/* =========================================================
   Galería fotográfica CASHER
   Mantiene la proporción original y evita ampliar miniaturas.
========================================================= */
.gallery-filters{
  align-items:center;
}
.gallery-filter{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 15px;
  border-radius:9999px;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  color:rgba(15,23,42,.72);
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  box-shadow:0 10px 24px rgba(2,6,23,.05);
  transition:transform .2s ease, color .2s ease, background-color .2s ease, border-color .2s ease;
}
.gallery-filter:hover{
  transform:translateY(-1px);
  border-color:rgba(234,98,15,.30);
  color:#EA620F;
}
.gallery-filter.is-active{
  border-color:rgba(234,98,15,.30);
  background:rgba(234,98,15,.10);
  color:#EA620F;
}

.gallery-masonry{
  columns:1;
  column-gap:18px;
}
@media (min-width:640px){
  .gallery-masonry{ columns:2; }
}
@media (min-width:1024px){
  .gallery-masonry{ columns:3; column-gap:22px; }
}
.gallery-card{
  display:inline-block;
  width:100%;
  margin:0 0 18px;
  break-inside:avoid;
  transition:opacity .25s ease, transform .25s ease;
}
@media (min-width:1024px){
  .gallery-card{ margin-bottom:22px; }
}
.gallery-card.is-hidden{
  display:none;
}
.gallery-card-button{
  position:relative;
  display:block;
  width:100%;
  overflow:hidden;
  border-radius:24px;
  background:#0B1220;
  text-align:left;
  box-shadow:0 18px 40px rgba(2,6,23,.12);
  border:1px solid rgba(15,23,42,.08);
  isolation:isolate;
}
.gallery-card-image{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  transform:translateZ(0);
  transition:transform .8s cubic-bezier(.2,.8,.2,1), filter .35s ease;
}
.gallery-card-shade{
  position:absolute;
  inset:0;
  background:linear-gradient(to top, rgba(2,6,23,.90) 0%, rgba(2,6,23,.28) 42%, rgba(2,6,23,0) 72%);
  opacity:.86;
  transition:opacity .35s ease;
}
.gallery-card-copy{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  display:grid;
  gap:6px;
  padding:20px;
  color:#fff;
}
.gallery-card-label{
  width:max-content;
  max-width:100%;
  border-radius:9999px;
  padding:6px 10px;
  background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.18);
  font-size:10px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  backdrop-filter:blur(8px);
}
.gallery-card-copy strong{
  font-size:18px;
  line-height:1.2;
  text-shadow:0 8px 24px rgba(0,0,0,.3);
}
.gallery-card-copy small{
  display:block;
  max-width:52ch;
  font-size:12px;
  line-height:1.55;
  color:rgba(255,255,255,.76);
}
.gallery-card-expand{
  position:absolute;
  top:14px;
  right:14px;
  display:grid;
  width:40px;
  height:40px;
  place-items:center;
  border-radius:14px;
  background:rgba(255,255,255,.90);
  color:#0B1220;
  font-weight:900;
  box-shadow:0 10px 25px rgba(2,6,23,.16);
  transform:translateY(-4px);
  opacity:0;
  transition:opacity .25s ease, transform .25s ease;
}
@media (hover:hover){
  .gallery-card-button:hover .gallery-card-image{
    transform:scale(1.035);
  }
  .gallery-card-button:hover .gallery-card-shade{ opacity:1; }
  .gallery-card-button:hover .gallery-card-expand{
    transform:translateY(0);
    opacity:1;
  }
}
@media (hover:none){
  .gallery-card-expand{ opacity:1; transform:none; }
}

