/* ═══════════════════════════════════════════════════════════════════════════
   DISEÑO ELEGANTE, COMPACTO Y CONMUTADOR DE IDIOMA CORPORATIVO
═══════════════════════════════════════════════════════════════════════════ */

/* Ajuste general para permitir ver el menú sin recortarse */
.site-header,
.header-inner,
.nav-menu {
    overflow: visible !important;
}

.nav-menu {
    display: flex !important;
    align-items: center !important;
}

/* Header derecho: selector de idioma + botón hamburguesa */
.header-right {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--navy);
}

/* ---------- HERO COMPACTO ELEGANTE ---------- */
.prog-page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--navy);
    color: var(--white);
    padding: 80px 24px 50px;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.prog-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
                linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%);
}

.prog-page-hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.prog-page-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    filter: grayscale(0.4) contrast(1.1);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.prog-page-hero:hover .prog-page-hero-media img {
    transform: scale(1.03);
}

/* Badge Delicado */
.prog-page-hero .prog-page-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.prog-page-hero .prog-page-badge:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}

.prog-page-hero .prog-page-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 8px var(--orange);
}

.prog-page-hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.8rem, 3.8vw, 2.6rem);
    line-height: 1.15;
    margin: 0 0 10px;
    font-weight: 400;
    letter-spacing: -0.01em;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.prog-page-hero p {
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.98rem;
    line-height: 1.6;
    font-weight: 300;
}

.prog-page-hero-perf {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 14px;
    z-index: 1;
    background-image: radial-gradient(circle at center, var(--white) 3.5px, transparent 3.6px);
    background-size: 26px 14px;
    background-position: 13px 7px;
    background-repeat: repeat-x;
    opacity: 0.95;
}

/* ---------- CONTENIDO PRINCIPAL ---------- */
.prog-page-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 24px 64px;
}

.prog-page-body h2 {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--navy);
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin: 48px 0 20px;
    letter-spacing: -0.01em;
}

.prog-page-body h2::before {
    content: "";
    flex-shrink: 0;
    width: 20px;
    height: 1px;
    background: var(--orange);
}

.prog-page-body h2:first-child {
    margin-top: 0;
}

.prog-page-body p {
    color: var(--gray-mid);
    line-height: 1.85;
    font-size: 1.02rem;
    margin-bottom: 20px;
    font-weight: 400;
}

/* ---------- IMAGEN DESTACADA ELEGANTE ---------- */
.prog-page-media {
    position: relative;
    margin: 36px 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--gray-lt);
    box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.08);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.prog-page-media:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 50px -12px rgba(15, 23, 42, 0.12);
}

.prog-page-media img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.prog-page-media:hover img {
    transform: scale(1.02);
}

.prog-page-media figcaption {
    font-size: 0.85rem;
    color: var(--gray-mid);
    font-style: italic;
    padding: 14px 22px;
    background: var(--white);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    letter-spacing: 0.01em;
}

/* ---------- GALERÍA FOTOGRÁFICA REFINADA ---------- */
.prog-page-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 24px 0 40px;
}

.prog-page-gallery figure {
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    background: var(--navy);
}

.prog-page-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    filter: grayscale(0.2) contrast(1.02);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
    cursor: pointer;
}

.prog-page-gallery img:hover,
.prog-page-gallery img:focus-visible {
    transform: scale(1.06);
    filter: grayscale(0) contrast(1.05);
}

/* ---------- LISTAS REFINADAS ---------- */
.prog-page-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: grid;
    gap: 12px;
}

.prog-page-body ul li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--gray-lt);
    border-radius: 10px;
    padding: 14px 20px;
    line-height: 1.6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.prog-page-body ul li:hover {
    transform: translateX(6px);
    border-color: rgba(13, 148, 136, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.prog-page-body ul li i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(13, 148, 136, 0.08);
    color: var(--teal);
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.prog-page-body ul li:hover i {
    background: var(--teal);
    color: var(--white);
}

/* ---------- CTA FINAL ESTILO TARJETA PREMIUM ---------- */
.prog-page-cta {
    position: relative;
    background: var(--white);
    border: 1px solid var(--gray-lt);
    border-radius: 16px;
    padding: 48px 36px 40px;
    text-align: center;
    margin-top: 56px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.07);
}

.prog-page-cta h2 {
    justify-content: center;
    margin-top: 0;
    font-size: 1.9rem;
}

.prog-page-cta h2::before {
    display: none;
}

.prog-page-cta p {
    color: var(--gray-mid);
    max-width: 560px;
    margin: 0 auto 28px;
    font-size: 1.05rem;
}

.prog-page-cta a,
.prog-page-cta button {
    position: relative;
    display: inline-block;
    background: var(--orange);
    color: var(--white);
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: 0.03em;
    padding: 14px 36px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(216, 119, 87, 0.25);
    transition: all 0.3s ease;
}

.prog-page-cta a:hover,
.prog-page-cta button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(216, 119, 87, 0.35);
}

