/* ============================================================
   INSTITUTO ACR — CSS UNIFICADO
   Adaptado del diseño premium code.html
   ============================================================ */

/* ========== VARIABLES GLOBALES ========== */
:root {
    --azul-institucional: #0F4672;
    --azul-tecnico: #1B6CA8;
    --cian-frio: #00B8D9;
    --dorado: #D4AF37;
    --dorado-hover: #F4D160;
    
    /* Light Mode (default dark) */
    --bg-primary: #071226;
    --bg-secondary: #0a1a2f;
    --bg-card: #13233F;
    --text-primary: #F8FAFC;
    --text-secondary: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.1);
    --btn-primary: #1B6CA8;
    --btn-primary-hover: #2a7ec0;
    
    --gradient-primary: linear-gradient(135deg, var(--azul-institucional), var(--azul-tecnico));
    --gradient-gold: linear-gradient(135deg, var(--dorado), var(--dorado-hover));
    
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 0 30px rgba(212, 175, 55, 0.2);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-padding: clamp(1rem, 5vw, 3rem);
    --section-padding: clamp(3rem, 8vw, 6rem);
    --header-height: 80px;
}

/* Light Mode */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #F8FAFC;
        --bg-secondary: #e2e8f0;
        --bg-card: #FFFFFF;
        --text-primary: #0F172A;
        --text-secondary: #64748b;
        --border-color: rgba(0, 0, 0, 0.08);
        --btn-primary: #0F4672;
        --btn-primary-hover: #1a5a8a;
        --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.05);
        --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
        --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.1);
    }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    font-size: 16px;
}

@media (max-width: 768px) {
    html { font-size: 15px; }
}
@media (max-width: 480px) {
    html { font-size: 14px; }
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    transition: background 0.3s ease;
}

/* ========== CONTAINER ========== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ========== TIPOGRAFÍA MEJORADA ========== */
h1, h2, h3, h4, .nav-link, .btn-primary, .btn-secondary {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 6vw, 3.8rem); line-height: 1.2; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 5vw, 2.5rem); line-height: 1.3; font-weight: 700; }
h3 { font-size: clamp(1.2rem, 3.5vw, 1.5rem); line-height: 1.4; }
h4 { font-size: clamp(1rem, 2.5vw, 1.2rem); }

.gold {
    color: var(--dorado);
    font-weight: 800;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.header.scrolled {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: grid;
    grid-template-columns: minmax(240px, 285px) minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1rem, 1.8vw, 1.5rem);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    width: 100%;
    min-width: 0;
    max-width: 285px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 2px var(--dorado), var(--shadow-gold);
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text h1 {
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    color: var(--text-primary);
    line-height: 1.05;
}

.logo-text {
    min-width: 0;
}

.logo-text p {
    font-size: 0.7rem;
    color: var(--dorado);
    font-weight: 600;
    line-height: 1.25;
}

/* Navegación */
.nav {
    display: flex;
    align-items: center;
    gap: clamp(0.9rem, 1.35vw, 1.45rem);
    justify-content: center;
    min-width: 0;
}

@media (max-width: 992px) {
    .nav { display: none; }
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.84rem, 1vw, 0.95rem);
    transition: color 0.3s;
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--dorado);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 0 0 auto;
}

@media (max-width: 992px) {
    .header-actions .desktop-cta {
        display: none;
    }
}

/* ========== BOTONES MEJORADOS ========== */
.btn-primary, .btn-secondary, .btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    border-radius: 60px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: transparent;
    border: 2px solid var(--dorado);
    color: var(--dorado);
}

.btn-primary:hover {
    background: var(--dorado);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-gold {
    background: var(--gradient-gold);
    color: var(--bg-primary);
    box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
    background: var(--dorado-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--btn-primary);
    color: white;
}

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

.btn-large {
    padding: 1rem 2.2rem;
    font-size: 1rem;
}

.btn-small {
    padding: 0.6rem 1.4rem;
    font-size: 0.8rem;
}

/* Menú móvil */
.menu-btn {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    cursor: pointer;
}

@media (max-width: 992px) {
    .menu-btn { display: block; }
}

.menu-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-primary);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 74px;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    padding: 1rem 0;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav-link {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
}

.mobile-nav-link:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--dorado);
}

.mobile-cta {
    display: block;
    text-align: center;
    margin: 1rem auto;
    width: fit-content;
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: calc(var(--header-height) + 2rem) 0 4rem;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.45);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(7, 18, 38, 0.7) 50%, rgba(0, 184, 217, 0.1) 100%);
    z-index: 1;
}

@media (prefers-color-scheme: light) {
    .hero-overlay {
        background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(248, 250, 252, 0.7) 50%, rgba(0, 184, 217, 0.05) 100%);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 860px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 175, 55, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.2rem;
    border-radius: 60px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--dorado);
}

.hero h1,
.hero-title {
    max-width: 790px;
    margin-bottom: 1.5rem;
    font-size: clamp(1rem, 2.7vw, 2.7rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
    font-weight: 900;
    color: #ffffff;
}

.hero-title span {
    display: block;
    white-space: nowrap;
}

.hero-title span .gold {
    display: inline;
}

.hero-highlight {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dorado);
}

.hero p {
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

@media (max-width: 640px) {
    .hero-features {
        grid-template-columns: 1fr;
    }
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.hero-feature svg {
    width: 20px;
    height: 20px;
    stroke: var(--dorado);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Badge flotante */
.hero-badge-card {
    position: absolute;
    top: 20%;
    right: 5%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 24px;
    padding: 1.5rem;
    width: min(300px, 85%);
    z-index: 2;
    box-shadow: var(--shadow-gold);
    animation: float 5s ease-in-out infinite;
}

@media (max-width: 992px) {
    .hero-badge-card {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 2rem;
        width: 100%;
        max-width: 400px;
    }
}

.hero-badge-card .badge-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.hero-badge-card .badge-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--bg-primary);
}

.hero-badge-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.hero-badge-card ul {
    list-style: none;
}

.hero-badge-card li {
    padding: 0.5rem 0;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ========== SECCIONES ========== */
.section {
    padding: var(--section-padding) 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    background: rgba(212, 175, 55, 0.15);
    padding: 0.4rem 1.2rem;
    border-radius: 60px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--dorado);
    margin-bottom: 1rem;
}

.gold-tag {
    background: var(--gradient-gold);
    color: var(--bg-primary);
}

.section-title h2 {
    font-weight: 800;
}

.section-title p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border-color);
    border-radius: 24px;
    overflow: hidden;
}

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

