/*
Theme Name:  Theme Nexo
Theme URI:   https://nexo.audiovisual
Author:      Nexo Audiovisual
Author URI:  https://nexo.audiovisual
Description: Tema personalizado para nexo.audiovisual. WordPress + GSAP. Animaciones, paletas de color por sección, zona privada de usuarios.
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theme-nexo
Tags:        custom-logo, custom-menu, custom-background, full-width-template, featured-images, gsap, animation
*/

/* ================================================================
   CSS CUSTOM PROPERTIES — Paleta de colores y tokens de diseño
   ================================================================ */
:root {

  /* ── Colores de marca ── */
  --nexo-dark:    #1A0A2E;   /* Fondo principal — navy oscuro */
  --nexo-cream:   #F0F0E4;   /* Texto principal — crema */
  --nexo-white:   #FFFFFF;

  /* ── Paletas por sección (se animan con GSAP) ── */
  --nexo-cyan:    #00E8C6;   /* El Programa */
  --nexo-yellow:  #FFE600;   /* Convocatorias */
  --nexo-magenta: #CC2EFF;   /* Directorio ICC */
  --nexo-red:     #FF3D5A;   /* News / Foro */
  --nexo-green:   #3DFF8F;   /* Acento global */

  /* ── Color activo de sección (modificado por GSAP en JS) ── */
  --section-accent: var(--nexo-cyan);
  --section-bg:     var(--nexo-dark);

  /* ── Tipografía ── */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'Space Grotesk', sans-serif;

  --fs-xs:   0.75rem;    /*  12px */
  --fs-sm:   0.875rem;   /*  14px */
  --fs-base: 1rem;       /*  16px */
  --fs-md:   1.125rem;   /*  18px */
  --fs-lg:   1.5rem;     /*  24px */
  --fs-xl:   2rem;       /*  32px */
  --fs-2xl:  2.5rem;     /*  40px */
  --fs-3xl:  3.5rem;     /*  56px */
  --fs-4xl:  5rem;       /*  80px */
  --fs-5xl:  7.5rem;     /* 120px */

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-bold:    700;
  --fw-black:   900;

  --lh-tight:  1.1;
  --lh-snug:   1.3;
  --lh-normal: 1.6;

  /* ── Espaciado ── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ── Layout ── */
  --container-max: 1280px;
  --container-pad: clamp(1.5rem, 5vw, 4rem);
  --nav-height:    72px;

  /* ── Transiciones ── */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 0.25s;
  --duration-base: 0.5s;
  --duration-slow: 0.9s;

  /* ── Z-index ── */
  --z-below:   -1;
  --z-base:     0;
  --z-above:    10;
  --z-nav:      100;
  --z-overlay:  200;
  --z-modal:    300;
  --z-loader:   999;
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: auto; /* GSAP ScrollSmoother controla el scroll */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family:      var(--font-body);
  font-size:        var(--fs-base);
  font-weight:      var(--fw-regular);
  line-height:      var(--lh-normal);
  color:            var(--nexo-cream);
  background-color: var(--nexo-dark);
  overflow-x:       hidden;
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Estado inicial antes de que GSAP tome el control */
body.is-loading {
  overflow: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size:   inherit;
}

/* ================================================================
   TIPOGRAFÍA
   ================================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family:  var(--font-heading);
  font-weight:  var(--fw-bold);
  line-height:  var(--lh-tight);
  color:        var(--nexo-cream);
}

h1 { font-size: clamp(var(--fs-3xl), 8vw, var(--fs-5xl)); }
h2 { font-size: clamp(var(--fs-2xl), 5vw, var(--fs-4xl)); }
h3 { font-size: clamp(var(--fs-xl),  3vw, var(--fs-3xl)); }
h4 { font-size: clamp(var(--fs-lg),  2vw, var(--fs-2xl)); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p {
  max-width: 68ch;
  line-height: var(--lh-normal);
}

/* ================================================================
   LAYOUT
   ================================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  position: relative;
  padding-block: var(--space-24);
}

/* ================================================================
   CARGADOR DE PÁGINA
   ================================================================ */
#nexo-loader {
  position:   fixed;
  inset:      0;
  z-index:    var(--z-loader);
  display:    flex;
  align-items: center;
  justify-content: center;
  background-color: var(--nexo-dark);
  pointer-events: none;
}

