/* Place pages (template 29.11.2026, first: the Ourika Valley) — on top of home.css, list.css and tour.css.
   The place read the way the home reads the mountain: by height (the road), by the hour (the weather now) and by the month. */
.hero.place .hero-ph { height: clamp(420px, 66vh, 700px); }
.hero.place .hero-ph img { object-position: 50% 60%; }
.hero.place .tablet h1 { font-size: clamp(32px, 3.7vw, 50px); }
.hero.place .crumbs { margin-bottom: 14px; }

.onpage { padding: 0; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.onpage .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 10px; padding-bottom: 10px; }
.onpage .wrap::-webkit-scrollbar { display: none; }
.onpage a { flex: none; text-decoration: none; font-size: 14.5px; font-weight: 600; padding: 7px 12px; border-radius: 4px; color: var(--muted); }
.onpage a:hover { background: var(--paper2); color: var(--ink); }
html { scroll-padding-top: 64px; }

/* the weather today */
.wx { background: var(--paper2); }
.wx-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 20px; align-items: stretch; }
.wx-now { background: var(--paper); border-radius: var(--r); padding: 28px 30px 10px; }
.wx-top { display: flex; align-items: center; gap: 18px; }
.ic.wbig { width: 68px; height: 68px; stroke-width: 1.25; color: var(--warm); }
.wx-t { font: var(--head-wt) 88px/.9 var(--f-head); font-stretch: calc(var(--head-w) * 1%); letter-spacing: -.03em; }
.wx-c { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 15.5px; }
.wx-cond { font: var(--head-wt) 22px/1.15 var(--f-head); font-stretch: calc(var(--head-w) * 1%); color: var(--ink); }
.wx-where { margin-top: 14px; font-size: 14px; color: var(--muted); }
.wx-facts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; border-top: 1px solid var(--line); }
.wx-facts li { display: grid; grid-template-columns: 20px 1fr; column-gap: 10px; row-gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.wx-facts li:nth-last-child(-n+2) { border-bottom: 0; }
.wx-facts .ic { grid-row: span 2; color: var(--accent); margin-top: 2px; }
.wx-facts span { font-size: 13.5px; color: var(--muted); }
.wx-facts b { font-weight: 650; font-size: 16.5px; }
.wx-side { display: flex; flex-direction: column; gap: 20px; }
.wx-vs { background: var(--band); color: var(--on-band); border-radius: var(--r); padding: 24px 28px 20px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px 22px; }
.wx-vs div { display: flex; flex-direction: column; gap: 3px; }
.wx-vs span { font-size: 14px; opacity: .78; }
.wx-vs b { font: var(--head-wt) 48px/1 var(--f-head); font-stretch: calc(var(--head-w) * 1%); letter-spacing: -.02em; }
.wx-vs small { font-size: 13px; opacity: .65; }
.wx-vs .here b { color: #9CC7E8; }
.wx-vs i { opacity: .55; display: flex; }
.wx-vs p { grid-column: 1 / -1; font-weight: 650; border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 12px; }
.wx-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; flex: 1; }
.wx-days li { background: var(--paper); border-radius: var(--r); padding: 18px 20px; display: grid; grid-template-columns: auto 1fr; align-content: center; align-items: center; column-gap: 14px; row-gap: 6px; }
.wx-days .dn { grid-column: 1 / -1; font-weight: 700; }
.wx-days .ic.wi { width: 36px; height: 36px; color: var(--warm); grid-row: span 2; stroke-width: 1.4; }
.wx-days .dc { color: var(--muted); font-size: 14px; }
.wx-days b { font: var(--head-wt) 24px/1 var(--f-head); font-stretch: calc(var(--head-w) * 1%); }
.wx-days .pp, .wx-days .sn { grid-column: 1 / -1; display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); }
.wx-days .pp .ic { color: var(--cold); }
.wx-src { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 28px; margin-top: 22px; color: var(--muted); font-size: 14.5px; }
.wx-src .more { margin-top: 0; }

