/* =========================================================
   VISUALES — estilos específicos de la subpágina
   Reutiliza variables y tokens definidos en css/style.css
========================================================= */

:root {
  /* Delineado suave de los contenedores de vídeo e info */
  --block-outline: rgba(255, 255, 255, 0.8);
  --block-glow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 28px rgba(255, 255, 255, 0.07);
}

.visuals-main {
  padding-top: var(--header-h);
  background: var(--color-bg);
  min-height: 100vh;
}

/* =========================================================
   0. CTA DE CONTACTO (antes del primer bloque)
========================================================= */
.visuals-cta {
  max-width: 900px;
  margin: 0 auto;
  padding: 90px 40px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.visuals-cta-text {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.visuals-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.visuals-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-fg);
  transition: border-color 0.25s var(--ease-fast), background 0.25s var(--ease-fast), transform 0.25s var(--ease-fast);
}

.visuals-cta-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* WhatsApp: fondo transparente, borde + texto + logo en verde */
.visuals-cta-btn--whatsapp {
  background: transparent;
  border: 1px solid #25d366;
  color: #25d366;
}

.visuals-cta-btn--whatsapp:hover {
  background: rgba(37, 211, 102, 0.1);
  transform: translateY(-2px);
}

.visuals-cta-btn--email {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.visuals-cta-btn--email:hover {
  border-color: var(--color-accent);
  background: rgba(0, 217, 255, 0.08);
  transform: translateY(-2px);
}

/* =========================================================
   1. BLOQUES DE OPCIONES (vídeo + info, alternados)
========================================================= */
.visual-blocks {
  display: flex;
  flex-direction: column;
  gap: 190px;
  max-width: 1493px; /* 1413px de contenido + 40px de padding a cada lado */
  margin: 0 auto;
  padding: 130px 40px 180px;
}

.visual-block {
  position: relative;
}

.visual-block-media {
  position: relative;
  width: 60%;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  border: 1px solid var(--block-outline);
  box-shadow: var(--block-glow);
  cursor: pointer;
}

.visual-block-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-block-info {
  position: absolute;
  top: 11.8%;
  width: 42%;
  background: var(--color-overlay-strong);
  border: 1px solid var(--block-outline);
  box-shadow: var(--block-glow);
  border-radius: 28px;
  padding: 44px 40px;
  backdrop-filter: blur(6px);
}

.visual-block-info h2 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 3.4vw, 3rem);
  color: var(--color-fg);
}

.info-divider {
  display: block;
  width: 64px;
  height: 2px;
  background: var(--color-accent);
  margin-bottom: 26px;
}

.visual-block-info p {
  margin: 0 0 30px;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
}

.gallery-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-fg);
  transition: border-color 0.25s var(--ease-fast), background 0.25s var(--ease-fast);
}

.gallery-btn .btn-icon {
  color: var(--color-accent);
  font-size: 1.05rem;
  line-height: 1;
  transition: transform 0.3s var(--ease-smooth);
}

.gallery-btn:hover {
  border-color: var(--color-accent);
  background: rgba(0, 217, 255, 0.08);
}

.gallery-btn:hover .btn-icon { transform: rotate(90deg); }

/* --- Variante A: vídeo a la izquierda, info a la derecha (bloques pares) ---
   El conjunto (vídeo 60% + panel 42%, solapados un 12%) ocupa un 90% del
   ancho total del bloque. Para centrarlo, se deja un margen del 5% a cada
   lado: el vídeo empieza en el 5% (en vez de en el 0%) y el panel termina
   en el 95% (right: 5% en vez de right: 10%). El solape entre ambos se
   mantiene igual (12%). */
.visual-block--media-left .visual-block-media { margin-left: 5%; }
.visual-block--media-left .visual-block-info { right: 5%; left: auto; }

/* --- Variante B: info a la izquierda, vídeo a la derecha (bloques impares) ---
   Mismo ajuste, en espejo: el vídeo termina en el 95% (margin-right: 5% en
   vez de pegado al 100%) y el panel empieza en el 5% (left: 5% en vez de
   left: 10%). */
.visual-block--media-right .visual-block-media { margin-left: auto; margin-right: 5%; }
.visual-block--media-right .visual-block-info { left: 5%; right: auto; }

