/* =========================================
   FICHEIRO CSS PRINCIPAL (PÁGINA INICIAL)
   =========================================
   Este ficheiro contém as variáveis de cores globais, definições base do site (como tipos de letra e resets),
   e todos os estilos visuais aplicados exclusivamente à página principal (index.html).
*/

/* --- Resets Básicos e Variáveis --- */
:root {
    --primary: #0a3d62;       /* Azul escuro institucional */
    --primary-light: #3c6382; /* Azul médio para hover */
    --accent: #f6b93b;        /* Amarelo/Ouro do logo para detalhes */
    --text-dark: #1e272e;     /* Cinza quase preto para melhor leitura */
    --text-muted: #7f8c8d;    /* Cinza suave para subtítulos */
    --bg-light: #f8f9fa;      /* Fundo cinza claro */
    --bg-dark: #111;
    --card-bg: #ffffff;
    --max-width: 1200px;
    --border-radius: 16px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Reset básico para garantir consistência entre navegadores */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Habilita a rolagem suave para âncoras */
html {
    scroll-behavior: smooth;
}

/* --- Estilização Global --- */
body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- Estilização do Cabeçalho (Header) --- */
header {
    background-color: #ffffff;
    padding: 20px 0;
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.site-logo {
    height: 50px;
    width: auto;
    display: block;
}
.site-title {
    font-size: 22px;
    font-weight: 800;
    color: black;
    letter-spacing: -0.5px;
}

/* --- Menu Principal --- */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}
.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding-bottom: 6px;
    border-bottom: 2px solid transparent;
    display: inline-block;
    line-height: 1;
}
.main-nav a:hover, .active-link {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--accent) !important;
}

/* Menu Dropdown */
.main-nav > ul > li {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
}
.menu-item-dropdown {
    position: relative; 
    display: inline-flex;
    align-items: center;
}
.main-nav ul .dropdown-menu {
    display: none !important; 
    position: absolute; 
    top: 100%; 
    left: 50%; 
    transform: translateX(-50%); 
    background-color: #ffffff !important; 
    min-width: 180px; 
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.12); 
    z-index: 9999; 
    list-style-type: none !important; 
    padding: 12px 0 8px 0 !important; 
    border-radius: 6px; 
}
.dropdown-menu li {
    display: block !important;
    width: 100% !important;
}
.dropdown-menu li a {
    color: #2c3e50 !important; 
    padding: 10px 20px !important; 
    text-decoration: none !important; 
    display: block !important; 
    text-align: center !important; 
    font-size: 13px !important; 
    font-weight: 600 !important;
    text-transform: uppercase; 
    border-bottom: none !important;
    background: none !important;
    transition: background-color 0.2s;
}
.dropdown-menu li a:hover {
    background-color: #f8f9fa !important; 
    color: #0a3d62 !important; 
}
.menu-item-dropdown:hover .dropdown-menu {
    display: block !important;
}
.menu-item-dropdown:hover .main-link {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--accent) !important;
}

/* --- Estilos do Carrossel (Slider) --- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 680px; 
    overflow: hidden;
    background-color: #000;
}

.slider-container {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
    overflow: hidden;
    background-color: #000000; 
}

.slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover; 
    background-position: center center; 
    background-repeat: no-repeat;
    z-index: 1;
}

.slide-background::before,
.slide-background::after {
    display: none !important;
}

.slide::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45); 
    z-index: 2;
    pointer-events: none;
}

.slide-content {
    position: relative;
    z-index: 10; 
    max-width: 800px;
    padding: 0 24px;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-content h1, .slide-content p, .slide-content span {
    color: #ffffff !important;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    font-size: 24px;
    padding: 16px 20px;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
    transition: background 0.3s;
}

.slider-arrow:hover {
    background: var(--accent);
    color: var(--text-dark);
}

.prev-arrow { left: 20px; }
.next-arrow { right: 20px; }

.slider-dots {
    position: absolute;
    bottom: 25px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 20; 
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--accent); 
    width: 32px; 
    border-radius: 50px;
}

/* --- Secção Hero (Apresentação Principal) --- */
section:first-of-type {
    padding: 100px 24px;
    background: radial-gradient(circle at top right, rgba(246, 185, 59, 0.08), transparent), 
                radial-gradient(circle at bottom left, rgba(10, 61, 98, 0.03), transparent);
    text-align: center;
}

