/* ============================================================
   destination.css — Destination Deep-Dive
   Uses CSS custom properties so dark / light mode are a single
   source of truth — no scattered overrides.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&display=swap');

/* ── Tokens ────────────────────────────────────────────────── */

html.dark {
    --dp-bg:           #0d1117;
    --dp-bg-card:      #161b22;
    --dp-bg-card-alt:  rgba(255,255,255,0.04);
    --dp-bg-chip:      rgba(255,255,255,0.07);
    --dp-bg-chip-hover:rgba(255,255,255,0.12);
    --dp-border:       rgba(255,255,255,0.08);
    --dp-border-hover: rgba(255,255,255,0.16);
    --dp-text-1:       #f0f6fc;
    --dp-text-2:       rgba(240,246,252,0.6);
    --dp-text-3:       rgba(240,246,252,0.38);
    --dp-tab-bg:       rgba(13,17,23,0.92);
    --dp-sheet-bg:     #161b22;
    --dp-pill-bg:      rgba(255,255,255,0.06);
    --dp-pill-border:  rgba(255,255,255,0.1);
    --dp-badge-bg:     rgba(224,90,43,0.15);
    --dp-badge-color:  #e0754a;
    --dp-map-bg:       #1a1f2e;
    --dp-icon-btn-bg:  rgba(0,0,0,0.5);
    --dp-icon-btn-border: rgba(255,255,255,0.2);
}

html:not(.dark) {
    --dp-bg:           #faf9f7;
    --dp-bg-card:      #ffffff;
    --dp-bg-card-alt:  #ffffff;
    --dp-bg-chip:      rgba(0,0,0,0.05);
    --dp-bg-chip-hover:rgba(0,0,0,0.09);
    --dp-border:       rgba(0,0,0,0.09);
    --dp-border-hover: rgba(0,0,0,0.18);
    --dp-text-1:       #111827;
    --dp-text-2:       rgba(17,24,39,0.58);
    --dp-text-3:       rgba(17,24,39,0.38);
    --dp-tab-bg:       rgba(250,249,247,0.96);
    --dp-sheet-bg:     #ffffff;
    --dp-pill-bg:      rgba(0,0,0,0.04);
    --dp-pill-border:  rgba(0,0,0,0.09);
    --dp-badge-bg:     rgba(224,90,43,0.1);
    --dp-badge-color:  #c94f24;
    --dp-map-bg:       #e8e8e8;
    --dp-icon-btn-bg:  rgba(0,0,0,0.42);
    --dp-icon-btn-border: rgba(255,255,255,0.25);
}

/* ── Page wrapper ──────────────────────────────────────────── */

.dest-page {
    min-height: 100vh;
    background: var(--dp-bg);
    padding-bottom: 96px;                  /* mobile nav clearance */
}

/* ── Breadcrumb ────────────────────────────────────────────── */

.dest-breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 1rem 4px;
    font-size: 13px;
    color: var(--dp-text-3);
}

.dest-breadcrumb ol {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 4px;
}

.dest-breadcrumb li + li::before {
    content: "›";
    margin-right: 4px;
    color: var(--dp-text-3);
    pointer-events: none;
}

.dest-breadcrumb a {
    color: var(--dp-text-3);
    text-decoration: none;
    transition: color 0.15s ease;
    border-radius: 4px;
    padding: 1px 2px;
}

.dest-breadcrumb a:hover {
    color: var(--dp-text-1);
    text-decoration: underline;
}

.dest-breadcrumb [aria-current="page"] a {
    color: var(--dp-text-2);
    font-weight: 600;
    pointer-events: none;    /* already on this page — don't navigate to self */
    text-decoration: none;
}

@media (max-width: 767px) {
    .dest-breadcrumb { padding: 56px 1rem 4px; } /* clear fixed mobile nav */
}

/* ── Offline banner ────────────────────────────────────────── */

.offline-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--dp-badge-bg);
    border-bottom: 1px solid rgba(224,90,43,0.25);
    color: var(--dp-badge-color);
    font-size: 0.8125rem;
    font-weight: 500;
}

.offline-banner.hidden { display: none; }

/* ── Content wrapper (max-width, centred) ──────────────────── */

.dest-content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .dest-content-wrap { padding: 0 1.5rem; }
}

/* ── Hero ──────────────────────────────────────────────────── */

.dest-hero {
    position: relative;
    width: 100%;
    height: clamp(320px, 55vw, 480px);
    overflow: hidden;
    background: var(--dp-map-bg);
}