/* =========================================================
   2. MODAL GALERÍA (carrusel de 3 items)
========================================================= */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-smooth), visibility 0.35s;
}

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

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}

.gallery-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1500px, 92vw);
  max-height: 88vh;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 30px 34px 26px;
  transform: translateY(16px);
  transition: transform 0.35s var(--ease-smooth);
  display: flex;
  flex-direction: column;
}

.gallery-modal.is-open .gallery-modal-panel {
  transform: translateY(0);
}

.gallery-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-shrink: 0;
}

.gallery-modal-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
  color: var(--color-fg);
}

.gallery-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-fg);
  border-radius: 50%;
  transition: background 0.2s var(--ease-fast);
}

.gallery-close:hover { background: rgba(255, 255, 255, 0.08); }

.gallery-track-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 14px;
  min-height: 0;
}

.gallery-track {
  flex: 1;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar { display: none; }

.gallery-item {
  position: relative;
  flex: 0 0 calc((100% - 48px) / 3);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #111;
  cursor: pointer;
}

.gallery-item video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #000;
}

.gallery-item-title {
  padding: 20px 12px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--color-fg);
}

.gallery-arrow {
  flex-shrink: 0;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s var(--ease-fast);
}

.gallery-arrow:hover { color: var(--color-accent); }

/* --- Barra de scroll deslizante (genérica: horizontal en escritorio,
       vertical en móvil — cada variante define su propia geometría) --- */
.gallery-scrollbar {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  cursor: pointer;
}

.gallery-scrollbar-thumb {
  position: absolute;
  background: var(--color-accent);
  border-radius: 999px;
  cursor: grab;
  touch-action: none;
}

.gallery-scrollbar-thumb:active { cursor: grabbing; }

/* Horizontal: visible en escritorio, debajo del track */
.gallery-scrollbar--horizontal {
  position: relative;
  width: 100%;
  height: 6px;
  margin-top: 22px;
  flex-shrink: 0;
}

.gallery-scrollbar--horizontal .gallery-scrollbar-thumb {
  top: 0;
  left: 0;
  height: 100%;
  min-width: 44px;
}

/* Vertical: oculta por defecto, se activa solo en móvil (ver media query) */
.gallery-scrollbar--vertical {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
}

.gallery-scrollbar--vertical .gallery-scrollbar-thumb {
  top: 0;
  left: 0;
  width: 100%;
  min-height: 44px;
}

/* =========================================================
   3. MODAL REPRODUCTOR DE VÍDEO GRANDE
========================================================= */
.video-player-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-smooth), visibility 0.3s;
}

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

.video-player-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}

.video-player-panel {
  position: relative;
  z-index: 1;
  width: min(1000px, 90vw);
  max-height: 92vh;
}

.video-player-close {
  position: absolute;
  top: -46px;
  right: 0;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--color-fg);
  border-radius: 50%;
  transition: background 0.2s var(--ease-fast);
}

.video-player-close:hover { background: rgba(255, 255, 255, 0.1); }

.video-player-wrapper {
  position: relative;
  width: 100%;
  max-height: 82vh;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#videoPlayerEl {
  width: 100%;
  max-height: 80vh;
  display: block;
  background: #000;
}

/* --- Controles personalizados --- */
.video-player-controls {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  transition: opacity 0.3s var(--ease-fast), transform 0.3s var(--ease-fast);
  opacity: 1;
}

.video-player-controls.is-hidden {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.vp-progress-row { margin-bottom: 8px; }

.vp-progress,
.vp-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.28);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.vp-progress::-webkit-slider-thumb,
.vp-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
}

.vp-progress::-moz-range-thumb,
.vp-volume::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
}

.vp-buttons-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.vp-buttons-left,
.vp-buttons-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vp-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-fg);
  border-radius: 50%;
  transition: background 0.2s var(--ease-fast);
}

.vp-btn:hover { background: rgba(255,255,255,0.1); }

.vp-btn svg { width: 20px; height: 20px; }

.vp-time {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  min-width: 92px;
}

.vp-volume { width: 90px; }

