/* =====================================================
   VARIABLES DE SISTEMA Y RESET
   ===================================================== */
:root {
  /* Paleta de colores principal */
  --color-blue: #1a43dd;      /* Azul principal de acento */
  --color-dark-1: #262626;    /* Fondo oscuro para la sección Hero */
  --color-dark-2: #262626;    /* Fondo oscuro intermedio para Servicios */
  --color-dark-3: #262626;    /* Fondo oscuro profundo para Clientes */
  --color-dark-4: #262626;    /* Fondo negro para el Footer */
  --color-white: #ffffff;     /* Blanco de contraste */
  
  /* Espaciados y bordes */
  --pad-x: 60px;              /* Relleno horizontal (padding) en escritorio */
  --pad-x-m: 24px;            /* Relleno horizontal (padding) en móviles */
  --radius-panel: 48px;       /* Radio de curvatura para las esquinas de los paneles */
}

/* Reset general de márgenes, rellenos y modelo de caja */
*, *::before, *::after { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

/* Configuración base del HTML */
html { 
  font-family: 'Urbanist', sans-serif; 
  scroll-behavior: smooth;    /* Habilita el desplazamiento suave nativo */
}

/* Configuración base del Body */
body { 
  background: var(--color-dark-1); 
  color: var(--color-white); 
  overflow-x: hidden;         /* Previene el desbordamiento horizontal */
  -webkit-font-smoothing: antialiased; /* Suavizado de fuente en navegadores basados en WebKit */
}

/* =====================================================
   ESTRUCTURA MAESTRA DEL SCROLL (GSAP)
   ===================================================== */
.stack-container {
  position: relative;
  height: 100vh;              /* Altura fija de pantalla completa */
  overflow: hidden;           /* Oculta el scroll interno para que GSAP maneje las capas */
}

.panel {
  position: absolute; 
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;          /* Altura mínima de pantalla completa */
  height: auto;               /* Adaptable al contenido de forma orgánica */
  box-shadow: 0 10px 20px rgba(0,0,0,0.4); /* Sombra para dar efecto de superposición */
  will-change: transform;     /* Optimiza el rendimiento de renderizado para animaciones de posición */
  backface-visibility: hidden; /* Evita parpadeos en animaciones 3D */
}

/* ORDEN Z (Z-INDEX) INVERTIDO PARA SUPERPOSICIÓN DE CAPAS */
.z-1 { z-index: 5; } /* Hero S01 - Capa superior */
.z-2 { z-index: 4; } /* Servicios S02 */
.z-3 { z-index: 3; } /* Experiencia S03 */
.z-4 { z-index: 2; } /* Clientes S04 */
.z-5 { z-index: 1; box-shadow: none; } /* Footer S05 - Capa final de fondo */

/* Bordes curvos inferiores para el efecto de revelado (stacking) */
.radius-bottom { 
  border-radius: 0 0 var(--radius-panel) var(--radius-panel); 
}
.z-5.radius-bottom { 
  border-radius: 0;          /* El panel final no tiene curvatura inferior */
}

/* =====================================================
   UTILIDADES TIPOGRÁFICAS COMPARTIDAS
   ===================================================== */
h1 { 
  font-size: clamp(2.2rem, 4vw, 5.55rem); /* Tamaño responsivo y fluido de fuente (30px a 54px) */
  font-weight: 300; 
  line-height: 1.1; 
  margin-bottom: 14px; 
}
h1 strong { 
  font-weight: 900; 
}
h2 { 
  font-size: clamp(1.5rem, 3.5vw, 2.75rem); /* Tamaño responsivo adaptativo (24px a 44px) */
  font-weight: 300; 
  line-height: 1.2; 
}
h2 strong { 
  font-weight: 900; 
}

/* =====================================================
   ESTILOS DE SECCIÓN ESPECÍFICOS
   ===================================================== */

/* --- S01: HERO --- */
#s01 {
  background: linear-gradient(45deg, var(--color-dark-1) 0%, #1a45dd 50%, var(--color-white) 100%);
  display: flex;
  flex-direction: column;
  height: 100vh !important;   /* Fuerza la altura a 100vh para permitir el centrado vertical */
}
.s01-content {
  width: 85%;                 /* Ancho del contenido al 85% */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.s01-nav { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 22px 0; 
  flex-shrink: 0;             /* Previene que la barra colapse */
}
.hamburger { 
  display: flex; 
  flex-direction: column; 
  gap: 8px; 
  cursor: pointer; 
  background: none; 
  border: none; 
  padding: 4px; 
}
.hamburger span { 
  display: block; 
  width: 40px; 
  height: 3px; 
  background: #fff; 
  border-radius: 2px; 
}
.logo { 
  display: flex;
  align-items: center;
}
.logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* Espaciador de ancho en la barra de navegación para balancear la hamburguesa y el logo */
.nav-spacer { 
  width: 30px; 
}

.s01-body { 
  flex: 1;                    /* Toma todo el espacio vertical disponible */
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 0 0 50px; 
  gap: 40px; 
}
.s01-text { 
  width: 65%; 
}
.s01-text p { 
  font-size: 2.2rem;       /* Convertido de 15px */
  color: rgba(255,255,255,.8); 
  line-height: 1.2; 
  margin-bottom: 30px; 
}
.btn-border { 
  display: inline-block; 
  padding: 11px 26px; 
  border: 2px solid rgba(255,255,255,.8); 
  border-radius: 50px; 
  font-size: 0.8125rem;       /* Convertido de 13px */
  font-weight: 600; 
  color: #fff; 
  text-decoration: none; 
  transition: background .2s, color .2s; /* Transiciones suaves en hover */
}
.btn-border:hover { 
  background: #fff; 
  color: var(--color-blue); 
}
.iso_logo { 
  width: 35%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0; 
}
.iso_logo img {
  width: 450px;
  height: 450px;
  object-fit: contain;
  animation: float 4s ease-in-out infinite;
}

/* Keyframes para la animación de flotación e inclinación del círculo decorativo */
@keyframes float { 
  0%, 100% { transform: translateY(0) rotate(-6deg); } 
  50% { transform: translateY(-14px) rotate(-6deg); } 
}

.scroll-hint { 
  position: absolute; 
  bottom: 28px; 
  left: 50%; 
  transform: translateX(-50%); 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 6px; 
  font-size: 0.625rem;        /* Convertido de 10px */
  letter-spacing: 2px; 
  text-transform: uppercase; 
  color: rgba(255,255,255,.45); 
  animation: bob 2s ease-in-out infinite; /* Animación de rebote suave */
}

/* Keyframes para la animación de rebote vertical del indicador de scroll */
@keyframes bob { 
  0%, 100% { transform: translateX(-50%) translateY(0); } 
  50% { transform: translateX(-50%) translateY(6px); } 
}

/* --- S02: SERVICIOS --- */
#s02 { 
  background: var(--color-dark-2); 
  padding: 80px var(--pad-x); 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  height: 120vh !important;   /* Altura de 120vh según solicitud */
}
.s02-head { 
  text-align: center; 
  margin-bottom: 8px; 
}
.s02-sub { 
  text-align: center; 
  font-size: 1.5rem;        /* Convertido de 14px */
  color: #999; 
  margin-bottom: 40px; 
}
.s02-sub span { 
  color: var(--color-blue); 
  font-weight: 700; 
}
.cards { 
  display: grid; 
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4 columnas iguales en desktop */
  gap: 16px; 
  width: 100%; 
  max-width: 1100px; 
  margin-bottom: 40px; 
}
.card { 
  border-radius: 16px; 
  overflow: hidden; 
  position: relative; 
  aspect-ratio: 1 / 1.45;     /* Mayor altura en pantallas de escritorio */
  cursor: pointer; 
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.7s cubic-bezier(0.25, 1, 0.5, 1); 
}


/* Colores base para cada tarjeta de servicio con 70% de opacidad y transición lenta de retorno */
.card-brand { 
  background-color: rgba(119, 211, 0, 0.70); 
  transition: background-color 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.card-social { 
  background-color: rgba(254, 134, 22, 0.70); 
  transition: background-color 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.card-web { 
  background-color: rgba(166, 9, 240, 0.70); 
  transition: background-color 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.card-people { 
  background-color: rgba(83, 202, 249, 0.70); 
  transition: background-color 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Colores en hover con 15% de opacidad para revelar la imagen de fondo */
.card-brand:hover { background-color: rgba(119, 211, 0, 0.15); }
.card-social:hover { background-color: rgba(254, 134, 22, 0.15); }
.card-web:hover { background-color: rgba(166, 9, 240, 0.15); }
.card-people:hover { background-color: rgba(83, 202, 249, 0.15); }


 


.card-texture { 
  position: absolute; 
  inset: 0; 
  overflow: hidden; 
}
.card-overlay { 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(to bottom, transparent 70%, rgba(0,0,0,.5) 100%); 
  display: flex; 
  flex-direction: column; 
  justify-content: flex-end; 
  padding: 20px; 
}
.card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.3; /* Pequeña opacidad por defecto para que sea visible pero sutil */
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.card:hover .card-img {
  transform: scale(1.08); /* Zoom sutil y elegante */
  opacity: 0.9; /* Opacidad cambia al 90% (0.9) en hover */
}
.card-title { 
  font-size: 1.375rem;        /* Convertido de 22px */
  font-weight: 900; 
  color: #fff; 
  margin-bottom: 5px; 
}
.card-desc { 
  font-size: 0.75rem;         /* Convertido de 12px */
  color: rgba(255,255,255,.75); 
  line-height: 1.4; 
  margin-bottom: 12px; 
}
.card-link { 
  font-size: 0.625rem;        /* Convertido de 10px */
  font-weight: 700; 
  color: #fff; 
  text-decoration: none; 
  letter-spacing: 1px; 
  text-transform: uppercase; 
  border-bottom: 1px solid rgba(255,255,255,.4); 
  width: fit-content; 
  padding-bottom: 2px; 
}
.btn-paquetes { 
  display: inline-block; 
  padding: 16px 44px;         /* Relleno aumentado para hacerlo más grande */
  background: #181E27;
  background: linear-gradient(45deg, rgba(24, 30, 39, 1) 0%, rgba(26, 69, 221, 1) 50%, rgba(255, 255, 255, 1) 100%); 
  border-radius: 50px; 
  font-size: 1.15rem;         /* Tamaño de fuente aumentado */
  font-weight: 600; 
  color: #fff; 
  text-decoration: none; 
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), filter 0.3s ease; 
}
.btn-paquetes:hover { 
  filter: brightness(1.15);
  transform: scale(1.03);     /* Ligera ampliación interactiva */
}

/* --- S03: EXPERIENCIA --- */
#s03 { 
background: #1A45DD;
background: linear-gradient(0deg, rgba(26, 69, 221, 1) 0%, rgba(24, 31, 46, 1) 45%, rgba(24, 31, 46, 1) 55%, rgba(255, 255, 255, 1) 90%);
  padding: 80px var(--pad-x); 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
}
.s03-head { 
  text-align: center; 
  margin-bottom: 50px; 
  width: 100%; 
  color: #000;                /* Titular en color negro */
}
.vblocks { 
  display: flex; 
  flex-direction: column; 
  gap: 24px; 
  width: 100%; 
  max-width: 950px; 
  padding-bottom: 80px; 
}
.vblock { 
  border-radius: 20px; 
  overflow: hidden; 
  position: relative; 
  background: #0a0a0a; 
  height: 650px; 
  cursor: pointer; 
  transition: transform .3s ease; 
  flex-shrink: 0; 
}
.vblock:hover { 
  transform: scale(1.02);      /* Micro-zoom al pasar el cursor */
}
.vblock-inner { 
  position: absolute; 
  inset: 0; 
}
.play-btn { 
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%,-50%); 
  width: 64px; 
  height: 64px; 
  background: rgba(255,255,255,.92); 
  border-radius: 50%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  z-index: 4; 
  box-shadow: 0 4px 20px rgba(0,0,0,.4); 
  transition: transform .2s; 
}
.vblock:hover .play-btn { 
  transform: translate(-50%,-50%) scale(1.1); /* Efecto pop en el botón de reproducción */
}
.vblock-label { 
  position: absolute; 
  bottom: 24px; 
  left: 24px; 
  font-size: 0.9375rem;       /* Convertido de 15px */
  font-weight: 600; 
  color: #fff; 
  z-index: 5; 
  text-shadow: 0 2px 10px rgba(0,0,0,.8); /* Añade legibilidad al texto sobre el video */
}

/* --- S04: CLIENTES --- */
#s04 { 
  background: var(--color-dark-3); 
  height: 100vh !important;   /* Mantiene altura de pantalla completa estricta */
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  overflow: hidden; 
}
.s04-clients { 
  text-align: center; 
  width: 100%; 
  padding: 0 var(--pad-x); 
}
.s04-eyebrow {  
  letter-spacing: 2px; 
  text-transform: uppercase; 
  color: #777; 
  margin-bottom: 40px; 
}
.s04-logos { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 60px; 
  flex-wrap: wrap; 
}
.clogo { 
  color: rgba(255,255,255,.6); 
  transition: color .3s ease; 
  cursor: default; 
}
.clogo:hover { 
  color: #fff; 
}

.clogo-img { 
  height: 90px;               /* Altura de logotipos alineada */
  width: auto;
  opacity: 0.6;               /* Opacidad base sutil */
  transition: opacity 0.3s ease; 
}
.clogo:hover .clogo-img { 
  opacity: 1;                 /* Opacidad completa en hover */
}

/* --- S05: CONTACTO Y FOOTER --- */
#s05 { 
  background: var(--color-white); 
  color: #111; 
  height: 100vh !important;   /* Mantiene altura de pantalla completa estricta */
  display: flex; 
  flex-direction: column; 
}
.s05-cta { 
  flex: 1;                    /* Se expande para empujar el footer hacia abajo */
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  padding: 0 var(--pad-x); 
  position: relative; 
}
.s05-cta h2 { 
  color: #111; 
  margin-bottom: 24px; 
}
.s05-email { 
  font-size: 1.25rem;         /* Convertido de 20px */
  font-weight: 600; 
  color: var(--color-blue); 
  text-decoration: none; 
  border-bottom: 2px solid var(--color-blue); 
  width: fit-content; 
  padding-bottom: 2px; 
}
.wa-s05 { 
  position: absolute; 
  right: var(--pad-x); 
  top: 50%; 
  transform: translateY(-50%); 
  width: 70px; 
  height: 70px; 
  background: #25d366; 
  border-radius: 50%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  text-decoration: none; 
  box-shadow: 0 8px 25px rgba(37,211,102,.4); 
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1); 
}
.wa-s05:hover { 
  transform: translateY(-50%) scale(1.1); 
}

