/* Premium Golf Events Carousel — edge-to-edge, section-matched type */

#golf-events-carousel {
  --ge-ink: var(--charcoal, #25272b);
  --ge-muted: var(--taupe, #9c9488);
  --ge-plum: var(--plum, #8b3a2f);
  --ge-cream: var(--ivory, #f7f4ed);
  --ge-line: color-mix(in srgb, var(--taupe, #9c9488) 35%, transparent);
  --forest-deep: #263524;
  --forest: #334731;
  --forest-light: #43573d;
  --gold-deep: #96672c;
  --gold: #b27d34;
  --gold-light: #d2a052;
  --rust-deep: #702b23;
  --rust: #87372c;
  --rust-light: #9d4a3d;
  --brown-deep: #5d402f;
  --brown: #6d4c37;
  --brown-light: #80604a;

  /* Break out of .container → full viewport edge-to-edge */
  position: relative;
  z-index: 5;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: 460px;
  margin-top: 4px;
  margin-bottom: 8px;
  box-sizing: border-box;
  overflow: visible;
  pointer-events: auto;
  font-family: var(--font-sans, "Montserrat", system-ui, sans-serif);
}

#golf-events-carousel *,
#golf-events-carousel *::before,
#golf-events-carousel *::after {
  box-sizing: border-box;
}

.ge-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 18px 0 28px;
  cursor: grab;
}

.ge-viewport.is-dragging {
  cursor: grabbing;
}

.ge-track {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: 0;
  transition: transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
  user-select: none;
}

/* Card */
.ge-card {
  position: relative;
  flex: 0 0 252px;
  width: 252px;
  height: 392px;
  overflow: hidden;
  border-radius: 16px;
  background: color-mix(in srgb, var(--ge-cream) 92%, #fff);
  border: 1px solid color-mix(in srgb, var(--taupe, #9c9488) 28%, transparent);
  box-shadow:
    0 12px 28px rgba(62, 48, 36, 0.1),
    0 2px 6px rgba(62, 48, 36, 0.05);
  cursor: pointer;
  pointer-events: auto;
  transition:
    flex-basis 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    width 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    height 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.55s ease;
}

.ge-card-active {
  flex-basis: 292px;
  width: 292px;
  height: 424px;
  transform: translateY(-8px);
  z-index: 10;
  overflow: visible;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  outline: 1px solid color-mix(in srgb, var(--ge-plum) 22%, transparent);
  box-shadow:
    0 0 0 4px rgba(255, 252, 247, 0.72),
    0 24px 48px rgba(57, 43, 34, 0.18),
    0 6px 14px rgba(57, 43, 34, 0.08);
}

.ge-card-active .ge-image {
  height: 248px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.ge-card-active .ge-footer {
  border-radius: 0 0 16px 16px;
}

/* Image */
.ge-image {
  position: relative;
  width: 100%;
  height: 228px;
  overflow: hidden;
}

.ge-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.8) contrast(1.03) brightness(0.98);
  transform: scale(1.001);
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ge-card:hover .ge-image img {
  transform: scale(1.04);
}

.ge-photo-grade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(26, 25, 20, 0.2) 0%,
    rgba(26, 25, 20, 0.02) 42%,
    rgba(29, 26, 21, 0.12) 100%
  );
}

/* Date badge */
.ge-date {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  min-width: 50px;
  padding: 7px 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border-radius: 8px;
  background: rgba(42, 34, 28, 0.78);
  color: #f7f3e9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.ge-date-active {
  background: color-mix(in srgb, var(--ge-plum) 88%, #000);
  border-color: rgba(255, 255, 255, 0.26);
}

.ge-day {
  font-family: var(--font-serif, "Cormorant Garamond", Georgia, serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.3px;
}

.ge-month {
  margin-top: 3px;
  font-family: var(--font-sans, "Montserrat", system-ui, sans-serif);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 1.1px;
}

.ge-year {
  font-family: var(--font-sans, "Montserrat", system-ui, sans-serif);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.5px;
  opacity: 0.88;
}

/* Category pill */
.ge-pill {
  position: absolute;
  top: 14px;
  right: 12px;
  z-index: 11;
  min-height: 24px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: var(--font-sans, "Montserrat", system-ui, sans-serif);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}

.ge-pill-green {
  color: #f8f6ed;
  background: linear-gradient(135deg, #304b36, #456148);
}

.ge-pill-gold {
  color: #292015;
  background: linear-gradient(135deg, #d09a35, #e4b34d);
}

.ge-pill-red {
  color: #fff8f0;
  background: linear-gradient(135deg, #952b2b, #ad3b37);
}

/* Featured seal */
.ge-featured {
  position: absolute;
  right: 8px;
  top: 210px;
  width: 78px;
  height: 96px;
  z-index: 30;
  pointer-events: none;
}

.ge-card-active .ge-featured {
  top: 228px;
}

.ge-featured-svg {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(48, 26, 20, 0.26));
}

.ge-feat-outer {
  fill: #8a3a2e;
  stroke: rgba(242, 219, 185, 0.95);
  stroke-width: 2.2;
}

.ge-feat-inner {
  fill: #6f2c24;
  stroke: rgba(240, 217, 184, 0.55);
  stroke-width: 1;
}

.ge-feat-text {
  fill: #f0d9b8;
  font-family: var(--font-sans, "Montserrat", system-ui, sans-serif);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.ge-feat-crown {
  fill: #f0d9b8;
  font-family: Georgia, "Cormorant Garamond", serif;
  font-size: 18px;
}

.ge-featured-tail {
  position: absolute;
  left: 12px;
  top: 58px;
  width: 48px;
  height: 34px;
  z-index: 1;
  background: linear-gradient(180deg, #823329, #5f241e);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 68%, 0 100%);
}

/* Info — matched to ongoing-mini typography */
.ge-info {
  height: 118px;
  padding: 14px 16px 0;
  background: linear-gradient(180deg, #fcfbf8 0%, #f7f5f0 100%);
}

.ge-card-active .ge-info {
  height: 126px;
  padding-top: 16px;
}

.ge-info h3 {
  margin: 0;
  font-family: var(--font-serif, "Cormorant Garamond", Georgia, serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--ge-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ge-card-active .ge-info h3 {
  font-size: 20px;
}

.ge-info h3 i,
.ge-info h3 em {
  font-family: var(--font-serif, "Cormorant Garamond", Georgia, serif);
  color: var(--ge-plum);
  font-weight: 400;
  font-style: italic;
}

.ge-info p {
  margin: 5px 0 0;
  color: var(--ge-muted);
  font-family: var(--font-sans, "Montserrat", system-ui, sans-serif);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ge-location {
  margin-top: 8px;
  padding-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--ge-line);
  color: var(--ge-ink);
  font-family: var(--font-sans, "Montserrat", system-ui, sans-serif);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}

.ge-location > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ge-map-pin {
  width: 13px;
  height: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ge-map-pin svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--ge-plum);
  stroke-width: 1.8;
}

.ge-location-arrow {
  margin-left: auto;
  color: var(--ge-plum);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

/* Footer — matches section CTA scale */
.ge-footer {
  position: relative;
  z-index: 4;
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  color: #fff;
  font-family: var(--font-sans, "Montserrat", system-ui, sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}
a.ge-footer:hover {
  filter: brightness(1.06);
  color: #fff;
}

.ge-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.2;
  pointer-events: none;
  background:
    repeating-radial-gradient(
      circle at 88% 120%,
      transparent 0 6px,
      rgba(255, 255, 255, 0.35) 6.5px 7px,
      transparent 7.5px 14px
    ),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='80' viewBox='0 0 160 80'%3E%3Cpath fill='none' stroke='rgba(255,255,255,0.35)' stroke-width='0.7' d='M-10,60 C20,40 40,70 70,50 S120,20 170,45'/%3E%3Cpath fill='none' stroke='rgba(255,255,255,0.28)' stroke-width='0.6' d='M-10,70 C30,50 50,78 80,58 S130,30 170,55'/%3E%3Cpath fill='none' stroke='rgba(255,255,255,0.22)' stroke-width='0.55' d='M-10,48 C25,30 45,58 75,40 S125,12 170,35'/%3E%3C/svg%3E");
  background-size: 120px 120px, 160px 80px;
  background-position: 110% 40%, center;
}

.ge-footer > span {
  position: relative;
  z-index: 2;
}

.ge-footer-arrow {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.ge-footer-green {
  background: linear-gradient(135deg, var(--forest-deep) 0%, var(--forest) 56%, var(--forest-light) 100%);
}

.ge-footer-gold {
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold) 54%, var(--gold-light) 100%);
}

.ge-footer-rust {
  background: linear-gradient(135deg, var(--rust-deep) 0%, var(--rust) 55%, var(--rust-light) 100%);
}

.ge-footer-brown {
  background: linear-gradient(135deg, var(--brown-deep) 0%, var(--brown) 55%, var(--brown-light) 100%);
}

/* Continuous loop — no arrow controls */

@media (max-width: 1400px) {
  .ge-track { gap: 16px; }
  .ge-card { flex-basis: 236px; width: 236px; }
  .ge-card-active { flex-basis: 272px; width: 272px; }
  .ge-info h3 { font-size: 17px; }
  .ge-card-active .ge-info h3 { font-size: 19px; }
}

@media (max-width: 1100px) {
  #golf-events-carousel { height: 430px; }
  .ge-viewport { padding: 12px 0 20px; }
  .ge-track { gap: 14px; }
  .ge-card,
  .ge-card-active {
    flex: 0 0 248px;
    width: 248px;
    height: 380px;
    transform: none;
    outline: none;
  }
  .ge-card-active .ge-image { height: 228px; }
  .ge-card-active .ge-info { height: 118px; padding-top: 14px; }
}

@media (max-width: 650px) {
  #golf-events-carousel { height: 420px; }
  .ge-card,
  .ge-card-active {
    flex: 0 0 min(78vw, 280px);
    width: min(78vw, 280px);
    height: 380px;
    transform: none;
  }
}
