/* ══════════════════════════════════════════════════════════════════
   Studio Notarile Cosenza — Stili pagine galleria studio
   ══════════════════════════════════════════════════════════════════ */

/* Rimuovi padding-top per pagine galleria (la navbar è già scrolled) */
.gallery-page body { background: var(--ivory); }

/* ─── HERO GALLERIA ──────────────────────────────────────────────── */
.gallery-hero {
  position: relative;
  height: 65vh;
  min-height: 420px;
  overflow: hidden;
  margin-top: var(--nav-h);
}

.gallery-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13,27,42,.55) 0%,
    rgba(13,27,42,.50) 50%,
    rgba(13,27,42,.80) 100%
  );
  display: flex;
  align-items: flex-end;
  padding-bottom: 4rem;
}

.gallery-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.gallery-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
  transition: color var(--transition), gap var(--transition);
}
.gallery-back:hover { color: var(--white); gap: .7rem; }

.gallery-eyebrow {
  font-family: var(--font-sans);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
}

.gallery-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  letter-spacing: .04em;
  margin-bottom: 1rem;
}

.gallery-address {
  font-family: var(--font-sans);
  font-size: .85rem;
  color: rgba(255,255,255,.75);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .2rem;
}
.gallery-address i { color: var(--gold); }


/* ─── SEZIONE GALLERIA ───────────────────────────────────────────── */
.gallery-section {
  padding: 5rem 0 6rem;
  background: var(--ivory);
}

.gallery-intro {
  text-align: center;
  margin-bottom: 3.5rem;
}

.gallery-intro-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-mid);
  max-width: 580px;
  margin: 1.2rem auto 0;
  line-height: 1.7;
}

/* Grid 3 colonne con primo elemento wide */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1.2rem;
}

.gallery-grid--two {
  grid-template-columns: 1fr 1fr;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  cursor: pointer;
  background: var(--stone);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.gallery-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-grid--two .gallery-item--wide {
  grid-column: span 1;
}

.gallery-item img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.gallery-item--wide img {
  height: 420px;
}
.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: .8rem 1.2rem;
  background: linear-gradient(to top, rgba(13,27,42,.75) 0%, transparent 100%);
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}


/* ─── LIGHTBOX ───────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.93);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.lightbox-caption {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--white);
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  backdrop-filter: blur(4px);
}
.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev  { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover { background: rgba(184,151,80,.4); transform: rotate(90deg); }
.lightbox-prev:hover  { background: rgba(184,151,80,.3); transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover  { background: rgba(184,151,80,.3); transform: translateY(-50%) translateX(3px); }


/* ─── CTA ────────────────────────────────────────────────────────── */
.gallery-cta {
  background: var(--navy);
  padding: 4rem 0;
}

.gallery-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.gallery-cta-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: .4rem;
}
.gallery-cta-sub {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
}
.gallery-cta-sub a {
  color: var(--gold-light);
  font-weight: 600;
}
.gallery-cta-sub a:hover { color: var(--white); }

.gallery-cta-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Bottone outline (solo su pagine galleria) */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.35);
  padding: .95rem 2rem;
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(184,151,80,.08);
}

/* Footer compatto sulle pagine galleria */
.footer-compact .footer-bottom {
  padding: 1.4rem 0;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-back-home {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--gold-light);
  font-weight: 500;
  transition: color var(--transition);
}
.footer-back-home:hover { color: var(--white); }


/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item--wide { grid-column: span 2; }
  .gallery-item img { height: 260px; }
  .gallery-item--wide img { height: 340px; }
}

@media (max-width: 600px) {
  .gallery-hero { height: 55vh; }
  .gallery-grid,
  .gallery-grid--two { grid-template-columns: 1fr; }
  .gallery-item--wide { grid-column: span 1; }
  .gallery-item img,
  .gallery-item--wide img { height: 240px; }
  .gallery-cta-inner { flex-direction: column; text-align: center; }
  .gallery-cta-btns { justify-content: center; }
  .lightbox-prev { left: .5rem; }
  .lightbox-next { right: .5rem; }
}