.s05-footer { 
  background: var(--color-dark-4); 
  color: #fff; 
  padding: 40px var(--pad-x); 
  border-top-left-radius: var(--radius-panel); 
  border-top-right-radius: var(--radius-panel); 
  display: flex; 
  align-items: center; 
  gap: 20px; 
  flex-shrink: 0;             /* Evita que el footer reduzca su tamaño */
}
.footer-label { 
  font-size: 1.2rem;        /* Convertido de 14px */
  color: #888; 
}
.soc { 
  width: 36px; 
  height: 36px; 
  background: #ffffff;        /* Fondo blanco según solicitud */
  border-radius: 50%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  text-decoration: none; 
  transition: opacity .2s, transform .2s; 
}
.soc:hover { 
  opacity: 0.85; 
  transform: scale(1.05);
}
.soc svg {
  fill: #262626;              /* Icono en color #262626 */
  stroke: #262626;
}
.soc svg rect,
.soc svg circle,
.soc svg path {
  fill: inherit;
  stroke: inherit;
}
.soc svg[fill="none"] {
  fill: none;
}
.soc svg[fill="none"] rect,
.soc svg[fill="none"] circle {
  fill: none;
}
.soc svg[fill="none"] circle:last-child {
  fill: #262626;
  stroke: none;
}

