/* ════════════════════════════════════════════
   EMI BARRIOS — mobile-responsive.css
   Agrega esto al FINAL de tu style.css
   (o inclúyelo como <link> después de style.css)
════════════════════════════════════════════ */

/* ══════════════════════════════════════
   MÓVIL COMPLETO ≤ 768px
══════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── GLOBAL ── */
  body {
    overflow-x: hidden;
  }

  /* ── PORTADA ── */
  .seccion-portada {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .portada-titulo {
    margin-top: 0;
    width: 100vw;
    display: flex;
    justify-content: center;
  }

  .portada-titulo-img {
    margin-left: 0;
    width: 98vw;
    max-width: 98vw;
  }

  .portada-sello {
    margin-top: -10vw;
    width: 62vw;
    align-self: center;
    transform: rotate(6deg);
  }

  .scroll-hint {
    bottom: 5vw;
  }

  .scroll-arrow {
    width: 7vw;
    min-width: 28px;
  }

  /* ── TICKER ── */
  .ticker-wrap {
    height: 14vw;
  }

  .ticker-svg {
    height: 14vw;
  }

  /* ── SOBRE MÍ ── */
  .sm-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 6vw 4vw 8vw;
  }

  .sm-col-left {
    align-items: flex-start;
    gap: 2vw;
  }

  .sm-col-right {
    align-items: center;
    gap: 4vw;
    margin-top: 4vw;
  }

  .nametag {
    margin-bottom: -4vw;
    width: 80vw;
  }

  .sm-heading {
    width: 92vw;
  }

  .collage-img {
    width: 88vw;
    transform: rotate(-2deg);
  }

  /* CONTACTO — íconos en fila horizontal */
  .contact-svg-block {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5vw;
    width: 100%;
    margin-top: 4vw;
  }

  .contact-svg {
    width: 28vw;
    margin-top: 0 !important;
    max-width: 110px;
  }

  /* ── CV / MENÚ ── */
  .CV {
    padding: 4vw 2vw 6vw;
  }

  .menu-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 3vw;
  }

  .menu-svg {
    height: clamp(55px, 18vw, 100px);
    width: 42vw;
  }

  .menu-svg img {
    width: 100%;
    height: auto;
  }

  /* ── DIVIDERS ── */
  .divider-wrap {
    padding: 2.5vw 0;
  }

  .divider-group span {
    font-size: clamp(11px, 3.5vw, 18px);
  }

  /* ── FOTOGRAFÍA ── */
  .seccion-fotografia {
    padding: 8vw 4vw 10vw;
  }

  .foto-titulo-wrap {
    margin-bottom: 8vw;
    overflow: visible;
  }

  .foto-titulo-svg {
    width: 92vw;
    max-width: 92vw;
  }

  /* Grid fotos: 1 columna, alternando tamaños */
  .grid-fotos {
    display: flex;
    flex-direction: column;
    gap: 5vw;
  }

  .foto-item.grande,
  .foto-item:not(.grande) {
    grid-column: unset;
    width: 100%;
    height: 65vw;
  }

  /* Restaurar rotaciones sutiles en móvil */
  .foto-item:nth-child(odd)  { transform: rotate(-1deg) !important; }
  .foto-item:nth-child(even) { transform: rotate(1deg) !important; }

  /* Desactivar blur-hover en touch */
  .grid-fotos:hover .foto-item {
    filter: none;
  }

  /* ── ILUSTRACIÓN ── */
  .seccion-ilustracion {
    padding: 4vw 4vw 10vw;
  }

  .ilustracion-titulo-wrap {
    justify-content: flex-start;
    overflow: visible;
  }

  .ilustracion-titulo-svg {
    width: 92vw;
    max-width: 92vw;
  }

  .ilustracion-grid {
    display: flex;
    flex-direction: column;
    gap: 5vw;
  }

  .il-item:nth-child(1),
  .il-item:nth-child(2),
  .il-item:nth-child(3),
  .il-item:nth-child(4),
  .il-item:nth-child(5),
  .il-item:nth-child(6) {
    grid-column: unset !important;
    grid-row: unset !important;
    height: 70vw;
  }

  .il-item:nth-child(odd)  { transform: rotate(-0.8deg) !important; }
  .il-item:nth-child(even) { transform: rotate(1.2deg) !important; }

  .ilustracion-grid:hover .il-item {
    filter: none;
  }

  /* ── MOTION GRAPHICS ── */
  .seccion-motion {
    padding: 8vw 4vw 10vw;
  }

  .motion-titulo-wrap {
    margin-bottom: 8vw;
    overflow: visible;
  }

  .motion-titulo-svg {
    width: 92vw;
    max-width: 92vw;
  }

  .grid-motion {
    display: flex;
    flex-direction: column;
    gap: 6vw;
  }

  .motion-item.grande,
  .motion-item:not(.grande) {
    grid-column: unset;
    width: 100%;
    height: 58vw;
  }

  .motion-item:nth-child(odd)  { transform: rotate(-1deg) !important; }
  .motion-item:nth-child(even) { transform: rotate(1deg) !important; }

  .grid-motion:hover .motion-item {
    filter: none;
  }

  /* ── AUDIOVISUAL ── */
  .seccion-audio {
    padding: 8vw 4vw 14vw;
  }

  .audio-titulo-wrap {
    justify-content: flex-start;
    margin-bottom: 8vw;
    overflow: visible;
  }

  .audio-titulo-svg {
    width: 92vw;
    max-width: 92vw;
  }

  .grid-audio {
    grid-template-columns: 1fr;
    gap: 6vw;
  }

  .audio-item {
    height: 58vw;
  }

  .audio-item:nth-child(1) { transform: rotate(-0.8deg); }
  .audio-item:nth-child(2) { transform: rotate(0.8deg); }

  .grid-audio:hover .audio-item {
    filter: none;
  }

  /* ── LIGHTBOX MÓVIL ── */
  .lightbox-img {
    max-width: 95vw;
    max-height: 75vh;
  }

  .lightbox-btn {
    font-size: 7vw;
    padding: 3vw;
  }

  .lightbox-close {
    top: 3vw;
    right: 4vw;
    font-size: 8vw;
  }

  .lightbox-serie {
    font-size: clamp(10px, 3vw, 13px);
    bottom: 4vw;
  }

  /* ── TOAST ── */
  .toast {
    bottom: 8vw;
    font-size: clamp(12px, 3.5vw, 15px);
    padding: 2.5vw 5vw;
    border-radius: 1vw;
    width: 85vw;
    text-align: center;
  }

  /* ── SCROLL SUAVE ── */
  html {
    scroll-snap-type: none;
  }
}

