/* ==================== DISTANCE.PHP CSS ==================== */
/* Matches the "Choose your favorite DISTANCE" card layout    */

:root {
  --blue-dark:  #0D1F35;
  --blue-main:  #1a3aff;
  --blue-mid:   #1a5fd4;
  --blue-text:  #003399;
  --white:      #ffffff;
  --off-white:  #f4f6fb;
  --border:     #dde3ee;
  --muted:      #6b7a99;
  --radius-lg:  18px;
  --radius-md:  12px;
  --radius-sm:  8px;
  --card-w:     220px;
  --font:       'Sora', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--blue-dark);
  min-height: 100vh;
}

/* ─── SECTION WRAPPER ─── */
.dist-section {
  max-width: 1260px;
  margin: 0 auto;
  padding: 56px 32px 72px;
}

/* ─── HEADER ROW ─── */
.dist-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 36px;
}



.dist-header-eyebrow {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--blue-mid);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.dist-header-title {
  font-family: var(--font);
  font-size: clamp(52px, 8vw, 76px);
  font-weight: 900;
  color: var(--blue-dark);
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.dist-header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 8px;
}

.dist-header-tagline {
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-dark);
  max-width: 280px;
}

.dist-nav-btns {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.dist-nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue-mid);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  transition: background .2s, transform .15s;
  flex-shrink: 0;
}

.dist-nav-btn:hover { background: var(--blue-dark); transform: scale(1.07); }
.dist-nav-btn:disabled { opacity: .35; cursor: default; transform: none; }

/* ─── CARDS TRACK ─── */
.dist-track-wrap {
  overflow: hidden;
  position: relative;
}

.dist-track {
  display: flex;
  gap: 18px;
  transition: transform .38s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* ─── SINGLE DISTANCE CARD ─── */
.dist-card {
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .22s, transform .22s;
  display: flex;
  flex-direction: column;
}

.dist-card:hover {
  box-shadow: 0 8px 32px rgba(13, 31, 53, .14);
  transform: translateY(-3px);
}

/* ─── PHOTO BOX ─── */
.dist-card-photo {
  width: 100%;
  height: 162px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #cdd5e8;
  flex-shrink: 0;
}

.dist-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.dist-card:hover .dist-card-photo img {
  transform: scale(1.04);
}

/* placeholder when no photo */
.dist-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c8d4ea 0%, #a0b4d4 100%);
  color: rgba(255,255,255,.6);
  font-size: 42px;
}

/* ─── SOLD OUT RIBBON ─── */
.dist-sold-ribbon {
  position: absolute;
  top: 18px;
  left: -28px;
  width: 120px;
  background: #c0001a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  text-align: center;
  padding: 6px 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  z-index: 4;
}

/* ─── CARD BODY ─── */
.dist-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* date + time row */
.dist-card-datetime {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.dist-card-datetime i {
  color: var(--blue-mid);
  font-size: 13px;
}

.dist-datetime-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

/* distance label */
.dist-card-km {
  font-size: 48px;
  font-weight: 900;
  color: var(--blue-text);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}

/* elevation */
.dist-card-elev {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-mid);
  margin-bottom: 12px;
}

.dist-card-elev i { font-size: 14px; }

/* ─── CARD FOOTER ─── */
.dist-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* badge image */
.dist-card-badge {
  height: 26px;
  max-width: 70px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

/* fallback badge pill */
.dist-badge-pill {
  height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* brand logo separator */
.dist-footer-sep {
  width: 1.5px;
  height: 18px;
  background: var(--border);
  flex-shrink: 0;
}

/* waves label */
.dist-card-waves {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

/* ─── VIEW ALL BUTTON ─── */
.dist-view-all-wrap {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

.dist-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue-mid);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 16px 52px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(26, 95, 212, .3);
}

.dist-view-all-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(13, 31, 53, .25);
}

/* ─── EMPTY STATE ─── */
.dist-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.dist-empty i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  opacity: .4;
}

.dist-empty p {
  font-size: 15px;
  font-weight: 500;
}

/* ─── LOADING SKELETON ─── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.dist-skeleton {
  background: linear-gradient(90deg, #eef1f7 25%, #dde3ee 50%, #eef1f7 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 8px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .dist-section { padding: 36px 16px 52px; }
  .dist-header { flex-direction: column; align-items: flex-start; }
  .dist-header-title { font-size: 52px; }
  .dist-header-right { width: 100%; justify-content: space-between; }
  :root { --card-w: 185px; }
  .dist-card-km { font-size: 38px; }
  .dist-card-photo { height: 130px; }
}

@media (max-width: 480px) {
  :root { --card-w: 160px; }
  .dist-header-title { font-size: 40px; }
  .dist-card-km { font-size: 32px; }
}