.golf-section {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--color-sand);
  padding: 120px 64px 140px;
}

.golf-section__background {
  position: absolute;
  inset: 0;
  background-image: var(--theme-img-shadow-fx);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.5;
  pointer-events: none;
  rotate: 180deg;
}

.golf-section__wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.golf-section__content {
  width: 100%;
  max-width: 1240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* Header Section */
.golf-section__header {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.golf-section__eyebrow-container {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.golf-section__line {
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--color-navy-dark, #002542);
}

.golf-section__eyebrow {
  color: var(--color-navy-dark, #002542);
  font-family: 'Cronos Pro', Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.5;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.golf-section__title {
  color: var(--color-navy-dark, #002542);
  font-family: 'Rufina', serif;
  font-size: 68px;
  font-weight: 400;
  line-height: 0.95;
  text-align: center;
  margin: 0;
  padding: 0;
}

.golf-section__description {
  color: var(--color-navy-dark, #002542);
  font-family: 'Cronos Pro', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  margin: 0;
  padding: 0;
}

/* Button */
.golf-section__button {
  height: 48px;
  padding: 4px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 68px;
  border: 1.5px solid var(--color-navy-dark, #002542);
  background: transparent;
  color: var(--color-navy-dark, #002542);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: var(--btn-font-size, 16px);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.golf-section__button:hover {
  background: var(--color-navy-dark, #002542);
  color: var(--color-cream, #FAF9F2);
}

.golf-section__button:active {
  transform: scale(0.98);
}

/* Hero Carousel */
.golf-section__hero-carousel {
  position: relative;
  width: 100%;
  height: 660px;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 24px;
}

/* The markup (React + PHP mirror) gives this img the class .details-image,
   so match it by position too: it must fill and crop to the frame, not sit
   at its natural height and get cut off at the bottom. */
.golf-section__hero-image,
.golf-section__hero-carousel > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Cards Grid */
.golf-section__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  width: 100%;
  margin-top: 24px;
}

.golf-card {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.golf-card__image {
  width: 100%;
  aspect-ratio: 443 / 220;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.golf-card__content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-right: 24px;
  height: 100%;
}

.golf-card__title {
  color: var(--color-navy-dark, #002542);
  font-family: 'Cronos Pro', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  padding: 0;
}

.golf-card__description {
  color: var(--color-navy-dark, #002542);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  margin: 0;
  padding: 0;
}

.golf-card__link {
  display: flex;
  align-items: center;
  gap: 8px;
  height: auto;
  padding-top: 8px;
  border-top: 1px solid var(--color-navy-dark, #002542);
  border-left: none;
  border-right: none;
  border-bottom: none;
  background: none;
  color: var(--color-navy-dark, #002542);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s ease;
  margin-top: auto;
  text-decoration: none;
}

.golf-card__link:hover {
  opacity: 0.7;
}

.golf-card__link svg {
  width: 20px;
  height: 20px;
  color: currentColor;
}

/* Slider progress bar: phones only (the cards are a grid above 768px). */
.golf-section__progress {
  display: none;
  position: relative;
  width: 100%;
  height: 4px;
  margin-top: -8px;
  border-radius: 9999px;
  background: rgba(0, 37, 66, 0.12);
  overflow: hidden;
}

.golf-section__progress-thumb {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 9999px;
  background: var(--color-navy, #003764);
  transition: left 0.1s linear;
}

/* Responsive */
@media (max-width: 1024px) {
  .golf-section {
    padding: 80px 40px;
  }

  .golf-section__content {
    gap: 40px;
  }

  .golf-section__title {
    font-size: 48px;
    line-height: 1;
  }

  .golf-section__description {
    font-size: 24px;
  }

  .golf-section__hero-carousel {
    height: 480px;
  }

  .golf-section__cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .golf-section {
    padding: 60px 24px;
  }

  .golf-section__content {
    gap: 32px;
  }

  .golf-section__header {
    gap: 24px;
  }

  .golf-section__title {
    font-size: 40px;
    line-height: 1;
  }

  .golf-section__description {
    font-size: 20px;
  }

  /* Phones: no big golf photo, the course cards carry the section. */
  .golf-section__hero-carousel {
    display: none;
  }

  /* Cards become a swipe slider: one card wide with the next one peeking in,
     running to the right edge of the screen. */
  .golf-section__cards {
    display: flex;
    gap: 24px;
    align-self: stretch;
    width: auto;
    margin-top: 0;
    margin-right: -24px;
    padding-right: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .golf-section__cards::-webkit-scrollbar {
    display: none;
  }

  .golf-card {
    flex: 0 0 calc(100% - 32px);
    min-width: 0;
    gap: 24px;
    scroll-snap-align: start;
  }

  .golf-card__image {
    aspect-ratio: 16 / 10;
  }

  .golf-card__content {
    gap: 20px;
    padding-right: 0;
  }

  .golf-card__title {
    font-size: 24px;
  }

  .golf-card__link {
    align-self: flex-start;
    min-width: 50%;
    padding-top: 12px;
  }

  .golf-section__progress {
    display: block;
  }
}

/* Short laptop screens (<=820px tall): keep the big photo carousel within
   the visible area under the header, and tighten the card spacing. */
@media (min-width: 769px) and (max-height: 820px) {
  .golf-section__hero-carousel {
    height: clamp(320px, calc(100svh - 130px), 660px);
  }

  .golf-card,
  .golf-card__content {
    gap: 20px;
  }
}
