/* ===== Portafolio — Bframe ===== */
[hidden] { display: none !important; }
body.no-scroll { overflow: hidden; }

/* --- Filtros --- */
.filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.chip {
  font-family: var(--font-tag);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--khaki);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--accent); color: var(--ivory); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--ivory); }
.chip.small { font-size: 0.7rem; padding: 6px 12px; letter-spacing: 1px; }

/* --- Cinta de clientes --- */
.marquee { overflow: hidden; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee span {
  font-family: var(--font-tag);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.74rem;
  color: var(--khaki);
  padding: 14px 0 14px 26px;
  white-space: nowrap;
}
.marquee span::after { content: "\25C6"; color: var(--accent); margin-left: 26px; font-size: 0.55rem; vertical-align: middle; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Secciones --- */
.pf-section { padding: 64px 24px 24px; }
.pf-section + .pf-section { padding-top: 40px; }
.pf-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.pf-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
}
.pf-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.1; }
.pf-head p { color: var(--khaki); font-size: 0.88rem; margin-left: auto; max-width: 320px; opacity: 0.85; }
.pf-sub {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-tag); text-transform: uppercase; letter-spacing: 3px;
  font-size: 0.72rem; font-weight: 600; color: var(--accent);
  margin: 34px 0 18px;
}
.pf-sub::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sub-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

/* --- Miniaturas y placeholders --- */
.thumb {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, #2a1a17, #120e0d);
  transition: transform 0.25s, border-color 0.25s;
}
.thumb::before {
  content: "BF";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 2.4rem;
  color: rgba(122,20,20,0.35);
  letter-spacing: 2px;
}
.ph-1 { background: linear-gradient(145deg, #321c17, #120e0d); }
.ph-2 { background: linear-gradient(145deg, #241a1d, #0f0c0d); }
.ph-3 { background: linear-gradient(145deg, #2d2118, #120e0c); }
.thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0; transition: opacity 0.4s, transform 0.5s;
}
.thumb.loaded img { opacity: 1; }
.thumb.loaded::before { display: none; }
.thumb.broken img { display: none; }
.card { cursor: pointer; outline: none; }
.card:hover .thumb, .card:focus-visible .thumb { transform: translateY(-4px); border-color: var(--accent); }
.card:hover .thumb img { transform: scale(1.05); }
.card:focus-visible .thumb { box-shadow: 0 0 0 2px var(--accent); }
.thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14,12,11,0.55), transparent 45%);
  pointer-events: none;
}
.tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: var(--font-tag); text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 0.62rem; font-weight: 600; color: var(--ivory);
  background: rgba(21,18,16,0.7); border: 1px solid rgba(247,243,234,0.2);
  border-radius: 6px; padding: 3px 8px; backdrop-filter: blur(4px);
}
.play { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; }
.play i {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(21,18,16,0.55);
  border: 1px solid rgba(247,243,234,0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.play i::before {
  content: "";
  border-left: 14px solid var(--ivory);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 4px;
}
.card:hover .play i, .card:focus-visible .play i { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }

/* --- Leyendas --- */
.cap { padding: 12px 2px 0; }
.cap strong { display: block; font-family: var(--font-tag); font-size: 0.88rem; font-weight: 600; color: var(--ivory); line-height: 1.3; }
.cap small { display: block; font-size: 0.72rem; color: var(--khaki); opacity: 0.75; margin-top: 3px; line-height: 1.4; }

/* --- Reels (verticales) --- */
.reels-wrap { position: relative; }
.reels-track {
  display: flex; gap: 18px; overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 6px 2px 22px;
  scrollbar-width: thin; scrollbar-color: var(--accent) var(--border);
}
.reels-track::-webkit-scrollbar { height: 6px; }
.reels-track::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 6px; }
.reels-track::-webkit-scrollbar-track { background: var(--border); border-radius: 6px; }
.reel { flex: 0 0 auto; width: 214px; scroll-snap-align: start; }
.reel .thumb { aspect-ratio: 9 / 16; }
.rt-btn {
  display: none;
  position: absolute; top: 38%; z-index: 5;
  width: 42px; height: 42px; border-radius: 8px;
  background: rgba(21,18,16,0.85); color: var(--ivory);
  border: 1px solid var(--border); cursor: pointer; font-size: 1.2rem; line-height: 1;
  transition: background 0.2s, border-color 0.2s;
}
.rt-btn:hover { background: var(--accent); border-color: var(--accent); }
.rt-prev { left: -14px; } .rt-next { right: -14px; }
@media (hover: hover) and (min-width: 900px) { .rt-btn { display: block; } }

/* --- Videos (horizontales) --- */
.videos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 22px; align-items: start; }
.video .thumb { aspect-ratio: 16 / 9; }
.video.feature { grid-column: span 2; grid-row: span 2; }
.video.feature .cap strong { font-size: 1.05rem; }

/* --- Fotos (mosaico) --- */
.photos { columns: 3 260px; column-gap: 16px; }
.photo {
  position: relative; break-inside: avoid; margin-bottom: 16px;
  border-radius: 10px; overflow: hidden; cursor: zoom-in; outline: none;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, #2a1a17, #120e0d);
  min-height: 220px;
  transition: border-color 0.25s;
}
.photo:nth-child(3n+2) { min-height: 300px; }
.photo.loaded { min-height: 0; }
.photo:hover, .photo:focus-visible { border-color: var(--accent); }
.photo img { width: 100%; display: block; opacity: 0; transition: opacity 0.4s, transform 0.5s; }
.photo.loaded img { opacity: 1; }
.photo.broken img { display: none; }
.photo:hover img { transform: scale(1.04); }
.photo .ov {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px;
  background: linear-gradient(transparent, rgba(14,12,11,0.88));
  font-family: var(--font-tag); text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 0.68rem; color: var(--ivory);
  opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s;
}
.photo:hover .ov, .photo:focus-visible .ov { opacity: 1; transform: none; }

/* --- CTA final --- */
.pf-cta { text-align: center; padding: 70px 24px 80px; }
.pf-cta h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-bottom: 12px; }
.pf-cta p { color: var(--khaki); max-width: 460px; margin: 0 auto 26px; }

