/* ==========================================================================
   RESET & VARIÁVEIS DE SISTEMA
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Elimina o scroll para a direita */
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit; /* Força paddings a ficarem dentro do tamanho definido */
}

:root {
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --primary-dark: #0d1527;
    --accent-orange: #d97706;
    --accent-yellow-bg: #fef3c7;
    --accent-yellow-text: #b45309;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ==========================================================================
   NAVBAR & HEADER
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    width: 100%;
}

.logo {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--primary-dark);
}

.logo .dot {
    color: var(--accent-orange);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    margin: 0 1.2rem;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-orange);
}

.btn-portal {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    text-decoration: none;
    padding: 0.7rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.5px;
    transition: opacity 0.3s;
}

.btn-portal:hover {
    opacity: 0.9;
}

.btn-portal-mobile {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2100;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary-dark);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 7rem 5%;
    background-color: var(--bg-white);
    width: 100%;
}

.badge {
    background-color: var(--accent-yellow-bg);
    color: var(--accent-yellow-text);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 3rem;
    max-width: 850px;
    color: var(--primary-dark);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero .highlight {
    color: var(--accent-orange);
}

.hero .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 650px;
    margin-bottom: 2.5rem;
}

.btn-primary {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    text-decoration: none;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 6px;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* ==========================================================================
   QUEM SOMOS & TRÍADE
   ========================================================================== */
.about-section {
    padding: 6rem 5%;
    background-color: var(--bg-light);
    width: 100%;
}

.about-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 5rem;
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.purpose-card {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    padding: 2.5rem;
    border-radius: 16px;
}

.purpose-card h3 {
    color: var(--accent-orange);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.triad-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.triad-card {
    background-color: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.triad-card .icon {
    font-size: 2.2rem;
    color: var(--accent-orange);
    margin-bottom: 1rem;
}

.triad-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.triad-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ==========================================================================
   SERVIÇOS
   ========================================================================== */
.services-section {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    padding: 6rem 5%;
    text-align: center;
    width: 100%;
}

.services-section h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    opacity: 0.7;
    margin-bottom: 4rem;
    font-size: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.service-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    text-align: left;
}

.service-card .icon-service {
    font-size: 2rem;
    color: var(--accent-orange);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.service-card p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact-section {
    padding: 6rem 5%;
    background-color: var(--bg-light);
    text-align: center;
    width: 100%;
}

.contact-container {
    background-color: var(--bg-white);
    max-width: 950px;
    margin: 0 auto;
    border-radius: 24px;
    padding: 3.5rem;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 4rem;
    text-align: left;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

.contact-info h3 {
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item i {
    font-size: 1.3rem;
    color: var(--accent-orange);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.form-group input, 
.form-group textarea {
    background-color: #f1f5f9;
    border: 2px solid transparent;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    width: 100%;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
    background-color: var(--bg-white);
}

.btn-submit {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

/* ==========================================================================
   MEDIA QUERIES (SISTEMA FLUIDO ANTI-ESPREMIMENTO)
   ========================================================================== */

@media (max-width: 1024px) {
    .about-container { grid-template-columns: 1fr; gap: 2.5rem; }
    .triad-container { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar { padding: 1rem 5%; }
    .menu-toggle { display: flex; }

    /* Menu Lateral Isolado sem quebrar o viewport */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; 
        width: 280px;
        max-width: 80%;
        height: 100vh;
        background-color: var(--bg-white);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 6rem 2rem;
        gap: 1.5rem;
        transition: right 0.3s ease-in-out;
        z-index: 2000;
    }

    .nav-links.active { right: 0; }
    .nav-links a { margin: 0; width: 100%; padding-bottom: 0.6rem; border-bottom: 1px solid #f1f5f9; }

    .navbar > .btn-portal { display: none; }
    .btn-portal-mobile {
        display: block !important;
        background-color: var(--primary-dark);
        color: var(--bg-white) !important;
        text-align: center;
        padding: 0.8rem;
        border-radius: 6px;
        font-weight: 700;
        width: 100%;
        margin-top: 1rem;
    }

    /* Transformação do Hambúrguer para X */
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    /* Reset de Spacing para Mobile - Força largura total utilizável */
    .hero, .about-section, .services-section, .contact-section {
        padding: 3.5rem 1rem !important;
    }

    .hero h1 { font-size: 1.95rem; }

    /* Converte todas as grids em blocos verticais fluidos */
    .about-container, .triad-container, .services-grid, .contact-container {
        display: flex;
        flex-direction: column;
        width: 100% !important;
        max-width: 100% !important;
        padding: 1.5rem 1rem !important;
        gap: 1.5rem;
    }

    .purpose-card, .triad-card, .service-card {
        width: 100% !important;
        padding: 1.5rem !important;
    }

    .contact-info { text-align: center; }
    .info-item { justify-content: center; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.7rem; }
}