/* ============================================================
   ROCKY'S RIDE — ROUTE GUIDE PAGE
   Utility-first companion to long-form story pages.
   ============================================================ */

.route-hero{min-height:64vh;}
.route-hero .standfirst{max-width:760px;}

.route-jump{
  background:var(--bone);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.route-jump-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:18px 0;
}
.route-jump-links a{
  font-family:var(--label);
  text-transform:uppercase;
  letter-spacing:.11em;
  font-size:12px;
  font-weight:600;
  text-decoration:none;
  color:var(--char);
  border:1px solid var(--line);
  padding:7px 12px;
  background:var(--offwhite);
}
.route-jump-links a:hover{border-color:var(--jacket);}

.route-section{padding:72px 0;background:var(--offwhite);}
.route-section.alt{background:var(--bone);}
.route-section .section-head{margin:12px 0 10px;}
.route-copy{
  font-size:17px;
  color:var(--mute);
  max-width:760px;
  margin-bottom:26px;
}

.at-glance{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}
.glance-card{
  border:1px solid var(--line);
  background:#fff;
  padding:16px;
}
.glance-card .label{
  display:block;
  font-family:var(--label);
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:11px;
  color:var(--mute);
  margin-bottom:6px;
}
.glance-card .value{
  display:block;
  font-family:var(--display);
  font-size:30px;
  line-height:1.05;
  color:var(--char);
  margin-bottom:6px;
}
.glance-card p{
  font-size:14px;
  line-height:1.55;
  color:var(--ink);
}

.route-section#gallery{
  padding-top:80px;
  padding-bottom:88px;
}
.gallery-intro .route-copy{max-width:880px;}
.route-gallery-carousel{
  position:relative;
  border:1px solid var(--line);
  background:var(--char);
}
.route-gallery-viewport{
  overflow:hidden;
  height:auto;
  background:var(--char);
}
.route-gallery-track{
  position:relative;
  height:auto;
  min-height:0;
}
.route-gallery-slide{
  display:none;
  margin:0;
}
.route-gallery-slide.is-active{
  display:flex;
  flex-direction:column;
}
/* Fixed 16:9 image window; scales with layout width, capped on short screens */
.route-gallery-carousel:not(.route-gallery-carousel--square) .route-gallery-media{
  flex:0 0 auto;
  width:100%;
  aspect-ratio:16 / 9;
  max-height:min(78vh, 860px);
  background:#14110f;
  overflow:hidden;
}
.route-gallery-carousel:not(.route-gallery-carousel--square) .route-gallery-ph{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center center;
}
/* Square Malawi gallery keeps its own frame rules below */
.route-gallery-carousel--square .route-gallery-media{
  flex:1 1 auto;
  min-height:0;
  width:100%;
  background:#14110f;
  overflow:hidden;
}
.route-gallery-carousel--square .route-gallery-slide{
  height:100%;
}
.route-gallery-carousel--square .route-gallery-slide.is-active{
  height:100%;
}
.route-gallery-carousel--square .route-gallery-track{
  height:100%;
}
.route-gallery-carousel--square .route-gallery-ph{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
}
.route-gallery-slide .placeholder.route-gallery-ph{
  display:flex;
  align-items:center;
  justify-content:center;
  object-fit:unset;
  font-size:13px;
  letter-spacing:.12em;
  color:#cfc8b6;
}
.route-gallery-slide figcaption{
  font-family:var(--label);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:12.5px;
  color:var(--mute);
  padding:12px 14px 14px;
  border-top:1px solid var(--line);
  background:#fff;
}
.route-gallery-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:2;
  width:46px;
  height:46px;
  border:1px solid rgba(255,255,255,.7);
  background:rgba(20,17,15,.42);
  color:#fff;
  cursor:pointer;
  font-size:24px;
  line-height:1;
}
.route-gallery-btn:hover{
  background:rgba(20,17,15,.68);
}
.route-gallery-btn--prev{left:14px;}
.route-gallery-btn--next{right:14px;}
.route-gallery-dots{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  margin-top:14px;
}
.route-gallery-dots .dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#bfb8a7;
}
.route-gallery-dots .dot.is-active{
  background:var(--char);
}