.prog-page-cta a:active,
.prog-page-cta button:active {
    transform: translateY(0);
}

/* ---------- BOTÓN VOLVER ---------- */
.prog-page-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--teal);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--gray-lt);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.prog-page-back:hover {
    gap: 12px;
    color: var(--white);
    background: var(--teal);
    border-color: var(--teal);
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.2);
}

/* ---------- CONMUTADOR DE IDIOMA CORPORATIVO ---------- */
.gt-wrapper {
    position: relative !important;
    display: inline-block !important;
    margin-left: 16px !important;
    z-index: 9999 !important;
}

/* Botón Ovalado Azul Oscuro */
.gt-current-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background-color: #002244 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 8px 20px !important;
    border-radius: 50px !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 34, 68, 0.2) !important;
    transition: background-color 0.2s ease, transform 0.15s ease !important;
    white-space: nowrap !important;
}

.gt-current-btn:hover {
    background-color: #00162e !important;
}

.gt-current-btn .gt-flag {
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.gt-current-btn .gt-text {
    font-weight: 600 !important;
}

.gt-current-btn .gt-arrow {
    font-size: 0.7rem !important;
    margin-left: 4px !important;
    transition: transform 0.25s ease !important;
}

/* Menú Desplegable Blanco Flotante */
.gt-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    right: 0 !important;
    min-width: 170px !important;
    background-color: #ffffff !important;
    border-radius: 18px !important;
    padding: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-8px) !important;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s !important;
    z-index: 10000 !important;
}

/* Estado Activo cuando se hace clic */
.gt-wrapper.open .gt-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.gt-wrapper.open .gt-arrow {
    transform: rotate(180deg) !important;
}

/* Opciones de la lista */
.gt-option {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 10px 14px !important;
    border: none !important;
    background: transparent !important;
    border-radius: 12px !important;
    color: #002244 !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: background-color 0.15s ease !important;
}

.gt-option:hover {
    background-color: #f1f5f9 !important;
}

.gt-option .gt-option-flag {
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    color: #64748b !important;
    width: 28px !important;
    text-transform: uppercase !important;
}

.gt-option .gt-option-text {
    flex-grow: 1 !important;
}

.gt-option .gt-check {
    font-size: 0.85rem !important;
    color: #16a34a !important;
    display: none !important;
}

.gt-option.active .gt-check {
    display: inline-block !important;
}

/* ---------- MENÚ MÓVIL (HAMBURGUESA) ---------- */
@media (max-width: 768px) {
    .nav-menu {
        display: none !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background: var(--white) !important;
        border-bottom: 1px solid var(--gray-lt) !important;
        padding: 1.2rem 0 !important;
        box-shadow: 0 8px 24px rgba(0,40,85,.08) !important;
    }
    .nav-menu.show {
        display: flex !important;
    }
    .nav-menu a {
        margin: 0 !important;
        padding: 0.75rem 2rem !important;
        font-size: 1rem !important;
    }
    .mobile-toggle {
        display: block !important;
    }

    /* Selector de idioma en móvil: solo bandera/código */
    .gt-text { display: none; }
    .gt-current-btn { padding: 8px 12px !important; gap: 5px !important; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .prog-page-hero {
        padding: 70px 20px 45px;
    }

    .prog-page-body {
        padding: 48px 20px 48px;
    }
}

@media (max-width: 600px) {
    .prog-page-hero {
        padding: 60px 16px 38px;
        clip-path: polygon(0 0, 100% 0, 100% 97%, 0 100%);
    }

    .prog-page-body {
        padding: 40px 16px 36px;
    }

    .prog-page-cta {
        padding: 36px 20px 32px;
    }

    .prog-page-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .prog-page-gallery img,
    .prog-page-cta a,
    .prog-page-cta button,
    .prog-page-back,
    .prog-page-body ul li,
    .prog-page-body ul li i,
    .prog-page-hero-media img,
    .prog-page-media {
        transition: none;
    }
}