/* Let Me Discover v2: country page (website/tours/v2/country). Loads after lmd-v2.css (tokens, .lmd-btn).
   Same bright sky as the home hero. Desktop: one screen, the page never scrolls; only the tour grid does.
   Optional photo: public/images/lmd/countries/{url}/hero.webp fills the background. */
:root {
    --lmd-orange: #ff9a2e;
    --lmd-ease-out: cubic-bezier(.2, .7, .2, 1);
    --lmd-shadow-text: 0 2px 14px rgba(15, 61, 102, .35);
    /* the home hero's sky, top to bottom */
    --lmd-sky-bg:
        radial-gradient(45% 35% at 85% 30%, rgba(255, 255, 255, .55) 0%, transparent 70%),
        radial-gradient(35% 25% at 10% 85%, rgba(255, 236, 210, .45) 0%, transparent 70%),
        linear-gradient(180deg, #4fa6ef 0%, #6cb8f6 35%, #9fd2fa 70%, #d4ecfc 100%);
}

@media (min-width: 901px) {
    html, body { height: 100%; overflow: hidden; }
}

.lmd-cp {
    position: relative; isolation: isolate; height: 100vh; min-height: 600px; overflow: hidden;
    font-family: var(--lmd-body); color: var(--lmd-white); background: var(--lmd-sky-bg);
}
.lmd-cp__bg { position: absolute; inset: 0; z-index: -1; }
.lmd-cp__bg img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    animation: lmd-cp-drift 40s ease-in-out infinite alternate;
    will-change: transform;
}
/* a light sky veil on the left only, so a photo stays bright */
.lmd-cp.has-photo .lmd-cp__bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(79, 166, 239, .35) 0%, rgba(79, 166, 239, .1) 30%, rgba(79, 166, 239, .08) 100%);
}
/* drifting clouds when there is no photo yet */
.lmd-cp:not(.has-photo) .lmd-cp__bg::before,
.lmd-cp:not(.has-photo) .lmd-cp__bg::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(30px); background: rgba(255, 255, 255, .55);
    animation: lmd-cp-cloud 60s linear infinite;
}
.lmd-cp:not(.has-photo) .lmd-cp__bg::before { width: 520px; height: 120px; top: 18%; left: -10%; }
.lmd-cp:not(.has-photo) .lmd-cp__bg::after { width: 380px; height: 90px; top: 62%; left: 30%; animation-duration: 80s; animation-delay: -30s; opacity: .7; }
@keyframes lmd-cp-cloud { from { transform: translateX(-20vw); } to { transform: translateX(110vw); } }
@keyframes lmd-cp-drift { from { transform: scale(1.04); } to { transform: scale(1.12) translateX(-1.5%); } }
@keyframes lmd-cp-in { from { opacity: 0; transform: translateX(40px); } }
@keyframes lmd-cp-rise { from { opacity: 0; transform: translateY(16px); } }

/* ───── Home button (instead of the nav bar) ───── */
.lmd-home {
    position: fixed; z-index: 1000; top: 20px; left: var(--lmd-gutter);
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px 0 14px; border-radius: 999px;
    font: 600 14px var(--lmd-body); color: var(--lmd-white); text-decoration: none; text-shadow: 0 1px 6px rgba(15, 61, 102, .3);
    background: var(--lmd-glass); border: 1px solid var(--lmd-glass-line);
    -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 12px 30px -18px rgba(15, 45, 90, .55);
    transition: background .25s ease, gap .3s var(--lmd-ease-out);
}
.lmd-home:hover { background: rgba(255, 255, 255, .3); color: var(--lmd-white); gap: 12px; }

.lmd-cp__in {
    height: 100%; max-width: 1480px; margin: 0 auto;
    padding: 78px var(--lmd-gutter) 22px;
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: clamp(20px, 3vw, 48px);
}

/* ───── the country's name, running up the left side ───── */
.lmd-cp__name {
    align-self: center; margin: 0; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap;
    font-family: var(--lmd-display); font-weight: 700; line-height: .9; letter-spacing: .12em; color: var(--lmd-white);
    /* as big as the screen height allows for this many letters (and their spacing) */
    font-size: min(200px, calc((100vh - 110px) / (var(--len) * .74)));
    text-shadow: 0 6px 40px rgba(15, 61, 102, .35);
    animation: lmd-cp-name 1.1s var(--lmd-ease-out) both;
}
@keyframes lmd-cp-name { from { opacity: 0; transform: rotate(180deg) translateY(-40px); } }


