/* Gallery page - scoped to .page-gallery. Editorial masonry, dark-wrapped
   image tiles, premium service chips, compact info cards. Mirrors the
   dark/gold language already in use on Home / Services / Brands / Magazine. */

.page-gallery {
  background:
    radial-gradient(1200px 480px at 50% -10%, rgba(214, 180, 106, 0.1), transparent),
    radial-gradient(900px 420px at 85% 30%, rgba(214, 180, 106, 0.045), transparent),
    linear-gradient(180deg, #060503 0%, #0a0807 40%, #060503 100%);
}

/* Buffer below the translucent sticky topbar so the hero never sits behind it. */
.page-gallery main {
  padding-top: 1.5rem;
}
.page-gallery main > .section:first-child {
  padding-top: 5.5rem;
}
@media (max-width: 540px) {
  .page-gallery main {
    padding-top: 1rem;
  }
  .page-gallery main > .section:first-child {
    padding-top: 4rem;
  }
}
html:has(.page-gallery) {
  scroll-padding-top: 90px;
}

/* ---------- Hero ---------- */
.page-gallery .gal-hero {
  position: relative;
  padding: 1.7rem 1.4rem 1.8rem;
  margin: 0 0 0.4rem;
  border: 1px solid rgba(214, 180, 106, 0.32);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgba(214, 180, 106, 0.13), transparent 70%),
    linear-gradient(180deg, rgba(28, 22, 16, 0.96), rgba(10, 9, 8, 0.97));
  box-shadow:
    inset 0 1px 0 rgba(214, 180, 106, 0.14),
    0 14px 36px rgba(0, 0, 0, 0.4);
  text-align: center;
}
@media (min-width: 720px) {
  .page-gallery .gal-hero {
    padding: 2rem 2rem 2.1rem;
  }
}
.page-gallery .gal-hero h1 {
  margin: 0 0 0.45rem;
  color: var(--champagne);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.25;
}
.page-gallery .gal-hero p {
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.7;
  max-width: 64ch;
}
.page-gallery .gal-hero .cta-row {
  margin-top: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Uniform-tile gallery grid ----------
   Fixed column count per breakpoint - desktop 5, tablet 3, mobile 2,
   narrow mobile 1. Every tile is 1:1 so a wedding shot next to a bottle
   product photo doesn't break the row rhythm. The grid is centered on
   the page with a sensible max-width. */
.page-gallery .gallery-public-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: start;
  gap: 1rem;
  max-width: 1280px;
  margin-inline: auto;
}
@media (max-width: 1100px) {
  .page-gallery .gallery-public-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
  }
}
@media (max-width: 600px) {
  .page-gallery .gallery-public-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}
@media (max-width: 380px) {
  .page-gallery .gallery-public-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
  }
}

.page-gallery .gallery-public-item {
  display: block;
  width: 100%;
  /* Fixed 1:1 tile - no card stretches because of image dimensions. */
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(214, 180, 106, 0.22);
  border-radius: var(--radius-sm, 12px);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(214, 180, 106, 0.07), transparent 70%),
    linear-gradient(180deg, rgba(28, 22, 16, 0.85), rgba(10, 9, 8, 0.92));
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  /* Softer custom easing for a more premium feel. Hover effect stays
     intentionally subtle: slight lift + slight gold glow + slight zoom. */
  transition:
    border-color 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.page-gallery .gallery-public-item:hover,
.page-gallery .gallery-public-item:focus-visible {
  border-color: rgba(214, 180, 106, 0.6);
  box-shadow:
    0 0 18px rgba(214, 180, 106, 0.18),
    0 14px 30px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
  outline: none;
}
.page-gallery .gallery-public-item img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.97);
  transition:
    transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 0.3s ease;
  will-change: transform;
}
.page-gallery .gallery-public-item:hover img,
.page-gallery .gallery-public-item:focus-visible img {
  filter: brightness(1.02);
}
/* Opt-in: lifestyle images use the default `cover`. For product / bottle
   shots with white backgrounds, the renderer or admin can flag the item
   with [data-fit="contain"] and the image is centered with padding instead
   of cropped - card height stays identical, image is never distorted. */
