/* Portfolio / Gallery — glass theme, taller portrait tiles (3:4) */
html.elitein-gallery-smooth-scroll {
  scroll-behavior: smooth;
}

body.elitein-gallery-page {
  background: #021a15;
}

.elitein-gallery-body {
  padding-top: clamp(92px, 14vh, 140px);
}

.elitein-gallery-hero {
  position: relative;
  padding: clamp(48px, 8vw, 88px) clamp(24px, 5vw, 72px) clamp(36px, 5vw, 56px);
  text-align: center;
  isolation: isolate;
}

.elitein-gallery-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 65% at 50% -10%, rgba(3, 99, 83, 0.45) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.elitein-gallery-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin: 0 auto;
}

.elitein-gallery-hero-label {
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 214, 126, 0.92);
  margin-bottom: clamp(14px, 2vw, 22px);
}

.elitein-gallery-hero-title {
  font-size: clamp(2.35rem, 5.8vw, 4.25rem);
  font-weight: 500;
  color: var(--white-color);
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0 0 clamp(14px, 2vw, 22px);
}

.elitein-gallery-hero-title span {
  color: var(--yellow-color);
}

.elitein-gallery-hero-copy {
  font-size: clamp(1rem, 1.22vw, 1.125rem);
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.74);
  margin: 0;
}

/* sticky category dock */
.elitein-gallery-anchor-wrap {
  position: sticky;
  top: 0;
  z-index: 998;
  padding: 18px clamp(18px, 4vw, 40px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.elitein-gallery-anchor-strip {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.elitein-gallery-anchor-strip a {
  position: relative;
  isolation: isolate;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(3, 99, 83, 0.22) 45%,
    rgba(255, 255, 255, 0.04) 100%
  );
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease, color 0.25s ease;
  border: none;
}

.elitein-gallery-anchor-strip a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    138deg,
    rgba(255, 255, 255, 0) 12%,
    rgba(255, 255, 255, 0.2) 48%,
    rgba(255, 255, 255, 0) 92%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}

.elitein-gallery-anchor-strip a:hover {
  transform: translateY(-2px) scale(1.03);
  color: var(--yellow-color);
}

.elitein-gallery-anchor-strip a.is-current {
  color: var(--black-color);
  background: linear-gradient(135deg, #ffd67e 0%, #f5c86a 100%);
  backdrop-filter: none;
}

/* sections */
[class^="elitein-gallery-section"],
[id^="gallery-"] {
  scroll-margin-top: clamp(104px, 16vh, 150px);
}

.elitein-gallery-section {
  padding: clamp(48px, 7vw, 88px) clamp(18px, 4vw, 56px) clamp(64px, 9vw, 100px);
  position: relative;
}

.elitein-gallery-section-heading {
  max-width: 1440px;
  margin: 0 auto clamp(36px, 5vw, 52px);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 32px;
}

.elitein-gallery-section-heading h2 {
  font-family: inherit;
  font-size: clamp(1.95rem, 4.2vw, 3rem);
  color: var(--white-color);
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 500;
  font-style: normal;
}

.elitein-gallery-section-heading span {
  color: rgba(255, 214, 126, 0.78);
}

.elitein-gallery-section-num {
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.38);
}

/* 4 : 5 tile grid — explicit 5 columns on desktop so every cell matches row height */
.elitein-gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 24px);
  max-width: 1440px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 1240px) {
  .elitein-gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .elitein-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .elitein-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.elitein-gallery-item {
  position: relative;
  isolation: isolate;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  background: linear-gradient(
    148deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(3, 99, 83, 0.12) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  border-radius: 0;
  padding: 0;
  border: none;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition:
    backdrop-filter 0.45s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
}

.elitein-gallery-item:hover {
  transform: translateY(-6px) scale(1.01);
  backdrop-filter: blur(24px) saturate(182%);
  -webkit-backdrop-filter: blur(24px) saturate(182%);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.48);
}

.elitein-gallery-ratio {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 0;
  overflow: hidden;
  z-index: 1;
  border: none;
  /* Match page bg so any 1px seam from rounding is invisible */
  background: #021a15;
  isolation: isolate;
}

/* Slight overscan + centered cover avoids fractional-pixel gaps / “stripe” under images */
.elitein-gallery-ratio img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  transform: translate(-50%, -50%);
  display: block;
  object-fit: cover;
  object-position: center center;
  border: none;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dishes often sit low in-frame — bias crop toward lower area */
#gallery-food .elitein-gallery-ratio img {
  object-position: center 92%;
}

.elitein-gallery-item:hover .elitein-gallery-ratio img {
  transform: translate(-50%, -50%) scale(1.05);
}

body.elitein-gallery-page footer.ei-footer {
  margin-top: 0;
}

@media (max-width: 580px) {
  .elitein-gallery-anchor-strip a {
    padding: 11px 16px;
    font-size: 12px;
  }
}
