:root {
    --primary-blue: #2C36E3;
    --azur: #2974EC;
    --turquoise: #17DAA4;
    --dark-gray: #454545;
    --light-bg: #F4F6F9;
    --white: #FFFFFF;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    --hover-shadow: 0 20px 40px rgba(44, 54, 227, 0.08);
    --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-gray);
    background-color: var(--light-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header optimizado: Elementos agrupados hacia la izquierda */
.site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
    .header-left-group {
        justify-content: space-between;
    }
    .logo-enovus {
        align-self: flex-end;
    }
}

.nav-guide-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    color: #1E293B;
}

.pulsing-text {
    animation: textPulse 1.8s infinite ease-in-out;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.bouncing-arrow {
    font-weight: 900;
    color: var(--turquoise);
    display: inline-block;
    animation: bounceIndicator 1.2s infinite ease-in-out;
}

@keyframes bounceIndicator {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.nav-modalities {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 4px;
}

.nav-mod-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-mod-link:hover {
    color: var(--primary-blue);
    background: #FFFFFF;
    border-color: var(--turquoise);
    box-shadow: 0 4px 12px rgba(23, 218, 164, 0.25);
}

/* LOGO ENOVUS+ INTACTO */
.logo-enovus {
    height: 30px;
    width: auto;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #161FB8, var(--primary-blue), var(--azur), #14B882, var(--turquoise));
    background-size: 400% 400%;
    animation: gradientAnimation 10s ease infinite;
    color: var(--white);
    padding: 5rem 0 6rem;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

@media(min-width: 768px) {
    .hero-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .hero-text {
        max-width: 58%;
    }
}

.hero-top-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.hero-divider {
    width: 60px;
    height: 3px;
    background: var(--turquoise);
    border-radius: 2px;
    margin-bottom: 1rem;
}

.hero-text h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

@media (min-width: 768px) {
    .hero-text h1 {
        font-size: 3.2rem;
    }
}

.hero-text p {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.95;
    line-height: 1.6;
}

/* LOGO CEFR AGRANDADO Y CON PERSPECTIVA 3D */
.hero-image-wrapper {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 2.5rem;
    border-radius: 26px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hero-image-wrapper:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(-5deg) scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.cefr-badge-img {
    width: 220px;
    height: auto;
    filter: brightness(0) invert(1) drop-shadow(0 6px 16px rgba(255, 255, 255, 0.5));
    transition: transform 0.4s ease;
}

.hero-image-wrapper:hover .cefr-badge-img {
    transform: scale(1.04);
}

/* Modality Intro Cards Grid */
.modalities-intro-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media(min-width: 768px) {
    .modalities-intro-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.modality-desc-card {
    background: var(--white);
    padding: 1.8rem;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    text-align: left;
    border: 1px solid #E2E8F0;
    position: relative;
    transition: var(--transition);
}

.modality-desc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
    border-color: transparent;
    background-image: linear-gradient(var(--white), var(--white)), linear-gradient(135deg, var(--primary-blue), var(--turquoise));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.mod-card-header-horizontal {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mod-icon-wrapper {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    background: rgba(41, 116, 236, 0.08);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modality-desc-card:hover .mod-icon-wrapper {
    background: linear-gradient(135deg, var(--primary-blue), var(--turquoise));
    color: var(--white);
    transform: scale(1.05);
}

.modality-desc-card h3 {
    font-size: 1.25rem;
    color: var(--dark-gray);
    font-weight: 800;
    transition: var(--transition);
}

.modality-desc-card:hover h3 {
    color: var(--primary-blue);
}

.modality-desc-card p {
    font-size: 0.9rem;
    color: #64748B;
    line-height: 1.5;
}

/* Levels Section */
.levels-section {
    padding: 3.5rem 0;
    text-align: center;
    position: relative;
    z-index: 5;
}

.section-modality-header {
    margin-bottom: 2rem;
}

.blue-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-blue);
}

@media(min-width: 768px) {
    .blue-section-title {
        font-size: 2.2rem;
    }
}

.section-title-line {
    width: 50px;
    height: 3px;
    background: var(--primary-blue);
    margin: 0.6rem auto 0;
    border-radius: 2px;
}

/* Sección 2 con fondo gris claro y sin línea superior */
.light-alt-section {
    background: #CBD5E1;
    border-top: none;
    padding-bottom: 3.5rem;
}

.section-heading-wrapper {
    margin-bottom: 1.8rem;
}

.section-heading-wrapper h3 {
    font-size: 1.6rem;
    color: var(--dark-gray);
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.section-subtitle {
    color: #334E68;
    font-size: 0.95rem;
}

.levels-control-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tabs-navigation {
    position: relative;
    display: inline-flex;
    background: #FFFFFF;
    padding: 0.35rem;
    border-radius: 50px;
    box-shadow: var(--card-shadow);
    gap: 0.25rem;
    justify-content: center;
    border: 1px solid rgba(203, 213, 225, 0.8);
    overflow: hidden;
}

.tabs-navigation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--progress-width, 20%);
    background: linear-gradient(90deg, rgba(23, 218, 164, 0.25), rgba(23, 218, 164, 0.5));
    border-radius: 50px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.tab-btn {
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    color: #475569;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    padding: 0.7rem 1.1rem;
    border-radius: 40px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary-blue);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--azur) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(44, 54, 227, 0.35);
}

.level-up-btn {
    background: linear-gradient(135deg, #10B981 0%, var(--turquoise) 100%);
    color: #064E3B;
    border: 2px solid #047857;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    animation: arcadePulse 1.8s infinite ease-in-out;
    white-space: nowrap;
}

@keyframes arcadePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { transform: scale(1.03); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.level-up-btn:hover {
    transform: translateY(-2px) scale(1.03);
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
}

.arcade-coin {
    font-size: 0.8rem;
}

.arcade-arrow {
    font-size: 0.65rem;
}

.tabs-content-container {
    background: transparent;
    text-align: left;
}

.tab-panel {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: var(--transition);
}

.tab-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.panel-header-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border-left: 6px solid var(--primary-blue);
    padding: 1.5rem;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
    position: relative;
    overflow: hidden;
}

@media(min-width: 850px) {
    .panel-header-card {
        padding: 2rem 2.5rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.panel-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}

.panel-title-row {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
}

@media(min-width: 600px) {
    .panel-title-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
}

.panel-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
}

@media(min-width: 450px) {
    .panel-title-group {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
}

.panel-header-card h3 {
    font-size: 1.5rem;
    color: var(--dark-gray);
    font-weight: 900;
}

@media (min-width: 768px) {
    .panel-header-card h3 {
        font-size: 1.8rem;
    }
}

.level-capsule-green {
    background: rgba(23, 218, 164, 0.2);
    color: #0b5c47;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.toggle-overview-btn {
    background: rgba(41, 116, 236, 0.08);
    border: 1px solid rgba(41, 116, 236, 0.2);
    color: var(--primary-blue);
    padding: 0.45rem 0.9rem;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.toggle-overview-btn:hover {
    background: rgba(41, 116, 236, 0.15);
}

.toggle-icon {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
}

.overview-collapse {
    max-height: 400px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 1;
    margin-top: 0.4rem;
}

.overview-collapse:not(.open) {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.level-overview-text {
    font-size: 1.02rem;
    color: #334155;
    font-weight: 500;
    line-height: 1.65;
    background: rgba(241, 245, 249, 0.8);
    padding: 1.1rem;
    border-radius: 10px;
    border-left: 4px solid var(--azur);
}

.section-title-specific {
    margin-bottom: 1rem;
    text-align: left;
}

.section-title-specific h4 {
    font-size: 1.15rem;
    color: var(--dark-gray);
    font-weight: 800;
}

.objectives-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

@media(min-width: 768px) {
    .objectives-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.objective-card {
    background: var(--white);
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid #E2E8F0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
    position: relative;
}

.objective-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
    border-color: var(--turquoise);
}

.objective-icon {
    background: rgba(23, 218, 164, 0.2);
    color: #0b5c47;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    transition: var(--transition);
}

.objective-card:hover .objective-icon {
    background: var(--turquoise);
    color: #064E3B;
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(23, 218, 164, 0.5);
}

.objective-text {
    font-size: 0.95rem;
    color: #334155;
    font-weight: 500;
    line-height: 1.5;
}

.site-footer {
    background-color: var(--dark-gray);
    color: var(--white);
    text-align: center;
    padding: 2.5rem 0;
    font-size: 0.85rem;
    margin-top: 0;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}