/* ─── RESET & VARIABLES ──────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:          #080808;
  --color-white:       #ffffff;
  --color-white-dim:   rgba(255,255,255,0.5);
  --color-white-faint: rgba(255,255,255,0.12);

  --font-display: 'Cormorant Garant', serif;
  --font-mono:    'Space Mono', monospace;

  --line-weight: 0.5px;

  --spacing-md: 32px;
  --spacing-lg: 64px;
  --spacing-xl: 120px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --hero-video-h: 56.25vw;
}

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-white);
  font-family: var(--font-display);
  overflow-x: hidden;
  cursor: none;
}


/* ─── CURSOR ─────────────────────────────────────────────────────────────── */

.cursor {
  position: fixed; top: 0; left: 0;
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width .3s, height .3s;
}

.cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 32px; height: 32px;
  border: 0.5px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%,-50%);
  transition: width .3s, height .3s, border-color .3s;
}

.cursor.is-hover      { width: 4px; height: 4px; }
.cursor-ring.is-hover { width: 52px; height: 52px; border-color: rgba(255,255,255,0.55); }


/* ─── HEADER ─────────────────────────────────────────────────────────────── */

.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex; align-items: center;
  padding: 22px 40px;
}

.site-header::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,8,.65) 0%, transparent 100%);
  pointer-events: none;
  transition: opacity .5s;
}

.site-header.menu-open::before { opacity: 0; }

.header-brand {
  text-decoration: none;
  position: relative; z-index: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header-brand img {
  display: block;
  height: 32px;
  width: auto;
}

.header-line {
  flex: 1;
  height: var(--line-weight);
  background: var(--color-white-faint);
  margin: 0 32px;
  position: relative;
  overflow: hidden;
}

.header-line::after {
  content: '';
  position: absolute; top: 0; left: -80px;
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation: shimR 8s ease-in-out infinite;
}

@keyframes shimR {
  0%   { left: -80px; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}


/* ─── HAMBURGER ──────────────────────────────────────────────────────────── */

.btn-menu {
  position: relative; z-index: 1;
  background: none; border: none; cursor: none;
  padding: 4px;
  display: flex; flex-direction: column; gap: 5px; align-items: flex-end;
}

.btn-menu-bar {
  display: block;
  height: 0.5px;
  background: #fff;
  transition: width .4s var(--ease-out), opacity .3s, transform .4s var(--ease-out);
  transform-origin: right center;
}

.btn-menu-bar:nth-child(1) { width: 28px; }
.btn-menu-bar:nth-child(2) { width: 20px; }
.btn-menu-bar:nth-child(3) { width: 28px; }

.btn-menu:hover .btn-menu-bar:nth-child(2) { width: 28px; }

.menu-open .btn-menu-bar:nth-child(1) { transform: translateY(5.5px) rotate(-45deg); }
.menu-open .btn-menu-bar:nth-child(2) { opacity: 0; width: 0; }
.menu-open .btn-menu-bar:nth-child(3) { transform: translateY(-5.5px) rotate(45deg); }


/* ─── NAV OVERLAY ────────────────────────────────────────────────────────── */

.nav-overlay {
  position: fixed; inset: 0;
  z-index: 150;
  background: #000000ba;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s;
}

.nav-overlay.is-open { opacity: 1; pointer-events: all; }

.nav-deco-line   { position: absolute; background: var(--color-white-faint); }
.nav-deco-line.h { width: 100%; height: var(--line-weight); }
.nav-deco-line.v { height: 100%; width: var(--line-weight); }
.nav-deco-line.top    { top: 80px; }
.nav-deco-line.bottom { bottom: 80px; }
.nav-deco-line.left   { left: 10%; }
.nav-deco-line.right  { right: 10%; }

/*
 * WORDPRESS — nav principal:
 * Reemplazar el <ul class="nav-list"> con wp_nav_menu():
 *
 *   <?php wp_nav_menu([
 *     'theme_location' => 'berro_main',
 *     'container'      => false,
 *     'menu_class'     => 'nav-list',
 *     'fallback_cb'    => false,
 *     'walker'         => new Berro_Nav_Walker(),
 *   ]); ?>
 *
 * Berro_Nav_Walker agrega class="nav-item" al <li> y class="nav-link" al <a>.
 * Registrar en functions.php:
 *   register_nav_menus(['berro_main' => __('Menú principal', 'berro')]);
 */

.nav-list {
  list-style: none; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}

.nav-item { overflow: hidden; }

.nav-link {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(24px, 4vw, 48px);
  line-height: 1.05;
  color: var(--color-white-dim);
  text-decoration: none;
  transform: translateY(100%);
  opacity: 0;
  transition: transform .7s var(--ease-out), opacity .5s, color .3s;
}


.nav-overlay.is-open .nav-link { transform: translateY(0); opacity: 1; }

.nav-item:nth-child(1) .nav-link { transition-delay: .08s; }
.nav-item:nth-child(2) .nav-link { transition-delay: .14s; }
.nav-item:nth-child(3) .nav-link { transition-delay: .20s; }
.nav-item:nth-child(4) .nav-link { transition-delay: .26s; }
.nav-item:nth-child(5) .nav-link { transition-delay: .32s; }

.nav-link:hover { color: #fff; }

.nav-footer {
  position: absolute; bottom: 36px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 40px;
  opacity: 0; gap: 10px;
  transform: translateY(10px);
  transition: opacity .5s .5s, transform .5s var(--ease-out) .5s;
}

.nav-overlay.is-open .nav-footer { opacity: 1; transform: translateY(0); }

.nav-footer-links { display: flex; gap: 28px; }

.nav-footer-links a {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--color-white-dim);
  text-decoration: none;
  transition: color .3s;
}

.nav-footer-links a:hover { color: #fff; }

.nav-footer-copy {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--color-white-dim);
}


/* ─── HOME HERO ──────────────────────────────────────────────────────────── */

.home-hero {
  position: fixed; inset: 0; z-index: 10;
  overflow: hidden;
  transition: opacity .9s var(--ease-out);
}

.home-hero.is-hidden { opacity: 0; pointer-events: none; }

#vimeo-home-hero {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#vimeo-home-hero iframe {
  display: block; border: none; pointer-events: none;
}

.home-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(8,8,8,.25) 0%,
    rgba(8,8,8,.05) 40%,
    rgba(8,8,8,.6)  100%
  );
}