.lmd-cp__credit {
    position: absolute; right: var(--lmd-gutter); bottom: 6px; font-size: 10px; color: var(--lmd-white-2);
    text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

/* ───── right: glass panel (same glass as the home search bar) ───── */
.lmd-cp__panel {
    position: relative; min-height: 0; max-height: 100%; display: flex; flex-direction: column;
    width: 100%; color: var(--lmd-white);
    animation: lmd-cp-in .9s var(--lmd-ease-out) .1s both;
}


.lmd-cp__bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 4px 6px; }
.lmd-cp__count { margin-right: auto; font-size: 14px; color: var(--lmd-white); text-shadow: 0 2px 12px rgba(11, 18, 51, .55); }
.lmd-cp__count b { font: 700 22px var(--lmd-display); color: var(--lmd-white); margin-right: 4px; }
.lmd-dd__btn, .lmd-cp__fbtn {
    height: 38px; padding: 0 16px; border-radius: 999px; cursor: pointer;
    font: 600 13px var(--lmd-body); color: var(--lmd-white);
    background: rgba(29, 90, 150, .32); border: 1px solid var(--lmd-glass-line);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: 0 8px 20px -12px rgba(11, 18, 51, .6);
    transition: background .2s ease;
}
.lmd-dd__btn:hover, .lmd-cp__fbtn:hover, .lmd-dd.is-open .lmd-dd__btn { background: rgba(255, 255, 255, .3); }
.lmd-dd { position: relative; }
.lmd-dd__btn { display: inline-flex; align-items: center; gap: 8px; }
.lmd-dd__btn svg { transition: transform .3s var(--lmd-ease-out); }
.lmd-dd.is-open .lmd-dd__btn svg { transform: rotate(180deg); }
.lmd-dd__list {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; min-width: 100%; margin: 0; padding: 6px; list-style: none;
    border-radius: 14px; border: 1px solid var(--lmd-glass-line);
    background: rgba(56, 140, 215, .96);
    box-shadow: 0 20px 40px -20px rgba(15, 45, 90, .6);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s ease, transform .25s var(--lmd-ease-out), visibility .2s;
}
.lmd-dd.is-open .lmd-dd__list { opacity: 1; visibility: visible; transform: none; }
.lmd-dd__list a {
    display: block; padding: 8px 12px; border-radius: 9px; white-space: nowrap;
    font-size: 13px; font-weight: 500; color: var(--lmd-white); text-decoration: none;
}
.lmd-dd__list a:hover { background: rgba(255, 255, 255, .2); color: var(--lmd-white); }
.lmd-dd__list a[aria-current] { background: var(--lmd-white); color: var(--lmd-ink); }
.lmd-cp__fbtn { display: inline-flex; align-items: center; gap: 6px; }
.lmd-cp__fbtn i {
    font-style: normal; font-size: 11px; font-weight: 700; color: var(--lmd-ink);
    min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; background: var(--lmd-white);
}
.lmd-cp__fbtn.is-on, .lmd-cp__fbtn[aria-expanded="true"] { background: rgba(255, 255, 255, .34); }

.lmd-cp__scroll {
    flex: 1; min-height: 0; overflow-y: auto; padding: 12px 4px 28px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .5) transparent;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12px, #000 calc(100% - 36px), transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 12px, #000 calc(100% - 36px), transparent 100%);
}
/* the quote form still sits on light glass so its fields stay readable */
.lmd-cp__panel--quote {
    align-self: start; justify-self: end; max-width: 860px; border-radius: 24px; border: 1px solid var(--lmd-glass-line);
    background: rgba(79, 160, 230, .3); -webkit-backdrop-filter: blur(6px) saturate(130%); backdrop-filter: blur(6px) saturate(130%);
    box-shadow: 0 30px 70px -34px rgba(15, 45, 90, .55);
}
.lmd-cp__panel--quote .lmd-cp__scroll { padding: 18px 20px; -webkit-mask-image: none; mask-image: none; }

