/*
 * Tour, destination and transfer detail parts (includes/tour-parts.php, place-parts.php).
 * Ported from the Next app's tour.css, map.css and transfer.css; dense with facts (brand guide p.3).
 * Everything is scoped to .amwaj so Divi's content styles don't reach in and ours don't leak out.
 */

/* Divi gives lists bullets and padding, and paragraphs a bottom padding, inside layouts. */
.amwaj :is(.checks, .crosses, .keyfacts, .timeline, .route-steps), #left-area .amwaj :is(.checks, .crosses, .keyfacts, .timeline, .route-steps) { list-style: none; padding: 0; line-height: inherit; }
.amwaj p { padding-bottom: 0; }
.amwaj .amwaj-i { display: inline-block; vertical-align: middle; }

.amwaj.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.amwaj.crumbs a { color: var(--muted); text-decoration: none; }
.amwaj.crumbs a:hover { color: var(--head); text-decoration: underline; }

.amwaj .tmeta { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin: 12px 0 24px; font-size: 14px; color: var(--muted); max-width: none; }
.amwaj .tmeta span { display: inline-flex; align-items: center; gap: 6px; }
.amwaj .badge { height: 28px; padding: 0 12px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--head); font-weight: 500; font-size: 13px; }
.amwaj-count { display: block; }

