/* ================================================================
   MyKutch.org — Distance Guide Page  ·  css/distance.css
   Design tokens inherited from style.css (never duplicated here):
     --font-heading   Cormorant Garamond
     --font-body      DM Sans
     --color-heading  #1B3A6B  navy
     --color-primary  #C2410C  terracotta
     --color-bg       #FFFDF8  warm cream
     --color-section-bg  #F5F0EA  warm sand
   ================================================================ */

/* ── Shared spacing token ──────────────────────────────────── */
:root {
  --dm-pad-x: 10%;
  --dm-nav: var(--mk-h, 70px);
}

/* ── Eyebrow label ─────────────────────────────────────────── */
.dm-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-primary);
  display: block;
  margin-bottom: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════
   1. HERO
   ═══════════════════════════════════════════════════════════ */
.dm-hero {
  background: var(--color-bg, #FFFDF8);
  padding: calc(var(--dm-nav) + clamp(3.5rem, 7vw, 6rem)) var(--dm-pad-x) clamp(4rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: center;
}

.dm-hero-text {
  display: flex;
  flex-direction: column;
}

/* Main h1 — inherits global h1 font/size from style.css.
   Only set display & margin here; metallic-luster sets the color. */
.dm-title {
  margin: 0 0 1.25rem !important;
  display: inline-block;
}

.dm-lead {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-muted, #6B7280);
  margin: 0 0 2.5rem;
  max-width: 56ch;
}

/* Stats row — identical pattern to the main page hero */
.dm-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(27,58,107,0.1);
  flex-wrap: wrap;
}

.dm-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dm-stat strong {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.dm-stat span {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted, #6B7280);
}

/* Hero image panel — fills the column height, same as dest-hero-photo */
.dm-hero-img {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  min-height: 460px;
  box-shadow: 0 16px 48px rgba(27,58,107,0.16);
}

.dm-hero-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}


/* ═══════════════════════════════════════════════════════════
   3. SEARCH & FILTER
   ═══════════════════════════════════════════════════════════ */
.dm-search-section {
  background: linear-gradient(135deg, #BAE6FD 0%, #A7F3D0 100%);
  padding: 2.5rem var(--dm-pad-x) 0;
}

.dm-search-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(27,58,107,0.08);
  box-shadow: 0 2px 12px rgba(27,58,107,0.06);
}

.dm-search-bar {
  position: relative;
  max-width: 560px;
}

.dm-search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--color-text-muted, #6B7280);
  pointer-events: none;
}

.dm-search-input {
  width: 100%;
  padding: 0.9rem 2.75rem 0.9rem 2.75rem;
  border: 1.5px solid rgba(27,58,107,0.14);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text, #374151);
  background: var(--color-bg, #FFFDF8);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dm-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(194,65,12,0.1);
  background: #fff;
}

.dm-clear-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--color-text-muted, #6B7280);
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
  transition: color 0.2s;
}
.dm-clear-btn:hover { color: var(--color-primary); }

