/* ==========================================================================
   Variáveis e Paleta de Cores Premium
   ========================================================================== */
   :root {
    /* Cores Principais */
    --color-primary: #00567A; 
    --color-primary-dark: #003a52; 
    --color-accent: #c2a675; /* Um tom areia/dourado suave para elegância */
    
    /* Fundo e Superfícies */
    --color-bg: #f8f9fa;
    --color-surface: #ffffff;
    
    /* Textos */
    --color-text-main: #2d3748;
    --color-text-muted: #718096;
    
    /* Efeitos */
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 15px 35px rgba(0, 86, 122, 0.08);
    --shadow-hover: 0 20px 45px rgba(0, 86, 122, 0.15);
    --radius-lg: 16px;
    --radius-md: 8px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Tipografia */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

/* ==========================================================================
   Reset e Estilos Globais
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

ul { list-style: none; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
}

/* ==========================================================================
   Cabeçalho (Glassmorphism)
   ========================================================================== */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px); /* Efeito de vidro desfocado */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-empresa {
    max-height: 120px;
    display: block;
    transition: var(--transition);
}

.logo-empresa:hover {
    transform: scale(1.02);
}

nav ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a {
    color: var(--color-text-main);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:not(.btn-destaque):hover {
    color: var(--color-accent);
}

/* ==========================================================================
   Botões
   ========================================================================== */
.btn-primary, .btn-destaque, .btn-enviar {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 30px; /* Estilo pílula moderno */
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary, .btn-enviar {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 86, 122, 0.2);
}

.btn-primary:hover, .btn-enviar:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 86, 122, 0.3);
}

.btn-destaque {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 10px 24px;
}

.btn-destaque:hover {
    background-color: var(--color-primary);
    color: white;
}

/* ==========================================================================
   Seção Hero (Gradiente Elegante)
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 10rem 0 8rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Elemento decorativo abstrato no fundo */
.hero::after {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.hero-accent {
    color: var(--color-accent);
    font-style: italic;
}

.hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.25rem;
    max-width: 650px;
    margin: 0 auto 3rem;
    font-weight: 300;
}

/* ==========================================================================
   Serviços (Cards Modernos)
   ========================================================================== */
.servicos {
    padding: 8rem 0;
    background-color: var(--color-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.card {
    background: var(--color-surface);
    padding: 3.5rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    position: relative;
    top: 0;
}

.card:hover {
    top: -10px;
    box-shadow: var(--shadow-hover);
}

.card-icon {
    margin-bottom: 2rem;
}

.card-icon img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    transition: var(--transition);
}

.card:hover .card-icon img {
    transform: scale(1.1);
}

.card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.card-link {
    color: var(--color-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card-link::after {
    content: '→';
    transition: transform 0.3s;
}

.card-link:hover::after {
    transform: translateX(5px);
}

/* ==========================================================================
   Clientes
   ========================================================================== */
.clientes {
    padding: 6rem 0 8rem;
    background-color: var(--color-surface);
}

.grid-clientes {
    display: flex;
    gap: 50px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4rem;
}

.cliente-item {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-surface);
    box-shadow: var(--shadow-md);
    padding: 25px;
    transition: var(--transition);
}

.cliente-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.logo-cliente {
    width: auto;
    height: auto;
    max-height: 90px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: var(--transition);
}

.cliente-item:hover .logo-cliente {
    filter: grayscale(0%) opacity(1);
}

/* ==========================================================================
   Página de Contato e Formulário Moderno
   ========================================================================== */
.page-contato {
    padding: 6rem 0;
    background-color: var(--color-bg);
}

.form-section {
    max-width: 750px;
    background: var(--color-surface);
    padding: 4rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.form-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Inputs com estilo "Filled" */
input, textarea {
    width: 100%;
    padding: 16px 20px;
    background-color: #f4f7f6;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: var(--font-body);
    color: var(--color-text-main);
    transition: var(--transition);
}

input::placeholder, textarea::placeholder {
    color: #a0aec0;
}

input:focus, textarea:focus {
    outline: none;
    background-color: var(--color-surface);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(0, 86, 122, 0.1);
}

.btn-enviar { width: 100%; margin-top: 1rem; }
.btn-enviar:disabled { background-color: var(--color-text-muted); cursor: not-allowed; }

#mensagemStatus {
    text-align: center;
    margin-top: 2rem;
    font-weight: 700;
}

/* ==========================================================================
   Rodapé
   ========================================================================== */
footer {
    padding: 4rem 0 3rem;
    background-color: var(--color-primary-dark);
    color: rgba(255,255,255,0.7);
    text-align: center;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.logo-footer {
    max-height: 100px;
    width: auto;
    display: block;
}

footer p { font-size: 14px; letter-spacing: 0.5px; }

/* ==========================================================================
   Responsividade (Telemóveis e Tablets)
   ========================================================================== */
@media (max-width: 768px) {
    /* Cabeçalho: Coloca a logo em cima e o menu em baixo, centrados */
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    nav a { 
        font-size: 13px; 
    }
    
    /* Hero Section: Reduz os textos e esconde o efeito que causa scroll lateral */
    .hero { 
        padding: 5rem 0 4rem; 
    }
    .hero h1 { 
        font-size: 2.2rem; 
    }
    .hero p { 
        font-size: 1.05rem; 
        padding: 0 10px; 
    }
    .hero::after { 
        display: none; /* Remove o gradiente gigante no telemóvel */
    }
    
    /* Serviços: Força a ficar numa única coluna */
    .section-header { 
        margin-bottom: 3rem; 
    }
    .section-header h2 { 
        font-size: 2rem; 
    }
    .cards {
        grid-template-columns: 1fr; /* 1 coluna em vez de tentar encaixar várias */
        gap: 25px;
    }
    .card { 
        padding: 2.5rem 1.5rem; 
    }
    
    /* Clientes: Reduz os círculos para caberem no ecrã */
    .grid-clientes { 
        gap: 15px; 
        margin-top: 2rem; 
    }
    .cliente-item {
        width: 120px; /* Círculos menores */
        height: 120px;
        padding: 15px;
    }
    .logo-cliente { 
        max-height: 60px; 
    }
    
    /* Formulário e Sobre (Ajustes de espaçamento) */
    .form-section { 
        padding: 2.5rem 1.5rem; 
    }
    .about-grid { 
        grid-template-columns: 1fr; 
        gap: 30px; 
        text-align: center; 
    }
    .about-text p { 
        text-align: center; 
    }
}

/* Ajuste extra para ecrãs muito estreitos (ex: iPhone SE) */
@media (max-width: 400px) {
    .cliente-item {
        width: 100px;
        height: 100px;
        padding: 10px;
    }
    .logo-cliente { 
        max-height: 50px; 
    }
    .hero h1 { 
        font-size: 1.9rem; 
    }
    .btn-destaque { 
        padding: 8px 12px; 
    }
}