.home-hero-logo {
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  width: 624px; z-index: 2;
  display: block;
  background: transparent;
  pointer-events: none;
}

.home-hero-cta {
  position: absolute; bottom: 52px; left: 50%;
  z-index: 3;
  background: none; border: none; cursor: none;
  color: rgba(255,255,255,0.65);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: color .3s, gap .3s var(--ease-out);
  white-space: nowrap;
  animation: ctaFloat 2.8s ease-in-out infinite;
}

.home-hero-cta:hover { color: #fff; gap: 15px; }

.home-hero-cta-label {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .35em; text-transform: uppercase;
}

.home-hero-cta svg {
  width: 30px; height: 30px;
  fill: none; stroke: currentColor;
  stroke-width: 0.8; stroke-linecap: round; stroke-linejoin: round;
}

@keyframes ctaFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-6px); }
}

#sound-toggle {
  position: absolute; bottom: 40px; right: 40px;
  z-index: 4;
  background: none; border: none; cursor: none;
  padding: 4px;
  color: var(--color-white-dim);
  opacity: .6;
  transition: color .3s, opacity .3s;
  display: flex; align-items: center; gap: 8px;
}

#sound-toggle:hover { color: #fff; opacity: 1; }

#sound-toggle svg {
  width: 28px; height: 28px;
  fill: none; stroke: currentColor;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}

.sound-label { display: none; }

#icon-muted { display: none; }


/* ─── HERO LOADER ────────────────────────────────────────────────────────── */

.home-hero-loader {
  position: absolute; inset: 0;
  background: var(--color-bg);
  z-index: 1;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 1.2s var(--ease-out);
}

.home-hero-loader::after {
  content: 'BERRO.AI';
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: .45em; text-transform: uppercase;
  color: var(--color-white-faint);
  animation: loaderPulse 2s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.6; }
}

.home-hero-loader.is-gone { opacity: 0; }


/* ─── WORK GRID ──────────────────────────────────────────────────────────── */

.section-work { padding: var(--spacing-xl) 40px; }

.section-header { display: flex; align-items: center; gap: 24px; margin-bottom: var(--spacing-lg); }
.section-label  { font-family: var(--font-mono); font-size: 9px; letter-spacing: .35em; text-transform: uppercase; color: var(--color-white-dim); flex-shrink: 0; }
.section-line   { flex: 1; height: var(--line-weight); background: var(--color-white-faint); }