/* tours: photo tiles, name and price on the photo */
.lmd-tours { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 26px 24px; padding: 6px 6px 0 !important; margin: 0; padding: 0; list-style: none; }
.lmd-tour { animation: lmd-cp-rise .6s var(--lmd-ease-out) both; animation-delay: calc(.2s + var(--i) * .035s); }
.lmd-tour a {
    position: relative; isolation: isolate; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px;
    color: var(--lmd-white); text-decoration: none;
    /* shown when the tour has no photo */
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='40' viewBox='0 0 64 40'%3E%3Cpath d='M0 40 22 12l10 12 8-8 24 24Z' fill='%23ffffff' fill-opacity='.5'/%3E%3Ccircle cx='48' cy='8' r='5' fill='%23ffffff' fill-opacity='.65'/%3E%3C/svg%3E") center 35% / 52px no-repeat,
        linear-gradient(160deg, #a9dcff 0%, #6cb8f6 60%, #4a9fe0 100%);
    border: 1px solid rgba(255, 255, 255, .5);
    box-shadow: 0 16px 34px -14px rgba(11, 18, 51, .55);
    transition: transform .25s ease-out;
}
.lmd-tour img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
/* hover: just a little bigger */
.lmd-tour a:hover, .lmd-tour a:focus-visible { transform: scale(1.05); color: var(--lmd-white); z-index: 1; }
.lmd-tour__cap {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 34px 12px 11px;
    background: linear-gradient(0deg, rgba(15, 61, 102, .78) 0%, rgba(15, 61, 102, .4) 60%, rgba(15, 61, 102, 0) 100%);
}
.lmd-tour h3 {
    margin: 0; min-width: 0; font: 600 13px/1.3 var(--lmd-display); color: var(--lmd-white); text-transform: capitalize;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lmd-tour__tags { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.lmd-tour__price, .lmd-tour__off, .lmd-tour__dur {
    padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--lmd-white);
}
.lmd-tour__price { font-family: var(--lmd-display); color: var(--lmd-ink); background: rgba(255, 255, 255, .92); }
.lmd-tour__off { background: var(--lmd-orange); }
.lmd-tour__dur { position: absolute; top: 8px; right: 8px; font-size: 11px; }
.lmd-tour__dur { right: 8px; background: rgba(15, 61, 102, .6); }

.lmd-cp__empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; background: rgba(255, 255, 255, .2); }
.lmd-link { padding: 0; border: 0; background: none; cursor: pointer; font: 700 13px var(--lmd-body); color: var(--lmd-white); text-decoration: underline; text-underline-offset: 3px; }
.lmd-link:hover { color: var(--lmd-ice); }

/* filters: a large white-glass card in the middle of the screen, the page blurred behind */
.lmd-fmodal {
    position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px;
    background: rgba(214, 240, 255, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    animation: lmd-fade .25s ease both;
}
.lmd-fmodal[hidden] { display: none; }
@keyframes lmd-fade { from { opacity: 0; } }
.lmd-filters {
    display: flex; flex-direction: column; width: min(920px, 100%); max-height: min(82vh, 760px); overflow: hidden;
    font-family: var(--lmd-body); color: var(--lmd-ink); border-radius: 26px; border: 1px solid rgba(255, 255, 255, .95);
    background: linear-gradient(160deg, rgba(255, 255, 255, .96) 0%, rgba(240, 249, 255, .95) 55%, rgba(220, 240, 253, .95) 100%);
    box-shadow: 0 40px 90px -30px rgba(15, 61, 102, .5);
    animation: lmd-cp-rise .35s var(--lmd-ease-out) both;
}
.lmd-filters__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 10px 26px; }
.lmd-filters__head h2 { margin: 0; font: 700 22px var(--lmd-display); color: var(--lmd-ink); }
.lmd-filters__x {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
    color: var(--lmd-ink); background: rgba(15, 61, 102, .06); border: 1px solid rgba(15, 61, 102, .1); transition: background .2s ease;
}
.lmd-filters__x:hover { background: rgba(15, 61, 102, .12); }
.lmd-filters__scroll {
    flex: 1; min-height: 0; overflow-y: auto; padding: 6px 26px 14px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px 32px; align-content: start;
}
.lmd-filters__group { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.lmd-filters__group:first-child { grid-column: 1 / -1; }
.lmd-filters__group legend { float: none; width: auto; margin: 0 0 8px; font: 700 11px var(--lmd-body); letter-spacing: .1em; text-transform: uppercase; color: #5b84ad; }
.lmd-chip--check { display: inline-block; padding: 0; margin: 0 6px 6px 0; border: 0; background: none; cursor: pointer; text-decoration: none; }
.lmd-chip--check[hidden] { display: none; }
.lmd-chip--check input { position: absolute; opacity: 0; pointer-events: none; }
.lmd-chip--check span {
    display: inline-block; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--lmd-ink);
    background: var(--lmd-white); border: 1px solid rgba(15, 61, 102, .14); transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.lmd-chip--check i { font-style: normal; font-size: 11px; opacity: .6; margin-left: 2px; }
.lmd-chip--check:hover span { border-color: var(--lmd-sky); color: var(--lmd-ink); }
.lmd-chip--check input:checked + span { background: var(--lmd-btn); border-color: transparent; color: var(--lmd-white); }
.lmd-chip--check input:focus-visible + span { outline: 2px solid var(--lmd-sky); outline-offset: 2px; }
.lmd-filters__areas { max-height: 120px; overflow-y: auto; scrollbar-width: thin; }
.lmd-filters__find {
    width: min(320px, 100%); height: 38px; margin: 0 0 10px; padding: 0 14px; border-radius: 999px;
    font: 400 13px var(--lmd-body); color: var(--lmd-ink); background: var(--lmd-white); border: 1px solid rgba(15, 61, 102, .14);
}
.lmd-filters__find::placeholder { color: #7f9bb8; }
.lmd-filters__find:focus { outline: 0; border-color: var(--lmd-sky); box-shadow: 0 0 0 3px rgba(92, 200, 255, .2); }
.lmd-filters__foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 26px; border-top: 1px solid rgba(15, 61, 102, .08); }
.lmd-filters .lmd-link { color: var(--lmd-wave); }

/* glass dropdown as a form field (quote form) */
.lmd-dd--field { width: 100%; }
.lmd-dd--field select { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; opacity: 0; pointer-events: none; }
.lmd-dd--field .lmd-dd__btn {
    width: 100%; height: 40px; justify-content: space-between; padding: 0 14px; border-radius: 10px; box-shadow: none;
    font: 400 14px var(--lmd-body); background: rgba(255, 255, 255, .18);
}
.lmd-f .lmd-dd--field .lmd-dd__btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--lmd-white); }
.lmd-f .lmd-dd--field .lmd-dd__btn.is-empty span { color: var(--lmd-white-3); }
.lmd-dd--field .lmd-dd__list { left: 0; right: 0; max-height: 260px; display: flex; flex-direction: column; z-index: 20; }
.lmd-dd__opts { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .5) transparent; }
.lmd-dd__opts a[hidden] { display: none; }
.lmd-dd__find {
    flex-shrink: 0; height: 34px; margin: 0 0 6px; padding: 0 12px; border-radius: 9px;
    font: 400 13px var(--lmd-body); color: var(--lmd-white); background: rgba(255, 255, 255, .2); border: 1px solid var(--lmd-glass-line);
}
.lmd-dd__find::placeholder { color: var(--lmd-white-3); }
.lmd-dd__find:focus { outline: 0; background: rgba(255, 255, 255, .3); }