@media (min-width: 768px) {
    .dest-hero { height: clamp(400px, 55vh, 580px); }
}

.dest-hero-blur {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    z-index: 0;
}

.dest-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Strong bottom gradient for text legibility */
.dest-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.45) 40%, transparent 70%),
        linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 20%);
    z-index: 2;
    display: flex;
    align-items: flex-end;
}

/* ── Hero top bar (back + icon buttons) ────────────────────── */

.dest-hero-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
}

@media (min-width: 768px) {
    .dest-hero-topbar { padding: 1.25rem 1.5rem; }
}

.dest-hero-topbar-actions {
    display: flex;
    gap: 0.5rem;
}

.dest-hero-back,
.dest-icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--dp-icon-btn-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--dp-icon-btn-border);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.dest-hero-back:hover,
.dest-icon-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.06);
}

.dest-icon-btn.is-saved {
    background: rgba(224,90,43,0.7);
    border-color: transparent;
    color: #fff;
}

/* ── Hero bottom content ────────────────────────────────────── */

.dest-hero-bottom {
    padding: 1.25rem 1rem 1.5rem;
    width: 100%;
}

@media (min-width: 768px) {
    .dest-hero-bottom { padding: 2rem 1.5rem 2rem; max-width: 1200px; }
}

.dest-hero-breadcrumb {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    margin: 0 0 0.375rem;
    letter-spacing: 0.01em;
}

.dest-hero-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin: 0 0 1rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

/* ── Ask AI button (hero) ──────────────────────────────────── */

.dest-ask-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    background: #E05A2B;
    border: none;
    border-radius: 9999px;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 16px rgba(224,90,43,0.45);
}

.dest-ask-ai-btn:hover { background: #c94f24; transform: translateY(-1px); }
.dest-ask-ai-btn:active { transform: scale(0.97); }

/* ── Info strip ────────────────────────────────────────────── */

.dest-info-strip-wrap {
    background: var(--dp-bg);
    border-bottom: 1px solid var(--dp-border);
}

.dest-info-strip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 1200px;
    margin: 0 auto;
}

.dest-info-strip::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
    .dest-info-strip { padding: 0.875rem 1.5rem; gap: 0.625rem; }
}

.dest-info-pill {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--dp-pill-bg);
    border: 1px solid var(--dp-pill-border);
    border-radius: 9999px;
    white-space: nowrap;
}

.dest-info-pill-icon {
    color: var(--dp-text-3);
    flex-shrink: 0;
}

.dest-info-pill-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dp-text-3);
}

.dest-info-pill-value {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--dp-text-1);
}

.dest-tag-pill {
    flex-shrink: 0;
    padding: 0.375rem 0.75rem;
    background: var(--dp-pill-bg);
    border: 1px solid var(--dp-pill-border);
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--dp-text-2);
    white-space: nowrap;
    text-transform: capitalize;
}

.dest-add-trip-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    border: 1.5px solid #E05A2B;
    background: transparent;
    color: #E05A2B;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.dest-add-trip-btn:hover {
    background: #E05A2B;
    color: #fff;
}

/* ── AI Summary card ───────────────────────────────────────── */

.ai-summary-card {
    margin: 1.25rem 0;
    padding: 1.125rem 1.25rem;
    background: var(--dp-bg-card);
    border: 1px solid var(--dp-border);
    border-left: 3px solid #E05A2B;
    border-radius: 12px;
}

@media (min-width: 768px) {
    .ai-summary-card { padding: 1.375rem 1.5rem; }
}

.ai-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.625rem;
    background: var(--dp-badge-bg);
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dp-badge-color);
}

.ai-summary-date {
    font-size: 0.6875rem;
    color: var(--dp-text-3);
}

.ai-summary-text {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--dp-text-2);
    margin: 0 0 0.5rem;
}

.ai-summary-text.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ai-summary-text.is-expanded {
    display: block;
}