/* Instagram-style square gallery (Faces of Malawi) */
.route-gallery-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  width:100%;
}
.route-gallery-carousel--square{
  /* As large as the layout allows; shrink on short viewports so the square fits on screen */
  width:min(100%, 82svh);
  max-width:100%;
  margin-inline:auto;
  border-color:#dbdbdb;
  background:#fafafa;
  box-shadow:0 1px 12px rgba(0,0,0,.06);
}
.route-gallery-carousel--square .route-gallery-viewport{
  width:100%;
  height:auto;
  aspect-ratio:1 / 1;
  background:#0a0a0a;
}
.route-gallery-carousel--square .route-gallery-media{
  background:#0a0a0a;
}
.route-gallery-carousel--square .route-gallery-ph{
  object-fit:cover;
  object-position:center center;
}
.route-gallery-carousel--square .route-gallery-slide.is-portrait .route-gallery-ph{
  object-fit:cover;
}
.route-gallery-carousel--square .route-gallery-slide figcaption{
  text-align:center;
  font-size:11.5px;
  letter-spacing:.1em;
  padding:10px 16px 12px;
  border-top:1px solid #efefef;
  background:#fafafa;
  color:#737373;
}
.route-gallery-carousel--square .route-gallery-btn{
  border-color:rgba(255,255,255,.55);
  background:rgba(0,0,0,.35);
}
.route-gallery-carousel--square .route-gallery-btn:hover{
  background:rgba(0,0,0,.55);
}
.route-gallery-carousel--square + .route-gallery-dots{
  display:none;
}
.route-gallery-counter{
  margin:10px 0 0;
  font-family:var(--label);
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--mute);
  text-align:center;
}

/* map embed + actions — base styles in expedition.css */

.btn.is-disabled,
.btn[aria-disabled="true"]{
  opacity:1;
  pointer-events:none;
  cursor:not-allowed;
  background:#c8c4ba;
  color:#6b675d;
  border-color:#b8b4aa;
}

/* ---------- route intel (bikepacking-style tabs) ---------- */
.route-intel{
  background:#f1eee6;
  border-top:1px solid var(--line);
}

.route-intel-tabs-wrap{
  background:#d8d3c8;
  border-bottom:1px solid #c8c2b4;
}
.route-intel-tabs-wrap .wrap{
  display:flex;
  justify-content:center;
}
.route-intel-tabs{
  display:flex;
  flex-wrap:nowrap;
  justify-content:center;
  overflow-x:auto;
  scrollbar-width:none;
  max-width:980px;
  width:100%;
}
.route-intel-tabs::-webkit-scrollbar{display:none;}
.route-intel-tab{
  position:relative;
  flex:0 0 auto;
  border:none;
  background:transparent;
  color:#8b3a2f;
  font-family:var(--label);
  text-transform:uppercase;
  letter-spacing:.11em;
  font-size:13px;
  font-weight:700;
  padding:16px 18px 18px;
  cursor:pointer;
  white-space:nowrap;
}
.route-intel-tab:hover{background:rgba(255,255,255,.25);}
.route-intel-tab.is-active{
  background:var(--char);
  color:var(--offwhite);
}
.route-intel-tab.is-active::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-1px;
  transform:translateX(-50%);
  width:0;
  height:0;
  border-left:9px solid transparent;
  border-right:9px solid transparent;
  border-top:9px solid var(--char);
}

.route-intel-body{
  padding:0 0 72px;
  background-color:#f1eee6;
  background-image:
    linear-gradient(rgba(243,241,234,.82), rgba(243,241,234,.82)),
    url("/assets/img/topo-map-bg.jpg");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}
.route-intel-body .wrap{
  padding-top:28px;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.route-intel-panel{
  display:none;
  width:100%;
  max-width:980px;
  margin-left:auto;
  margin-right:auto;
  padding:28px 36px 28px;
  background:rgba(252,251,247,.94);
  border:1px solid rgba(210,204,190,.95);
  box-shadow:0 12px 40px rgba(26,28,24,.07);
}
.route-intel-panel.is-active{display:block;}
.route-intel-lead{
  max-width:920px;
  font-family:var(--serif);
  font-size:18px;
  line-height:1.75;
  color:var(--char);
  margin-bottom:22px;
}
.route-intel-heading{
  font-family:var(--display);
  font-size:clamp(28px, 3.2vw, 36px);
  font-weight:700;
  line-height:1.12;
  letter-spacing:-.01em;
  text-transform:none;
  color:var(--char);
  margin-bottom:26px;
  padding-bottom:16px;
  border-bottom:2px solid var(--char);
}
.route-intel-list{
  list-style:none;
  max-width:920px;
}
.route-intel-list li{
  position:relative;
  padding:0 0 18px 28px;
  font-family:var(--serif);
  font-size:18px;
  line-height:1.72;
  color:var(--char);
}
.route-intel-list li::before{
  content:"»";
  position:absolute;
  left:0;
  top:1px;
  font-family:var(--label);
  font-size:17px;
  line-height:1.4;
  color:var(--jacket);
  font-weight:700;
  letter-spacing:.02em;
}
.route-intel-list li strong{
  font-family:var(--label);
  font-weight:700;
  font-size:15px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--char);
}
.route-intel-list li em{
  font-style:italic;
  color:var(--jacket);
}
.route-intel-list--compact li{
  font-size:17px;
  line-height:1.68;
  padding-bottom:12px;
}
.route-intel-list--links li{
  padding-bottom:20px;
}
.route-intel-list--links li strong{
  font-size:14px;
  letter-spacing:.12em;
}
.route-intel-list--links a{
  color:var(--jacket);
  font-weight:600;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}