.page-gallery .gallery-public-item[data-fit="contain"] img {
  object-fit: contain;
  padding: 12%;
}
.page-gallery .gallery-public-item:hover img,
.page-gallery .gallery-public-item:focus-visible img {
  transform: scale(1.035);
}

/* Hover "view" badge - slides down from the top-end corner, gold-bordered
   pill with an eye glyph + Hebrew label. Subtle, not flashy. */
.page-gallery .gallery-public-item .gal-view-cue {
  position: absolute;
  top: 0.7rem;
  inset-inline-end: 0.7rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 180, 106, 0.55);
  background: rgba(8, 6, 4, 0.78);
  backdrop-filter: blur(4px);
  color: var(--champagne);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.page-gallery .gallery-public-item .gal-view-cue::before {
  content: "👁";
  font-size: 0.85rem;
  line-height: 1;
}
.page-gallery .gallery-public-item:hover .gal-view-cue,
.page-gallery .gallery-public-item:focus-visible .gal-view-cue {
  opacity: 1;
  transform: translateY(0);
}
@media (hover: none) {
  .page-gallery .gallery-public-item .gal-view-cue {
    display: none;
  }
}
/* Soft inner vignette - helps product/bottle shots with white backgrounds
   blend with the dark page without distorting the image itself. */
.page-gallery .gallery-public-item::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(0, 0, 0, 0.35), transparent 60%),
    radial-gradient(ellipse 80% 30% at 50% 0%, rgba(0, 0, 0, 0.15), transparent 70%);
  z-index: 1;
}
/* Hover/active caption overlay */
.page-gallery .gallery-public-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.85rem 0.95rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  text-align: right;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 60%, rgba(0, 0, 0, 0.85) 100%);
  border-top: 1px solid rgba(214, 180, 106, 0.18);
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.page-gallery .gallery-public-item:hover figcaption,
.page-gallery .gallery-public-item:focus-visible figcaption {
  transform: translateY(0);
  opacity: 1;
}
@media (hover: none) {
  /* On touch devices keep the caption visible at a subtler opacity. */
  .page-gallery .gallery-public-item figcaption {
    transform: translateY(0);
    opacity: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 70%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-gallery .gallery-public-item,
  .page-gallery .gallery-public-item img {
    transition: none;
  }
  .page-gallery .gallery-public-item:hover {
    transform: none;
  }
  .page-gallery .gallery-public-item:hover img {
    transform: none;
  }
}

/* Empty state */
.page-gallery #galleryPublicEmpty {
  text-align: center;
  padding: 1.4rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(214, 180, 106, 0.22);
  border-radius: var(--radius);
  background: rgba(20, 16, 12, 0.55);
}

/* Skeleton tiles - visible only on first paint. Match the uniform 1:1
   tile size so there's zero layout jump when real images replace them. */
.page-gallery .gallery-public-grid[data-state="loading"] .gal-skel {
  display: block;
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: var(--radius-sm, 12px);
  border: 1px solid rgba(214, 180, 106, 0.16);
  background:
    linear-gradient(180deg, rgba(28, 22, 16, 0.75), rgba(10, 9, 8, 0.85));
  position: relative;
  overflow: hidden;
}
.page-gallery .gal-skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(214, 180, 106, 0.16), transparent);
  animation: galSkel 1.4s ease-in-out infinite;
}
@keyframes galSkel {
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .page-gallery .gal-skel::after { animation: none; }
}

/* Tighten the generous global section padding only on this page so the
   sections feel premium but not airy. Hero keeps its top buffer from
   the topbar rule above; the rest are quieter. */
.page-gallery main > .section {
  padding-top: 2.2rem;
  padding-bottom: 2.2rem;
}
.page-gallery main > .section:first-child {
  padding-bottom: 1.2rem;
}

