/* Destination archive — all styles scoped under `.vnx-dest-archive` so the
 * theme + other sections cannot leak in. Layout adapts
 * docs/reference/forecast/DestinationsArchivePage.tsx. */

.vnx-dest-archive {
    --vnx-da-border: #e5e7eb;
    --vnx-da-muted: #6b7280;
    --vnx-da-primary: #0f172a;
    --vnx-da-accent: #0ea5e9;
    --vnx-da-bg-soft: #f8fafc;
    --vnx-da-hero-from: #0f2552;
    --vnx-da-hero-to: #1e3a8a;
    --vnx-da-success: #16a34a;
    --vnx-da-warn: #f59e0b;
    --vnx-da-danger: #dc2626;

    color: var(--vnx-da-primary);
    background: #ffffff;
}

.vnx-dest-archive *,
.vnx-dest-archive *::before,
.vnx-dest-archive *::after {
    box-sizing: border-box;
}

/* ---------- Hero ---------- */
.vnx-dest-archive__hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--vnx-da-hero-from) 0%, var(--vnx-da-hero-to) 100%);
    color: #fff;
    padding: 56px 0 64px;
    padding-top: 80px;
}

.vnx-dest-archive__hero-media {
    position: absolute;
    inset: 0;
}

.vnx-dest-archive__hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vnx-dest-archive__hero-overlay {
    position: absolute;
    inset: 0;
}

.vnx-dest-archive__hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.vnx-dest-archive__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.vnx-dest-archive__back:hover { background: rgba(255, 255, 255, 0.12); }

.vnx-dest-archive__title {
    font-size: clamp(32px, 4.4vw, 48px);
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
    /* Use Vietnamese-capable heading stack (Playfair is not enqueued here). */
    font-family: 'Noto Serif', 'Roboto Slab', Georgia, serif;
}

.vnx-dest-archive__lede {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 auto 6px;
    max-width: 640px;
}

.vnx-dest-archive__hero-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 24px;
}

.vnx-dest-archive__search {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}

.vnx-dest-archive__search i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vnx-da-muted);
}

.vnx-dest-archive__search input {
    width: 100%;
    padding: 16px 18px 16px 48px;
    border-radius: 12px;
    border: 0;
    background: #ffffff;
    color: var(--vnx-da-primary);
    font-size: 15px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.2);
}

.vnx-dest-archive__search input:focus {
    outline: 2px solid var(--vnx-da-accent);
    outline-offset: 2px;
}

/* ---------- Best today strip ---------- */
.vnx-dest-archive__best-strip {
    background: linear-gradient(90deg, #ecfdf5, #ecfeff);
    border-top: 1px solid #a7f3d0;
    border-bottom: 1px solid #a7f3d0;
    padding: 20px 0;
}

.vnx-dest-archive__best-strip-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.vnx-dest-archive__best-strip-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #065f46;
}

.vnx-dest-archive__best-strip-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
}

.vnx-dest-archive__best-card {
    flex: 0 0 260px;
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 1.5px solid #a7f3d0;
    border-radius: 12px;
    text-decoration: none;
    color: var(--vnx-da-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    scroll-snap-align: start;
}

.vnx-dest-archive__best-card:hover {
    border-color: var(--vnx-da-success);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.15);
    transform: translateY(-1px);
}

.vnx-dest-archive__best-thumb {
    flex: 0 0 58px;
    height: 58px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #e5e7eb;
}

.vnx-dest-archive__best-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vnx-dest-archive__best-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vnx-dest-archive__best-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--vnx-da-success);
}

.vnx-dest-archive__best-label {
    font-size: 12px;
    color: #065f46;
}

/* ---------- Filter / sort bar ---------- */
.vnx-dest-archive__bar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    border-bottom: 1px solid var(--vnx-da-border);
    box-shadow: 0 1px 3px rgba(2, 6, 23, 0.04);
}