/* Filters */
.dm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dm-filter {
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--color-bg, #FFFDF8);
  color: var(--color-text, #374151);
  border: 1.5px solid rgba(27,58,107,0.14);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.dm-filter:hover,
.dm-filter.active {
  background: var(--color-heading);
  color: #fff;
  border-color: var(--color-heading);
}

/* Meta row */
.dm-search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dm-count {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--color-text-muted, #6B7280);
  margin: 0;
}

/* Legend */
.dm-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--color-text-muted, #6B7280);
  align-items: center;
}

.dm-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dm-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   4. DISTANCE TABLE
   ═══════════════════════════════════════════════════════════ */
.dm-table-section {
  background: linear-gradient(180deg, #EFF6FF 0%, #F0FDF4 100%);
  padding: 1.5rem var(--dm-pad-x) clamp(4rem, 8vw, 6rem);
}

.dm-table-wrap {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(27,58,107,0.08);
  box-shadow: 0 4px 24px rgba(27,58,107,0.07);
  overflow: hidden;
}

.dm-table {
  width: 100%;
  border-collapse: collapse;
}

/* Header — navy, Cormorant italic */
.dm-table thead {
  background: var(--color-heading, #1B3A6B);
}

.dm-table thead th {
  padding: 1rem 1.1rem;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  color: rgba(255,255,255,0.9);
  border: none;
  white-space: nowrap;
}
.dm-table thead th::after { display: none !important; }

/* Body rows */
.dm-table tbody tr {
  border-bottom: 1px solid rgba(27,58,107,0.05);
  transition: background 0.15s;
}
.dm-table tbody tr:last-child { border-bottom: none; }
.dm-table tbody tr:hover { background: rgba(194,65,12,0.03); }
.dm-table tbody tr:nth-child(even) { background: #fafaf8; }
.dm-table tbody tr:nth-child(even):hover { background: rgba(194,65,12,0.04); }

.dm-table td {
  padding: 0.85rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text, #374151);
  vertical-align: middle;
  border: none;
}

/* Row number */
.dm-td-num {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted, #6B7280);
  letter-spacing: 0.04em;
  width: 36px;
  text-align: center;
}

/* Place name */
.dm-place-link {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-heading);
  text-decoration: none;
  transition: color 0.2s;
}
.dm-place-link:hover { color: var(--color-primary); }

.dm-place-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-heading);
}

/* Specialty badge */
.dm-badge {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Distance numeral */
.dm-km {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Muted columns */
.dm-td-muted {
  font-size: 0.82rem;
  color: var(--color-text-muted, #6B7280);
}

/* Phone */
.dm-phone {
  font-family: var(--font-body);
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.82rem;
}
.dm-phone:hover { text-decoration: underline; }

/* Empty state */
.dm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 4rem 2rem;
  text-align: center;
}
.dm-empty span { font-size: 2.5rem; line-height: 1; }
.dm-empty p { font-family: var(--font-body); font-size: 0.95rem; color: var(--color-text-muted); margin: 0; }
.dm-empty button {
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  border: 1.5px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.dm-empty button:hover { background: var(--color-primary); color: #fff; }

/* ═══════════════════════════════════════════════════════════
   5. CTA BANNER
   ═══════════════════════════════════════════════════════════ */
.dm-cta {
  background: linear-gradient(135deg, #D97706 0%, #C2410C 55%, #9A3412 100%);
  padding: clamp(4rem, 8vw, 6rem) var(--dm-pad-x);
  text-align: center;
}

.dm-cta-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.dm-eyebrow-light {
  color: rgba(255,255,255,0.7);
  -webkit-text-fill-color: rgba(255,255,255,0.7);
}

.dm-cta-title {
  font-family: var(--font-heading) !important;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem) !important;
  font-weight: 600 !important;
  color: #FEF3C7 !important;
  -webkit-text-fill-color: #FEF3C7 !important;
  background: none !important;
  margin: 0 !important;
  line-height: 1.2;
}
.dm-cta-title::after { display: none !important; }

.dm-cta-desc {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.82);
  margin: 0;
}

.dm-cta-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.dm-cta-btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.dm-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.dm-cta-btn--primary {
  background: #fff;
  color: var(--color-primary);
}

.dm-cta-btn--ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}
.dm-cta-btn--ghost:hover {
  background: rgba(255,255,255,0.12);
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .dm-hero { grid-template-columns: 1fr 300px; gap: 2.5rem; }
}

@media (max-width: 900px) {
  :root { --dm-pad-x: 1.5rem; }
  .dm-hero         { grid-template-columns: 1fr; }
  .dm-hero-img     { display: none; }
  .dm-col-via,
  .dm-col-note     { display: none; }
}

@media (max-width: 600px) {
  :root { --dm-pad-x: 1rem; }
  .dm-col-contact  { display: none; }
  .dm-table td,
  .dm-table th     { padding: 0.75rem 0.75rem; }
  .dm-stats        { gap: 1.5rem; }
  .dm-cta          { padding: 3rem var(--dm-pad-x); }
}
