/* GALERÍAS PÚBLICAS */
.gallery-page{
  background:#fff;
  min-height:100vh;
}

.gallery-hero{
  max-width:1180px;
  margin:0 auto;
  padding:60px 22px 28px;
  text-align:center;
}

.gallery-hero h1{
  font-family:Georgia,serif;
  color:#061B36;
  font-size:clamp(38px,6vw,70px);
  margin:10px 0 16px;
}

.gallery-hero p{
  max-width:900px;
  margin:0 auto;
  line-height:1.7;
}

.gallery-actions{
  margin-top:20px;
}

.gallery-grid{
  max-width:1180px;
  margin:0 auto;
  padding:10px 22px 70px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}

.gallery-item{
  position:relative;
  overflow:hidden;
  border-radius:24px;
  box-shadow:0 18px 44px rgba(6,27,54,.16);
  cursor:pointer;
  min-height:260px;
  background:#071A33;
}

.gallery-item img{
  width:100%;
  height:100%;
  min-height:260px;
  object-fit:cover;
  display:block;
  transition:.3s ease;
}

.gallery-item:hover img{
  transform:scale(1.04);
}

.gallery-item div{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:18px;
  color:white;
  background:linear-gradient(transparent,rgba(0,0,0,.76));
}

.gallery-item strong{
  display:block;
  font-size:20px;
}

.gallery-item span{
  display:block;
  font-size:14px;
  opacity:.92;
}

.empty-gallery{
  grid-column:1/-1;
  background:#F4F7FB;
  border-radius:24px;
  padding:40px;
  text-align:center;
}

.lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.92);
  z-index:999;
  display:none;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  padding:22px;
  color:white;
  text-align:center;
}

.lightbox.open{
  display:flex;
}

.lightbox img{
  max-width:96vw;
  max-height:72vh;
  border-radius:18px;
  object-fit:contain;
}

.lightbox button{
  position:absolute;
  top:18px;
  right:24px;
  font-size:38px;
  background:transparent;
  color:white;
  border:0;
  cursor:pointer;
}

.lightbox h2{
  color:white;
  margin:18px 0 4px;
}

.lightbox p{
  margin:0;
}

/* ADMIN IMÁGENES */
.gallery-admin-form{
  display:grid;
  gap:12px;
}

.gallery-admin-form label{
  font-weight:900;
  color:#071A33;
}

.gallery-admin-form input,
.gallery-admin-form select,
.gallery-admin-form textarea{
  width:100%;
  padding:12px;
  border:1px solid #DDE6F2;
  border-radius:12px;
}

.gallery-admin-form button{
  background:#071A33;
  color:white;
  border:0;
  border-radius:14px;
  padding:13px;
  font-weight:900;
  cursor:pointer;
}

.check-admin{
  display:flex;
  align-items:center;
  gap:8px;
}

.check-admin input{
  width:auto;
}

.admin-cancel{
  display:inline-block;
  text-align:center;
  color:#0057B7;
  font-weight:900;
}

.gallery-admin-list{
  margin-top:20px;
}

.gallery-admin-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}

.gallery-admin-grid article{
  border:1px solid #DDE6F2;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
}

.gallery-admin-grid img{
  width:100%;
  height:180px;
  object-fit:cover;
  display:block;
}

.gallery-admin-grid article div{
  padding:14px;
}

.gallery-admin-grid p{
  margin:6px 0;
}

.gallery-admin-grid small{
  color:#67768A;
  font-weight:800;
}

.admin-row-actions{
  display:flex;
  gap:12px;
  padding:10px 0 0!important;
}

.admin-row-actions a{
  color:#0057B7;
  font-weight:900;
}

@media(max-width:900px){
  .gallery-grid,
  .gallery-admin-grid{
    grid-template-columns:1fr;
  }

  .gallery-item,
  .gallery-item img{
    min-height:230px;
  }
}