.work-grid { display: flex; flex-direction: column; gap: 20px; }
.work-row  { display: grid; gap: 20px; height: 420px; }

.work-row:nth-child(1) { grid-template-columns: 25fr 45fr 30fr; }
.work-row:nth-child(2) { grid-template-columns: 40fr 33fr 27fr; }
.work-row:nth-child(3) { grid-template-columns: 32fr 28fr 40fr; }
.work-row:nth-child(4) { grid-template-columns: 38fr 42fr 20fr; }

.work-item { position: relative; overflow: hidden; cursor: none; display: block; text-decoration: none; color: inherit; }
.work-item img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0;
  transition: opacity .6s ease, transform .9s var(--ease-out);
}
.work-item img.img-loaded { opacity: 1; }
.work-item:hover img { transform: scale(1.04); }

.work-item::before,
.work-item::after {
  content: '';
  position: absolute; z-index: 2;
  opacity: 0;
  transition: opacity .4s ease, transform .5s cubic-bezier(0.16,1,0.3,1);
}

.work-item::before {
  top: 12px; left: 12px; right: 12px;
  height: 0.5px;
  background: rgba(255,255,255,0.4);
  transform: scaleX(0); transform-origin: left;
}

.work-item::after {
  bottom: 12px; left: 12px; right: 12px;
  height: 0.5px;
  background: rgba(255,255,255,0.4);
  transform: scaleX(0); transform-origin: right;
}

.work-item:hover::before { opacity: 1; transform: scaleX(1); }
.work-item:hover::after  { opacity: 1; transform: scaleX(1); }

.work-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8,8,8,.88) 100%);
  opacity: 0; transition: opacity .4s;
}

.work-item:hover .work-item-overlay { opacity: 1; }

.work-item-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 20px 18px;
  transform: translateY(6px); opacity: 0;
  transition: opacity .4s, transform .4s var(--ease-out);
}

.work-item:hover .work-item-info { opacity: 1; transform: translateY(0); }

.work-item-cta {
  font-family: var(--font-mono);
  font-size: 8px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--color-white-dim);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}

.work-item-cta::before {
  content: '';
  display: block; width: 18px; height: var(--line-weight);
  background: var(--color-white-dim); flex-shrink: 0;
}

.work-item-title { font-family: var(--font-display); font-weight: 300; font-size: clamp(16px, 1.6vw, 22px); line-height: 1.1; color: #fff; }
.work-item-cat   { font-family: var(--font-mono); font-size: 12px; color: var(--color-white-dim); margin-top: 3px; }

.work-item-client {
  font-family: var(--font-mono);
  font-size: 7px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--color-white-dim); margin-bottom: 4px;
}

/*
 * Row patterns — cíclicos, compartidos por todas las páginas de portfolio.
 * WORDPRESS: PHP asigna la clase: 'row-pattern-' . (($row_index % 4) + 1)
 */
.work-row.row-pattern-1 { grid-template-columns: 25fr 45fr 30fr; }
.work-row.row-pattern-2 { grid-template-columns: 40fr 33fr 27fr; }
.work-row.row-pattern-3 { grid-template-columns: 32fr 28fr 40fr; }
.work-row.row-pattern-4 { grid-template-columns: 38fr 42fr 20fr; }


/* ─── HOME CATS ──────────────────────────────────────────────────────────── */

.home-cats {
  position: fixed; inset: 0; z-index: 9;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--color-white-faint);
  opacity: 0;
  pointer-events: none;
  transition: opacity .9s var(--ease-out);
}

.home-cats.is-visible {
  opacity: 1;
  pointer-events: all;
}

.cat-item {
  position: relative;
  overflow: hidden;
  cursor: none;
  text-decoration: none;
  background: var(--color-bg);
  display: block;
}

.cat-slides {
  position: absolute; inset: 0;
  transition: transform 1.2s var(--ease-out);
}

.cat-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0;
  filter: brightness(.7);
  transition: opacity 1.6s ease, filter 1.6s;
}

.cat-slide.is-active { opacity: 1; }

.cat-item:hover .cat-slides { transform: scale(1.06); }
.cat-item:hover .cat-slide   { filter: brightness(.85); }

/* Línea superior que se desliza en hover */
.cat-item::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: var(--line-weight);
  background: rgba(255,255,255,.5);
  z-index: 3;
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease-out);
}

.cat-item:hover::before { transform: scaleX(1); }