.loader__logo {
  width: 80px;
}

/* ================================================================
   NAVEGACIÓN
   ================================================================ */
.site-nav {
  position:         fixed;
  top:              0;
  left:             0;
  right:            0;
  z-index:          var(--z-nav);
  height:           var(--nav-height);
  display:          flex;
  align-items:      center;
  padding-inline:   var(--container-pad);
  transition:       background-color var(--duration-base) var(--ease-out-expo);
}

.site-nav.is-scrolled {
  background-color: rgba(26, 10, 46, 0.92);
  backdrop-filter:  blur(12px);
}

.nav__brand {
  display:     flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__brand img {
  height: 36px;
  width:  auto;
}

.nav__list {
  display:         flex;
  align-items:     center;
  gap:             var(--space-8);
  margin-inline-start: auto;
}

.nav__link {
  font-size:      var(--fs-sm);
  font-weight:    var(--fw-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color:          var(--nexo-cream);
  opacity:        0.7;
  transition:     opacity var(--duration-fast) ease,
                  color   var(--duration-fast) ease;
  position:       relative;
  padding-block:  var(--space-2);
}

.nav__link::after {
  content:    '';
  position:   absolute;
  bottom:     0;
  left:       0;
  width:      0;
  height:     2px;
  background: var(--section-accent);
  transition: width var(--duration-base) var(--ease-out-expo);
}

.nav__link:hover,
.nav__link.is-active {
  opacity: 1;
  color:   var(--section-accent);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  width: 100%;
}

/* Hamburger (móvil) */
.nav__toggle {
  display:    none;
  flex-direction: column;
  gap:        5px;
  width:      32px;
  padding:    4px;
  margin-inline-start: auto;
  cursor:     pointer;
}

.nav__toggle span {
  display:          block;
  height:           2px;
  background-color: var(--nexo-cream);
  border-radius:    2px;
  transform-origin: center;
  transition:       transform var(--duration-base) var(--ease-out-expo),
                    opacity   var(--duration-fast)  ease;
}

/* Menú fullscreen móvil */
.nav__mobile {
  position:   fixed;
  inset:      0;
  z-index:    calc(var(--z-nav) - 1);
  display:    flex;
  flex-direction: column;
  justify-content: center;
  align-items:     center;
  gap:             var(--space-8);
  background-color: var(--nexo-dark);
  clip-path:  circle(0% at calc(100% - 2.5rem) 36px);
  pointer-events: none;
}

.nav__mobile.is-open {
  pointer-events: auto;
}

.nav__mobile .nav__link {
  font-size:   var(--fs-xl);
  font-weight: var(--fw-bold);
  opacity:     0;
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position:   relative;
  min-height: 100svh;
  display:    flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block-end: var(--space-16);
  overflow:   hidden;
}

.hero__bg {
  position: absolute;
  inset:    0;
  z-index:  var(--z-below);
}

.hero__title {
  font-size:   clamp(var(--fs-3xl), 10vw, var(--fs-5xl));
  font-weight: var(--fw-black);
  line-height: 0.9;
  mix-blend-mode: normal;
}

.hero__accent {
  color:       var(--section-accent);
  display:     block;
}

/* ================================================================
   SECCIONES DE CONTENIDO
   ================================================================ */
.section-label {
  font-size:      var(--fs-xs);
  font-weight:    var(--fw-bold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color:          var(--section-accent);
  margin-block-end: var(--space-4);
}

.section-title {
  font-size:   clamp(var(--fs-2xl), 5vw, var(--fs-4xl));
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-block-end: var(--space-6);
}

/* ================================================================
   TARJETAS (Cards)
   ================================================================ */
.card {
  position:      relative;
  overflow:      hidden;
  border-radius: 4px;
  background:    rgba(255, 255, 255, 0.04);
  border:        1px solid rgba(255, 255, 255, 0.08);
  transition:    border-color var(--duration-base) ease;
}

.card:hover {
  border-color: var(--section-accent);
}

.card__image {
  aspect-ratio: 4 / 5;
  overflow:     hidden;
}

.card__image img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.card:hover .card__image img {
  transform: scale(1.06);
}

.card__body {
  padding: var(--space-6);
}

.card__name {
  font-size:   var(--fs-md);
  font-weight: var(--fw-bold);
  margin-block-end: var(--space-1);
}

.card__meta {
  font-size:   var(--fs-sm);
  opacity:     0.6;
  font-weight: var(--fw-medium);
}

.card__tag {
  display:        inline-block;
  margin-block-start: var(--space-4);
  padding:        var(--space-1) var(--space-3);
  font-size:      var(--fs-xs);
  font-weight:    var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color:          var(--nexo-dark);
  background:     var(--section-accent);
  border-radius:  2px;
}

/* ================================================================
   FILTROS (Directorio ICC)
   ================================================================ */
.filters {
  display:         flex;
  flex-wrap:       wrap;
  gap:             var(--space-2);
  margin-block-end: var(--space-12);
  border-bottom:   2px solid rgba(255,255,255,0.1);
  padding-block-end: var(--space-4);
}

.filter-btn {
  font-family:    var(--font-body);
  font-size:      var(--fs-base);
  font-weight:    var(--fw-medium);
  padding:        var(--space-2) var(--space-4);
  border-radius:  100px;
  border:         1px solid rgba(255,255,255,0.15);
  color:          var(--nexo-cream);
  background:     transparent;
  cursor:         pointer;
  transition:     all var(--duration-fast) ease;
}

.filter-btn:hover {
  border-color: var(--section-accent);
  color:        var(--section-accent);
}

.filter-btn.is-active {
  background:   var(--section-accent);
  border-color: var(--section-accent);
  color:        var(--nexo-dark);
}

.filter-btn .filter-count {
  font-size:   var(--fs-xs);
  font-weight: var(--fw-medium);
  opacity:     0.7;
  margin-inline-start: var(--space-1);
}

/* Grid de cards filtrable */
.cards-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap:                   var(--space-6);
}

/* ================================================================
   BOTONES
   ================================================================ */
.btn {
  display:        inline-flex;
  align-items:    center;
  gap:            var(--space-3);
  padding:        var(--space-4) var(--space-8);
  font-family:    var(--font-body);
  font-size:      var(--fs-sm);
  font-weight:    var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius:  100px;
  transition:     all var(--duration-base) var(--ease-out-expo);
  cursor:         pointer;
  border:         2px solid transparent;
}

.btn--primary {
  background: var(--section-accent);
  color:      var(--nexo-dark);
}

.btn--primary:hover {
  transform:  translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.btn--outline {
  background:   transparent;
  border-color: var(--nexo-cream);
  color:        var(--nexo-cream);
}

.btn--outline:hover {
  background:  var(--nexo-cream);
  color:       var(--nexo-dark);
  transform:   translateY(-2px);
}

.btn--ghost {
  background:   transparent;
  border-color: var(--section-accent);
  color:        var(--section-accent);
}

.btn--ghost:hover {
  background: var(--section-accent);
  color:      var(--nexo-dark);
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  padding-block:  var(--space-16);
  border-top:     1px solid rgba(255,255,255,0.08);
  background:     var(--nexo-dark);
}

.footer__grid {
  display:               grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap:                   var(--space-12);
  margin-block-end:      var(--space-12);
}

.footer__brand img {
  height: 48px;
  margin-block-end: var(--space-4);
}

.footer__tagline {
  font-size: var(--fs-sm);
  opacity:   0.5;
  max-width: 28ch;
}

.footer__col-title {
  font-size:        var(--fs-xs);
  font-weight:      var(--fw-bold);
  letter-spacing:   0.12em;
  text-transform:   uppercase;
  color:            var(--section-accent);
  margin-block-end: var(--space-4);
}

.footer__menu {
  display:        flex;
  flex-direction: column;
  gap:            var(--space-3);
}

.footer__menu a {
  font-size:  var(--fs-sm);
  opacity:    0.6;
  transition: opacity var(--duration-fast) ease,
              color   var(--duration-fast) ease;
}

.footer__menu a:hover {
  opacity: 1;
  color:   var(--section-accent);
}

.footer__bottom {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding-block-start: var(--space-6);
  border-top:          1px solid rgba(255,255,255,0.08);
  font-size:           var(--fs-xs);
  opacity:             0.4;
}

/* ================================================================
   FORMULARIOS
   ================================================================ */
.form-group {
  display:          flex;
  flex-direction:   column;
  gap:              var(--space-2);
  margin-block-end: var(--space-6);
}

.form-label {
  font-size:      var(--fs-sm);
  font-weight:    var(--fw-medium);
  letter-spacing: 0.04em;
}

.form-input,
.form-textarea,
.form-select {
  width:        100%;
  padding:      var(--space-4) var(--space-4);
  background:   rgba(255,255,255,0.05);
  border:       1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color:        var(--nexo-cream);
  font-size:    var(--fs-base);
  outline:      none;
  transition:   border-color var(--duration-fast) ease,
                background   var(--duration-fast) ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--section-accent);
  background:   rgba(255,255,255,0.08);
}

.form-input::placeholder,
.form-textarea::placeholder {
  opacity: 0.4;
}

.form-textarea {
  resize:     vertical;
  min-height: 140px;
}

.form-error {
  font-size: var(--fs-xs);
  color:     var(--nexo-red);
}

/* ================================================================
   UTILIDADES
   ================================================================ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-accent  { color: var(--section-accent); }
.text-cream   { color: var(--nexo-cream); }
.text-muted   { opacity: 0.5; }
.text-center  { text-align: center; }

.mt-auto { margin-top: auto; }

/* Targets de animación GSAP (invisibles antes del init) */
[data-gsap-fade]   { opacity: 0; }
[data-gsap-slide]  { opacity: 0; transform: translateY(40px); }
[data-gsap-reveal] { overflow: hidden; }

/* ================================================================
   HOME — BANNER HERO
   ================================================================ */
.home-banner {
  position:   relative;
  width:      100%;
  height:     100svh;
  min-height: 600px;
  overflow:   hidden;
  background: var(--nexo-dark);
}

/* Track: apilamiento absoluto de todos los slides */
.home-banner__track {
  position: absolute;
  inset:    0;
}

.banner-slide {
  position: absolute;
  inset:    0;
}

/* Imagen de fondo con parallax */
.banner-slide__bg {
  position:            absolute;
  inset:               -20%; /* espacio extra para el efecto parallax */
  background-size:     cover;
  background-position: center;
  background-repeat:   no-repeat;
  will-change:         transform;
}

/* Fondo de fallback si no hay imagen */
.banner-slide__bg--no-img {
  background: linear-gradient(
    135deg,
    var(--nexo-dark)   0%,
    #2A0A4E            50%,
    var(--nexo-dark)   100%
  );
}

/* Overlay oscuro degradado para legibilidad del texto */
.banner-slide__overlay {
  position:   absolute;
  inset:      0;
  background: linear-gradient(
    to top,
    rgba(26, 10, 46, 0.85) 0%,
    rgba(26, 10, 46, 0.20) 50%,
    rgba(26, 10, 46, 0.10) 100%
  );
  pointer-events: none;
}

/* Contenido del slide: posicionado en la parte inferior */
.banner-slide__content {
  position:    absolute;
  bottom:      0;
  left:        0;
  right:       0;
  padding-block-end: clamp(var(--space-16), 10vh, var(--space-32));
}

/* Título del banner — tipografía grande */
.banner-slide__title {
  font-size:   clamp(3rem, 9vw, 9rem);
  font-weight: var(--fw-black);
  line-height: 0.95;
  color:       var(--nexo-cream);
  max-width:   16ch;
  word-break:  break-word;
}

/* Puntos de navegación (slider múltiple) */
.banner__dots {
  position: absolute;
  bottom:   var(--space-8);
  right:    var(--container-pad);
  display:  flex;
  gap:      var(--space-3);
  z-index:  var(--z-above);
}

.banner__dot {
  width:         10px;
  height:        10px;
  border-radius: 50%;
  border:        2px solid rgba(240, 240, 228, 0.5);
  background:    transparent;
  cursor:        pointer;
  padding:       0;
  transition:    all var(--duration-fast) ease;
}

.banner__dot:hover,
.banner__dot.is-active {
  background:    var(--nexo-cream);
  border-color:  var(--nexo-cream);
  transform:     scale(1.2);
}

/* Indicador de scroll — línea animada */
.banner__scroll-hint {
  position:        absolute;
  bottom:          var(--space-8);
  left:            50%;
  transform:       translateX(-50%);
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  gap:             var(--space-2);
  z-index:         var(--z-above);
}

.scroll-hint__line {
  display:          block;
  width:            2px;
  height:           48px;
  background:       linear-gradient(
    to bottom,
    var(--section-accent),
    transparent
  );
  animation:        scrollHint 1.8s ease-in-out infinite;
}

@keyframes scrollHint {
  0%   { transform: scaleY(0); transform-origin: top;    opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top;    opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ================================================================
   HOME — SECCIÓN EL PROGRAMA
   ================================================================ */
.home-programa {
  background: var(--nexo-dark);
}

.home-programa__header {
  margin-block-end: var(--space-12);
}

/* Lista de cards de programa */
.programa-cards {
  display:        flex;
  flex-direction: column;
}

.programa-card {
  display:        grid;
  grid-template-columns: 64px 1fr;
  grid-template-rows:    auto auto;
  column-gap:     var(--space-8);
  row-gap:        var(--space-4);
  padding-block:  var(--space-12);
  border-bottom:  1px solid rgba(255, 255, 255, 0.08);
  transition:     border-color var(--duration-base) ease;
}

.programa-card:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.programa-card:hover {
  border-bottom-color: var(--nexo-cyan);
}

/* Número de orden */
.programa-card__num {
  font-size:   clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--fw-black);
  line-height: 1;
  color:       var(--nexo-cyan);
  opacity:     0.35;
  grid-row:    1 / 3;
  align-self:  start;
  padding-block-start: var(--space-1);
  transition:  opacity var(--duration-base) ease;
}

.programa-card:hover .programa-card__num {
  opacity: 0.8;
}

/* Título de la card */
.programa-card__title {
  font-size:    clamp(var(--fs-xl), 3vw, var(--fs-3xl));
  font-weight:  var(--fw-bold);
  line-height:  var(--lh-tight);
  color:        var(--nexo-cream);
  align-self:   center;
  grid-column:  2;
  grid-row:     1;
}

/* Cuerpo / texto WYSIWYG */
.programa-card__body {
  grid-column: 2;
  grid-row:    2;
}

.programa-card__text {
  font-size:   var(--fs-base);
  line-height: var(--lh-normal);
  opacity:     0.7;
  max-width:   70ch;
}

/* Estilos para el contenido WYSIWYG dentro de las cards */
.programa-card__text p  { margin-block-end: var(--space-4); }
.programa-card__text ul,
.programa-card__text ol { padding-inline-start: var(--space-6); margin-block-end: var(--space-4); }
.programa-card__text li { list-style: disc; margin-block-end: var(--space-2); }
.programa-card__text a  { color: var(--nexo-cyan); text-decoration: underline; }
.programa-card__text strong { color: var(--nexo-cream); font-weight: var(--fw-bold); }

/* Responsive */
@media (max-width: 640px) {
  .programa-card {
    grid-template-columns: 44px 1fr;
    column-gap: var(--space-4);
  }

  .banner-slide__title {
    font-size: clamp(2.5rem, 11vw, 4rem);
  }
}

/* ================================================================
   SELECTOR DE IDIOMA — dropdown estilo Figma
   ================================================================ */
.lang-selector {
  position:           relative;
  margin-inline-start: var(--space-4);
}

/* Trigger: bandera + nombre + flecha */
.lang-selector__trigger {
  display:     flex;
  align-items: center;
  gap:         var(--space-2);
  padding:     6px 12px 6px 10px;
  background:  transparent;
  border:      1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  color:       var(--nexo-cream);
  cursor:      pointer;
  font-family: var(--font-body);
  font-size:   var(--fs-xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  transition:  border-color var(--duration-fast) ease,
               color        var(--duration-fast) ease;
}

.lang-selector__trigger:hover,
.lang-selector__trigger[aria-expanded="true"] {
  border-color: var(--section-accent);
  color:        var(--section-accent);
}

.lang-selector__flag {
  font-size:   15px;
  line-height: 1;
}

.lang-selector__label {
  font-size:      var(--fs-xs);
  font-weight:    var(--fw-medium);
  letter-spacing: 0.02em;
}

.lang-selector__arrow {
  display:    flex;
  align-items: center;
  margin-inline-start: 2px;
  color:      currentColor;
  transition: transform var(--duration-fast) ease;
}

.lang-selector__trigger[aria-expanded="true"] .lang-selector__arrow {
  transform: rotate(180deg);
}

/* Panel del dropdown */
.lang-selector__menu {
  position:       absolute;
  top:            calc(100% + 8px);
  right:          0;
  min-width:      148px;
  background:     rgba(20, 8, 36, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border:         1.5px solid rgba(255, 255, 255, 0.12);
  border-radius:  10px;
  overflow:       hidden;
  z-index:        calc(var(--z-nav) + 10);
  transform-origin: top right;
  /* El atributo `hidden` lo gestiona JS */
}

/* Opciones del menú */
.lang-selector__option {
  display:     flex;
  align-items: center;
  gap:         var(--space-3);
  padding:     10px 14px;
  cursor:      pointer;
  font-size:   var(--fs-sm);
  font-weight: var(--fw-medium);
  color:       rgba(240, 240, 228, 0.65);
  transition:  background var(--duration-fast) ease,
               color      var(--duration-fast) ease;
  outline:     none;
}

.lang-selector__option:hover {
  background: rgba(255, 255, 255, 0.07);
  color:      var(--nexo-cream);
}

/* Opción actualmente seleccionada */
.lang-selector__option.is-selected {
  color: var(--section-accent);
  background: rgba(255, 255, 255, 0.04);
}

.lang-selector__option.is-selected::after {
  content:           '✓';
  margin-inline-start: auto;
  font-size:         var(--fs-xs);
  opacity:           0.7;
}

.lang-selector__opt-flag {
  font-size: 16px;
  line-height: 1;
}

/* Separador entre opciones */
.lang-selector__option + .lang-selector__option {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ================================================================
   BLOQUES DE CONTENIDO BILINGÜE
   ================================================================ */

/*
 * Fallback CSS para cuando JS no está disponible.
 * PHP ya renderiza con el atributo `hidden` correcto según la cookie,
 * así que esto solo sirve como capa extra de seguridad.
 */
body[data-lang="es"] [data-show-lang="fr"],
body[data-lang="fr"] [data-show-lang="es"] {
  display: none !important;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .nav__toggle {
    display: flex;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  [data-gsap-fade],
  [data-gsap-slide] {
    opacity: 1;
    transform: none;
  }
}