/* ---------- Services chips ---------- */
.page-gallery .gal-services {
  margin-top: 0;
}
.page-gallery .gal-services-head {
  margin: 0 0 1rem;
  text-align: center;
}
.page-gallery .gal-services-head h2 {
  margin: 0 0 0.3rem;
  color: var(--champagne);
  font-size: clamp(1.2rem, 2.3vw, 1.6rem);
}
.page-gallery .gal-services-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.94rem;
  line-height: 1.55;
}
.page-gallery .gal-services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 600px) {
  .page-gallery .gal-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .page-gallery .gal-services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.page-gallery .gal-service-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(214, 180, 106, 0.28);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 80% 80% at 30% 0%, rgba(214, 180, 106, 0.07), transparent 70%),
    linear-gradient(180deg, rgba(28, 22, 16, 0.9), rgba(10, 9, 8, 0.94));
  text-decoration: none;
  color: var(--champagne);
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(214, 180, 106, 0.08), 0 6px 16px rgba(0, 0, 0, 0.3);
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.page-gallery .gal-service-card:hover {
  border-color: rgba(214, 180, 106, 0.6);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(214, 180, 106, 0.14),
    0 0 18px rgba(214, 180, 106, 0.14),
    0 12px 24px rgba(0, 0, 0, 0.4);
}
.page-gallery .gal-service-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(214, 180, 106, 0.4);
  background:
    radial-gradient(circle at 30% 20%, rgba(214, 180, 106, 0.22), transparent 65%),
    linear-gradient(160deg, rgba(20, 15, 8, 0.85), rgba(8, 6, 4, 0.9));
  color: var(--gold);
  font-size: 1.05rem;
}
.page-gallery .gal-service-label {
  flex: 1;
  min-width: 0;
}
.page-gallery .gal-service-arrow {
  flex-shrink: 0;
  color: var(--gold);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.page-gallery .gal-service-card:hover .gal-service-arrow {
  transform: translateX(-3px); /* RTL: arrow nudges to the left (toward text end) */
}

/* ---------- Info cards (below gallery) ---------- */
.page-gallery .gal-info-section {
  margin-top: 0;
}
.page-gallery .gal-info-head {
  margin: 0 0 0.85rem;
  text-align: center;
}
.page-gallery .gal-info-head h2 {
  margin: 0;
  color: var(--champagne);
  font-size: clamp(1.2rem, 2.3vw, 1.55rem);
}
.page-gallery .gal-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 760px) {
  .page-gallery .gal-info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.page-gallery .gal-info-card {
  padding: 1.2rem 1.15rem 1.25rem;
  border: 1px solid rgba(214, 180, 106, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(214, 180, 106, 0.06), rgba(255, 255, 255, 0.015) 60%, rgba(0, 0, 0, 0));
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.page-gallery .gal-info-card:hover {
  border-color: rgba(214, 180, 106, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(214, 180, 106, 0.1), 0 12px 26px rgba(0, 0, 0, 0.35);
}
.page-gallery .gal-info-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(214, 180, 106, 0.4);
  background:
    radial-gradient(circle at 30% 20%, rgba(214, 180, 106, 0.22), transparent 65%),
    linear-gradient(160deg, rgba(20, 15, 8, 0.85), rgba(8, 6, 4, 0.9));
  color: var(--gold);
  box-shadow: inset 0 1px 0 rgba(214, 180, 106, 0.18), 0 6px 16px rgba(0, 0, 0, 0.3);
}
.page-gallery .gal-info-card h3 {
  margin: 0;
  color: var(--champagne);
  font-size: 1.02rem;
  line-height: 1.35;
}
.page-gallery .gal-info-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.93rem;
  line-height: 1.7;
}

/* ---------- FAQ section spacing (uses global #faq-dynamic styling) ---------- */
.page-gallery .gal-faq-section {
  margin-top: 0;
}
.page-gallery .gal-faq-section .section-title {
  text-align: center;
}

/* No-overflow safety on the gallery page */
.page-gallery main,
.page-gallery .container,
.page-gallery .gallery-public-grid,
.page-gallery .gal-info-card,
.page-gallery .gal-service-card {
  min-width: 0;
}