/* ---- Gallery: one large photo and up to four small ones ---- */
.amwaj .tgallery { position: relative; display: grid; gap: 6px; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); height: min(52vw, 500px); border-radius: var(--r-tile); overflow: hidden; }
.amwaj .tgallery .gitem { position: relative; border: 0; padding: 0; margin: 0; cursor: zoom-in; background: var(--surface); overflow: hidden; }
/* The photo fills its tile (next/image "fill"). */
.amwaj .tgallery .gitem img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: opacity .3s; }
.amwaj .tgallery .gitem:hover img { opacity: .9; }
.amwaj .tgallery .g0 { grid-row: 1 / 3; }
.amwaj .tgallery.count-1 { grid-template-columns: 1fr; }
.amwaj .tgallery.count-1 .g0 { grid-row: 1 / 3; }
.amwaj .tgallery.count-2 { grid-template-columns: 2fr 1fr; }
.amwaj .tgallery.count-2 .g1 { grid-row: 1 / 3; }
.amwaj .tgallery.count-3 { grid-template-columns: 2fr 1fr; }
.amwaj .tgallery.count-4 .g3 { grid-column: 2 / 4; }
.amwaj .gall { position: absolute; right: 16px; bottom: 16px; background: rgba(0, 0, 0, .32); color: #fff; backdrop-filter: blur(32px) saturate(140%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); font-weight: 500; }
.amwaj .gall:hover { background: #fff; color: #000; }

.amwaj .viewer { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, .94); color: #fff; }
.amwaj .viewer[open] { display: grid; grid-template-rows: auto 1fr; }
.amwaj .viewer::backdrop { background: rgba(0, 0, 0, .94); }
.amwaj .vbar { display: flex; justify-content: space-between; align-items: center; padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
.amwaj .vclose, .amwaj .vnav { width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .4); color: #fff; font-size: 20px; cursor: pointer; }
.amwaj .vclose:hover, .amwaj .vnav:hover { border-color: #fff; }
.amwaj .vimg { margin: 0; display: grid; place-items: center; gap: 12px; padding: 0 72px 24px; min-height: 0; }
.amwaj .vimg img { max-width: 100%; max-height: calc(100dvh - 140px); width: auto; height: auto; object-fit: contain; border-radius: var(--r-image); }
.amwaj .vimg figcaption { font-size: 14px; color: #a3adb5; text-align: center; }
.amwaj .vnav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 28px; line-height: 1; }
.amwaj .vprev { left: 16px; } .amwaj .vnext { right: 16px; }

/* ---- Facts and sections ---- */
.amwaj .keyfacts { margin: 32px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--line); }
.amwaj .keyfacts li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--head); }
.amwaj .keyfacts svg { color: var(--accent-text); flex: none; margin-top: 2px; }
.amwaj .keyfacts small { display: block; font-size: 12px; color: var(--muted); }
.amwaj.tsec { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.amwaj.tsec h2 { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.02em; margin-bottom: 18px; padding-bottom: 0; }
.amwaj.incl h2 { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.02em; margin-bottom: 18px; padding-bottom: 0; }
.amwaj .prose p + p { margin-top: 14px; }
.amwaj .prose p { max-width: 66ch; }
.amwaj .also { margin-top: 16px; font-size: 14px; }
.amwaj .mpoint { margin-top: 8px; }
.amwaj .checks, .amwaj .crosses { margin: 0; display: grid; gap: 10px; }
.amwaj .checks li, .amwaj .crosses li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.amwaj .checks svg { color: var(--accent-text); margin-top: 3px; }
.amwaj .crosses span { color: var(--muted); text-align: center; }
.amwaj.incl { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

/* ---- Itinerary: timeline with a scroll-filled gold line, numbered stops, and a sticky route map beside it ---- */
.amwaj .iday + .iday { margin-top: 32px; }
.amwaj .iday h3 { font-size: 19px; padding-bottom: 0; }
.amwaj .imeta { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; color: var(--muted); margin: 6px 0 10px; max-width: none; }
.amwaj .iday > .prose { margin-bottom: 14px; }
.amwaj .itin.has-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.amwaj .itin-map { position: sticky; top: 96px; }
.amwaj .timeline { margin: 8px 0 0; position: relative; }
.amwaj .timeline::before, .amwaj .timeline .tfill { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 1.5px; background: var(--line-2); }
.amwaj .timeline .tfill { background: var(--gold); transform-origin: top; transform: scaleY(0); }
.amwaj .timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 16px; padding: 10px 0; transition: opacity .5s var(--ease-out); }
.amwaj .tdot { width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2); margin: 6px 0 0 8px; z-index: 1; transition: border-color .5s; }
.amwaj .tnum { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--bg); color: var(--muted); font: 600 12px var(--font-sans); display: grid; place-items: center; cursor: pointer; z-index: 1; transition: background-color .5s var(--ease-out), border-color .5s, color .5s; }
.amwaj .tnum:hover { border-color: var(--head); color: var(--head); }
.amwaj .timeline li.reached .tnum, .amwaj .timeline li.reached .tdot { border-color: var(--gold); color: var(--head); }
.amwaj .timeline li.active .tnum { background: var(--gold); border-color: var(--gold); color: #000; }
.amwaj .timeline time { display: block; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.amwaj .timeline b { color: var(--head); font-weight: 600; }
.amwaj .timeline p { font-size: 15px; color: var(--text); margin-top: 2px; }

/* ---- Route / location map (MapLibre) with gold stop markers ---- */
.amwaj .routemap { height: min(62vh, 520px); border-radius: var(--r-tile); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.amwaj .routemap.loading { animation: amwaj-skeleton 1.6s linear infinite; background: linear-gradient(90deg, var(--surface) 0%, var(--line) 50%, var(--surface) 100%); background-size: 200% 100%; }
@keyframes amwaj-skeleton { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.amwaj .routemap .maplibregl-ctrl-group { border-radius: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.amwaj .stopmark { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: #000; color: var(--gold); font: 600 13px var(--font-sans); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); transition: background-color .25s var(--ease-out), color .25s, transform .5s var(--ease-out); }
.amwaj .stopmark:hover, .amwaj .stopmark.on { background: var(--gold); color: #000; }
.amwaj .stopmark.on { transform: scale(1.25); z-index: 2; }
.amwaj.tr-map { margin-top: 8px; }
.amwaj.tr-map .routemap { height: min(52vh, 460px); }
.amwaj.dmap .routemap { height: 380px; }

/* ---- Transfer route steps ---- */
.amwaj .route-steps { margin: 0; display: grid; border-top: 1px solid var(--line); }
.amwaj .route-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.amwaj .route-steps .mk { width: 28px; height: 28px; border-radius: 50%; background: #000; color: var(--gold); font: 600 12px var(--font-sans); display: grid; place-items: center; }
.amwaj .route-steps b { color: var(--head); font-weight: 500; display: block; }
.amwaj .route-steps small { color: var(--muted); font-size: 13px; }

/* ---- FAQs and reviews ---- */
.amwaj .faqs { display: grid; border-top: 1px solid var(--line); }
.amwaj .faqs details { border-bottom: 1px solid var(--line); }
.amwaj .faqs summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 600; color: var(--head); }
.amwaj .faqs summary::-webkit-details-marker { display: none; }
.amwaj .faqs summary svg { flex: none; transition: transform .25s var(--ease-out); color: var(--muted); }
.amwaj .faqs details[open] summary svg { transform: rotate(180deg); }
.amwaj .faqs details p { padding: 0 0 18px; }

.amwaj .reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.amwaj .review-card { margin: 0; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--r-card); }
.amwaj .review-card .stars { color: var(--gold); letter-spacing: 2px; }
.amwaj .review-card blockquote { margin: 8px 0; padding: 0; border: 0; color: var(--head); font-style: normal; }
.amwaj .review-card figcaption { font-size: 13px; color: var(--muted); }

@media (max-width: 1200px) {
	.amwaj .itin.has-map { grid-template-columns: 1fr; }
	.amwaj .itin-map { position: relative; top: 0; order: -1; }
	.amwaj .itin-map .routemap { height: 320px; }
}
@media (max-width: 900px) {
	.amwaj.dmap .routemap { height: 300px; }
	.amwaj .tgallery { grid-template-columns: 1fr 1fr; grid-template-rows: 2fr 1fr; height: 72vw; }
	.amwaj .tgallery .g0 { grid-column: 1 / 3; grid-row: 1; }
	.amwaj .tgallery .g3, .amwaj .tgallery .g4 { display: none; }
	.amwaj .tgallery.count-1 .g0 { grid-row: 1 / 3; }
	.amwaj .tgallery.count-2 .g1 { grid-row: 2; grid-column: 1 / 3; }
	.amwaj.incl { grid-template-columns: 1fr; }
	.amwaj .vimg { padding: 0 12px 24px; }
	.amwaj .vnav { display: none; }
}

/* "On this page" (includes/toc.php) */
.amwaj-toc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 22px; margin: 40px 0 0; font-size: 14px; }
.amwaj-toc > span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.amwaj-toc ol { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.amwaj-toc li { margin: 0; padding: 0; }
.amwaj-toc li::marker { content: none; }
.amwaj-toc a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.amwaj-toc a:hover, .amwaj-toc a:focus-visible { color: var(--gold); border-color: var(--gold); }
.amwaj.tsec[id] { scroll-margin-top: 110px; }