.cat-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg,
    rgba(8,8,8,.05) 0%,
    rgba(8,8,8,.0)  35%,
    rgba(8,8,8,.55) 65%,
    rgba(8,8,8,.96) 100%
  );
}


.cat-content {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  padding: 0 28px 32px;
  display: flex; flex-direction: column; gap: 5px;
}

/* Línea corta sobre el título que se alarga en hover */
.cat-content::before {
  content: '';
  display: block;
  order: -1;
  width: 20px; height: var(--line-weight);
  background: rgba(255,255,255,.45);
  margin-bottom: 4px;
  transition: width .5s var(--ease-out);
}

.cat-item:hover .cat-content::before { width: 44px; }

.cat-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(30px, 3vw, 52px);
  line-height: 1; letter-spacing: -0.01em;
  color: #fff;
}

.cat-title em { font-style: italic; }

.cat-desc {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 13px;
  color: var(--color-white-dim);
}

.cat-cta {
  font-family: var(--font-mono);
  font-size: 8px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--color-white-dim);
  display: flex; align-items: center; gap: 10px;
  margin-top: 6px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s, transform .35s var(--ease-out);
}

.cat-cta::before {
  content: '';
  display: block; width: 16px; height: var(--line-weight);
  background: var(--color-white-dim); flex-shrink: 0;
  transition: width .4s var(--ease-out);
}

.cat-item:hover .cat-cta             { opacity: 1; transform: translateY(0); }
.cat-item:hover .cat-cta::before     { width: 28px; }



/* ─── FOOTER ─────────────────────────────────────────────────────────────── */

.site-footer {
  padding: 40px 40px 32px;
  border-top: var(--line-weight) solid var(--color-white-faint);
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 32px;
}

.footer-brand      { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.footer-brand span { color: var(--color-white-dim); }

.footer-icons   { display: flex; align-items: center; gap: 28px; }
.footer-icons a { display: flex; align-items: center; color: var(--color-white-dim); text-decoration: none; transition: color .3s; }
.footer-icons a:hover { color: #fff; }

.footer-icons svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}

.footer-copy { font-family: var(--font-mono); font-size: 8px; letter-spacing: .2em; text-transform: uppercase; color: var(--color-white-dim); text-align: right; }


/* ─── REVEAL ─────────────────────────────────────────────────────────────── */

[data-reveal]           { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal-delay="2"] { transition-delay: .2s; }


/* ─── RESPONSIVE — TABLET (≤ 1024px) ────────────────────────────────────── */

@media (max-width: 1024px) {
  .work-row { height: 300px; gap: 12px; grid-template-columns: 1fr 1fr !important; }
  .work-row .work-item:last-child { display: none; }
  .home-hero-logo { width: 240px; }
}


/* ─── RESPONSIVE — MOBILE (≤ 767px) ─────────────────────────────────────── */

@media (max-width: 767px) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }

  .site-header { position: relative; padding: 18px 24px; }
  .header-line { margin: 0 18px; }

  .btn-menu { cursor: pointer; }

  /* Hero: bloque proporcional al ratio real del video */
  .home-hero {
    top: 68px; left: 0; right: 0;
    height: var(--hero-video-h);
    bottom: auto;
    transition: height 0.4s ease, opacity .9s var(--ease-out);
  }

  /* Override JS inline sizing → video sin recorte */
  #vimeo-home-hero {
    width: 100vw !important;
    height: var(--hero-video-h) !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
  }
  #vimeo-home-hero iframe {
    width: 100vw !important;
    height: var(--hero-video-h) !important;
  }

  .home-hero-logo { display: none; }
  .home-hero-cta  { display: none; }
  #sound-toggle   { bottom: 16px; right: 16px; cursor: pointer; }

  /* Cats: siempre visibles debajo del video, 3 columnas */
  .home-cats {
    position: fixed;
    top: calc(68px + var(--hero-video-h));
    left: 0; right: 0; bottom: 0;
    height: auto;
    opacity: 1 !important;
    pointer-events: all !important;
    grid-template-columns: 1fr 1fr 1fr;
    transition: top 0.4s ease;
  }

  .home-cats .cat-item { height: auto; }

  /* Texto en columnas angostas */
  .cat-desc { display: none; }
  .cat-cta  { display: none; }
  .cat-content { padding: 12px 10px; }
  .cat-title { font-size: 1.4rem; }

  .section-work { padding: 72px 24px; }
  .work-grid { gap: 12px; }
  .work-row { height: auto; gap: 12px; grid-template-columns: 1fr !important; }
  .work-row .work-item { height: 260px; }
  .work-row .work-item:last-child { display: block; }

  .nav-footer { padding: 0 24px; flex-direction: column; gap: 12px; align-items: center; bottom: 24px; }

  .site-footer { grid-template-columns: 1fr; gap: 24px; padding: 32px 24px 28px; text-align: center; }
  .footer-icons { justify-content: center; }
  .footer-copy  { text-align: center; }
}