.stat-card {
    background: var(--bg-card);
    padding: 2rem 1rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon svg {
    width: 50px;
    height: 50px;
    stroke: var(--dorado);
    margin: 0 auto 1rem;
}

.stat-number {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: var(--gradient-gold);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

/* ========== ORGANISMOS BANNER ========== */
.organismos-banner {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 2rem;
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}

.organismos-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== COURSES GRID ========== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }
}

.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    overflow: hidden;
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-8px);
    border-color: var(--dorado);
    box-shadow: var(--shadow-gold);
}

.course-image {
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: hidden;
    background: var(--bg-secondary);
}

@media (max-width: 640px) {
    .course-image {
        height: 200px;
    }
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-content {
    padding: 1.8rem;
}

.course-badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.15);
    padding: 0.3rem 1rem;
    border-radius: 60px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--dorado);
    margin-bottom: 1rem;
}

.course-icon svg {
    width: 45px;
    height: 45px;
    stroke: var(--cian-frio);
    margin-bottom: 0.8rem;
}

.course-content h3 {
    margin-bottom: 0.5rem;
}

.course-subtitle {
    font-size: 0.85rem;
    color: var(--dorado);
    margin-bottom: 1rem;
}

.course-meta {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.course-meta span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.course-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.course-price {
    font-size: 0.8rem;
    color: var(--dorado);
    font-weight: 600;
}

/* ========== ROUTE GRID ========== */
.route-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .route-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .route-grid { grid-template-columns: 1fr; }
}

.route-step {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.8rem 1rem;
    transition: var(--transition);
}

.route-step:hover {
    transform: translateY(-5px);
    border-color: var(--dorado);
    box-shadow: var(--shadow-gold);
}

.route-icon svg {
    width: 45px;
    height: 45px;
    stroke: var(--cian-frio);
    margin: 0 auto 0.5rem;
}

.route-number {
    width: 52px;
    height: 52px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--bg-primary);
}

.route-step h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.route-step p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ========== ESTANDARES ========== */
.standards-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-content: stretch;
    gap: 0.85rem;
}

.standard-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 260px;
    overflow: hidden;
    text-align: center;
    background: #f5f5f5;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.standard-card.has-media {
    padding: 0.55rem 0.55rem 0.9rem;
    gap: 0.95rem;
    background: var(--bg-card);
    border-color: rgba(96, 165, 250, 0.16);
    border-radius: 14px;
}

.standard-media {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid rgba(250, 204, 21, 0.42);
}

.standard-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.standard-code {
    margin: 0.35rem;
    padding: 0.58rem 0.45rem;
    border-radius: 5px;
    background: #a67c20;
    color: #f8fafc;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: clamp(0.72rem, 0.9vw, 0.98rem);
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.standard-card h4 {
    margin: 1rem 0.75rem 0.65rem;
    color: #1f2d3d;
    font-size: clamp(0.84rem, 0.98vw, 1.02rem);
    line-height: 1.55;
    font-weight: 800;
}

.standard-card p {
    margin: 0 0.9rem 1rem;
    color: #334155;
    font-size: 0.78rem;
    line-height: 1.45;
}

.standard-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin: auto 1rem 1.1rem;
    padding: 0 1.1rem;
    border-radius: 18px;
    background: #d1d1d1;
    color: #0076a8;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    transition: var(--transition);
}

.standard-card.has-media .standard-download {
    flex: 0 0 auto;
    width: calc(100% - 0.7rem);
    min-height: 52px;
    margin: 0 auto;
    border-radius: 16px;
    background: #e5e7eb;
    color: #0076a8;
    box-shadow: none;
}

.standard-download:hover,
.standard-download:focus-visible {
    background: var(--dorado);
    color: #111111;
    transform: translateY(-2px);
}

@media (max-width: 1040px) {
    .standards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .standards-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== ORGANIGRAMA ========== */
.org-chart {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .org-chart { padding: 1.5rem; }
}

.org-director {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.org-team {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.org-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.2rem 1.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    max-width: 380px;
    width: 100%;
}

@media (max-width: 640px) {
    .org-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
}

.org-card:hover {
    border-color: var(--dorado);
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.org-card-gold {
    border-color: var(--dorado);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), transparent);
}

.org-avatar {
    width: 75px;
    height: 75px;
    background: var(--gradient-primary);
    border-radius: 50%;
    overflow: hidden;
}

.org-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.org-info h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.org-info p {
    font-size: 0.8rem;
    color: var(--dorado);
    font-weight: 600;
}

/* Tooltip */
.org-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(720px, calc(100vw - 2rem));
    max-height: min(82vh, 640px);
    display: grid;
    grid-template-columns: minmax(220px, 0.95fr) minmax(230px, 1fr);
    gap: 1.2rem;
    padding: 1rem;
    overflow: hidden;
    background: rgba(19, 35, 63, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(250, 204, 21, 0.72);
    border-radius: 24px;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -48%) scale(0.96);
    transition: var(--transition);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42), 0 0 0 9999px rgba(7, 18, 38, 0.68);
}

.org-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.tooltip-avatar {
    width: 100%;
    height: min(56vh, 440px);
    background: var(--gradient-primary);
    border-radius: 18px;
    overflow: hidden;
    flex-shrink: 0;
}

.tooltip-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tooltip-info h4 {
    padding-right: 2rem;
    font-size: clamp(1.25rem, 2.4vw, 1.8rem);
    line-height: 1.12;
    margin-bottom: 0.55rem;
}

.tooltip-info p {
    font-size: clamp(0.92rem, 1.35vw, 1.08rem);
    color: var(--text-secondary);
    margin-top: 0.75rem;
    line-height: 1.55;
}

.tooltip-info {
    min-width: 0;
    max-height: min(56vh, 440px);
    overflow-y: auto;
    padding: 0.35rem 0.45rem 0.35rem 0;
}

.tooltip-info .gold {
    color: var(--dorado);
    font-weight: 800;
}

.tooltip-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.tooltip-close:hover {
    color: var(--dorado);
}

body.org-modal-open {
    overflow: hidden;
}

