:root {
    --verde-principal: #007E67;
    --verde-oscuro: #004D40;
    --verde-claro: #80C3AF;
    --fondo: #F4F4F4;
    --naranja: #FF8300;
    --dorado: #B88E5B;
    --blanco: #FFFFFF;
    --footer-fondo: #3A424C;
    --footer-texto: #D0D3D6;
    --footer-secundario: #71849A;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}


body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* ====CONTENIDO PRINCIPAL======= */
main {
    flex: 1;
}


/* ====BARRA DE NAVEGACIÓN======= */
.navbar {
    width: 80%;
    min-height: 70px;
    margin: 0 auto 10px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    background-color: var(--verde-principal);
    color: var(--blanco);
    border-radius: 0 0 10px 10px;
}


/* ======LOGO=========== */
.navbar__logo {
    width: 130px;
    height: auto;
    margin-right: 50px;
    padding: 10px 0;
    object-fit: contain;
}


/* =====MENU PRINCIPAL======= */
.navbar__menu {
    display: flex;
    align-items: stretch;
    height: 70px;
    margin-left: auto;
    list-style: none;
}


/* Elementos principales */
.navbar__item {
    position: relative;
    width: 100%;
}


/* =====ENLACES PRINCIPALES======= */
.navbar__menu > .navbar__item {
    display: flex;
    align-items: center;
    width: auto;
}

.navbar__link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    padding: 10px 16px;
    color: var(--blanco);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        padding-left 0.2s ease;
}

.navbar__menu > .navbar__item > .navbar__link {
    height: 100%;
    padding: 0 15px;
    font-size: 17px;
    font-weight: 300px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}


/* =====HOVER DEL MENÚ PRINCIPAL======= */
.navbar__menu > .navbar__item:hover > .navbar__link {
    background-color: var(--verde-oscuro);
    color: var(--blanco);
}


/* ======SUBMENÚ========= */
.navbar__submenu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 240px;
    list-style: none;
    background-color: var(--verde-oscuro);
    border-top: 3px solid var(--naranja);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}


/* Mostrar submenú */
.navbar__item--has-submenu:hover > .navbar__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* =====ELEMENTOS DEL SUBMENÚ===== */
.navbar__submenu .navbar__item {
    position: relative;
}


/* ======ENCABEZADOS DE SUBMENÚ====== */
.navbar__heading {
    display: block;
    width: 100%;
    padding: 10px 16px;
    color: var(--verde-claro);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.2px;
    cursor: default;
}


/* =====HOVER DE LOS ELEMENTOS===== */
.navbar__submenu .navbar__item:hover > .navbar__link {
    padding-left: 21px;
    background-color: var(--verde-principal);
    color: var(--blanco);
}


/* Evitar hover en encabezados */
.navbar__submenu .navbar__item:hover > .navbar__heading {
    padding-left: 16px;
    background-color: transparent;
    color: var(--verde-claro);
}


/* ====SUBMENÚ NIVEL 2==== */
.navbar__submenu--nested {
    top: -3px;
    left: 100%;
    min-width: 250px;
}


/* =====FLECHAS DE SUBMENÚ===== */
.navbar__item--has-submenu > .navbar__link::after,
.navbar__item--has-submenu > .navbar__heading::after {
    margin-left: auto;
    color: var(--verde-claro);
    font-size: 8px;
}


/* Flecha principal */
.navbar__menu > .navbar__item--has-submenu > .navbar__link::after,
.navbar__menu > .navbar__item--has-submenu > .navbar__heading::after {
    content: "▼";
    margin-left: 8px;
    font-size: 7px;
    transition: transform 0.2s ease;
}


/* Girar flecha */
.navbar__menu > .navbar__item--has-submenu:hover > .navbar__link::after,
.navbar__menu > .navbar__item--has-submenu:hover > .navbar__heading::after {
    transform: rotate(180deg);
}


/* Flecha secundaria */
.navbar__submenu .navbar__item--has-submenu > .navbar__link::after,
.navbar__submenu .navbar__item--has-submenu > .navbar__heading::after {
    content: "▶";
    float: right;
}


/* ====ACENTO DORADO=== */
.navbar__submenu .navbar__item--has-submenu:hover > .navbar__link::after {
    color: var(--dorado);
}