/* the road read by height */
.road { background: var(--paper); }
.road-wrap { display: grid; grid-template-columns: minmax(0, 9fr) minmax(0, 3fr); gap: 36px; align-items: end; }
.road-chart { position: relative; height: 320px; margin-top: 56px; border-bottom: 1px solid var(--line); }
.road-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.road-chart .land { fill: var(--paper2); }
.road-chart .edge { fill: none; stroke: var(--accent); stroke-width: 2.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.rm { position: absolute; left: calc(var(--x) * 100%); bottom: calc(var(--y) * 100%); transform: translate(-50%, -18px); display: flex; flex-direction: column; align-items: center; text-align: center; white-space: nowrap; }
.rm::after { content: ""; position: absolute; left: 50%; bottom: -18px; width: 12px; height: 12px; margin-left: -6px; transform: translateY(50%); border-radius: 50%; background: var(--ink); border: 2px solid var(--paper); }
.rm.rm-s { transform: translate(0, -18px); align-items: flex-start; text-align: left; } .rm.rm-s::after { left: 0; }
.rm.rm-e { transform: translate(-100%, -18px); align-items: flex-end; text-align: right; } .rm.rm-e::after { left: 100%; background: var(--accent); }
.rm .nm { font-weight: 700; font-size: 15px; }
.rm .nm, .rm .v { background: var(--paper); padding: 0 5px; border-radius: 3px; }   /* the line passes behind the words */
.rm .v { font-size: 13.5px; color: var(--muted); }
.road-nums { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.road-nums div { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; }
.road-nums b { font: var(--head-wt) 34px/1 var(--f-head); font-stretch: calc(var(--head-w) * 1%); letter-spacing: -.02em; white-space: nowrap; }
.road-nums span { font-size: 14.5px; color: var(--muted); }
.road-src { font-size: 13.5px; color: var(--muted); margin-top: 14px; }
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 44px; }
.way { background: var(--paper2); border-radius: var(--r); padding: 24px 24px 22px; display: flex; flex-direction: column; }
.way > .ic { width: 26px; height: 26px; color: var(--accent); }
.way h3 { margin-top: 14px; }
.way p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.way .more { margin-top: auto; padding-top: 14px; font-size: 15px; align-self: flex-start; border-bottom: 0; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* the main sight */
.sight { background: var(--paper2); }
.sight-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 52px; align-items: center; }
.sight-ph { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 320px 210px; gap: 10px; }
.sight-ph figure { margin: 0; border-radius: var(--r); overflow: hidden; background: var(--paper3); position: relative; }
.sight-ph .s1 { grid-column: 1 / -1; }
.sight-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sight-facts { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid var(--line); }
.sight-facts li { display: grid; grid-template-columns: 22px 150px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.sight-facts .ic { color: var(--accent); align-self: center; }
.sight-facts span { color: var(--muted); font-size: 14.5px; }
.sight-facts b { font-weight: 600; font-size: 16px; }
.fine { font-size: 13.5px; color: var(--muted); margin-top: 14px; }

/* things to do on the way */
.todo { background: var(--paper); }
.td-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.td { grid-column: span 2; background: var(--paper2); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.td:nth-child(-n+2) { grid-column: span 3; }
.td figure { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper3); }
.td:nth-child(-n+2) figure { aspect-ratio: 16 / 8; }
.td img { width: 100%; height: 100%; object-fit: cover; }
.td .noph { aspect-ratio: 16 / 10; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 9%, var(--paper2)); }
.td .noph .ic { width: 60px; height: 60px; color: var(--accent); stroke-width: 1.15; }
.td-bd { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.td-bd p { color: var(--muted); font-size: 16px; }
.td-bd .td-n { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 650; color: var(--accent); }

/* tours of the place */
.ptours { background: var(--paper2); }
.pt-counts { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--paper); border-radius: var(--r); }
.pt-counts li { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; row-gap: 3px; padding: 18px 20px; border-left: 1px solid var(--line); }
.pt-counts li:first-child { border-left: 0; }
.pt-counts .ic { grid-row: span 2; color: var(--accent); margin-top: 2px; }
.pt-counts b { font: var(--head-wt) 22px/1.1 var(--f-head); font-stretch: calc(var(--head-w) * 1%); }
.pt-counts span { font-size: 14px; color: var(--muted); }

/* the weather by month: the bar runs from the average low to the average high; the dashed mark is the average high in Marrakech */
.clim { background: var(--paper); }
.clim-chart { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; }
.clim-chart li { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cb { position: relative; width: 100%; height: 300px; background: linear-gradient(var(--paper3), var(--paper3)) center / 1px 100% no-repeat; }
.cb .bar { position: absolute; left: 50%; width: 30px; margin-left: -15px; bottom: calc(var(--lo) * 100%); height: calc((var(--hi) - var(--lo)) * 100%); border-radius: 15px; background: linear-gradient(to top, var(--cold), var(--warm)); }
.cb .tx { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -6px); font: 700 14px/1 var(--f-body); }
.cb .tn { position: absolute; top: 100%; left: 50%; transform: translate(-50%, 6px); font: 600 13px/1 var(--f-body); color: var(--muted); }
.cb .mk { position: absolute; left: 50%; width: 42px; margin-left: -21px; bottom: calc(var(--mk) * 100%); border-top: 2px dashed var(--earth); }
.mo { font-weight: 700; font-size: 14px; margin-top: 20px; }
.wd { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; color: var(--muted); }
.wd .ic { color: var(--cold); }
.clim-legend { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14.5px; color: var(--muted); }
.clim-legend li { display: inline-flex; gap: 8px; align-items: center; }
.clim-legend .ic { color: var(--cold); }
.lg.bar { width: 12px; height: 22px; border-radius: 6px; background: linear-gradient(to top, var(--cold), var(--warm)); }
.lg.mk { width: 24px; border-top: 2px dashed var(--earth); }

/* photos */
.pgal { background: var(--paper2); }
.pg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 220px; gap: 12px; }
.pg-grid figure { margin: 0; border-radius: var(--r); overflow: hidden; position: relative; background: var(--paper3); }
.pg-grid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pg-grid .g0 { grid-column: span 2; grid-row: span 2; }