@media (max-width: 680px) {
    .org-tooltip {
        grid-template-columns: 1fr;
        width: min(420px, calc(100vw - 1.5rem));
        max-height: 88vh;
        overflow-y: auto;
    }

    .tooltip-avatar {
        height: min(48vh, 340px);
    }

    .tooltip-info {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

/* ========== BENEFITS GRID ========== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .benefits-grid { grid-template-columns: 1fr; }
}

.benefit-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-5px);
    border-color: var(--dorado);
    box-shadow: var(--shadow-gold);
}

.benefit-icon svg {
    width: 50px;
    height: 50px;
    stroke: var(--cian-frio);
}

.benefit-card h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.benefit-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.benefit-card small {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.2rem;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 992px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .footer-logo { justify-content: center; }
}

.footer-logo-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.footer-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-logo strong {
    font-size: 1rem;
}

.footer-logo p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .social-links { justify-content: center; }
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a svg {
    width: 20px;
    height: 20px;
    fill: var(--dorado);
}

.social-links a:hover {
    background: var(--dorado);
    transform: translateY(-3px);
}

.social-links a:hover svg {
    fill: var(--bg-primary);
}

.footer-column h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--dorado);
}

.footer-column a {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.footer-link-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    color: var(--dorado);
}

.footer-column a:hover {
    color: var(--dorado);
}

.whatsapp-link {
    color: #25D366 !important;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.footer-seals {
    margin-top: 0.5rem;
    color: var(--dorado);
    font-size: 0.75rem;
}

@media (prefers-color-scheme: light) {
    .footer {
        --dorado: #0F4672;
        --dorado-hover: #1B6CA8;
        --gradient-gold: linear-gradient(135deg, #0F4672, #1B6CA8);
    }

    .footer .gold,
    .footer-column h4,
    .footer-link-icon,
    .footer-column a:hover,
    .footer-seals,
    .footer .gold-hover {
        color: #0F4672;
    }

    .footer .social-links a {
        color: #0F4672;
        background: rgba(15, 70, 114, 0.08);
    }

    .footer .social-links a:hover {
        background: #0F4672;
        color: #ffffff;
    }

    .footer .whatsapp-link,
    .footer .whatsapp-link .footer-link-icon {
        color: #00D084 !important;
    }
}

/* ========== WHATSAPP FLOAT ========== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    z-index: 100;
    text-decoration: none;
}

@media (max-width: 640px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

@media (max-width: 640px) {
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .whatsapp-tooltip { display: none; }
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-5px);
}

/* ========== ANIMACIONES ========== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .fade-up,
    .hero-badge-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-badge-card {
        animation: none;
    }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--dorado);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--dorado-hover);
}

/* ========== UTILIDADES ========== */
.text-center { text-align: center; }
.hidden { display: none; }
.relative { position: relative; }

/* ========== COMPONENTES USADOS POR INDEX.PHP ========== */
.landing-page {
    background: var(--bg-primary);
}

body.center-acr {
    --center-accent: #FACC15;
    --center-accent-soft: rgba(250, 204, 21, 0.14);
    --center-accent-strong: rgba(250, 204, 21, 0.44);
}

body.center-conalep {
    --azul-institucional: #004B3C;
    --azul-tecnico: #00856F;
    --dorado: #FACC15;
    --center-accent: #00A887;
    --center-accent-soft: rgba(0, 168, 135, 0.16);
    --center-accent-strong: rgba(0, 168, 135, 0.42);
    --gradient-primary: linear-gradient(135deg, #003F35, #00856F);
}

body.center-aguilas {
    --azul-institucional: #172033;
    --azul-tecnico: #B91C1C;
    --dorado: #F59E0B;
    --center-accent: #EF4444;
    --center-accent-soft: rgba(239, 68, 68, 0.15);
    --center-accent-strong: rgba(245, 158, 11, 0.42);
    --gradient-primary: linear-gradient(135deg, #111827, #7F1D1D);
}

.center-pill,
.hero-center-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    border: 1px solid var(--center-accent-strong, rgba(250, 204, 21, 0.44));
    background: var(--center-accent-soft, rgba(250, 204, 21, 0.14));
    color: var(--center-accent, var(--dorado));
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.center-pill {
    margin-top: 0.2rem;
    padding: 0.14rem 0.42rem;
    border-radius: 999px;
    font-size: 0.58rem;
    line-height: 1;
}

.hero-center-badge {
    margin-bottom: 1.65rem;
    padding: 0.34rem 0.95rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.92), rgba(27, 108, 168, 0.82));
    border-color: rgba(96, 165, 250, 0.35);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    font-size: clamp(0.74rem, 1vw, 1rem);
    line-height: 1.25;
    letter-spacing: 0.08em;
    box-shadow: 0 10px 24px rgba(15, 76, 129, 0.26);
}

.hero-break {
    display: block;
    color: var(--text-primary);
}

.btn-login {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--center-accent-strong, rgba(250, 204, 21, 0.44));
    color: var(--text-primary);
    box-shadow: none;
}

.btn-login:hover,
.btn-login:focus-visible {
    background: var(--center-accent-soft, rgba(250, 204, 21, 0.14));
    border-color: var(--center-accent, var(--dorado));
    color: var(--center-accent, var(--dorado));
}

.header-actions .btn-login,
.header-actions .desktop-cta,
.landing-language-switcher .language-select,
.mobile-login,
.mobile-cta {
    height: 48px;
    min-height: 48px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.header-actions .btn-login,
.header-actions .desktop-cta,
.mobile-login,
.mobile-cta {
    padding: 0 20px;
}

.landing-language-switcher .language-select-form {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.landing-language-switcher .language-select-icon {
    position: absolute;
    left: 14px;
    z-index: 1;
    display: inline-flex;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.landing-language-switcher .language-select-icon svg {
    width: 16px;
    height: 16px;
}

.landing-language-switcher .language-select-chevron {
    position: absolute;
    right: 16px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: translateY(-2px) rotate(45deg);
    pointer-events: none;
}

.landing-language-switcher .language-select {
    min-width: 138px;
    padding: 0 38px 0 38px;
    border: 1px solid var(--center-accent-strong, rgba(250, 204, 21, 0.44));
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    appearance: none;
    text-transform: uppercase;
}

.landing-language-switcher .language-select option {
    background: #ffffff;
    color: #0b1220;
    font-weight: 800;
}

@media (max-width: 1240px) {
    .header-inner {
        grid-template-columns: minmax(210px, 240px) minmax(0, 1fr) auto;
        gap: 0.85rem;
    }

    .logo-icon {
        width: 44px;
        height: 44px;
    }

    .logo-text h1 {
        font-size: 0.9rem;
    }

    .logo-text p {
        font-size: 0.62rem;
    }

    .nav {
        gap: 0.8rem;
    }

    .nav-link {
        font-size: 0.84rem;
    }

    .header-actions .btn-login,
    .header-actions .desktop-cta {
        padding: 0 16px;
    }

    .landing-language-switcher .language-select {
        min-width: 128px;
        padding-right: 34px;
    }
}

.mobile-language {
    display: none;
}

.mobile-login,
.mobile-cta {
    display: flex;
    width: min(100%, 260px);
    margin: 1rem auto 0.35rem;
}

.header-actions .desktop-cta .btn-icon,
.mobile-cta .btn-icon {
    width: 20px;
    height: 20px;
    max-width: 20px;
    max-height: 20px;
    flex: 0 0 20px;
}

.certified-students-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 1rem 0 2rem;
}

.certified-students-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.5rem 0.25rem 1.5rem;
}

.certified-student-card {
    flex: 0 0 min(360px, 88vw);
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.certified-student-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--gradient-primary);
}

.certified-student-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.certified-student-body {
    padding: 1.35rem;
}

.certified-student-badge {
    display: inline-flex;
    width: max-content;
    margin-bottom: 0.85rem;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    background: var(--gradient-gold);
    color: var(--bg-primary);
    font-size: 0.72rem;
    font-weight: 800;
}

.certified-student-course,
.certified-student-generation,
.certified-student-testimonial {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.certified-students-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
}

.certified-students-dots {
    display: flex;
    gap: 0.45rem;
}

.certified-student-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: var(--border-color);
    cursor: pointer;
}