/* ====ACENTO NARANJA=== */
.navbar__submenu {
    border-top-color: var(--naranja);
}


/* ======RESPONSIVO====== */
@media (max-width: 1100px) {
    .navbar {
        width: 100%;
        border-radius: 0;
    }

    .navbar__logo {
        width: 110px;
        margin-right: 15px;
    }

    .navbar__menu > .navbar__item > .navbar__link {
        padding: 0 10px;
        font-size: 13px;
    }
}


/*----------------------------------------------------------*/


/* ====FOOTER======= */
.footer {
    position: relative;
    width: 100%;
    padding: 80px 11%;
    background-color: var(--footer-fondo);
    color: var(--blanco);
}


/* ====CONTENIDO DEL FOOTER======= */
.footer__content {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 1.2fr 1.3fr;
    gap: 70px;
    max-width: 1250px;
    margin: 0 auto;
}


/* ====SECCIONES======= */
.footer__section {
    min-width: 0;
}


/* ====TÍTULOS======= */
.footer__title {
    margin: 0 0 22px;
    color: var(--blanco);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}


/* ====LISTAS======= */
.footer__list {
    margin: 0;
    padding: 0;
    list-style: none;
}


/* ====ELEMENTOS DE LISTA======= */
.footer__list li {
    margin-bottom: 8px;
}


/* ====ENLACES======= */
.footer__list a {
    color: var(--footer-secundario);
    text-decoration: none;
    font-size: 12px;
    line-height: 1.45;
    transition:
        color 0.2s ease,
        padding-left 0.2s ease;
}


/* ====ENLACE DESTACADO======= */
.footer__list .footer__link--highlight {
    color: var(--verde-principal);
}


/* ====HOVER DE ENLACES======= */
.footer__list a:hover {
    color: var(--blanco);
    padding-left: 4px;
}


/* ====BANNERS======= */
.footer__banners {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}


/* ====BANNER======= */
.footer__banner {
    display: block;
    width: 200px;
    overflow: hidden;
    border-radius: 18px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* ====IMAGEN DEL BANNER======= */
.footer__banner img {
    display: block;
    width: 100%;
    height: auto;
}


/* ====HOVER DE BANNER======= */
.footer__banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}


/* ====CONTACTO======= */
.footer__contact p,
.footer__contact address {
    margin: 0 0 10px;
    color: var(--footer-texto);
    font-size: 14px;
    line-height: 1.25;
}


/* ====DIRECCIÓN======= */
.footer__contact address {
    font-style: italic;
}


/* ====NOMBRE DE CONALEP======= */
.footer__contact address strong {
    color: var(--blanco);
    font-weight: 700;
}


/* ====CORREO======= */
.footer__email {
    margin-top: 20px !important;
}

.footer__email a {
    color: var(--footer-texto);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer__email a:hover {
    color: var(--blanco);
}


/* ====PARTE INFERIOR======= */
.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1250px;
    margin: 75px auto;
    padding-top: 25px;
    border-top: 1px solid rgba(208, 211, 214, 0.18);
}


/* ====MARCA INSTITUCIONAL======= */
.footer__brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer__brand-logo {
    width: 85px;
    height: auto;
    opacity: 0.45;
}

.footer__brand p {
    margin: 0;
    color: var(--footer-secundario);
    font-size: 14px;
}

.footer__brand strong {
    color: var(--footer-secundario);
    font-weight: 700;
}