.vnx-dest-archive__bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.vnx-dest-archive__bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vnx-dest-archive__filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--vnx-da-border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--vnx-da-primary);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.vnx-dest-archive__filters-toggle:hover { background: #f8fafc; border-color: #cbd5e1; }

.vnx-dest-archive__filters-toggle[aria-expanded="true"] {
    background: var(--vnx-da-primary);
    border-color: var(--vnx-da-primary);
    color: #fff;
}

.vnx-dest-archive__filters-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--vnx-da-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
}

.vnx-dest-archive__filters-toggle[aria-expanded="true"] .vnx-dest-archive__filters-count {
    background: #fff;
    color: var(--vnx-da-primary);
}

.vnx-dest-archive__active-chips {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.vnx-dest-archive__active-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 10px;
    background: #e2e8f0;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: #1e293b;
}

.vnx-dest-archive__active-chip-x {
    background: transparent;
    border: 0;
    padding: 0;
    width: 18px;
    height: 18px;
    font-size: 14px;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    border-radius: 999px;
}

.vnx-dest-archive__active-chip-x:hover { background: rgba(15, 23, 42, 0.12); color: var(--vnx-da-primary); }

.vnx-dest-archive__bar-right {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.vnx-dest-archive__count {
    font-size: 13px;
    color: var(--vnx-da-muted);
}

.vnx-dest-archive__sort {
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid var(--vnx-da-border);
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}

.vnx-dest-archive__sort:focus {
    outline: 2px solid var(--vnx-da-accent);
    outline-offset: 2px;
}

/* Filters panel */
.vnx-dest-archive__filters-panel {
    border-top: 1px solid var(--vnx-da-border);
    background: #f8fafc;
}

.vnx-dest-archive__filters-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.vnx-dest-archive__filter-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #334155;
    margin: 0 0 10px;
}

.vnx-dest-archive__filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.vnx-dest-archive__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #e2e8f0;
    border: 1px solid transparent;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.vnx-dest-archive__pill:hover { background: #cbd5e1; }

.vnx-dest-archive__pill.is-active {
    background: var(--vnx-da-primary);
    color: #fff;
    border-color: var(--vnx-da-primary);
}

/* ---------- Grid ---------- */
.vnx-dest-archive__grid-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 56px;
}

.vnx-dest-archive__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
    /* Stretch rows so every card in a row shares the same height and CTAs align */
    align-items: stretch;
}

.vnx-dest-archive__empty,
.vnx-dest-archive__empty-filter {
    text-align: center;
    color: var(--vnx-da-muted);
    padding: 48px 20px;
}

.vnx-dest-archive__empty h2 { margin: 8px 0 4px; color: var(--vnx-da-primary); }

.vnx-dest-archive__empty i {
    font-size: 28px;
    color: var(--vnx-da-muted);
}

/* ---------- Destination card ---------- */
.vnx-dest-card {
    background: #fff;
    border: 1px solid var(--vnx-da-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vnx-dest-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.12);
}

.vnx-dest-card.is-hidden { display: none; }

/* --- media --- */
.vnx-dest-card__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    flex-shrink: 0;
}

.vnx-dest-card__media--recommended::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    height: 44%;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(22, 163, 74, 0) 0%,
        rgba(22, 163, 74, 0.42) 62%,
        rgba(22, 163, 74, 0.86) 100%
    );
}

.vnx-dest-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.vnx-dest-card__img--placeholder {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.vnx-dest-card:hover .vnx-dest-card__img {
    transform: scale(1.06);
}

/* Score pill top-left */
.vnx-dest-card__score {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    background: #64748b;
    box-shadow: 0 4px 10px rgba(2, 6, 23, 0.2);
}

.vnx-dest-card__score--excellent { background: var(--vnx-da-success); }
.vnx-dest-card__score--good      { background: #0ea5e9; }
.vnx-dest-card__score--moderate  { background: var(--vnx-da-warn); }
.vnx-dest-card__score--poor      { background: var(--vnx-da-danger); }

/* Category badge top-right */
.vnx-dest-card__cat-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--vnx-da-primary);
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(2, 6, 23, 0.15);
}