/* =====================================================
   MENÚ OVERLAY Y FLOTANTES
   ===================================================== */
#menu-overlay { 
  position: fixed; 
  inset: 0; 
  z-index: 9000;              /* Capa sobre todo el contenido */
  background: #0d0dcc; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  padding: 0 var(--pad-x); 
  opacity: 0; 
  pointer-events: none; 
  transform: translateY(-20px); 
  transition: opacity .4s ease, transform .4s ease; 
}
#menu-overlay.open { 
  opacity: 1; 
  pointer-events: all; 
  transform: translateY(0); 
}
.menu-close { 
  position: absolute; 
  top: 24px; 
  right: 44px; 
  background: none; 
  border: none; 
  cursor: pointer; 
  display: flex; 
  flex-direction: column; 
  width: 50px; 
  height: 50px; 
  justify-content: center; 
  align-items: center; 
}
.menu-close span { 
  display: block; 
  width: 40px; 
  height: 2px; 
  background: #fff; 
  border-radius: 2px; 
  position: absolute; 
}
/* Cruz del botón cerrar del menú overlay */
.menu-close span:first-child { transform: rotate(45deg); }
.menu-close span:last-child { transform: rotate(-45deg); }

.menu-logo { 
  position: absolute; 
  top: 26px; 
  left: 44px; 
}
.menu-logo img {
  height: 22px;
  width: auto;
  display: block;
}
.menu-nav { 
  list-style: none; 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
}
.menu-nav li a { 
  display: inline-flex;       /* Evita que tome todo el ancho de la pantalla */
  width: fit-content;         /* Hace que el área interactiva y el hover se limiten solo al texto */
  align-items: baseline; 
  gap: 20px; 
  text-decoration: none; 
  color: rgba(255,255,255,.5); 
  font-size: clamp(2.25rem, 6vw, 4.5rem); /* Convertido de 36px y 72px */
  font-weight: 800; 
  transition: color .2s; 
  cursor: pointer;            /* Cursor pointer explícito */
  user-select: none;          /* Evita que se active el cursor de texto o se seleccione */
}
.menu-nav li a:hover { 
  color: #fff; 
}
.menu-nav li a .num { 
  font-size: 0.875rem;        /* Convertido de 14px */
  font-weight: 400; 
  opacity: .4; 
  margin-top: 6px; 
}
.menu-footer { 
  position: absolute; 
  bottom: 36px; 
  left: 60px; 
  right: 60px; 
  display: flex; 
  justify-content: space-between; 
  font-size: 0.8125rem;       /* Convertido de 13px */
  color: rgba(255,255,255,.4); 
}