/* ─── CATS MODAL (shared — se usa en todas las páginas salvo home) ───────── */

.cats-modal {
  position: fixed; inset: 0;
  z-index: 100;
  display: none;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--color-bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s var(--ease-out);
}

.cats-modal.is-visible {
  display: grid;
}

.cats-modal.is-open {
  opacity: 1;
  pointer-events: all;
}

.cats-modal-close {
  position: absolute;
  top: 76px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: none; border: none;
  padding: 14px 32px;
  cursor: none;
  color: rgba(255,255,255,0.25);
  transition: color .4s;
}

.cats-modal-close:hover { color: rgba(255,255,255,0.7); }

.cats-modal-close svg {
  display: block;
  width: 28px; height: 28px;
  fill: none; stroke: currentColor;
  stroke-width: 0.6; stroke-linecap: round; stroke-linejoin: round;
}


/* ─── SHARED EXPLORE WORK BUTTON ─────────────────────────────────────────── */

.btn-explore-work {
  display: inline-flex; align-items: center; gap: 16px;
  background: none; border: none; padding: 0;
  font-family: var(--font-mono);
  color: var(--color-white-dim);
  cursor: none;
  text-decoration: none;
  transition: color .3s, gap .4s var(--ease-out);
}

.btn-explore-work:hover { color: #fff; gap: 24px; }

.btn-explore-work .bew-line {
  display: block; width: 32px; height: var(--line-weight);
  background: currentColor; flex-shrink: 0;
  transition: width .4s var(--ease-out);
}

.btn-explore-work:hover .bew-line { width: 48px; }

.btn-explore-work .bew-label {
  font-size: 11px; letter-spacing: .35em; text-transform: uppercase;
}

.btn-explore-work .bew-arrow {
  width: 16px; height: 16px; display: block; flex-shrink: 0;
  fill: none; stroke: currentColor;
  stroke-width: 0.8; stroke-linecap: round; stroke-linejoin: round;
  transform: rotate(-90deg);
  transition: transform .4s var(--ease-out);
}

.btn-explore-work:hover .bew-arrow { transform: rotate(-90deg) translateX(4px); }

/* en la barra de filtros: empujado a la derecha */
.gallery-filter-explore { margin-left: auto; }


/* ─── SHARED GALLERY FILTERS ─────────────────────────────────────────────── */

.gallery-filters {
  position: fixed;
  top: 76px;
  left: 0; right: 0;
  z-index: 15;
  display: flex;
  gap: 28px;
  padding: 11px 40px;
  border-bottom: 0.5px solid rgba(255,255,255,0.06);
  background: rgba(8,8,8,0.96);
}

.gallery-filter-btn {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
  background: none;
  border: none;
  cursor: none;
  padding: 0 0 3px;
  position: relative;
  transition: color 0.3s var(--ease-out);
}

.gallery-filter-btn::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 0.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out);
}

.gallery-filter-btn.is-active        { color: rgba(255,255,255,0.65); }
.gallery-filter-btn.is-active::after { transform: scaleX(1); }
.gallery-filter-btn:hover            { color: rgba(255,255,255,0.45); }

.gallery-group           { display: none; }
.gallery-group.is-active { display: contents; }

/* Cuando hay barra de filtros, desplazar el gallery-wrap y las flechas */
.has-gallery-filters .gallery-wrap  { top: 112px; }
.has-gallery-filters .gallery-arrow { top: calc(112px + (100vh - 112px) / 2); }

@media (max-width: 767px) {
  .gallery-filters {
    position: sticky;
    top: 0;
    margin-top: 0;
    padding: 10px 20px;
    gap: 20px;
  }
  .gallery-group.is-active { display: block; }

  .cats-modal-close    { cursor: pointer; top: 76px; }
  .btn-explore-work    { cursor: pointer; }
  .gallery-filter-explore .bew-line,
  .gallery-filter-explore .bew-arrow { display: none; }
}