/* =========================================================
   4. RESPONSIVE
========================================================= */
@media (max-width: 900px) {
  .visuals-cta { padding: 70px 22px 0; gap: 24px; }

  .visuals-cta-buttons { width: 100%; flex-direction: column; }

  .visuals-cta-btn { width: 100%; justify-content: center; }

  .visual-blocks { gap: 90px; padding: 90px 20px 110px; }

  .visual-block-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md);
  }

  /* Separación mínima entre el vídeo y el panel de información
     (antes margin-top: -40px, que los solapaba) */
  .visual-block-info {
    position: static;
    width: 100%;
    margin-top: 24px;
    padding: 32px 26px;
    backdrop-filter: none;
    border-radius: var(--radius-md);
  }

  .visual-block--media-left .visual-block-info,
  .visual-block--media-right .visual-block-info {
    left: auto;
    right: auto;
  }

  /* En móvil el vídeo vuelve a ocupar el 100% del ancho:
     anula los márgenes del 5% usados solo en el layout de escritorio */
  .visual-block--media-left .visual-block-media,
  .visual-block--media-right .visual-block-media {
    margin-left: 0;
    margin-right: 0;
  }

  /* --- Galería del modal: columna vertical + barra vertical deslizante --- */
  .gallery-modal-panel {
    padding: 22px 18px 18px;
    width: 94vw;
    max-height: 88vh;
  }

  .gallery-arrow { display: none; }
  .gallery-scrollbar--horizontal { display: none; }
  .gallery-scrollbar--vertical { display: block; }

  .gallery-track-wrapper {
    flex: 1;
    min-height: 0;
    padding-right: 22px; /* hueco reservado para la barra vertical */
  }

  .gallery-track {
    flex-direction: column;
    gap: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: none;
    max-height: 100%;
  }

  /* Ítems más estrechos y centrados, dejando ver la barra a la derecha */
  .gallery-item {
    flex: 0 0 auto;
    width: 90%;
    margin: 0 auto;
  }

  .gallery-item video { aspect-ratio: 16 / 10; }

  .gallery-modal-title { font-size: 1.15rem; }

  /* --- Reproductor a pantalla completa en móvil --- */
  .video-player-panel { width: 100vw; }

  .video-player-wrapper {
    border-radius: 0;
    max-height: 100svh;
    height: 100svh;
  }

  #videoPlayerEl {
    max-height: 100svh;
    height: 100%;
    object-fit: contain;
  }

  .video-player-close {
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
  }

  .vp-time { display: none; }
  .vp-volume { width: 56px; }
  .video-player-controls {
    padding: 8px 10px calc(16px + env(safe-area-inset-bottom, 0px));
  }
}


/* =========================================================
   3. FOOTER
========================================================= */
.site-footer {
  background: var(--color-bg);
  padding: 72px 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-top {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr auto;
  gap: 60px;
  padding-bottom: 48px;
}

/* --- Columna de marca --- */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.footer-logo-img {
  height: 40px;
  width: auto;
  margin: 0;
}

.footer-tagline {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.98rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  max-width: 340px;
  margin: 0;
  text-align: left;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  opacity: 0.85;
  transition: opacity 0.25s var(--ease-fast), transform 0.25s var(--ease-fast);
}

.footer-social-link svg {
  width: 20px;
  height: 20px;
}

.footer-social-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.footer-tiktok-mask {
  display: block;
  width: 50px;
  height: 50px;
  background-color: currentColor;
  -webkit-mask-image: url('../Logos/tiktok.png');
  mask-image: url('../Logos/tiktok.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  mask-type: alpha;
}

/* --- Columna "Secciones" --- */
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-nav-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.25s var(--ease-fast);
}

.footer-nav a:hover {
  color: var(--color-fg);
}

/* --- Línea inferior: copyright + crédito --- */
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.footer-credit {
  margin: 8px 0 0;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.footer-credit a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease-fast);
}

.footer-credit a:hover {
  color: var(--color-fg);
}

@media (max-width: 600px) {

    .footer-credit {
        font-size: 0.7rem;
        margin-top: 7px;
        padding: 0 20px;
    }

}

@media (max-width: 480px) {
  .visual-block-info h2 { font-size: 1.7rem; }
  .visual-block-info p { font-size: 0.92rem; }

  .gallery-item { width: 88%; }

  .vp-volume { display: none; }
  .vp-buttons-right { gap: 6px; }
}