

:root {
    --primary-color: #192335;
    --secondary-color: #00a551;
    --tercery-color: #ffffff;
    --background-color: #f4f4f4;
    --text-color: #192335;
    --font-family: "inherit", sans-serif;
}

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

body {
    background-color: var(--background-color);
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    font-family: var(--font-family);
    color: var(--text-color);
}

/* --------------------- HEADER --------------------- */
.header {
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(0.75rem, 2vw, 1.2rem) clamp(2%, 4vw, 8%) clamp(0.75rem, 2vw, 1.2rem) clamp(2%, 3vw, 4%);
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo */
.header__logo img {
    height: clamp(32px, 5vw, 60px);
    width: auto;
}

/* Contenedor de nav y botón suscribirse */
.header__right {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2rem);
}

/* Menú horizontal */
.header__nav .nav__list {
    display: flex;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.header__nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    align-items: center;
}

/* Flecha del dropdown con rotación */
.arrow {
    display: inline-block;
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
}

.arrow.open {
    transform: rotate(180deg);
}

/* Botón Suscribirse */
.header__cta .btn-suscribirse {
    background: linear-gradient(90deg, #00a551, #a3dc35);
    color: white;
    font-weight: bold;
    padding: clamp(0.5rem, 1.5vw, 0.6rem) clamp(1rem, 2.5vw, 1.5rem);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.header__cta .btn-suscribirse:hover {
    opacity: 0.9;
}

/* --------------------- DROPDOWN --------------------- */
.nav__dropdown {
    position: static;
}

.dropdown__toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

.dropdown__toggle:focus {
    outline: none;
}

.dropdown__toggle .arrow {
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
}


@media (min-width: 1076px) {
    .dropdown__menu {
        position: absolute;
        top: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        max-width: 800px;
        min-width: 650px;
        height: auto;
        background: #ffffff;
        display: none;
        z-index: 99;
        padding: 1.5rem 2rem 1.8rem;
        border-radius: 14px;
        box-shadow: 0 6px 28px rgba(0, 0, 0, 0.12);
        align-items: flex-start;
        justify-content: space-between;
        gap: 1.8rem;
        overflow: visible;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.25s ease, transform 0.25s ease;
        pointer-events: none;
        border: 1px solid rgba(0, 165, 81, 0.08);
    }

    .dropdown__menu.active {
        display: flex;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    /* --------------------- COLUMNAS ULTRA COMPACTAS --------------------- */
    .modules-column {
        flex: 1;
        width: 100%;
        max-width: 100%;
    }

    .modules-column h4 {
        font-size: 0.8rem;
        font-weight: 700;
        color: #004d26;
        display: inline-block;
        padding: 0.4rem 0.9rem;
        margin-bottom: 0.9rem;
        background: linear-gradient(90deg, rgba(0, 165, 81, 0.1), rgba(163, 220, 53, 0.1));
        border-left: 3px solid #00a551;
        border-radius: 4px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .modules-columns {
        display: grid;
        grid-template-columns: 1fr 280px;
        gap: 1.8rem;
        align-items: start;
        width: 100%;
    }

    span.resaltado {
        font-size: 1.25rem;
        font-weight: 900;
        background: linear-gradient(90deg, #00a551, #a3dc35);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        display: inline-block;
    }

    .modules-columns ul {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.15rem;
        width: 100%;
    }

    .modules-columns li {
        list-style: none;
        transition: transform 0.2s ease;
        width: 100%;
    }

    .modules-columns li:hover {
        transform: translateX(3px);
    }

    .modules-columns li a {
        display: flex;
        align-items: center;
        padding: 0.45rem 0.9rem;
        color: var(--primary-color);
        background-color: transparent;
        border-radius: 6px;
        font-size: 0.875rem;
        font-weight: 500;
        transition: all 0.25s ease;
        position: relative;
        padding-left: 1.9rem;
        width: 100%;
        line-height: 1.3;
    }

    /* Icono decorativo antes del enlace */
    .modules-columns li a::before {
        content: '▸';
        position: absolute;
        left: 0.6rem;
        color: #00a551;
        font-size: 1rem;
        font-weight: bold;
        opacity: 0;
        transform: translateX(-3px);
        transition: all 0.25s ease;
    }

    .modules-columns li a:hover::before {
        opacity: 1;
        transform: translateX(0);
    }

    .modules-columns li a:hover {
        background: linear-gradient(90deg, rgba(0, 165, 81, 0.08), rgba(163, 220, 53, 0.08));
        color: #004d26;
    }

    /* --------------------- CARD ULTRA COMPACTA --------------------- */
    .card-column {
        display: flex;
        align-items: stretch;
        justify-content: center;
        width: 100%;
    }

    .card {
        background: linear-gradient(135deg, #2d2a7c 0%, #1f1d52 100%);
        border-radius: 12px;
        padding: 1.1rem 0.9rem 1.2rem;
        box-shadow: 0 5px 18px rgba(0, 0, 0, 0.15);
        text-align: center;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
        overflow: hidden;
    }

    /* Efecto de brillo sutil en la card */
    .card::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
        pointer-events: none;
    }

    .card img {
        width: 100%;
        height: auto;
        border-radius: 8px;
        margin-bottom: 0.7rem;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
        position: relative;
        z-index: 1;
    }

    .card p {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--tercery-color);
        line-height: 1.35;
        margin-bottom: 0.9rem;
        position: relative;
        z-index: 1;
    }

    .card button {
        background: white;
        color: #2c2c94;
        border: 2px solid transparent;
        padding: 0.55rem 1.1rem;
        border-radius: 7px;
        cursor: pointer;
        font-weight: 700;
        font-size: 0.85rem;
        transition: all 0.3s ease;
        position: relative;
        z-index: 1;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    }

    .card button:hover {
        background: linear-gradient(90deg, #00a551, #a3dc35);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 16px rgba(0, 165, 81, 0.3);
    }
}

/*  HAMBURGUESA  */
.header__burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
    z-index: 102;
    position: relative;
    width: clamp(24px, 4vw, 28px);
    height: clamp(20px, 3.5vw, 24px);
}

.burger-line {
    display: block;
    width: 100%;
    height: 3px;
    background: #00a551;
    margin: clamp(4px, 1vw, 5px) 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-line:first-child {
    transform-origin: top left;
}

.burger-line:last-child {
    transform-origin: bottom left;
}

/* Animación del icono hamburguesa a X */
.header__burger.open .burger-line:first-child {
    transform: rotate(45deg) translateY(-2px);
}

.header__burger.open .burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.header__burger.open .burger-line:last-child {
    transform: rotate(-45deg) translateY(2px);
}

/* ----------- RESPONSIVE: TABLET (768px - 1075px) ----------- */
@media (max-width: 1075px) and (min-width: 768px) {
    .header {
        padding: 1rem 4%;
    }

    .header__nav .nav__list {
        gap: 1rem;
    }

    .dropdown__menu {
        height: auto;
        max-height: 70vh;
        padding: 1.5rem 2rem;
    }

    .modules-columns {
        flex-wrap: wrap;
        padding: 0 1rem;
    }

    .card-column {
        flex-basis: 100%;
        margin-top: 1rem;
    }
}

/* ----------- RESPONSIVE: MOBILE (< 1075px) ----------- */
@media (max-width: 1075px) {
    .header__burger {
        display: block;
    }

    .header__right {
        flex: 1;
        justify-content: flex-end;
    }

    .header__cta {
        display: none;
    }

    /* Menú lateral mejorado */
    .header__nav {
        position: fixed;
        top: 0;
        right: -110vw;
        width: clamp(280px, 80vw, 340px);
        max-width: 340px;
        height: 100vh;
        background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        padding: clamp(80px, 15vw, 100px) clamp(1.5rem, 4vw, 2rem) clamp(1.5rem, 4vw, 2rem);
        transition: right 0.35s cubic-bezier(0.78, 0.07, 0.3, 0.98);
        z-index: 101;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        overflow-y: auto;
        border-radius: 30px 0 0 30px;
    }

    .header__nav.open {
        right: 0;
    }

    /* Lista de navegación */
    .nav__list {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    /* Items del menú con diseño tipo card */
    .nav__list > li {
        width: 100%;
        background: #ffffff;
        border-radius: 12px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .nav__list > li:hover {
        background: linear-gradient(90deg, rgba(0, 165, 81, 0.05), rgba(163, 220, 53, 0.05));
        transform: translateX(5px);
        box-shadow: 0 4px 12px rgba(0, 165, 81, 0.1);
    }

    /* Enlaces con estilo mejorado */
    .header__nav a {
        color: #333;
        font-size: clamp(0.95rem, 2vw, 1.05rem);
        font-weight: 600;
        width: 100%;
        text-align: left;
        padding: 15px 20px;
        border-radius: 12px;
        display: block;
        position: relative;
        padding-left: 45px;
        transition: all 0.3s ease;
    }

    /* Icono decorativo tipo flecha */
    .header__nav a::before {
        content: '→';
        position: absolute;
        left: 18px;
        opacity: 0;
        transform: translateX(-10px);
        transition: all 0.3s ease;
        color: #00a551;
        font-weight: 700;
        font-size: 1.2rem;
    }

    .nav__list > li:hover a::before {
        opacity: 1;
        transform: translateX(0);
    }

    .header__nav a:hover {
        color: #00a551;
        background: transparent;
    }

    /* Dropdown toggle mejorado */
    .dropdown__toggle {
        color: #333;
        font-size: clamp(0.95rem, 2vw, 1.05rem);
        font-weight: 600;
        width: 100%;
        text-align: left;
        padding: 15px 20px 15px 45px;
        border-radius: 12px;
        justify-content: space-between;
        transition: all 0.3s ease;
        position: relative;
    }

    /* Icono para dropdown toggle */
    .dropdown__toggle::before {
        content: '▾';
        position: absolute;
        left: 18px;
        color: #00a551;
        font-size: 1.2rem;
        font-weight: 700;
        transition: all 0.3s ease;
    }

    .dropdown__toggle:hover {
        color: #00a551;
        background: transparent;
    }

    .dropdown__toggle .arrow {
        color: #00a551;
        font-size: 1.2rem;
        font-weight: 700;
        transition: transform 0.3s ease;
    }

    .dropdown__toggle .arrow.open {
        transform: rotate(180deg);
    }

    /* Menú dropdown en móvil */
    .dropdown__menu {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        max-height: 0;
        background: #f8f9fa !important;
        box-shadow: none !important;
        display: block !important;
        border-radius: 12px !important;
        margin: 8px 0 0 0 !important;
        padding: 0 !important;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
    }

    .dropdown__menu.active {
        max-height: 800px;
        padding: 15px 12px !important;
        border: 2px solid #e8f5e9;
    }

    /* Título de sección */
    .modules-column h4 {
        width: 100%;
        justify-content: flex-start;
        font-size: 0.8rem;
        color: #00a551;
        text-transform: uppercase;
        letter-spacing: 1px;
        border-bottom: 2px solid #00a551;
        margin-bottom: 10px;
        padding: 8px 12px 8px;
        font-weight: 700;
    }

    /* Columnas del dropdown */
    .modules-columns {
        flex-direction: column;
        gap: 12px;
        padding: 0;
    }

    .modules-columns ul {
        margin-bottom: 0;
        width: 100%;
    }

    /* Items del dropdown */
    .modules-columns li {
        width: 100%;
        margin-bottom: 6px;
        border-radius: 8px;
        background: #ffffff;
        transition: all 0.2s ease;
        overflow: hidden;
    }

    .modules-columns li:hover {
        background: linear-gradient(90deg, rgba(0, 165, 81, 0.08), rgba(163, 220, 53, 0.08));
        transform: translateX(8px);
    }

    .modules-columns li a {
        padding: 12px 15px 12px 38px;
        display: block;
        width: 100%;
        color: #555;
        font-size: 0.92rem;
        font-weight: 500;
        position: relative;
    }

    /* Bullet decorativo */
    .modules-columns li a::before {
        content: '•';
        position: absolute;
        left: 18px;
        color: #00a551;
        font-size: 1.3rem;
        line-height: 1;
    }

    .modules-columns li:hover a {
        color: #00a551;
    }

    /* Ocultar card en móvil */
    .card-column {
        display: none !important;
    }

    /* Animación de entrada para items */
    .header__nav.open .nav__list > li {
        animation: slideInFromRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        opacity: 0;
    }

    .header__nav.open .nav__list > li:nth-child(1) { animation-delay: 0.05s; }
    .header__nav.open .nav__list > li:nth-child(2) { animation-delay: 0.1s; }
    .header__nav.open .nav__list > li:nth-child(3) { animation-delay: 0.15s; }
    .header__nav.open .nav__list > li:nth-child(4) { animation-delay: 0.2s; }
    .header__nav.open .nav__list > li:nth-child(5) { animation-delay: 0.25s; }
    .header__nav.open .nav__list > li:nth-child(6) { animation-delay: 0.3s; }

    @keyframes slideInFromRight {
        from {
            opacity: 0;
            transform: translateX(30px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* ----------- RESPONSIVE: MOBILE PEQUEÑO (< 480px) ----------- */
@media (max-width: 480px) {
    .header {
        padding: 0.75rem 1rem;
    }

    .header__logo img {
        height: 32px;
    }

    .header__nav {
        width: 85vw;
        max-width: 300px;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .burger-line {
        width: 24px;
        height: 2.5px;
    }

    .header__nav a,
    .dropdown__toggle {
        font-size: 0.95rem;
        padding: 13px 18px 13px 40px;
    }

    .modules-columns li a {
        font-size: 0.88rem;
        padding: 11px 14px 11px 35px;
    }
}