.certified-student-dot.active {
    width: 28px;
    background: var(--dorado);
}

.footer-brand,
.gold-badge,
.gold-hover,
.logo-img {
    min-width: 0;
}

.gold-hover:hover {
    color: var(--dorado);
}

@media (max-width: 992px) {
    .header-actions .desktop-language,
    .header-actions .desktop-login {
        display: none;
    }

    .mobile-language {
        display: flex;
        justify-content: center;
        margin: 0.75rem auto 0;
    }
}

@media (max-width: 768px) {
    .center-pill {
        display: none;
    }

    .hero-center-badge {
        white-space: normal;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.2rem);
    }

    .hero-title span {
        white-space: normal;
    }
}

/* ========== AJUSTES POR CENTRO ========== */
body.center-conalep {
    --azul-institucional: #004b3c;
    --azul-tecnico: #00856f;
    --dorado: #facc15;
    --gradient-primary: linear-gradient(135deg, #003f35, #00856f);
}

body.center-aguilas {
    --azul-institucional: #172033;
    --azul-tecnico: #b91c1c;
    --dorado: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #111827, #7f1d1d);
}

/* ========== FIX VISIBILIDAD ========== */
.hero-content.fade-up,
.hero-badge-card.fade-up {
    opacity: 1 !important;
    transform: none !important;
}


/* ============================================================
   HEADER RESPONSIVE MULTIDISPOSITIVO — V2
   Punto de cambio a menú móvil: 1199 px
   Probado para anchos desde 320 px hasta pantallas ultrawide.
   ============================================================ */

:root {
    --header-height: 72px;
    --header-max-width: 1480px;
    --header-surface: rgba(7, 18, 38, 0.96);
    --header-surface-scrolled: rgba(7, 18, 38, 0.985);
    --header-control-bg: rgba(255, 255, 255, 0.045);
    --header-control-hover: rgba(212, 175, 55, 0.12);
    --header-mobile-surface: #0a1a2f;
    --header-divider: rgba(255, 255, 255, 0.10);
}

@media (prefers-color-scheme: light) {
    :root {
        --header-surface: rgba(255, 255, 255, 0.95);
        --header-surface-scrolled: rgba(255, 255, 255, 0.985);
        --header-control-bg: rgba(15, 70, 114, 0.045);
        --header-control-hover: rgba(15, 70, 114, 0.10);
        --header-mobile-surface: #ffffff;
        --header-divider: rgba(15, 70, 114, 0.14);
    }
}

.header {
    min-height: var(--header-height);
    padding: 0.6rem 0;
    background: var(--header-surface);
    border-bottom: 1px solid var(--header-divider);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.header.scrolled {
    padding: 0.5rem 0;
    background: var(--header-surface-scrolled);
    border-bottom-color: var(--header-divider);
}

.header .container.header-inner {
    width: 100%;
    max-width: var(--header-max-width);
    padding-inline: clamp(0.85rem, 2vw, 1.75rem);
}

.header-inner {
    display: grid;
    grid-template-columns: minmax(245px, 290px) minmax(390px, 1fr) auto;
    align-items: center;
    gap: clamp(0.8rem, 1.25vw, 1.3rem);
}

.logo {
    width: auto;
    max-width: 100%;
    min-width: 0;
    gap: 0.7rem;
}

.logo-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
}

.logo-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text h1 {
    max-width: 100%;
    overflow: hidden;
    color: var(--text-primary);
    font-size: clamp(0.92rem, 1.05vw, 1.05rem);
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logo-text p {
    width: 100%;
    max-width: 225px;
    overflow: hidden;
    font-size: clamp(0.61rem, 0.72vw, 0.7rem);
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: clamp(0.72rem, 1.05vw, 1.15rem);
}

.nav-link {
    flex: 0 0 auto;
    font-size: clamp(0.79rem, 0.88vw, 0.9rem);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
}

.header-actions .desktop-language {
    flex: 0 0 142px;
    width: 142px;
}

.header-actions .desktop-login {
    flex: 0 0 auto;
    min-width: 138px;
}

.header-actions .desktop-cta {
    flex: 0 0 auto;
    min-width: 198px;
}

.header-actions .btn-login,
.header-actions .desktop-cta,
.landing-language-switcher .language-select {
    height: 46px;
    min-height: 46px;
}

.header-actions .btn-login,
.header-actions .desktop-cta {
    padding-inline: 1.1rem;
}

.header-actions .desktop-cta {
    gap: 0.6rem;
}

.header-actions .desktop-cta .btn-icon {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    flex-basis: 18px;
}

.landing-language-switcher,
.landing-language-switcher .language-select-form {
    min-width: 0;
}

.header-actions .landing-language-switcher .language-select-form,
.header-actions .landing-language-switcher .language-select {
    width: 100%;
}

.landing-language-switcher .language-select {
    min-width: 0;
    background: var(--header-control-bg);
}

.btn-login {
    background: var(--header-control-bg);
}

.btn-login:hover,
.btn-login:focus-visible {
    background: var(--header-control-hover);
}

.menu-btn {
    display: none;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-color: var(--center-accent-strong, rgba(212, 175, 55, 0.44));
    border-radius: 14px;
    background: var(--header-control-bg);
    color: var(--text-primary);
    transition: var(--transition);
}

.menu-btn:hover,
.menu-btn:focus-visible {
    border-color: var(--center-accent, var(--dorado));
    background: var(--header-control-hover);
    transform: translateY(-1px);
}

.menu-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

/* Evita que el menú quede abierto al volver a escritorio. */
.mobile-menu,
.mobile-menu.active {
    display: none;
}

@media (max-width: 1399px) and (min-width: 1200px) {
    .header-inner {
        grid-template-columns: minmax(220px, 250px) minmax(350px, 1fr) auto;
        gap: 0.75rem;
    }

    .logo-icon {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .logo-text h1 {
        font-size: 0.9rem;
    }

    .logo-text p {
        max-width: 190px;
        font-size: 0.61rem;
    }

    .center-pill {
        padding: 0.12rem 0.36rem;
        font-size: 0.53rem;
    }

    .nav {
        gap: clamp(0.58rem, 0.78vw, 0.82rem);
    }

    .nav-link {
        font-size: clamp(0.75rem, 0.82vw, 0.82rem);
    }

    .header-actions {
        gap: 0.48rem;
    }

    .header-actions .desktop-language {
        flex-basis: 126px;
        width: 126px;
    }

    .header-actions .desktop-login {
        min-width: 124px;
    }

    .header-actions .desktop-cta {
        min-width: 174px;
    }

    .header-actions .btn-login,
    .header-actions .desktop-cta,
    .landing-language-switcher .language-select {
        height: 44px;
        min-height: 44px;
        font-size: 0.79rem;
    }

    .header-actions .btn-login,
    .header-actions .desktop-cta {
        padding-inline: 0.85rem;
    }

    .landing-language-switcher .language-select {
        padding-left: 34px;
        padding-right: 30px;
    }

    .landing-language-switcher .language-select-icon {
        left: 12px;
    }

    .landing-language-switcher .language-select-chevron {
        right: 12px;
    }
}

/* Tablet, laptop compacta y móvil: navegación en panel desplegable. */
@media (max-width: 1199px) {
    :root {
        --header-height: 68px;
    }

    .header {
        padding: 0.55rem 0;
    }

    .header.scrolled {
        padding: 0.45rem 0;
    }

    .header-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.75rem;
    }

    .logo {
        max-width: min(100%, 360px);
    }

    .nav,
    .header-actions .desktop-language,
    .header-actions .desktop-login,
    .header-actions .desktop-cta {
        display: none;
    }

    .header-actions {
        width: auto;
        gap: 0;
    }

    .menu-btn {
        display: inline-flex;
    }

    .mobile-menu.active {
        display: block;
    }

    .mobile-menu {
        position: fixed;
        top: var(--header-height);
        right: 0;
        bottom: auto;
        left: 0;
        width: 100%;
        max-height: calc(100dvh - var(--header-height));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--header-mobile-surface);
        border-top: 1px solid var(--header-divider);
        border-bottom: 1px solid var(--header-divider);
        box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .mobile-menu-inner {
        display: grid;
        width: min(100%, 760px);
        max-width: 760px;
        gap: 1rem;
        padding-top: 1rem;
        padding-bottom: max(1.2rem, env(safe-area-inset-bottom));
    }

    .mobile-nav-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .mobile-nav-link {
        display: flex;
        min-height: 46px;
        padding: 0.72rem 1rem;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--header-divider);
        border-radius: 14px;
        background: var(--header-control-bg);
        color: var(--text-primary);
        font-family: 'Montserrat', system-ui, sans-serif;
        font-size: 0.86rem;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
    }

    .mobile-nav-link:hover,
    .mobile-nav-link:focus-visible,
    .mobile-nav-link.active {
        border-color: var(--center-accent, var(--dorado));
        background: var(--header-control-hover);
        color: var(--center-accent, var(--dorado));
    }

    .mobile-menu-actions {
        display: grid;
        grid-template-columns: minmax(150px, 0.85fr) minmax(150px, 0.85fr) minmax(190px, 1.15fr);
        gap: 0.65rem;
        padding-top: 0.9rem;
        border-top: 1px solid var(--header-divider);
    }

    .mobile-language,
    .mobile-login,
    .mobile-cta {
        display: flex;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .mobile-language .language-select-form,
    .mobile-language .language-select {
        width: 100%;
    }

    .mobile-login,
    .mobile-cta,
    .mobile-language .language-select {
        height: 48px;
        min-height: 48px;
    }
}

@media (max-width: 767px) {
    :root {
        --header-height: 64px;
    }

    .header .container.header-inner {
        padding-inline: clamp(0.75rem, 4vw, 1rem);
    }

    .logo {
        gap: 0.58rem;
    }

    .logo-icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .logo-text h1 {
        font-size: 0.88rem;
    }

    .logo-text p {
        max-width: min(54vw, 220px);
        font-size: 0.58rem;
    }

    .center-pill {
        display: none;
    }

    .menu-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        border-radius: 13px;
    }

    .mobile-menu-inner {
        gap: 0.85rem;
        padding-top: 0.85rem;
    }

    .mobile-nav-list {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .mobile-nav-link {
        min-height: 44px;
        justify-content: flex-start;
        padding-inline: 1rem;
        text-align: left;
    }

    .mobile-menu-actions {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .mobile-language,
    .mobile-login,
    .mobile-cta {
        width: 100%;
    }
}

@media (max-width: 479px) {
    .logo-text p {
        display: none;
    }

    .logo-text h1 {
        font-size: 0.9rem;
    }

    .mobile-menu-inner {
        padding-inline: 0.75rem;
    }
}

@media (max-width: 359px) {
    .logo-icon {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .logo-text h1 {
        max-width: 185px;
        font-size: 0.82rem;
    }

    .menu-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }
}

/* Móviles y tablets en horizontal: el panel puede desplazarse sin cortarse. */
@media (max-width: 1199px) and (max-height: 520px) and (orientation: landscape) {
    .mobile-menu {
        max-height: calc(100dvh - var(--header-height));
    }

    .mobile-menu-inner {
        grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
        align-items: start;
    }

    .mobile-menu-actions {
        grid-template-columns: 1fr;
        padding-top: 0;
        padding-left: 0.85rem;
        border-top: 0;
        border-left: 1px solid var(--header-divider);
    }
}

@media (prefers-reduced-motion: reduce) {
    .header,
    .menu-btn,
    .mobile-nav-link,
    .header-actions .btn-login,
    .header-actions .desktop-cta {
        transition: none;
    }
}

/* ============================================================
   HOTFIX — Selector de idioma mejor diseñado
   ============================================================ */
.header-actions .desktop-language {
    flex: 0 0 clamp(160px, 12vw, 176px);
    width: clamp(160px, 12vw, 176px);
}

.landing-language-switcher {
    display: flex;
    align-items: center;
    width: 100%;
}

.landing-language-switcher .language-select-form {
    width: 100%;
}

.landing-language-switcher .language-select {
    width: 100%;
    min-width: 0;
    padding: 0 2.6rem 0 2.5rem;
    border: 1.5px solid rgba(212, 175, 55, 0.72);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(15, 70, 114, 0.96), rgba(8, 25, 49, 0.98));
    color: #ffffff;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 18px rgba(0, 0, 0, 0.16);
    overflow: hidden;
    text-overflow: ellipsis;
}

.landing-language-switcher .language-select:hover,
.landing-language-switcher .language-select:focus-visible {
    border-color: var(--center-accent, var(--dorado));
    background: linear-gradient(180deg, rgba(18, 80, 128, 0.98), rgba(10, 28, 54, 1));
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14), 0 10px 24px rgba(0, 0, 0, 0.22);
}

.landing-language-switcher .language-select-icon {
    left: 14px;
    width: 15px;
    height: 15px;
    color: rgba(255, 255, 255, 0.92);
}

.landing-language-switcher .language-select-icon svg {
    width: 15px;
    height: 15px;
}

.landing-language-switcher .language-select-chevron {
    right: 16px;
    width: 8px;
    height: 8px;
    border-right-color: rgba(255, 255, 255, 0.88);
    border-bottom-color: rgba(255, 255, 255, 0.88);
}

.landing-language-switcher .language-select option {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: none;
}

@media (prefers-color-scheme: light) {
    .landing-language-switcher .language-select {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.98));
        color: var(--azul-institucional);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 6px 18px rgba(15, 70, 114, 0.10);
    }

    .landing-language-switcher .language-select:hover,
    .landing-language-switcher .language-select:focus-visible {
        background: linear-gradient(180deg, #ffffff, #eef4fb);
    }

    .landing-language-switcher .language-select-icon {
        color: var(--azul-institucional);
    }

    .landing-language-switcher .language-select-chevron {
        border-right-color: var(--azul-institucional);
        border-bottom-color: var(--azul-institucional);
    }
}