/* Botón flotante de WhatsApp */
.wa-float { 
  position: fixed; 
  right: 24px; 
  bottom: 24px; 
  width: 50px; 
  height: 50px; 
  background: #25d366; 
  border-radius: 50%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  z-index: 8000; 
  box-shadow: 0 4px 18px rgba(37,211,102,.5); 
  transition: transform .3s cubic-bezier(0.25, 1, 0.5, 1); 
}
.wa-float:hover { 
  transform: scale(1.05); 
}
.wa-tooltip {
  position: absolute;
  right: 62px;
  background: #25d366;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(37,211,102,.3);
  opacity: 0;
  transform: translateX(15px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
  user-select: none;
}
.wa-float:hover .wa-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Botón flotante Back to top */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 84px;               /* Posicionado justo arriba de wa-float */
  width: 50px;
  height: 50px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8000;
  box-shadow: 0 4px 18px rgba(0,0,0,.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s;
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
#back-to-top:hover {
  background: #222;
  transform: scale(1.05);
}

/* =====================================================
   DISEÑO RESPONSIVO (MEDIA QUERIES)
   ===================================================== */
@media (max-width: 960px) {
  :root { 
    --radius-panel: 32px;     /* Radio más pequeño de paneles para pantallas de tabletas */
  }

  /* --- S01: HERO RESPONSIVO --- */
  #s01 {
    height: auto !important;
    min-height: 100vh;
  }
  .s01-content {
    width: 90%;
  }
  .s01-body { 
    flex-direction: column; 
    padding: 40px 0 60px; 
    text-align: center; 
    justify-content: center; 
    gap: 30px;
  }
  .s01-nav { 
    padding: 18px 0; 
  }
  .s01-text, .iso_logo {
    width: 100%;
  }
  .iso_logo img {
    width: 280px;             /* Redimensionado para tabletas */
    height: 280px;
  }

  /* --- S02: SERVICIOS RESPONSIVO --- */
  #s02 {
    height: auto !important;  /* Evita desbordamiento de las tarjetas */
    min-height: 120vh;
    padding: 80px var(--pad-x-m);
  }
  .cards { 
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 columnas en tabletas */
    gap: 20px;
  }

  /* --- S03: EXPERIENCIA RESPONSIVO --- */
  #s03 {
    height: auto !important;
    padding: 80px var(--pad-x-m);
  }
  .vblock {
    height: 500px;            /* Altura adaptada para tabletas */
  }

  /* --- S04: CLIENTES RESPONSIVO --- */
  #s04 {
    height: 100vh !important; /* Mantiene pantalla completa en móviles y tabletas */
    padding: 60px var(--pad-x-m);
  }
  .s04-logos {
    gap: 40px;
  }
  .clogo-img {
    height: 70px;             /* Tamaño adaptado */
  }

  /* --- S05: CONTACTO RESPONSIVO --- */
  #s05 {
    height: auto !important;
    min-height: 100vh;
  }
  .s05-cta { 
    padding: 80px var(--pad-x-m) 60px; 
    text-align: center;
    align-items: center;
  }
  .wa-s05 { 
    position: relative; 
    right: auto; 
    top: auto; 
    transform: none; 
    margin-top: 30px;
    width: 64px; 
    height: 64px; 
  }
  .s05-footer {
    padding: 40px var(--pad-x-m);
  }

  /* --- MENÚ OVERLAY RESPONSIVO --- */
  #menu-overlay { 
    padding: 120px var(--pad-x-m) 40px; 
    justify-content: center;   /* Centra los elementos verticalmente para ocupar casi toda la pantalla */
    overflow-y: auto;          /* Permite scroll si el menú excede la pantalla */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  .menu-logo { 
    left: 24px; 
  }
  .menu-close { 
    right: 24px; 
  }
  .menu-footer { 
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 40px;
    flex-direction: column; 
    gap: 10px; 
    align-items: flex-start; 
  }
  .menu-nav li a {
    font-size: clamp(2rem, 8vw, 3.5rem); /* Tipografía adaptada */
  }
}

@media (max-width: 580px) {
  /* --- AJUSTES CELULARES --- */
  .iso_logo img {
    width: 200px;             /* Más compacto en móviles */
    height: 200px;
  }
  .cards { 
    grid-template-columns: 1fr; /* 1 columna en celulares */
  }
  .card { 
    aspect-ratio: auto; 
    height: 380px;            /* Altura adaptada para celulares */
  }
  .vblock { 
    height: 320px;            /* Videos más compactos en celulares */
  }
  .s05-footer { 
    flex-direction: row;       /* Botones y etiqueta uno al lado del otro */
    flex-wrap: wrap;           /* Permite ajuste si el espacio es muy reducido */
    align-items: center; 
    gap: 16px;                 /* Espaciado uniforme */
    padding: 30px var(--pad-x-m); 
  }
}