.footgolf-section {
  background: #f3f7fc;
  padding: var(--section-padding) 1.25rem;
  overflow: hidden;
}

.footgolf-content {
  width: min(100%, var(--container-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  grid-template-areas: "gallery text";
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.footgolf-text {
  grid-area: text;
  max-width: 520px;
  justify-self: end;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.footgolf-text h2 {
  font-family: var(--font-title);
  font-size: clamp(4rem, 8vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color1);
}

.footgolf-text p {
  margin-top: 1.25rem;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  color: rgba(30, 48, 84, 0.78);
}

.footgolf-gallery {
  grid-area: gallery;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1rem);
}

.gallery-item {
  position: relative;
  width: 100%;
  min-height: 9rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(30, 48, 84, 0.08);
  cursor: pointer;
  box-shadow: 0 18px 46px rgba(30, 48, 84, 0.16);
}

.gallery-item:nth-child(1),
.gallery-item:nth-child(4) {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transform: scale(1.01);
  transition:
    transform 260ms ease,
    filter 260ms ease;
}

.gallery-item:nth-child(1) img,
.gallery-item:nth-child(4) img {
  aspect-ratio: 1 / 2.08;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(30, 48, 84, 0.02),
    rgba(30, 48, 84, 0.3)
  );
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.08);
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(8, 14, 28, 0.9);
  backdrop-filter: blur(10px);
}

.gallery-lightbox[hidden] {
  display: none;
}

.lightbox-image {
  width: min(100%, 1180px);
  max-height: 86svh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.lightbox-close,
.lightbox-arrow {
  position: fixed;
  z-index: 101;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  background: var(--color-accent);
  color: var(--color1);
  transform: scale(1.04);
}

.lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-arrow {
  top: 50%;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  font-size: 2.6rem;
  line-height: 1;
  transform: translateY(-50%);
}

.lightbox-arrow:hover {
  transform: translateY(-50%) scale(1.04);
}

.lightbox-arrow-prev {
  left: clamp(0.75rem, 3vw, 2rem);
}

.lightbox-arrow-next {
  right: clamp(0.75rem, 3vw, 2rem);
}

@media (max-width: 980px) {
  .footgolf-content {
    grid-template-columns: 1fr;
    grid-template-areas:
      "text"
      "gallery";
  }

  .footgolf-text {
    max-width: 760px;
    text-align: center;
    margin: 0 auto;
    justify-self: center;
  }

  .footgolf-gallery {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 680px) {
  .footgolf-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) {
    grid-row: span 1;
  }

  .gallery-item:nth-child(1) img,
  .gallery-item:nth-child(4) img {
    aspect-ratio: 1 / 1;
  }

  .lightbox-arrow {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 2.2rem;
  }

  .lightbox-close {
    width: 2.75rem;
    height: 2.75rem;
  }
}

@media (max-width: 440px) {
  .footgolf-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footgolf-gallery {
    gap: 0.7rem;
  }

  .gallery-item {
    border-radius: 0.85rem;
  }

  .footgolf-text h2 {
    font-size: clamp(3.4rem, 18vw, 4.5rem);
  }
}