@media (max-width: 1399px) and (min-width: 1200px) {
    .header-actions .desktop-language {
        flex-basis: 164px;
        width: 164px;
    }

    .landing-language-switcher .language-select {
        font-size: 0.79rem;
        padding-left: 2.35rem;
        padding-right: 2.2rem;
    }
}

@media (max-width: 1199px) {
    .mobile-language,
    .mobile-language .language-select-form,
    .mobile-language .language-select {
        width: 100%;
    }

    .mobile-language .language-select {
        justify-content: flex-start;
        font-size: 0.88rem;
        padding-left: 2.6rem;
        padding-right: 2.6rem;
    }
}

@media (max-width: 767px) {
    .mobile-language .language-select {
        height: 50px;
        min-height: 50px;
        font-size: 0.86rem;
    }
}

@media (max-width: 479px) {
    .mobile-language .language-select {
        font-size: 0.82rem;
        padding-left: 2.45rem;
        padding-right: 2.35rem;
    }
}


/* ============================================================
   EGRESADOS ACR — CARRUSEL MULTIDISPOSITIVO + MODAL AMPLIADO
   Mantener al final para respetar la cascada del landing.
   ============================================================ */
.graduates-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 12%, rgba(0, 184, 217, 0.10), transparent 30%),
        linear-gradient(180deg, transparent, rgba(15, 70, 114, 0.10), transparent);
}