/* ====ENLACES INFERIORES======= */
.footer__bottom-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.footer__bottom-links a {
    color: var(--footer-secundario);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer__bottom-links a:hover {
    color: var(--blanco);
}


/* ====BOTÓN VOLVER ARRIBA======= */
.footer__back-to-top {
    position: absolute;
    right: 18px;
    bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: var(--verde-principal);
    color: var(--blanco);
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.footer__back-to-top:hover {
    background-color: var(--verde-oscuro);
    color: var(--blanco);
    transform: translateY(-2px);
}


/* ====RESPONSIVO FOOTER======= */
@media (max-width: 1100px) {
    .footer {
        padding: 65px 7% 25px;
    }

    .footer__content {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px;
    }

    .footer__bottom {
        margin-top: 60px;
    }
}


/* ====CELULAR FOOTER======= */
@media (max-width: 600px) {
    .footer {
        padding: 50px 25px 25px;
    }

    .footer__content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer__title {
        font-size: 17px;
    }

    .footer__list a {
        font-size: 14px;
    }

    .footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
        margin-top: 45px;
    }

    .footer__bottom-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .footer__brand {
        align-items: flex-start;
    }

    .footer__brand-logo {
        width: 70px;
    }

    .footer__back-to-top {
        right: 15px;
        bottom: 15px;
    }
}

.navbar__toggle,
        .navbar__caret { display: none; }

        @media (max-width: 1100px) {
            .navbar {
                position: relative;
                display: flex;
                flex-wrap: wrap;
                align-items: center;
                justify-content: space-between;
            }

            /* Botón hamburguesa */
            .navbar__toggle {
                display: inline-flex;
                flex-direction: column;
                justify-content: center;
                gap: 5px;
                width: 44px;
                height: 44px;
                padding: 10px;
                margin-left: auto;
                background: transparent;
                border: 0;
                cursor: pointer;
            }
            .navbar__toggle-bar {
                display: block;
                width: 100%;
                height: 3px;
                background: #fff;
                border-radius: 2px;
                transition: transform .25s ease, opacity .2s ease;
            }
            .navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
            .navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(2) { opacity: 0; }
            .navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

            /* Menú principal: oculto hasta abrirlo */
            .navbar .navbar__menu {
                display: none !important;
                flex-direction: column;
                position: fixed !important;
                top: var(--navbar-bottom, 70px) !important;
                left: 0 !important;
                right: 0 !important;
                z-index: 9999;
                box-sizing: border-box;
                width: auto !important;
                height: auto !important;
                max-height: calc(100vh - var(--navbar-bottom, 70px)) !important;
                overflow-x: hidden;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
                margin: 0;
                padding: 0;
                list-style: none;
                background: var(--navbar-mobile-bg, #00785f); /* cambia este color si tu header es de otro verde */
            }
            .navbar .navbar__menu.is-open { display: flex !important; }

            .navbar .navbar__item {
                display: flex;
                flex-wrap: wrap;
                align-items: stretch;
                position: static;
                box-sizing: border-box;
                width: 100%;
                height: auto !important;
                max-height: none !important;
                border-top: 1px solid rgba(255, 255, 255, .15);
            }
            .navbar .navbar__link {
                flex: 1 1 0;
                min-width: 0;
                display: block;
                padding: 14px 16px;
                color: #fff;
                text-decoration: none;
            }

            /* Flecha para abrir/cerrar cada submenú */
            .navbar__caret {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 48px;
                padding: 0;
                background: transparent;
                border: 0;
                border-left: 1px solid rgba(255, 255, 255, .15);
                color: #fff;
                cursor: pointer;
            }
            .navbar__caret::before {
                content: "";
                width: 8px;
                height: 8px;
                margin-top: -4px;
                border-right: 2px solid currentColor;
                border-bottom: 2px solid currentColor;
                transform: rotate(45deg);
                transition: transform .2s ease;
            }
            .navbar__item.is-open > .navbar__caret::before {
                margin-top: 4px;
                transform: rotate(-135deg);
            }

            /* Quita las flechas del diseño de escritorio para no duplicarlas */
            .navbar__item--has-submenu > .navbar__link::after,
            .navbar__item--has-submenu::after { content: none !important; display: none !important; }

            /* Submenús: en bloque, sin hover, se abren con .is-open */
            .navbar .navbar__submenu {
                position: static !important;
                display: none !important;
                flex-basis: 100%;
                width: 100% !important;
                min-width: 0 !important;
                max-height: none !important;
                margin: 0;
                padding: 0;
                list-style: none;
                opacity: 1 !important;
                visibility: visible !important;
                transform: none !important;
                box-shadow: none !important;
                border: 0;
                background: rgba(0, 0, 0, .18) !important;
            }
            .navbar .navbar__item.is-open > .navbar__submenu { display: block !important; }

            /* Sangría por nivel */
            .navbar .navbar__submenu .navbar__link { padding-left: 32px; }
            .navbar .navbar__submenu .navbar__submenu .navbar__link { padding-left: 48px; }
            .navbar .navbar__submenu .navbar__submenu .navbar__submenu .navbar__link { padding-left: 64px; }
        }