/* ============================================================
   PAGE · MULTIMEDIA — secciones únicas (reel grid + formatos)
   Cargar DESPUÉS de pages/servicio.css
   ============================================================ */

/* === REEL GRID (multimedia showcase) === */
.reel-section {
  padding: 100px 40px;
  max-width: var(--max);
  margin: 0 auto;
}
.reel-header {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 60px;
  align-items: end;
  margin-bottom: 56px;
}
.reel-h {
  font-family: var(--font-display);
  font-size: clamp(34px, 3.5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.reel-h em { font-style: italic; color: var(--gold); }
.reel-meta { font-size: 13px; color: var(--ink-dim); line-height: 1.6; text-align: right; }
.reel-meta strong { display: block; font-family: var(--font-display); font-size: 36px; color: var(--gold); line-height: 1; margin-bottom: 6px; }

.reel-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  aspect-ratio: 16/9;
  max-height: 720px;
}
.reel-item {
  position: relative;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border);
  cursor: none;
  transition: border-color 0.3s;
}
.reel-item:hover { border-color: var(--gold); }
.reel-item:nth-child(1) { grid-row: 1 / 3; }
.reel-item img, .reel-item video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(40%) contrast(1.05);
  transition: filter 0.5s, transform 0.6s var(--ease);
}
.reel-item:hover img, .reel-item:hover video { filter: grayscale(0); transform: scale(1.04); }
.reel-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10,10,10,0.92));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  pointer-events: none;
}
.reel-item-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.reel-item-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.reel-item:nth-child(1) .reel-item-name { font-size: 28px; }
.reel-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.reel-item:hover .reel-play-btn { opacity: 1; }
.reel-play-btn svg { width: 22px; height: 22px; color: var(--bg); margin-left: 3px; }

@media (max-width: 920px) {
  .reel-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; aspect-ratio: auto; max-height: none; }
  .reel-item { aspect-ratio: 4/5; }
  .reel-item:nth-child(1) { grid-column: 1 / 3; grid-row: 1; aspect-ratio: 16/9; }
  .reel-header { grid-template-columns: 1fr; }
  .reel-meta { text-align: left; }
}
@media (max-width: 540px) {
  .reel-grid { grid-template-columns: 1fr; }
  .reel-item:nth-child(1) { grid-column: 1; }
}

/* === REEL ITEM INTERACTIVITY === */
.reel-item[data-videos] { cursor: pointer; }
.reel-item[data-videos]:hover .reel-play-btn { opacity: 1; }

/* === VIDEO GALLERY LIGHTBOX === */
#yt-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.94);
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.ytl-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.ytl-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: .6;
  transition: opacity .2s;
  padding: 4px 8px;
  flex-shrink: 0;
}
.ytl-close:hover { opacity: 1; }

/* Gallery screen */
#ytl-gallery {
  width: min(980px, 100%);
  max-height: 84vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.ytl-client-name {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -.02em;
  line-height: 1;
}
.ytl-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.ytl-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color .25s;
}
.ytl-thumb:hover { border-color: var(--gold); }
.ytl-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
  transition: filter .4s, transform .5s var(--ease);
  display: block;
}
.ytl-thumb:hover img { filter: grayscale(0); transform: scale(1.04); }
.ytl-thumb-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.ytl-thumb:hover .ytl-thumb-play { opacity: 1; }
.ytl-thumb-play svg { width: 16px; height: 16px; color: var(--bg); margin-left: 2px; }
.ytl-thumb-title {
  position: absolute;
  bottom: 10px; left: 10px; right: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: -.01em;
  line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}

/* Player screen */
#ytl-player {
  display: none;
  flex-direction: column;
  width: min(980px, 100%);
}
#ytl-player.active { display: flex; }
.ytl-back {
  background: none;
  border: 1px solid var(--border);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  padding: 7px 14px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
}
.ytl-back:hover { color: var(--ink); border-color: var(--ink-dim); }
.ytl-back.hidden { visibility: hidden; pointer-events: none; }
.ytl-video-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
#ytl-video-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#ytl-video-desc {
  font-size: .78rem;
  color: var(--ink-dim);
  opacity: .65;
}
.ytl-iframe-wrap {
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
#yt-lightbox-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 540px) {
  .ytl-thumb-grid { grid-template-columns: 1fr 1fr; }
  #yt-lightbox { padding: 16px; }
}

/* === FORMATOS PILL CHIPS === */
.formats-section {
  padding: 80px 40px;
  max-width: var(--max);
  margin: 0 auto;
}
.formats-h {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.8vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 40px;
  max-width: 720px;
}
.formats-h em { font-style: italic; color: var(--gold); }
.formats-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.format-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  padding: 12px 20px;
  transition: all 0.2s;
  cursor: none;
}
.format-pill:hover {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
}
.format-pill em {
  color: var(--gold);
  font-style: normal;
  margin-right: 8px;
}
.format-pill:hover em { color: var(--bg); }