.graduates-carousel {
    --graduate-gap: clamp(1rem, 2vw, 1.5rem);
    position: relative;
    width: 100%;
    padding: 0 clamp(3.25rem, 5vw, 4.5rem);
}

.graduates-viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-radius: 28px;
    outline: none;
}

.graduates-viewport::-webkit-scrollbar {
    display: none;
}

.graduates-viewport:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.28);
}

.graduates-track {
    display: flex;
    gap: var(--graduate-gap);
    width: max-content;
    padding: 0.65rem 0.35rem 1.25rem;
}

.graduate-card {
    position: relative;
    flex: 0 0 clamp(270px, 27vw, 350px);
    min-width: 0;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    border: 1px solid rgba(212, 175, 55, 0.20);
    border-radius: 26px;
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    isolation: isolate;
    transition: transform 0.34s ease, border-color 0.34s ease, box-shadow 0.34s ease;
}

.graduate-card:hover,
.graduate-card:focus-visible {
    transform: translateY(-9px) scale(1.015);
    border-color: rgba(212, 175, 55, 0.82);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28), 0 0 28px rgba(212, 175, 55, 0.17);
    outline: none;
}

.graduate-card-photo {
    position: relative;
    aspect-ratio: 4 / 4.35;
    overflow: hidden;
    background: linear-gradient(145deg, #0f4672, #071226);
}

.graduate-card-photo::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    background: linear-gradient(180deg, transparent, rgba(7, 18, 38, 0.90));
    pointer-events: none;
}

.graduate-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.graduate-card:hover .graduate-card-photo img,
.graduate-card:focus-visible .graduate-card-photo img {
    transform: scale(1.075);
}