/* more places */
.mplaces { background: var(--paper); padding: 72px 0 92px; }
.mplaces h2 { font-size: clamp(26px, 2.6vw, 34px); margin-bottom: 22px; }
.mp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 250px; gap: 16px; }

@media (max-width: 1080px) {
  .wx-grid, .road-wrap, .sight-grid { grid-template-columns: 1fr; }
  .sight-grid { gap: 28px; }
  .road-nums { flex-direction: row; border-top: 0; }
  .road-nums div { flex: 1; border-bottom: 0; border-left: 1px solid var(--line); padding: 4px 18px; }
  .road-nums div:first-child { border-left: 0; padding-left: 0; }
  .pt-counts { grid-template-columns: 1fr 1fr; }
  .pt-counts li:nth-child(3) { border-left: 0; }
  .pt-counts li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .hero.place .hero-ph { height: 320px; }
  .hero.place .tablet h1 { font-size: 31px; }
  .onpage a { font-size: 14px; padding: 6px 10px; }
  .wx-now { padding: 22px 20px 6px; }
  .wx-t { font-size: 68px; }
  .ic.wbig { width: 52px; height: 52px; }
  .wx-facts { grid-template-columns: 1fr; }
  .wx-facts li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .wx-vs { padding: 20px; gap: 10px 14px; }
  .wx-vs b { font-size: 40px; }
  .wx-days { gap: 12px; }
  .wx-days li { padding: 16px; }
  .road-chart { height: 210px; margin-top: 64px; }
  .rm .nm { font-size: 13px; } .rm .v { font-size: 12px; }
  .road-nums { flex-direction: column; border-top: 1px solid var(--line); }
  .road-nums div { border-left: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .road-nums div:first-child { padding-left: 0; }
  .road-nums b { font-size: 28px; }
  .ways { grid-template-columns: 1fr; margin-top: 30px; }
  .sight-ph { grid-template-rows: 220px 140px; }
  .sight-facts li { grid-template-columns: 22px minmax(0, 1fr); row-gap: 2px; }
  .sight-facts li b { grid-column: 2; }
  .td-grid { grid-template-columns: 1fr; }
  .td, .td:nth-child(-n+2) { grid-column: auto; }
  .td:nth-child(-n+2) figure { aspect-ratio: 16 / 10; }
  .pt-counts li { padding: 14px; }
  .clim-chart { gap: 2px; }
  .cb { height: 210px; }
  .cb .bar { width: 16px; margin-left: -8px; border-radius: 8px; }
  .cb .tx { font-size: 11px; } .cb .tn { font-size: 10.5px; }
  .cb .mk { width: 24px; margin-left: -12px; }
  .mo { font-size: 11px; margin-top: 18px; }
  .wd { font-size: 11px; } .wd .ic { display: none; }
  .pg-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
  .mp-grid { grid-template-columns: 1fr; grid-auto-rows: 190px; }
}
