* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #d71936;
  --dark: #171717;
  --muted: #707070;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--dark);
  background: #fff;
  line-height: 1.6;
}

a { text-decoration: none; }

.hero {
  min-height: 350px;
  display: flex;
  align-items: center;
  padding: 65px 8%;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(15, 10, 8, .88), rgba(15, 10, 8, .2)),
    url("images/gallery-banner.jpg") center/cover no-repeat;
}

.hero-content { max-width: 650px; }

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.hero .eyebrow { color: #ff8796; }

.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.12;
  margin-bottom: 18px;
  letter-spacing: -1.5px;
}

.hero p { max-width: 510px; font-size: 17px; color: #f2f2f2; }

.gallery-section { max-width: 1400px; padding: 75px 6%; margin: auto; }
.section-heading { text-align: center; margin-bottom: 42px; }
.section-heading h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 8px; }
.section-heading p { color: var(--muted); font-size: 15px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 220px;
  gap: 20px;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #eee;
  padding: 0;
  text-align: left;
  cursor: zoom-in;
  isolation: isolate;
}

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

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.86), rgba(0,0,0,.04) 65%);
  opacity: .8;
  transition: opacity .35s ease;
  z-index: 0;
}

.gallery-item:hover img,
.gallery-item:focus-visible img { transform: scale(1.08); }
.gallery-item:hover::after { opacity: 1; }
.gallery-item:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.image-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 22px;
  color: #fff;
  pointer-events: none;
}

.image-overlay > span:first-child {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #ff9aa8;
  margin-bottom: 5px;
}

.image-overlay strong { font-size: 19px; line-height: 1.35; padding-right: 20px; }

.zoom-icon {
  position: absolute;
  right: 18px;
  bottom: 20px;
  font-size: 23px;
  opacity: 0;
  transform: translateY(8px);
  transition: .3s ease;
}

.gallery-item:hover .zoom-icon { opacity: 1; transform: translateY(0); }

.gallery-cta {
  margin-top: 75px;
  padding: 48px 25px;
  border-radius: 16px;
  text-align: center;
  background: #fff5f5;
}

.gallery-cta h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.gallery-cta p { color: var(--muted); margin-bottom: 24px; }

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 13px 24px;
  border-radius: 50px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  transition: .3s ease;
}

.cta-button:hover { background: #a80f27; transform: translateY(-3px); }
.footer { padding: 25px 15px; text-align: center; background: var(--dark); color: #ddd; font-size: 13px; }

/* Lightbox popup */
body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 90px 45px;
  background: rgba(8, 8, 10, .96);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: min(1100px, 100%);
  max-height: 100%;
  margin: 0;
}

.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 5px;
  box-shadow: 0 15px 60px rgba(0,0,0,.35);
}

.lightbox-figure figcaption {
  color: #fff;
  font-size: 15px;
  margin-top: 14px;
  text-align: center;
}

.lightbox-count { color: #bdbdbd; font-size: 12px; margin-top: 4px; }

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  background: rgba(255,255,255,.1);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.lightbox-close:hover,
.lightbox-arrow:hover { background: var(--primary); }

.lightbox-close {
  top: 22px;
  right: 25px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 34px;
  line-height: 1;
}

.lightbox-arrow {
  top: 50%;
  width: 52px;
  height: 68px;
  border-radius: 12px;
  font-size: 48px;
  line-height: 1;
  transform: translateY(-50%);
}

.lightbox-arrow:hover { transform: translateY(-50%) scale(1.05); }
.lightbox-arrow.prev { left: 24px; }
.lightbox-arrow.next { right: 24px; }

@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 200px; gap: 16px; }
  .gallery-section { padding: 60px 4%; }
}

@media (max-width: 650px) {
  .hero { min-height: 290px; padding: 45px 6%; }
  .hero p { font-size: 15px; }
  .gallery-section { padding: 45px 5%; }
  .section-heading { margin-bottom: 28px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 170px; gap: 12px; }
  .gallery-item.tall { grid-row: span 1; }
  .gallery-item.wide { grid-column: span 2; }
  .image-overlay { padding: 12px; }
  .image-overlay strong { font-size: 14px; }
  .image-overlay > span:first-child { font-size: 9px; letter-spacing: 1px; }
  .zoom-icon { display: none; }
  .gallery-cta { margin-top: 45px; padding: 32px 18px; }
  .lightbox { padding: 65px 14px 35px; }
  .lightbox-figure img { max-height: calc(100vh - 145px); }
  .lightbox-arrow { width: 42px; height: 52px; font-size: 36px; background: rgba(0,0,0,.55); }
  .lightbox-arrow.prev { left: 8px; }
  .lightbox-arrow.next { right: 8px; }
  .lightbox-close { top: 12px; right: 12px; width: 42px; height: 42px; }
}

@media (max-width: 380px) {
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 230px; }
  .gallery-item.wide { grid-column: span 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