.graduate-card.is-placeholder .graduate-card-photo img {
    object-fit: contain;
    padding: 25%;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.34));
}

.graduate-card-status,
.graduate-card-open {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 800;
}

.graduate-card-status {
    top: 1rem;
    left: 1rem;
    padding: 0.38rem 0.78rem;
    background: var(--gradient-gold);
    color: #071226;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.graduate-card-open {
    right: 1rem;
    bottom: 1rem;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(7, 18, 38, 0.66);
    color: #ffffff;
    font-size: 0.72rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.3s ease, color 0.3s ease;
}

.graduate-card:hover .graduate-card-open,
.graduate-card:focus-visible .graduate-card-open {
    background: var(--dorado);
    color: #071226;
}

.graduate-card-body {
    position: relative;
    min-height: 190px;
    padding: 1.35rem 1.4rem 1.5rem;
}

.graduate-card-number {
    position: absolute;
    top: 1rem;
    right: 1.15rem;
    color: rgba(212, 175, 55, 0.22);
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
}

.graduate-card-body h3 {
    position: relative;
    z-index: 1;
    max-width: calc(100% - 3rem);
    margin-bottom: 0.7rem;
    color: var(--text-primary);
    font-size: clamp(1.08rem, 1.7vw, 1.35rem);
    line-height: 1.2;
}

.graduate-card-course {
    margin-bottom: 0.55rem;
    color: var(--dorado);
    font-weight: 750;
    line-height: 1.42;
}

.graduate-card-generation {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.45;
}

.graduates-arrow {
    position: absolute;
    top: 43%;
    z-index: 4;
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(212, 175, 55, 0.48);
    border-radius: 50%;
    background: color-mix(in srgb, var(--bg-card) 88%, transparent);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(-50%);
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.graduates-arrow:hover,
.graduates-arrow:focus-visible {
    border-color: var(--dorado);
    background: var(--dorado);
    color: #071226;
    transform: translateY(-50%) scale(1.08);
    outline: none;
}

.graduates-arrow-prev {
    left: 0;
}

.graduates-arrow-next {
    right: 0;
}

.graduates-carousel-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.25rem;
}

.graduates-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 30px;
}

.graduates-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-secondary) 34%, transparent);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.graduates-dot:hover,
.graduates-dot:focus-visible {
    transform: scale(1.22);
    outline: 2px solid rgba(212, 175, 55, 0.26);
    outline-offset: 3px;
}

.graduates-dot.is-active {
    width: 28px;
    background: var(--gradient-gold);
}

.graduates-counter {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    min-width: 58px;
    color: var(--text-secondary);
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
}

.graduates-counter strong {
    color: var(--dorado);
    font-size: 1rem;
}

/* Modal que amplía la tarjeta seleccionada. */
.graduate-modal[hidden] {
    display: none;
}

.graduate-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 3vw, 2rem);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.graduate-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.graduate-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 10, 22, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.graduate-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: min(86dvh, 720px);
    display: grid;
    grid-template-columns: minmax(300px, 0.92fr) minmax(320px, 1.08fr);
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.55);
    border-radius: 30px;
    background: var(--bg-card);
    box-shadow: 0 38px 100px rgba(0, 0, 0, 0.52), 0 0 44px rgba(212, 175, 55, 0.14);
    transform: scale(0.86) translateY(24px);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.graduate-modal.is-open .graduate-modal-dialog {
    transform: scale(1) translateY(0);
}

.graduate-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 4;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(7, 18, 38, 0.72);
    color: #ffffff;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.graduate-modal-close:hover,
.graduate-modal-close:focus-visible {
    background: var(--dorado);
    color: #071226;
    transform: rotate(90deg);
    outline: none;
}

.graduate-modal-photo {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    background: linear-gradient(145deg, #0f4672, #071226);
}

.graduate-modal-photo::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(180deg, transparent, rgba(7, 18, 38, 0.72));
}

.graduate-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.graduate-modal-photo.is-placeholder img {
    object-fit: contain;
    padding: 25%;
    filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.42));
}

.graduate-modal-badge {
    position: absolute;
    left: 1.4rem;
    bottom: 1.4rem;
    z-index: 2;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: var(--gradient-gold);
    color: #071226;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.graduate-modal-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
    overflow-y: auto;
}