.route-intel-list--links a:hover{color:var(--char);}

.route-intel-blocks{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px 24px;
  max-width:980px;
}
.route-intel-block{
  background:rgba(255,255,255,.88);
  border:1px solid rgba(200,194,180,.9);
  padding:22px 24px 16px;
  box-shadow:0 1px 0 rgba(255,255,255,.95) inset;
}
.route-intel-block h4{
  font-family:var(--label);
  font-size:14px;
  font-weight:700;
  line-height:1.35;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--char);
  margin-bottom:14px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line);
}
.route-intel-block .route-intel-list li{
  font-size:16px;
  line-height:1.66;
}

.planning-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}
.planning-card{
  border:1px solid var(--line);
  background:#fff;
  padding:18px;
}
.planning-card h3{
  font-family:var(--display);
  font-size:25px;
  line-height:1.15;
  color:var(--char);
  margin-bottom:10px;
}
.route-intel-block h4 .risk-chip{
  margin-left:8px;
  vertical-align:middle;
}
.risk-chip{
  display:inline-block;
  vertical-align:middle;
  margin-left:8px;
  font-family:var(--label);
  text-transform:uppercase;
  letter-spacing:.1em;
  font-size:10px;
  font-weight:600;
  padding:4px 8px;
  border:1px solid var(--line);
  background:#f2efe7;
  color:var(--char);
}
.risk-chip--critical{background:#3f1f1f;color:#f7e3e3;border-color:#3f1f1f;}
.risk-chip--high{background:#4a3a23;color:#f5ead8;border-color:#4a3a23;}
.risk-chip--moderate{background:#2f4a73;color:#e6efff;border-color:#2f4a73;}
.planning-card ul{
  list-style:none;
}
.planning-card li{
  position:relative;
  padding-left:14px;
  font-size:16px;
  color:var(--ink);
  line-height:1.65;
  margin-bottom:8px;
}
.planning-card li::before{
  content:"";
  position:absolute;
  left:0;
  top:.68em;
  width:6px;
  height:6px;
  background:var(--jacket);
  border-radius:50%;
}
.planning-card--apps{
  background:#f7f5ee;
  border-color:#d9d2bf;
}
.planning-card--pet{
  background:#f7f2f0;
  border-color:#dbc3bc;
}


.segment-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.segment{
  border:1px solid var(--char-soft);
  background:rgba(255,255,255,.04);
  padding:18px;
}
.segment h3{
  font-family:var(--display);
  color:var(--offwhite);
  font-size:24px;
  margin-bottom:8px;
}
.segment-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.segment-meta span{
  font-family:var(--label);
  text-transform:uppercase;
  letter-spacing:.1em;
  font-size:12px;
  padding:4px 8px;
  border:1px solid var(--char-soft);
  color:var(--jacket-light);
}
.segment p{
  color:#d8d4c8;
  font-size:15.5px;
  line-height:1.68;
}


@media(max-width:1080px){
  .at-glance{grid-template-columns:repeat(2,minmax(0,1fr));}
  .route-gallery-carousel:not(.route-gallery-carousel--square) .route-gallery-media{
    max-height:min(74vh, 720px);
  }
  .route-gallery-carousel--square{
    width:min(100%, 80svh);
  }
  .segment-list{grid-template-columns:1fr;}
}
@media(max-width:840px){
  .route-intel-blocks{grid-template-columns:1fr;}
}
@media(max-width:680px){
  .route-hero{min-height:56vh;}
  .at-glance{grid-template-columns:1fr;}
  .route-section#gallery{
    padding-top:66px;
    padding-bottom:70px;
  }
  .route-gallery-carousel:not(.route-gallery-carousel--square) .route-gallery-media{
    max-height:min(64vh, 580px);
  }
  .route-gallery-carousel--square{
    width:min(100%, 78svh, 100vw - 44px);
  }
  .route-gallery-btn{
    width:40px;
    height:40px;
    font-size:20px;
  }
  .route-gallery-btn--prev{left:8px;}
  .route-gallery-btn--next{right:8px;}
  .route-intel-tab{
    font-size:12px;
    padding:14px 14px 16px;
  }
  .route-intel-tabs{
    justify-content:flex-start;
  }
  .route-intel-body{padding-bottom:56px;}
  .route-intel-body .wrap{padding-top:18px;}
  .route-intel-panel{
    padding:18px 20px 18px;
  }
  .route-intel-lead{
    font-size:17px;
    margin-bottom:18px;
  }
  .route-intel-heading{
    font-size:26px;
    margin-bottom:20px;
    padding-bottom:12px;
  }
  .route-intel-list li{
    font-size:17px;
    padding-left:24px;
  }
  .route-intel-block{padding:18px 18px 14px;}
}