.ai-summary-expand {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: #E05A2B;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.ai-summary-expand svg { transition: transform 0.2s; }
.ai-summary-expand[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ── AI Summary skeleton (shown while enrichment is generating) ── */

.ai-summary-skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.ai-skeleton-line {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg,
        var(--dp-surface-2, #1e1e2e) 25%,
        var(--dp-surface-3, #2a2a3d) 50%,
        var(--dp-surface-2, #1e1e2e) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    width: 100%;
}

.ai-skeleton-line--header { width: 40%; height: 12px; }
.ai-skeleton-line--short  { width: 65%; }

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Sticky tab bar ────────────────────────────────────────── */

.dest-tab-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--dp-tab-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--dp-border);
}

.dest-tab-inner {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.dest-tab-inner::-webkit-scrollbar { display: none; }

.dest-tab {
    flex-shrink: 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--dp-text-2);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.875rem 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.dest-tab:hover { color: var(--dp-text-1); }

.dest-tab.active {
    color: var(--dp-text-1);
    border-bottom-color: #E05A2B;
    font-weight: 600;
}

/* ── Tab content wrapper ───────────────────────────────────── */

.dest-tab-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1rem 1rem;
}

@media (min-width: 768px) {
    .dest-tab-content { padding: 1.5rem 1.5rem 1.5rem; }
}

/* ── Filter chips ──────────────────────────────────────────── */

.dest-filter-chips {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dest-filter-chips::-webkit-scrollbar { display: none; }

.dest-filter-chip {
    flex-shrink: 0;
    background: var(--dp-bg-chip);
    border: 1px solid var(--dp-border);
    border-radius: 9999px;
    color: var(--dp-text-2);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.375rem 0.875rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.dest-filter-chip:hover {
    background: var(--dp-bg-chip-hover);
    color: var(--dp-text-1);
}

.dest-filter-chip.active {
    background: rgba(224,90,43,0.12);
    border-color: rgba(224,90,43,0.4);
    color: #E05A2B;
    font-weight: 600;
}

/* ── Overview: two-column grid ─────────────────────────────── */

.dest-overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .dest-overview-grid {
        grid-template-columns: 1fr 280px;
        gap: 2rem;
    }
}

.dest-overview-main { min-width: 0; }

/* ── Suggested questions ───────────────────────────────────── */

.dest-questions-section {
    margin-bottom: 2rem;
}

.dest-questions-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dp-text-1);
    margin: 0 0 0.125rem;
}

.dest-questions-list {
    border-top: 1px solid var(--dp-border);
}

.dest-question-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.9375rem 0;
    border: none;
    border-bottom: 1px solid var(--dp-border);
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--dp-text-1);
    font-size: 0.9375rem;
    line-height: 1.45;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s;
}

.dest-question-item:hover { color: #E05A2B; }
.dest-question-item:hover .dest-question-chevron { color: #E05A2B; }

.dest-question-text { flex: 1; }

.dest-question-chevron {
    flex-shrink: 0;
    color: var(--dp-text-3);
    transition: color 0.15s;
}

/* ── Sticky sidebar (desktop only) ─────────────────────────── */

.dest-overview-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .dest-overview-sidebar {
        display: block;
        position: sticky;
        top: 72px;   /* clears the sticky tab bar */
    }
}

.dest-sidebar-card {
    background: var(--dp-bg-card);
    border: 1px solid var(--dp-border);
    border-radius: 16px;
    padding: 1.25rem;
}

.dest-sidebar-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dp-text-1);
    margin: 0 0 0.5rem;
}

.dest-sidebar-desc {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--dp-text-2);
    margin: 0 0 1rem;
}

.dest-sidebar-ai-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #E05A2B;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.dest-sidebar-ai-btn:hover { background: #c94f24; }
.dest-sidebar-ai-btn:active { transform: scale(0.98); }

/* ── Travel advice ─────────────────────────────────────────── */

.dest-travel-advice {
    margin-bottom: 2rem;
}

.dest-travel-list {
    border-top: 1px solid var(--dp-border);
    margin-top: 0.875rem;
}

.dest-travel-row {
    padding: 1rem 0;
    border-bottom: 1px solid var(--dp-border);
}

.dest-travel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.dest-travel-icon {
    font-size: 1rem;
    line-height: 1;
}

.dest-travel-label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--dp-text-1);
}

.dest-travel-desc {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--dp-text-2);
    margin: 0;
    padding-left: 1.625rem;  /* indent to align under label */
}

/* ── Things to know (Pros / Cons) ──────────────────────────── */

.dest-things-section {
    margin-bottom: 2rem;
}

.dest-things-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (max-width: 600px) {
    .dest-things-grid { grid-template-columns: 1fr; }
}

.dest-things-col-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dp-text-1);
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--dp-border);
}

.dest-things-col-header svg {
    flex-shrink: 0;
    color: var(--dp-text-3);
}

.dest-procon-item {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--dp-text-2);
    margin-bottom: 0.75rem;
}

