/* =========================================================
   CSS: Estilização Profissional e Moderna - SIMAI Smart Mobility
   Inclui Diretrizes de Acessibilidade (WCAG)
========================================================= */

:root {
    --primary-blue: #0f4c81;
    --accent-blue: #00a8cc;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --white: #ffffff;
    --high-contrast-bg: #000000;
    --high-contrast-text: #ffffff;
    --high-contrast-accent: #ffff00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* =========================================================
   1. Acessibilidade (Skip Link, Foco e Barra Superior)
========================================================= */

/* Skip Link para navegação por teclado */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--primary-blue);
    color: var(--white);
    padding: 10px 15px;
    z-index: 2000;
    font-weight: bold;
    text-decoration: none;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Indicador de Foco Claro (Navegação por Teclado) */
*:focus-visible {
    outline: 3px solid #ffaa00;
    outline-offset: 2px;
}

/* Barra de Acessibilidade */
.accessibility-bar {
    background: #1e293b;
    padding: 8px 0;
    border-bottom: 1px solid #334155;
}

.accessibility-bar .nav-container {
    display: flex;
    justify-content: flex-end;
    padding: 0 2rem;
}

.accessibility-bar button {
    background: none;
    border: 1px solid #475569;
    color: var(--white);
    padding: 4px 12px;
    margin-left: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.accessibility-bar button:hover {
    background: #334155;
}

/* =========================================================
   2. Cabeçalho / Navbar
========================================================= */

header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky; /* Alterado para sticky para respeitar a barra de acessibilidade */
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent-blue);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

/* Botão Menu Mobile (Oculto no Desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
}

/* =========================================================
   3. Seção Hero (Destaque Principal)
========================================================= */

.hero {
    padding: 120px 2rem 100px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1a365d 100%);
    color: var(--white);
    text-align: center;
}

.badge-hero {
    display: inline-block;
    background-color: rgba(0, 168, 204, 0.2);
    color: #67e8f9;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1.25rem;
    color: #e2e8f0;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: var(--white);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: #008ba3;
    transform: translateY(-2px);
}

/* =========================================================
   4. Seções de Conteúdo e Cards
========================================================= */

.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 3rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border-bottom: 4px solid var(--accent-blue);
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
}

.card i {
    font-size: 2.5rem;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
}

.card h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* =========================================================
   5. Acordeões (Abas Expansíveis - Soluções)
========================================================= */

.accordion-container {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    overflow: hidden;
}

.accordion-item summary {
    padding: 1.2rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-blue);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-item summary::-webkit-details-marker {
    display: none;
}

.summary-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.summary-title i {
    color: var(--accent-blue);
}

.accordion-icon {
    color: var(--text-light);
    transition: transform 0.3s ease;
}

details[open] summary .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-dark);
    border-top: 1px solid transparent;
}

/* =========================================================
   6. Impacto Social
========================================================= */

.impact-section {
    background-color: var(--white);
    text-align: center;
    border-radius: 15px;
    margin-bottom: 4rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}

.impact-text {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* =========================================================
   7. Rodapé & Contactos
========================================================= */

footer {
    background-color: #0f172a;
    color: var(--white);
    text-align: center;
    padding: 4rem 2rem 2rem;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
}

.footer-container h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.footer-desc {
    color: #94a3b8;
    margin-bottom: 2rem;
}

.contact-info {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-style: normal;
}

.contact-info a {
    color: #38bdf8;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 3rem;
    font-size: 0.85rem;
    color: #64748b;
    border-top: 1px solid #1e293b;
    padding-top: 1.5rem;
}

/* =========================================================
   8. Modo de Alto Contraste (Ativado via JS)
========================================================= */

body.high-contrast {
    background-color: var(--high-contrast-bg) !important;
    color: var(--high-contrast-text) !important;
}

body.high-contrast header,
body.high-contrast footer,
body.high-contrast .card,
body.high-contrast .accordion-item,
body.high-contrast .impact-section {
    background-color: #111111 !important;
    border: 1px solid var(--high-contrast-text);
    color: var(--high-contrast-text) !important;
}

body.high-contrast a,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast .logo,
body.high-contrast summary {
    color: var(--high-contrast-accent) !important;
}

body.high-contrast .btn-primary {
    background-color: var(--high-contrast-accent) !important;
    color: var(--high-contrast-bg) !important;
    border: 2px solid var(--high-contrast-bg);
}

body.high-contrast i {
    color: var(--high-contrast-accent) !important;
}

/* =========================================================
   9. Responsividade Básica & Menu Mobile
========================================================= */

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 1rem 2rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    body.high-contrast .nav-links {
        background-color: #111111;
        border-bottom: 1px solid var(--high-contrast-text);
    }

    .hero h1 { font-size: 2rem; }
    .hero { padding: 80px 2rem 60px; }
    .contact-info { flex-direction: column; gap: 0.8rem; }
    .accessibility-bar .nav-container { justify-content: center; }
}