/* quote form, on the glass */
.lmd-cp__qhead { margin-bottom: 12px; text-shadow: var(--lmd-shadow-text); }
.lmd-cp__qhead h2 { margin: 0; font: 700 24px var(--lmd-display); color: var(--lmd-white); }
.lmd-cp__qhead p { margin: 6px 0 8px; font-size: 14px; line-height: 1.5; color: var(--lmd-white); }
.lmd-quote { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.lmd-quote__trio { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lmd-f { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.lmd-f--wide { grid-column: 1 / -1; }
.lmd-f span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lmd-white-2); }
.lmd-f input, .lmd-f select, .lmd-f textarea {
    width: 100%; height: 40px; padding: 0 12px; border-radius: 10px;
    font: 400 14px var(--lmd-body); color: var(--lmd-white);
    background: rgba(255, 255, 255, .18); border: 1px solid var(--lmd-glass-line);
    transition: background .2s ease, box-shadow .2s ease;
}
.lmd-f select option { color: var(--lmd-ink); }
.lmd-f input::placeholder, .lmd-f textarea::placeholder { color: var(--lmd-white-3); }
.lmd-f textarea { height: auto; padding: 8px 12px; resize: none; }
.lmd-f input:focus, .lmd-f select:focus, .lmd-f textarea:focus { outline: 0; background: rgba(255, 255, 255, .28); box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.lmd-quote__send { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.lmd-cp__panel .alert { margin-bottom: 12px !important; border-radius: 12px; font-size: 14px; }

/* ───── phones and small tablets: normal scrolling page ───── */
@media (max-width: 900px) {
    .lmd-cp { height: auto; min-height: 100vh; overflow: visible; }
    .lmd-cp__bg { position: fixed; }
    .lmd-cp__in { grid-template-columns: 1fr; padding-top: 80px; gap: 16px; }
    .lmd-cp__name { writing-mode: horizontal-tb; transform: none; white-space: normal; font-size: clamp(36px, 11vw, 64px); animation-name: lmd-cp-rise; }
    .lmd-cp__scroll { overflow: visible; }
    .lmd-tours { grid-template-columns: repeat(2, 1fr); }
    .lmd-filters__scroll { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .lmd-quote, .lmd-quote__trio { grid-template-columns: 1fr; }
    .lmd-cp__count { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .lmd-cp *, .lmd-cp *::before, .lmd-cp *::after, .lmd-cp__bg::before, .lmd-cp__bg::after { animation: none !important; transition: none !important; }
}

/* our light-blue finish on the tour photos (same as the tour page) */
.lmd-tour img { filter: saturate(.85) contrast(.95) brightness(1.05) hue-rotate(-6deg); }
.lmd-tour a::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(170deg, rgba(150, 212, 255, .6) 0%, rgba(110, 185, 245, .3) 45%, rgba(40, 110, 190, .3) 100%);
    mix-blend-mode: soft-light;
}