.dest-procon-title {
    font-weight: 700;
    color: var(--dp-text-1);
    font-style: normal;
}

/* ── Overview: horizontal sections ────────────────────────── */

.dest-overview-section { margin-bottom: 2rem; }

.dest-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.875rem;
}

.dest-section-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--dp-text-1);
    margin: 0;
}

.dest-section-see-all {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: none;
    border: none;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #E05A2B;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.dest-section-see-all:hover { opacity: 0.75; }

/* ── Scroll outer: contains scroll row + arrow buttons ──────── */

.dest-scroll-outer {
    position: relative;
    /* Edge bleed: extends slightly past the content wrapper so first/last
       cards sit flush with the viewport on small screens */
    margin: 0 -1rem;
}

@media (min-width: 768px) {
    .dest-scroll-outer { margin: 0 -1.5rem; }
}

/* ── Scroll row ────────────────────────────────────────────── */

.dest-section-scroll {
    display: flex;
    gap: 0.875rem;
    overflow-x: auto;
    padding: 0.25rem 1rem 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-padding-inline: 1rem;
}

.dest-section-scroll::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
    .dest-section-scroll { padding: 0.25rem 1.5rem 1rem; scroll-padding-inline: 1.5rem; }
}

/* ── Scroll arrow buttons (shared by both pages) ───────────── */

.scroll-arrow {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--dp-border);
    background: var(--dp-bg-card);
    color: var(--dp-text-1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.scroll-arrow:hover {
    background: var(--dp-bg-chip);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.scroll-arrow-prev { left: 10px; }
.scroll-arrow-next { right: 10px; }

/* ── Horizontal place card (overview sections) ─────────────── */

.dest-hcard {
    flex-shrink: 0;
    width: 230px;
    background: var(--dp-bg-card);
    border: 1px solid var(--dp-border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    -webkit-tap-highlight-color: transparent;
}

.dest-hcard:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    border-color: var(--dp-border-hover);
}

.dest-hcard:focus-visible { outline: 2px solid #E05A2B; outline-offset: 2px; }

@media (min-width: 640px) { .dest-hcard { width: 250px; } }

.dest-hcard-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 62%;   /* 3:2 landscape */
    overflow: hidden;
    background: var(--dp-map-bg);
}

.dest-hcard-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s;
}

.dest-hcard-img.loaded { opacity: 1; }

.dest-hcard-blur {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.dest-hcard-save {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: color 0.15s, background 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.dest-hcard-save:hover { transform: scale(1.15); }
.dest-hcard-save.saved { color: #E05A2B; background: rgba(224,90,43,0.2); border-color: rgba(224,90,43,0.4); }

@keyframes savePop {
    0% { transform: scale(1); }
    40% { transform: scale(1.4); }
    70% { transform: scale(0.88); }
    100% { transform: scale(1); }
}

.dest-hcard-save.save-pop { animation: savePop 0.28s cubic-bezier(0.34,1.56,0.64,1) forwards; }

.dest-hcard-trip {
    position: absolute;
    top: 0.5rem;
    right: 2.75rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: color 0.15s, background 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.dest-hcard-trip:hover { transform: scale(1.15); color: #fff; background: rgba(224,90,43,0.55); border-color: rgba(224,90,43,0.6); }

.dest-hcard-body { padding: 0.625rem 0.75rem 0.75rem; }

.dest-hcard-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dp-text-1);
    margin: 0 0 0.25rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dest-hcard-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--dp-text-3);
}

.dest-hcard-rating {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    color: #f59e0b;
    font-weight: 600;
}

.dest-hcard-cat {
    color: var(--dp-text-3);
    text-transform: capitalize;
}

/* ── Grid place card (category tabs) ──────────────────────── */

.dest-place-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
}

@media (min-width: 640px) {
    .dest-place-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .dest-place-grid { grid-template-columns: repeat(4, 1fr); }
}

.dest-place-card {
    background: var(--dp-bg-card);
    border: 1px solid var(--dp-border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    -webkit-tap-highlight-color: transparent;
}

.dest-place-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: var(--dp-border-hover);
}

.dest-place-card:focus-visible { outline: 2px solid #E05A2B; outline-offset: 2px; }

.dest-card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 62%;
    overflow: hidden;
    background: var(--dp-map-bg);
}

.dest-card-blurhash {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.dest-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s;
}

.dest-card-img.loaded { opacity: 1; }

.dest-card-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.dest-card-action-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: color 0.15s, background 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.dest-card-action-btn:hover { transform: scale(1.15); }
.dest-card-action-btn.saved { color: #E05A2B; background: rgba(224,90,43,0.2); border-color: rgba(224,90,43,0.4); }
.dest-card-action-btn.save-pop { animation: savePop 0.28s cubic-bezier(0.34,1.56,0.64,1) forwards; }

.dest-card-category-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 9999px;
    padding: 0.1875rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
    text-transform: capitalize;
}

.dest-card-body { padding: 0.625rem 0.75rem 0.75rem; }

.dest-card-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.375rem;
    margin-bottom: 0.25rem;
}

.dest-card-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dp-text-1);
    margin: 0;
    line-height: 1.3;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dest-card-rating {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #f59e0b;
    white-space: nowrap;
    flex-shrink: 0;
}