/* Las tarjetas de la portada usan una proporción estable y nunca 600px de alto. */
.works-grid .work-media{
  width:100%;
  height:auto;
  min-height:0;
  aspect-ratio:4 / 3;
  border-radius:24px;
}
@media (min-width:1024px){
  .works-grid .work-media{
    min-height:0;
    border-radius:26px;
  }
}
.works-grid .work-overlay{
  opacity:.64;
}
.works-grid .work-overlay-content{
  opacity:1;
  transform:none;
}
.works-grid .work-title{
  font-size:19px;
}
.works-grid .work-desc{
  display:-webkit-box;
  overflow:hidden;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

/* Lightbox accesible para ver la fotografía a resolución disponible. */
.casher-lightbox{
  position:fixed;
  inset:0;
  z-index:100;
  display:none;
  place-items:center;
  padding:18px;
}
.casher-lightbox.is-open{
  display:grid;
}
.casher-lightbox-backdrop{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  background:rgba(2,6,23,.92);
  backdrop-filter:blur(10px);
}
.casher-lightbox-dialog{
  position:relative;
  z-index:1;
  width:min(94vw, 1500px);
  height:min(92vh, 980px);
  display:grid;
  grid-template-columns:52px minmax(0,1fr) 52px;
  align-items:center;
  gap:10px;
}
.casher-lightbox-figure{
  min-width:0;
  max-height:92vh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:24px;
  background:#050912;
  box-shadow:0 35px 100px rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.12);
}
.casher-lightbox-image{
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:calc(92vh - 112px);
  margin:0 auto;
  object-fit:contain;
  background:#050912;
}
.casher-lightbox-caption{
  min-height:92px;
  padding:18px 22px 20px;
  background:#0B1220;
  color:#fff;
}
.casher-lightbox-caption h2{
  font-size:18px;
  font-weight:900;
  line-height:1.25;
}
.casher-lightbox-caption p{
  margin-top:5px;
  font-size:13px;
  line-height:1.55;
  color:rgba(255,255,255,.68);
}
.casher-lightbox-close,
.casher-lightbox-nav{
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.10);
  color:#fff;
  backdrop-filter:blur(10px);
  transition:background-color .2s ease, transform .2s ease;
}
.casher-lightbox-close:hover,
.casher-lightbox-nav:hover{
  background:#EA620F;
  transform:translateY(-1px);
}
.casher-lightbox-close{
  position:absolute;
  top:-4px;
  right:0;
  z-index:2;
  width:44px;
  height:44px;
  border-radius:15px;
  transform:translateY(-100%);
}
.casher-lightbox-nav{
  width:48px;
  height:64px;
  border-radius:16px;
  font-size:36px;
  line-height:1;
}
@media (max-width:767px){
  .casher-lightbox{ padding:10px; }
  .casher-lightbox-dialog{
    width:100%;
    height:94vh;
    grid-template-columns:1fr;
    align-content:center;
  }
  .casher-lightbox-figure{
    max-height:90vh;
    border-radius:18px;
  }
  .casher-lightbox-image{ max-height:calc(90vh - 118px); }
  .casher-lightbox-caption{ min-height:106px; padding:15px 17px 17px; }
  .casher-lightbox-nav{
    position:absolute;
    z-index:3;
    top:46%;
    width:42px;
    height:58px;
    background:rgba(2,6,23,.58);
  }
  .casher-lightbox-prev{ left:8px; }
  .casher-lightbox-next{ right:8px; }
  .casher-lightbox-close{
    top:8px;
    right:8px;
    transform:none;
    background:rgba(2,6,23,.70);
  }
}

@media (prefers-reduced-motion:reduce){
  .gallery-card-image,
  .gallery-card-expand,
  .gallery-filter,
  .casher-lightbox-close,
  .casher-lightbox-nav{
    transition:none !important;
  }
}

@media (min-width:768px){
  .gallery-cta-link{ margin-top:0; }
}

/* Utilidades usadas por la integración sin depender de una recompilación de Vite. */
.text-left{ text-align:left; }
@media (hover:hover){
  .hover\:bg-casher-blue:hover{ background-color:#0D4B88; }
}
