body {
  margin: 0;
  background: #f7f2eb;
  color: #1d1611;
}

.gallery-page {
  overflow-x: hidden;
}

.gallery-hero {
  padding: 4rem 1.25rem 2rem;
  background:
    linear-gradient(135deg, rgba(29, 22, 17, 0.84), rgba(81, 52, 34, 0.62)),
    url('./../caltabellotta/terazza_caltabellotta.jpeg') center/cover no-repeat;
  color: #fff8f1;
}

.gallery-hero__inner,
.gallery-intro__inner,
.gallery-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.gallery-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .95fr);
  gap: 1.5rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 .75rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  opacity: .82;
}

.gallery-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
}

.lead {
  margin: 1rem 0 0;
  max-width: 44rem;
  line-height: 1.75;
  font-size: 1.05rem;
}

.gallery-cta-card {
  background: rgba(255, 248, 241, 0.95);
  color: #2c1d15;
  padding: 1.4rem;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
}

.gallery-cta-card h2 {
  margin: 0 0 .75rem;
  font-size: 1.35rem;
}

.gallery-cta-card p {
  margin: 0;
  line-height: 1.7;
}

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.2rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .85rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.btn-primary { background: #241711; color: #fff8f1; }
.btn-secondary { background: #efe2d2; color: #241711; }

.gallery-intro {
  padding: 1.5rem 0 1rem;
}

.gallery-intro p {
  margin: 0 0 1.1rem;
  line-height: 1.7;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: .85rem 1.1rem;
  background: #ece4da;
  color: #241711;
  cursor: pointer;
  font-weight: 600;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.btn:hover,
#buttonload:hover { transform: translateY(-1px); }

.btn.active,
#buttonload.active {
  background: #241711;
  color: #fff8f1;
}

.gallery-shell {
  padding-bottom: 2.5rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.column {
  flex: 1 1 calc(25% - .75rem);
  min-width: 0;
  display: grid;
  gap: 1rem;
}

.containerFoto {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(31, 20, 15, 0.10);
  background: #fff;
}

.containerFoto img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform .35s ease;
  cursor: zoom-in;
}

.containerFoto:hover img {
  transform: scale(1.035);
}

.overlayFoto {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: .75rem .9rem;
  background: linear-gradient(to top, rgba(15, 11, 9, .78), rgba(15, 11, 9, 0));
  color: #fff;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.load-more-wrap {
  margin-top: 1.2rem;
  text-align: center;
}

#buttonload {
  border: 0;
  border-radius: 999px;
  padding: .9rem 1.25rem;
  background: #ece4da;
  color: #241711;
  font-weight: 600;
  cursor: pointer;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(12, 9, 7, .82);
  z-index: 9999;
}

.lightbox.is-open {
  display: grid;
}

.lightbox-image {
  max-width: min(1100px, 96vw);
  max-height: 82vh;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .35);
}

.lightbox-caption {
  color: #fff8f1;
  text-align: center;
  margin: .85rem 0 0;
  font-size: .95rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .gallery-hero__inner {
    grid-template-columns: 1fr;
  }

  .column {
    flex-basis: calc(50% - .5rem);
  }
}

@media (max-width: 640px) {
  .gallery-hero {
    padding-top: 2.6rem;
  }

  .gallery-hero__inner,
  .gallery-intro__inner,
  .gallery-shell {
    width: min(100% - 1rem, 1180px);
  }

  .gallery-actions a,
  .btn {
    width: 100%;
  }

  .column {
    flex-basis: 100%;
  }

  .containerFoto,
  .gallery-cta-card {
    border-radius: 20px;
  }

  .containerFoto img {
    aspect-ratio: 4 / 4.6;
  }
}