.dest-card-meta {
    font-size: 0.75rem;
    color: var(--dp-text-3);
    margin: 0;
}

/* ── Loading / end states ──────────────────────────────────── */

.dest-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 2.5rem 1rem;
    color: var(--dp-text-3);
    font-size: 0.875rem;
}

.dest-loading.hidden { display: none; }

.dest-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--dp-border);
    border-top-color: #E05A2B;
    border-radius: 50%;
    animation: destSpin 0.75s linear infinite;
}

@keyframes destSpin { to { transform: rotate(360deg); } }

.dest-end-msg {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--dp-text-3);
    font-size: 0.8125rem;
}

.dest-end-msg.hidden { display: none; }

/* ── Map panel ─────────────────────────────────────────────── */

.dest-map {
    width: 100%;
    height: calc(100vh - 200px);
    min-height: 420px;
    background: var(--dp-map-bg);
}

.dest-map.hidden { display: none; }

/* ── Place detail overlay ──────────────────────────────────── */

.place-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
}

.place-detail-overlay.hidden { display: none; }

.place-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Mobile: bottom sheet */
.place-detail-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dp-sheet-bg);
    border: 1px solid var(--dp-border);
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    overflow-y: auto;
    scrollbar-width: none;
    padding-bottom: env(safe-area-inset-bottom, 0);
    animation: slideUp 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}

.place-detail-sheet::-webkit-scrollbar { display: none; }

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Desktop: centred modal */
@media (min-width: 768px) {
    .place-detail-sheet {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        width: 560px;
        max-width: calc(100vw - 2rem);
        max-height: 88vh;
        border-radius: 18px;
        box-shadow: 0 28px 80px rgba(0,0,0,0.4);
        animation: modalIn 0.22s cubic-bezier(0.32, 0.72, 0, 1);
    }

    @keyframes modalIn {
        from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)); }
        to   { opacity: 1; transform: translate(-50%, -50%); }
    }
}

.place-detail-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dp-bg-chip);
    border: 1px solid var(--dp-border);
    border-radius: 50%;
    color: var(--dp-text-2);
    cursor: pointer;
    z-index: 1;
    transition: background 0.15s, color 0.15s;
}

.place-detail-close:hover {
    background: var(--dp-bg-chip-hover);
    color: var(--dp-text-1);
}

.place-detail-content { padding: 1.25rem; }

/* Detail sheet inner */
.pd-hero-img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
    background: var(--dp-map-bg);
}

.pd-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dp-text-1);
    margin: 0 0 0.5rem;
    line-height: 1.25;
    padding-right: 2.5rem;  /* avoid overlap with close btn */
}

.pd-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.875rem;
}

.pd-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--dp-bg-chip);
    border: 1px solid var(--dp-border);
    border-radius: 9999px;
    padding: 0.2rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--dp-text-2);
    text-transform: capitalize;
}

.pd-rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #f59e0b;
}

.pd-description {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--dp-text-2);
    margin: 0 0 1.25rem;
}

.pd-actions {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.pd-action-btn {
    flex: 1;
    min-width: 110px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.6875rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.pd-action-btn:active { transform: scale(0.97); }

.pd-action-primary { background: #E05A2B; border: none; color: #fff; }
.pd-action-primary:hover { background: #c94f24; }

.pd-action-secondary {
    background: var(--dp-bg-chip);
    border: 1px solid var(--dp-border);
    color: var(--dp-text-1);
}

.pd-action-secondary:hover { background: var(--dp-bg-chip-hover); }

.pd-action-secondary.saved {
    color: #E05A2B;
    background: rgba(224,90,43,0.1);
    border-color: rgba(224,90,43,0.35);
}