.graduate-modal-kicker {
    margin-bottom: 0.9rem;
    color: var(--dorado);
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.graduate-modal-content h2 {
    margin-bottom: 1.15rem;
    color: var(--text-primary);
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.08;
}

.graduate-modal-course {
    margin-bottom: 0.75rem;
    color: var(--dorado);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 800;
    line-height: 1.45;
}

.graduate-modal-generation {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.graduate-modal-testimonial {
    margin-top: 1.5rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1rem;
    font-style: italic;
    line-height: 1.7;
}

body.graduate-modal-open {
    overflow: hidden;
}

@media (prefers-color-scheme: light) {
    .graduates-section {
        background:
            radial-gradient(circle at 12% 12%, rgba(15, 70, 114, 0.10), transparent 30%),
            linear-gradient(180deg, transparent, rgba(15, 70, 114, 0.07), transparent);
    }

    .graduate-card {
        border-color: rgba(15, 70, 114, 0.16);
        box-shadow: 0 18px 40px rgba(15, 70, 114, 0.12);
    }

    .graduate-card:hover,
    .graduate-card:focus-visible {
        border-color: var(--azul-institucional);
        box-shadow: 0 24px 55px rgba(15, 70, 114, 0.18);
    }

    .graduate-card-course,
    .graduates-counter strong,
    .graduate-modal-kicker,
    .graduate-modal-course {
        color: var(--azul-institucional);
    }

    .graduate-card-number {
        color: rgba(15, 70, 114, 0.14);
    }
}

@media (max-width: 1199px) {
    .graduates-carousel {
        padding-inline: 3.4rem;
    }

    .graduate-card {
        flex-basis: clamp(265px, 38vw, 330px);
    }
}

@media (max-width: 767px) {
    .graduates-carousel {
        padding-inline: 0;
    }

    .graduates-track {
        padding-inline: 0.1rem;
    }

    .graduate-card {
        flex-basis: min(82vw, 330px);
    }

    .graduates-arrow {
        top: auto;
        bottom: -0.1rem;
        width: 44px;
        height: 44px;
        transform: none;
    }

    .graduates-arrow:hover,
    .graduates-arrow:focus-visible {
        transform: scale(1.06);
    }

    .graduates-arrow-prev {
        left: 0;
    }

    .graduates-arrow-next {
        right: 0;
    }

    .graduates-carousel-footer {
        min-height: 48px;
        padding-inline: 3.25rem;
    }

    .graduates-dots {
        max-width: 185px;
        overflow: hidden;
    }

    .graduate-modal {
        align-items: end;
        padding: 0.75rem;
    }

    .graduate-modal-dialog {
        width: 100%;
        max-height: 91dvh;
        grid-template-columns: 1fr;
        overflow-y: auto;
        border-radius: 26px;
    }

    .graduate-modal-photo {
        min-height: 0;
        height: min(54dvh, 420px);
    }

    .graduate-modal-content {
        overflow: visible;
        padding: 1.7rem 1.4rem 2rem;
    }

    .graduate-modal-content h2 {
        padding-right: 2.6rem;
    }
}

@media (max-width: 420px) {
    .graduate-card {
        flex-basis: 86vw;
    }

    .graduate-card-body {
        min-height: 175px;
        padding: 1.2rem;
    }

    .graduate-card-status {
        top: 0.8rem;
        left: 0.8rem;
    }

    .graduate-card-open {
        right: 0.8rem;
        bottom: 0.8rem;
    }

    .graduates-counter {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .graduate-card,
    .graduate-card-photo img,
    .graduates-arrow,
    .graduates-dot,
    .graduate-modal,
    .graduate-modal-dialog,
    .graduate-modal-close {
        transition: none !important;
    }

    .graduates-viewport {
        scroll-behavior: auto;
    }
}

/* ============================================================
   HEADER — CONTROLES DEL MISMO TAMAÑO + CTA DESTACADO
   ============================================================ */
@media (min-width: 1200px) {
    .header-actions {
        --header-action-width: clamp(160px, 11.2vw, 176px);
        gap: 0.65rem;
    }

    .header-actions .desktop-language,
    .header-actions .desktop-login,
    .header-actions .desktop-cta {
        flex: 0 0 var(--header-action-width);
        width: var(--header-action-width);
        min-width: var(--header-action-width);
        max-width: var(--header-action-width);
        height: 48px;
        min-height: 48px;
    }

    .header-actions .desktop-login,
    .header-actions .desktop-cta,
    .header-actions .landing-language-switcher .language-select {
        width: 100%;
        height: 48px;
        min-height: 48px;
        padding-inline: 1rem;
        justify-content: center;
        font-size: 0.82rem;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
    }

    .header-actions .landing-language-switcher .language-select {
        padding-left: 2.55rem;
        padding-right: 2.55rem;
        text-align-last: center;
    }

    /* Inscribirme ahora: efecto premium diferente al resto. */
    .header-actions .desktop-cta {
        position: relative;
        isolation: isolate;
        overflow: hidden;
        border-color: #f2c744;
        background:
            linear-gradient(110deg, #c99516 0%, #f0c83c 38%, #ffe47a 50%, #e5b52a 68%, #c99516 100%);
        background-size: 230% 100%;
        color: #071226;
        box-shadow:
            0 8px 22px rgba(212, 175, 55, 0.24),
            inset 0 1px 0 rgba(255, 255, 255, 0.58);
        animation: acrCtaGradient 5s ease-in-out infinite;
    }

    .header-actions .desktop-cta::before {
        content: '';
        position: absolute;
        top: -35%;
        left: -42%;
        width: 24%;
        height: 170%;
        pointer-events: none;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.78),
            transparent
        );
        transform: rotate(18deg);
        animation: acrCtaShine 3.8s ease-in-out infinite;
    }

    .header-actions .desktop-cta:hover,
    .header-actions .desktop-cta:focus-visible {
        color: #071226;
        border-color: #ffe786;
        background-position: 100% 0;
        box-shadow:
            0 12px 30px rgba(212, 175, 55, 0.38),
            0 0 0 4px rgba(212, 175, 55, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.68);
        transform: translateY(-2px) scale(1.015);
    }

    .header-actions .desktop-cta .btn-icon {
        transition: transform 0.25s ease;
    }

    .header-actions .desktop-cta:hover .btn-icon,
    .header-actions .desktop-cta:focus-visible .btn-icon {
        transform: translateX(4px);
    }
}

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

@keyframes acrCtaShine {
    0%, 58% { left: -42%; opacity: 0; }
    66% { opacity: 0.9; }
    86%, 100% { left: 122%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .header-actions .desktop-cta,
    .header-actions .desktop-cta::before {
        animation: none;
    }
}


/* ============================================================
   AJUSTE FINAL — Selector de idioma más compacto y equilibrado
   ============================================================ */
@media (min-width: 1200px) {
    .header-actions .desktop-language {
        flex: 0 0 var(--header-action-width);
        width: var(--header-action-width);
        min-width: var(--header-action-width);
        max-width: var(--header-action-width);
    }

    .header-actions .landing-language-switcher,
    .header-actions .landing-language-switcher .language-select-form,
    .header-actions .landing-language-switcher .language-select {
        width: 100%;
    }

    .header-actions .landing-language-switcher .language-select {
        height: 48px;
        min-height: 48px;
        padding-left: 2.55rem;
        padding-right: 2.35rem;
        font-size: 0.81rem;
        text-align: center;
        text-align-last: center;
    }

    .header-actions .landing-language-switcher .language-select-icon {
        left: 13px;
    }

    .header-actions .landing-language-switcher .language-select-chevron {
        right: 14px;
    }
}

/* Organigrama: el modal conserva superficie azul, incluso en tema claro. */
.org-tooltip .tooltip-info h4,
.org-tooltip .tooltip-info #tooltipName {
    color: #ffffff;
}

.org-tooltip .tooltip-info p:not(.gold),
.org-tooltip .tooltip-info #tooltipDesc {
    color: rgba(255, 255, 255, 0.72);
}

@media (prefers-color-scheme: light) {
    .hero .hero-center-badge,
    .hero-center-badge {
        color: #ffffff;
        -webkit-text-fill-color: #ffffff;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
    }

    .hero h1,
    .hero-title,
    .hero-break {
        color: #0b1220;
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.48);
    }

    .hero-title .gold {
        color: #0f4c81;
    }
}
