:root {
    --header-green: #1f5c42;
    --header-green-dark: #174a35;

    --header-red: #6B1E11;
    --header-red-dark: #8a2818;

    --header-text: #1f2937;
    --header-border: #dbe4dc;

    --header-shadow-soft: 0 6px 18px rgba(0,0,0,0.06);
    --header-shadow: 0 10px 30px rgba(0,0,0,0.08);

    --radius: 12px;
}

/* RESET */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(92%, 1440px);
    margin: 0 auto;
}

/* HEADER */
.site-header {
    width: 100%;
    position: relative;
    z-index: 1000;
}

/* =========================
   TOPBAR (ROJO VINO)
========================= */
.topbar {
    background: linear-gradient(90deg, var(--header-red) 0%, var(--header-red-dark) 100%);
    color: #fff;
}

.topbar-content {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
}

.topbar-email {
    font-size: 0.95rem;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.topbar-email:hover {
    opacity: 0.85;
}

.topbar-right {
    gap: 14px;
}

.topbar-right a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.topbar-right a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.topbar-right i {
    font-size: 1.4rem;
}

/* BOTÓN EDUFÁCIL */
.edufacil-link {
    background: rgba(255,255,255,0.15);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 700;
    transition: 0.2s ease;
}

.edufacil-link:hover {
    background: rgba(255,255,255,0.25);
}

/* =========================
   NAVBAR (VERDE)
========================= */
.mainbar {
    background: linear-gradient(90deg, var(--header-green) 0%, var(--header-green-dark) 100%);
    box-shadow: var(--header-shadow-soft);
}

.mainbar-content {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* LOGO */
.site-logo {
    display: inline-flex;
    align-items: center;
}

.site-logo img {
    height: 78px;
    object-fit: contain;
}

/* =========================
   NAV
========================= */
.main-nav {
    margin-left: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    position: relative;
    padding: 8px 2px;
    transition: 0.2s ease;
}

.main-nav a:hover {
    opacity: 0.85;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background: #ffffff;
    border-radius: 999px;
    transition: width 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a.active {
    opacity: 1;
}

/* =========================
   MENU TOGGLE (MOBILE)
========================= */
.menu-toggle {
    display: none;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}

.menu-toggle span {
    width: 22px;
    height: 3px;
    background: #ffffff;
    border-radius: 999px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
    .topbar-content {
        flex-direction: column;
        padding: 12px 0;
        gap: 10px;
    }

    .mainbar-content {
        position: relative;
    }

    .menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        background: #ffffff;
        border: 1px solid var(--header-border);
        border-radius: 16px;
        box-shadow: var(--header-shadow);
        padding: 16px;
        display: none;
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .main-nav a {
        width: 100%;
        padding: 10px;
        border-radius: 8px;
        color: var(--header-text);
    }

    .main-nav a:hover {
        background: #f4f8f5;
        color: var(--header-green);
    }

    .main-nav a::after {
        display: none;
    }

    .site-logo img {
        height: 68px;
    }
}

@media (max-width: 576px) {
    .container {
        width: 94%;
    }

    .topbar-email {
        text-align: center;
        font-size: 0.9rem;
    }

    .site-logo img {
        height: 60px;
    }
}