/* --- Reproductor / visor --- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center;
  background: rgba(10,8,7,0.93); backdrop-filter: blur(6px);
  padding: 56px 16px 24px;
}
.modal.open { display: flex; }
.modal-inner { width: 100%; max-width: 1100px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.modal-media { width: 100%; display: flex; justify-content: center; }
.player { position: relative; width: min(100%, calc(74vh * 16 / 9)); aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.modal.vertical .player { height: min(78vh, 760px); width: min(100%, calc(min(78vh, 760px) * 9 / 16)); aspect-ratio: 9 / 16; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Capa invisible sobre la barra superior del reproductor de Drive: bloquea el botón "abrir en Drive" */
.player-guard { position: absolute; top: 0; left: 0; right: 0; height: 64px; z-index: 2; background: transparent; }
.modal img { max-width: 100%; max-height: 78vh; border-radius: 8px; object-fit: contain; background: #100d0c; }
.modal-cap { text-align: center; }
.modal-cap strong { display: block; font-family: var(--font-tag); font-size: 0.95rem; font-weight: 600; color: var(--ivory); }
.modal-cap small { display: block; font-size: 0.78rem; color: var(--khaki); opacity: 0.8; margin-top: 2px; }
.modal-btn {
  position: fixed; z-index: 101; width: 44px; height: 44px; border-radius: 8px;
  background: rgba(21,18,16,0.85); color: var(--ivory); border: 1px solid var(--border);
  cursor: pointer; font-size: 1.3rem; line-height: 1; transition: background 0.2s, border-color 0.2s;
}
.modal-btn:hover { background: var(--accent); border-color: var(--accent); }
.modal-close { top: 14px; right: 16px; }
.modal-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.modal-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .videos-grid { grid-template-columns: repeat(2, 1fr); }
  .video.feature { grid-row: auto; }
  .pf-head p { margin-left: 0; max-width: none; }
}
@media (max-width: 560px) {
  .videos-grid { grid-template-columns: 1fr; }
  .video.feature { grid-column: auto; }
  .reel { width: 164px; }
  .photos { columns: 2 140px; column-gap: 12px; }
  .photo { margin-bottom: 12px; }
  .modal-prev { left: 6px; } .modal-next { right: 6px; }
  .modal-btn { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .thumb, .thumb img, .photo img { transition: none; }
}
.pf-section { scroll-margin-top: 80px; }