/* Bottom ribbon */
.vnx-dest-card__ribbon {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 14px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--vnx-da-success);
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.2;
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.18);
}

/* --- body --- */
.vnx-dest-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
}

.vnx-dest-card__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Noto Serif', 'Roboto Slab', Georgia, serif;
}

.vnx-dest-card__title a {
    color: inherit;
    text-decoration: none;
}

.vnx-dest-card__location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--vnx-da-muted);
    margin: 0;
}

/* Weather snapshot */
.vnx-dest-card__weather {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--vnx-da-border);
    background: #f9fafb;
}

.vnx-dest-card__weather-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vnx-dest-card__weather--excellent { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.vnx-dest-card__weather--good      { background: #ecfeff; border-color: #a5f3fc; color: #155e75; }
.vnx-dest-card__weather--moderate  { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.vnx-dest-card__weather--poor      { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.vnx-dest-card__weather-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.vnx-dest-card__weather-primary i { font-size: 18px; }

.vnx-dest-card__weather-thermo {
    opacity: 0.6;
    font-size: 14px;
}

.vnx-dest-card__temp { font-size: 16px; }

.vnx-dest-card__short-label {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    opacity: 0.9;
}

.vnx-dest-card__weather-meta {
    margin: 2px 0 0;
    font-size: 11.5px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    opacity: 0.92;
}

.vnx-dest-card__weather-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.vnx-dest-card__intro {
    margin: 0;
    font-size: 14px;
    color: var(--vnx-da-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vnx-dest-card__today {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 8px 10px;
    background: rgba(168, 85, 247, 0.08);
    border-radius: 8px;
    font-size: 12.5px;
    color: #7c3aed;
    line-height: 1.35;
}

.vnx-dest-card__today i { color: #a855f7; }

.vnx-dest-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.vnx-dest-card__tag {
    padding: 4px 10px;
    border: 1px solid var(--vnx-da-border);
    border-radius: 999px;
    font-size: 11.5px;
    color: #475569;
    background: #fff;
    line-height: 1.2;
}

/* Stats + CTA: pinned to the bottom of the card body so Explore aligns across a row */
.vnx-dest-card__footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
    width: 100%;
}

.vnx-dest-card__stats {
    display: flex;
    align-items: center;
    gap: 10px 14px;
    font-size: 13px;
    color: var(--vnx-da-primary);
    flex-wrap: wrap;
}

.vnx-dest-card__stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vnx-dest-card__stat--rating i { color: #f59e0b; }

.vnx-dest-card__stat--muted { color: var(--vnx-da-muted); }
.vnx-dest-card__stat--muted i { color: var(--vnx-da-muted); }

/* Linked stats → hotel / tour archives filtered by ?dest= */
a.vnx-dest-card__stat-link {
    color: inherit;
    text-decoration: none;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

a.vnx-dest-card__stat-link:hover {
    color: var(--vnx-da-primary);
    background: rgba(15, 23, 42, 0.06);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a.vnx-dest-card__stat-link:focus-visible {
    outline: 2px solid var(--vnx-da-accent);
    outline-offset: 2px;
}

.vnx-dest-card__stat-sub { color: var(--vnx-da-muted); }

.vnx-dest-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #22C55E;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s ease;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.vnx-dest-card__cta:hover { background: #16A34A; }
.vnx-dest-card__cta:active { background: #15803D; }

.vnx-dest-card__cta i { transition: transform 0.2s ease; }
.vnx-dest-card__cta:hover i { transform: translateX(3px); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .vnx-dest-archive__hero { padding: 40px 0 48px; }
    .vnx-dest-archive__bar-inner { padding: 10px 16px; }
    .vnx-dest-archive__grid-wrap { padding: 24px 16px 40px; }
    .vnx-dest-archive__grid { grid-template-columns: 1fr; }
    .vnx-dest-archive__filters-inner { padding: 16px; gap: 16px; }
}
@media (max-width: 768px) {
    .vnx-dest-archive__hero {
        padding-top: 64px;
    }
}