/* ══════════════════════════════════════
   MÓVIL PEQUEÑO ≤ 400px (iPhone SE, etc.)
══════════════════════════════════════ */
@media (max-width: 400px) {

  .portada-titulo-img {
    width: 100vw;
  }

  .portada-sello {
    width: 70vw;
  }

  .nametag {
    width: 90vw;
  }

  .collage-img {
    width: 94vw;
  }

  .menu-svg {
    width: 46vw;
    height: clamp(50px, 20vw, 90px);
  }

  .foto-item.grande,
  .foto-item:not(.grande) {
    height: 72vw;
  }

  .il-item:nth-child(n) {
    height: 75vw !important;
  }

  .motion-item.grande,
  .motion-item:not(.grande),
  .audio-item {
    height: 64vw;
  }
}

/* ══════════════════════════════════════
   LIGHTBOX — fullscreen horizontal
══════════════════════════════════════ */

/* Estructura base del lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

/* Imagen centrada y que ocupa todo el espacio */
.lightbox-contenido {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 10vw;
}

.lightbox-img {
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
  border: none;
  display: block;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

/* Botones prev/next */
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: clamp(20px, 3vw, 40px);
  width: clamp(40px, 5vw, 60px);
  height: clamp(40px, 5vw, 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10001;
}

.lightbox-btn:hover {
  background: rgba(204, 0, 0, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 2vw; }
.lightbox-next { right: 2vw; }

/* Botón cerrar */
.lightbox-close {
  position: absolute;
  top: 2vw;
  right: 2vw;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: clamp(20px, 2.5vw, 32px);
  width: clamp(36px, 4vw, 50px);
  height: clamp(36px, 4vw, 50px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease;
  z-index: 10002;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(204, 0, 0, 0.6);
}

/* Label de serie */
.lightbox-serie {
  position: absolute;
  bottom: 2.5vw;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier New', monospace;
  font-size: clamp(10px, 1vw, 13px);
  letter-spacing: 0.25em;
  color: rgba(245,240,234,0.5);
  white-space: nowrap;
}

/* ── MÓVIL: lightbox ocupa toda la pantalla ── */
@media (max-width: 768px) {

  .lightbox-contenido {
    padding: 0 14vw;
  }

  .lightbox-img {
    max-width: 100vw;
    max-height: 82vh;
    object-fit: contain;
  }

  .lightbox-btn {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .lightbox-prev { left: 1vw; }
  .lightbox-next { right: 1vw; }

  .lightbox-close {
    top: 3vw;
    right: 3vw;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .lightbox-serie {
    font-size: clamp(9px, 2.8vw, 12px);
    bottom: 3vw;
    letter-spacing: 0.2em;
  }
}

/* ── LANDSCAPE en móvil (cuando rota) ── */
@media (max-width: 768px) and (orientation: landscape) {

  .lightbox-img {
    max-width: 85vw;
    max-height: 90vh;
  }

  .lightbox-contenido {
    padding: 0 12vw;
  }

  .lightbox-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .lightbox-serie {
    bottom: 1.5vw;
  }
}

/* ── Videos: hint visual en móvil ── */
@media (max-width: 768px) {

  .motion-item::after,
  .audio-item::after {
    content: '⛶';
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 18px;
    color: rgba(255,255,255,0.5);
    pointer-events: none;
    z-index: 5;
  }
}

/* ══════════════════════════════════════
   VIDEO FULLSCREEN — rotación CSS
   Funciona en navegadores reales móvil.
   En portrait, rota el video 90° para
   que se vea horizontal en fullscreen.
══════════════════════════════════════ */

/* Cuando el video está en fullscreen en portrait */
@media (max-width: 768px) and (orientation: portrait) {

  video:-webkit-full-screen {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vh !important;
    height: 100vw !important;
    max-width: none !important;
    max-height: none !important;
    transform: translate(-50%, -50%) rotate(90deg);
    object-fit: contain;
    background: #000;
    z-index: 99999;
  }

  video:fullscreen {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vh !important;
    height: 100vw !important;
    max-width: none !important;
    max-height: none !important;
    transform: translate(-50%, -50%) rotate(90deg);
    object-fit: contain;
    background: #000;
    z-index: 99999;
  }
}

/* Cuando ya está en landscape no hace falta rotar */
@media (max-width: 768px) and (orientation: landscape) {

  video:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    transform: none;
    object-fit: contain;
    background: #000;
  }

  video:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    transform: none;
    object-fit: contain;
    background: #000;
  }
}

/* ══════════════════════════════════════
   LIGHTBOX — mejoras desktop + ilustración
══════════════════════════════════════ */

/* La imagen se adapta sin importar si es
   horizontal (foto) o vertical (ilustración) */
.lightbox-img {
  max-width: 82vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border: none;
  /* Sombra sutil para separar del fondo negro */
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

/* Contador de serie — tipografía coherente con el resto */
.lightbox-serie {
  font-family: 'Courier New', monospace;
  font-size: clamp(10px, 1vw, 13px);
  letter-spacing: 0.3em;
  color: rgba(245,240,234,0.45);
  text-transform: uppercase;
}

/* Flechas — más visibles en desktop */
@media (min-width: 769px) {
  .lightbox-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 2vw;
    width: clamp(44px, 4vw, 60px);
    height: clamp(44px, 4vw, 60px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .lightbox-btn:hover {
    background: rgba(204, 0, 0, 0.55);
    transform: translateY(-50%) scale(1.1);
  }

  .lightbox-prev { left: 2.5vw; }
  .lightbox-next { right: 2.5vw; }

  .lightbox-close {
    position: absolute;
    top: 2vw;
    right: 2.5vw;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.5vw;
    width: clamp(36px, 3vw, 48px);
    height: clamp(36px, 3vw, 48px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 10002;
    line-height: 1;
  }

  .lightbox-close:hover {
    background: rgba(204, 0, 0, 0.6);
  }
}

/* Animación de entrada de la imagen al cambiar */
.lightbox-img {
  animation: lb-fade-in 0.2s ease forwards;
}

@keyframes lb-fade-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}