section:first-of-type span {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--text-muted);
    display: inline-block;
    margin-bottom: 12px;
}

section h1 {
    font-size: 48px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

section h1 span {
    color: var(--text-muted);
    font-weight: 400;
    display: block;
    font-size: 32px;
    margin-top: 8px;
}

section p {
    font-size: 18px;
    color: #4b5563;
    max-width: 700px;
    margin: 0 auto 32px auto;
}

/* --- Secção História e Números --- */
#historia {
    padding: 90px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

#historia h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 24px;
}

#historia p {
    font-size: 16px;
    color: #57606f;
    max-width: 800px;
    margin: 0 auto 16px auto;
}

#historia > div:last-child {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

#historia > div:last-child > div {
    background-color: var(--card-bg);
    padding: 32px 20px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

#historia > div:last-child > div::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

#historia > div:last-child > div:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

#historia > div:last-child > div:hover::after {
    transform: scaleX(1);
}

#historia > div:last-child p:first-child {
    font-size: 38px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 4px;
}

#historia > div:last-child p:last-child {
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin: 0;
}

/* --- Estilização do Rodapé --- */
footer {
    background-color: var(--bg-dark);
    color: #ffffff;
    text-align: center;
    padding: 40px 24px;
    margin-top: 60px;
}
footer p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 12px;
}
footer a.facebook-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
footer a.facebook-link:hover {
    opacity: 0.8;
    text-decoration: none;
}
.fb-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* --- Responsividade --- */
@media (max-width: 768px) {
    /* Cabeçalho */
    header {
        padding: 12px 0 !important;
    }
    .header-container {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        padding: 0 15px !important;
    }
    .logo-wrapper {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        margin-bottom: 0 !important;
        gap: 6px !important;
    }
    .site-logo {
        max-height: 45px !important; 
        width: auto !important;
    }
    .site-title {
        font-size: 14px !important;
        line-height: 1.3 !important;
        max-width: 90%;
        margin: 0 !important;
    }

    /* Menu Horizontal Responsivo */
    .main-nav {
        width: 100% !important;
        display: block !important;
    }
    .main-nav ul {
        display: flex !important;
        flex-direction: row !important; 
        flex-wrap: wrap !important;     
        justify-content: center !important;
        align-items: center !important;
        gap: 4px 10px !important;       
        padding: 4px 0 !important;
        background-color: transparent !important;
        box-shadow: none !important;
    }
    .main-nav > ul > li {
        width: auto !important;         
        padding: 0 !important;
        border-bottom: none !important; 
    }
    .main-nav a {
        font-size: 12px !important;     
        padding: 6px 8px !important;    
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px;
        border-bottom: none !important; 
    }

    /* Dropdown no mobile */
    .menu-item-dropdown {
        position: relative !important;
    }
    .main-nav ul .dropdown-menu {
        position: absolute !important;  
        top: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) !important; 
        background-color: #ffffff !important;
        min-width: 150px !important;
        box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.15) !important; 
        border-radius: 6px !important;
        padding: 6px 0 !important;
        display: none !important;       
        z-index: 99999 !important;      
    }
    .dropdown-menu li {
        display: block !important;
        width: 100% !important;
    }
    .dropdown-menu li a {
        font-size: 11px !important;
        padding: 8px 12px !important;
        text-align: center !important;
        color: var(--primary) !important;
    }
    .menu-item-dropdown:hover .dropdown-menu,
    .menu-item-dropdown:active .dropdown-menu,
    .menu-item-dropdown:focus-within .dropdown-menu {
        display: block !important;
    }

    /* Setas do Slider no Mobile */
    .slider-arrow {
        font-size: 16px !important;
        padding: 10px 12px !important;
    }
    .prev-arrow {
        left: 5px !important;
    }
    .next-arrow {
        right: 5px !important;
    }
}