/* ============================================================
   TRAKANALYTICA DATA LAB — DATASETS PAGE
   Scope: datasets.php only
   Depends on: style.css, header.css, footer.css
   ============================================================ */

/* ══════════════════════════════════════════
   PAGE HERO
   Full-bleed background image with dark overlay
   Content overlaid on top
══════════════════════════════════════════ */
.ds-hero {
    position: relative;
    overflow: hidden;
    padding: 100px 0;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* fallback colour while image loads */
    background-color: #0f1024;
}
/* Layer 1: full-bleed background image */
.ds-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../img/heroimage.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
}
/* Layer 2: dark overlay */
.ds-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(10,15,36,0.60) 0%,
        rgba(10,15,36,0.50) 50%,
        rgba(10,15,36,0.60) 100%
    );
}
.ds-hero-blob,
.ds-hero-blob-1,
.ds-hero-blob-2 {
    display: none;
}
.ds-hero-grid {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 44px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.ds-hero-inner {
    max-width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}
.ds-hero-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: #f97316;
    background: rgba(249,115,22,0.15);
    border: 1px solid rgba(249,115,22,0.3);
    border-radius: 100px;
    padding: 6px 16px;
    margin-bottom: 24px;
}
.ds-hero-tag .fa { font-size: 0.7rem; }
.ds-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}
.ds-hero h1 span {
    color: #f97316;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}
.ds-hero-desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 3px rgba(0,0,0,0.45);
    max-width: 1000px;
    margin: 0 auto;
    line-height: 1.7;
}
.ds-hero-note {
    display: none;
}

/* Live stats: one translucent strip under the text */
.ds-hero-stats {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 40px;
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    padding: 20px 24px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.ds-hero-stat {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}
.ds-hero-stat-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(249,115,22,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f97316;
    font-size: 1.05rem;
}
.ds-hero-stat-body {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    align-items: flex-start;
    text-align: left;
}
.ds-hero-stat-body strong {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
}
.ds-hero-stat-body span {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .ds-hero {
        min-height: 380px;
        padding: 80px 0;
    }
    .ds-hero-grid {
        gap: 36px;
        padding: 0 20px;
    }
    .ds-hero h1 {
        font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    }
    .ds-hero-desc {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .ds-hero {
        min-height: 340px;
        padding: 60px 0;
    }
    .ds-hero-grid {
        gap: 24px;
        padding: 0 16px;
    }
    .ds-hero h1 {
        font-size: 1.6rem;
    }
    .ds-hero-stats {
        padding: 18px;
        gap: 12px 20px;
    }
    .ds-hero-stat {
        flex: 1 1 42%;
    }
}

/* ══════════════════════════════════════════
   STICKY SEARCH BAR
══════════════════════════════════════════ */
.ds-search-bar {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 0;
    position: sticky;
    top: 64px;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(109,40,217,.06);
}
.ds-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ds-search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.ds-search-wrap .fa {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.88rem;
}
.ds-search-input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border: 1.5px solid var(--border-subtle);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-base);
    outline: none;
    transition: border-color .2s;
    font-family: 'Google Sans Flex', sans-serif;
}
.ds-search-input:focus { border-color: var(--accent-primary); }

.ds-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.ds-sort-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}
.ds-sort-select {
    border: 1.5px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--bg-base);
    cursor: pointer;
    font-family: 'Google Sans Flex', sans-serif;
    outline: none;
}
.ds-sort-select:focus { border-color: var(--accent-primary); }

.ds-access-plan-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.ds-filter-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}
.ds-access-plan-select {
    border: 1.5px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--bg-base);
    cursor: pointer;
    font-family: 'Google Sans Flex', sans-serif;
    outline: none;
    max-width: 240px;
}
.ds-access-plan-select:focus { border-color: var(--accent-primary); }

/* ══════════════════════════════════════════
   SUBSCRIPTION BANNER
══════════════════════════════════════════ */
.ds-subscription-banner {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 8px 24px rgba(109,40,217,0.16);
}
.ds-sub-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.ds-sub-banner-text {
    flex: 1;
}
.ds-sub-banner-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ds-sub-banner-text p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.5;
    margin: 0;
}
.ds-sub-banner-text strong {
    color: #fbbf24;
    font-weight: 700;
}
.ds-btn-subscribe-now {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 12px 28px;
    background: #ffffff;
    color: #6d28d9;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Google Sans Flex', sans-serif;
}
.ds-btn-subscribe-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.ds-btn-subscribe-now:active {
    transform: translateY(0);
}
.ds-btn-subscribe-now .fa {
    font-size: 0.85rem;
}

/* Two plain-language facts: what you keep, and what happens if you need more */
.ds-sub-banner-points {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.2);
}
.ds-sub-banner-point {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,.95);
}
.ds-sub-banner-point .fa {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}
.ds-sub-banner-point strong { color: #fde68a; font-weight: 700; }

/* ══════════════════════════════════════════
   FLOATING SUBSCRIBE BAR
   Keeps the Subscribe button reachable while
   scrolling through a long dataset list.
══════════════════════════════════════════ */
.ds-subscription-sticky {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 500;
    background: #0f172a;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.35);
    padding: 14px 16px 14px 20px;
    max-width: calc(100vw - 40px);
    transform: translateX(-50%);
    animation: dsSubStickyIn .3s ease .1s both;
}
@keyframes dsSubStickyIn {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.ds-subscription-sticky-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.ds-subscription-sticky-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ds-subscription-sticky-title {
    color: #fff;
    font-weight: 800;
    font-size: 0.88rem;
    white-space: nowrap;
}
.ds-subscription-sticky-sub {
    font-size: 0.74rem;
    color: rgba(255,255,255,.6);
    white-space: nowrap;
}
.ds-btn-subscribe-sticky {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fbbf24;
    color: #1e293b;
    border: none;
    padding: 11px 20px;
    border-radius: 9px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'Google Sans Flex', sans-serif;
    white-space: nowrap;
    transition: transform .15s, background .15s;
    flex-shrink: 0;
}
.ds-btn-subscribe-sticky:hover { transform: translateY(-1px); background: #f59e0b; }

@media (max-width: 640px) {
    .ds-subscription-sticky { left: 12px; right: 12px; bottom: 12px; transform: none; max-width: none; }
    @keyframes dsSubStickyIn {
        from { opacity: 0; transform: translateY(16px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .ds-subscription-sticky-inner { justify-content: space-between; }
    .ds-btn-subscribe-sticky { flex: 1; justify-content: center; }
}

/* ══════════════════════════════════════════
   SUBSCRIPTION PRICE DISPLAY
══════════════════════════════════════════ */
.ds-price-subscription {
    display: inline-block;
    padding: 4px 12px;
    background: #d4fc79;
    color: #374151;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ds-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1.5px solid var(--border-medium);
    border-radius: 10px;
    background: white;
    color: var(--accent-primary);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Google Sans Flex', sans-serif;
}

/* ══════════════════════════════════════════
   LAYOUT: SIDEBAR + LIST
══════════════════════════════════════════ */
.ds-layout {
    padding: 32px 0 56px;
    background: var(--bg-base);
    min-height: 60vh;
}
.ds-layout-inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

/* ── SIDEBAR (flat app-nav style) ── */
.ds-sidebar {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    overflow: hidden;
    position: sticky;
    top: 120px;
    padding-top: 4px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

.ds-sidebar-close-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 10px;
}
.ds-sidebar-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}
.ds-sidebar-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 2px 4px;
}

.ds-sidebar-section {
    padding: 6px 12px 14px;
}
.ds-sidebar-section:last-of-type { border-bottom: none; }

.ds-sidebar-heading {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    margin: 4px 8px 8px;
}

.ds-sidebar-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.ds-sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: left;
    transition: background .15s, color .15s;
    font-family: 'Google Sans Flex', sans-serif;
}
.ds-sidebar-link:hover {
    background: rgba(17,24,39,.05);
    color: var(--text-primary);
}
.ds-sidebar-link.active {
    background: rgba(109,40,217,.08);
    color: var(--accent-primary);
    font-weight: 700;
}
/* Icons are plain glyphs (no colour box) at rest, like a flat app nav —
   colour only kicks in once the row is active/hovered. */
.ds-sidebar-link-icon {
    width: 20px;
    height: 20px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
    background: none;
    color: var(--text-muted);
    transition: color .15s;
}
.ds-sidebar-link:hover .ds-sidebar-link-icon { color: var(--text-secondary); }
.ds-sidebar-link.active .ds-sidebar-link-icon { color: var(--accent-primary); }

/* Category colour becomes visible only once that row is the active filter */
.ds-sidebar-link.active .ds-sidebar-link-icon.cat-health   { color: #ef4444; }
.ds-sidebar-link.active .ds-sidebar-link-icon.cat-economic { color: #16a34a; }
.ds-sidebar-link.active .ds-sidebar-link-icon.cat-survey   { color: #3b82f6; }
.ds-sidebar-link.active .ds-sidebar-link-icon.cat-training { color: #7c3aed; }
.ds-sidebar-link.active .ds-sidebar-link-icon.cat-free     { color: #059669; }

.ds-sidebar-count {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    padding: 0;
    border-radius: 0;
    min-width: auto;
    text-align: center;
}
.ds-sidebar-link.active .ds-sidebar-count {
    background: none;
    color: var(--accent-primary);
    font-weight: 800;
}

/* Radio filter lists */
.ds-sidebar-checks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ds-check-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.86rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 6px;
    border-radius: 8px;
    transition: background .12s;
    font-weight: 500;
}
.ds-check-label:hover { background: rgba(109,40,217,.05); }
.ds-check-label input[type="radio"] {
    accent-color: var(--accent-primary);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.ds-check-label em {
    margin-left: auto;
    font-style: normal;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Free datasets sidebar link special */
.cat-free-link.active { background: rgba(5,150,105,.08); color: #059669; }
.cat-free-link.active .ds-sidebar-count { color: #059669; }

/* Clear button */
.ds-clear-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 6px 12px 18px;
    padding: 9px 14px;
    border: none;
    border-radius: 8px;
    background: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: background .15s, color .15s;
    font-family: 'Google Sans Flex', sans-serif;
}
.ds-clear-btn:hover { background: rgba(17,24,39,.05); color: var(--accent-primary); }

/* ── RESULT BAR ── */
.ds-result-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.ds-result-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}
.ds-result-count strong { color: var(--text-primary); font-weight: 800; }

.ds-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ds-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px 3px 12px;
    background: rgba(109,40,217,.09);
    color: var(--accent-primary);
    border-radius: 20px;
}
.ds-active-tag button {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    opacity: .7;
}
.ds-active-tag button:hover { opacity: 1; }

/* ── LIST HEADER ── */
/* Column headers only make sense over a table-style list; the card
   grid below carries its own labels on each card, so this is hidden. */
.ds-list-header { display: none; }

/* ── DATASET CARDS (grid, Kaggle-style) ── */
.ds-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.ds-row {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    align-items: stretch;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ds-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(15,23,42,.09);
    border-color: var(--border-medium);
}

/* A quiet gold ring calls out premium datasets without shouting */
.ds-row:has(.ds-badge-premium) {
    border-color: #f3d9a4;
}

/* Name cell -> card banner + heading block */
.ds-row-name {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 0;
}
.ds-row-icon {
    width: 100%;
    height: 88px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.9rem;
    transition: transform .25s ease;
}
.ds-row:hover .ds-row-icon { transform: scale(1.04); }
.ds-row-icon.health   { background: linear-gradient(145deg, #fee2e2, #fecaca); color: #dc2626; }
.ds-row-icon.economic { background: linear-gradient(145deg, #dcfce7, #bbf7d0); color: #16a34a; }
.ds-row-icon.survey   { background: linear-gradient(145deg, #dbeafe, #bfdbfe); color: #2563eb; }
.ds-row-icon.training { background: linear-gradient(145deg, #ede9fe, #ddd6fe); color: #7c3aed; }

.ds-row-info { min-width: 0; flex: 1; padding: 16px 18px 4px; }
.ds-row-title {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ds-row-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ds-row-meta {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.ds-row-meta span {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    padding: 3px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ds-row-meta .fa { font-size: 0.72rem; opacity: .75; }

/* Tag row: category / type / format sit on one line under the meta chips */
.ds-row-tags {
    order: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 18px 22px;
}
.ds-row-cat { min-width: 0; }
.ds-cat-pill {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.ds-cat-pill.cat-health   { background: #fef2f2; color: #dc2626; }
.ds-cat-pill.cat-economic { background: #f0fdf4; color: #16a34a; }
.ds-cat-pill.cat-survey   { background: #eff6ff; color: #2563eb; }
.ds-cat-pill.cat-training { background: #ede9fe; color: #7c3aed; }

/* Type + format cells */
.ds-row-type {
    font-size: 0.86rem;
    color: var(--text-secondary);
}
.ds-row-na { color: var(--text-muted); }

.ds-fmt-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 9px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Footer: price on the left, actions on the right, pinned to card bottom */
.ds-row-footer {
    order: 3;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px 18px;
    border-top: 1px solid var(--border-subtle);
}

/* Price cell */
.ds-row-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent-primary);
    white-space: nowrap;
}
.ds-row-price.free {
    display: inline-flex;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Actions */

.ds-row-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ds-row-actions > .ds-btn-copy {
    align-self: flex-end;
}
.ds-btn-view,
.ds-btn-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: opacity .15s, background .15s, transform .15s, box-shadow .15s;
    font-family: 'Google Sans Flex', sans-serif;
    white-space: nowrap;
    text-decoration: none;
}
.ds-btn-view {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    color: #fff;
}
.ds-btn-view:hover { opacity: .92; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(124,58,237,.28); }
.ds-btn-preview {
    background: var(--bg-base);
    color: var(--accent-primary);
    border: 1.5px solid var(--border-medium);
}
.ds-btn-preview:hover { background: rgba(109,40,217,.07); transform: translateY(-1px); }

.ds-btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 8px;
    font-size: 0.78rem;
    cursor: pointer;
    background: var(--bg-base);
    color: #6b7280;
    border: 1.5px solid var(--border-medium);
    transition: opacity .15s, background .15s, transform .15s, color .15s, border-color .15s;
    flex-shrink: 0;
}
.ds-btn-copy:hover { background: rgba(109,40,217,.07); color: var(--accent-primary); border-color: var(--accent-primary); transform: translateY(-1px); }
.ds-btn-copy.copied { color: #059669; border-color: #6ee7b7; background: #ecfdf5; }

/* Toast notification */
.ds-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(10px);
    background: #1f2937;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Google Sans Flex', sans-serif;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 9999;
}
.ds-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Badges — sit as a corner chip over the card banner, Kaggle-card style */
.ds-row-name { position: relative; }
.ds-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,.14);
}
.ds-badge-premium  { background: #f5f3ff; color: #7c3aed; }
.ds-badge-popular  { background: #fff7ed; color: #ea580c; }
.ds-badge-beginner { background: #f0fdf4; color: #16a34a; }
.ds-badge-new      { background: #eff6ff; color: #2563eb; }

/* Plan pill — names which pricing plan a dataset belongs to */
.ds-plan-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.63rem;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1.5px solid transparent;
    cursor: pointer;
    font-family: 'Google Sans Flex', sans-serif;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
}
.ds-plan-pill:hover  { opacity: .8; }
.ds-plan-pill:active { transform: scale(0.96); }
.plan-free      { background: #ecfdf5; color: #059669; border-color: #6ee7b7; }
.plan-standard  { background: #eff6ff; color: #2563eb; border-color: #93c5fd; }
.plan-bundle    { background: #f5f3ff; color: #7c3aed; border-color: #c4b5fd; }
.plan-monthly   { background: #fffbeb; color: #d97706; border-color: #fcd34d; }
.plan-premium   { background: #fdf2f8; color: #db2777; border-color: #f9a8d4; }

/* ══════════════════════════════════════════
   RESEARCH-READY DATA
══════════════════════════════════════════ */
.ds-ready {
    padding: 96px 0;
    background: var(--bg-base, #f8f8fc);
}
.ds-ready-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}
.ds-ready-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-secondary, #7c3aed);
    background: rgba(109,40,217,.07);
    border: 1px solid rgba(109,40,217,.2);
    border-radius: 100px;
    padding: 5px 14px;
    margin-bottom: 18px;
}
.ds-ready-text h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--text-primary, #14142b);
    line-height: 1.2;
    margin-bottom: 20px;
}
.ds-ready-text p {
    font-size: 1rem;
    color: var(--text-secondary, #4a4a6a);
    line-height: 1.75;
    margin-bottom: 16px;
    max-width: 480px;
}
.ds-ready-cta {
    margin-top: 12px;
}

.ds-ready-panel {
    background: #ffffff;
    border: 1px solid rgba(109,40,217,.1);
    border-radius: 20px;
    padding: 34px 38px;
    max-width: 520px;
    box-shadow: 0 20px 56px -24px rgba(109,40,217,.22);
}
.ds-ready-panel-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(109,40,217,.1);
}
.ds-ready-panel-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(109,40,217,.07);
    border: 1px solid rgba(109,40,217,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #7c3aed;
}
.ds-ready-panel-head h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary, #14142b);
    margin: 0;
}
.ds-ready-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ds-ready-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(109,40,217,.08);
    font-size: 0.92rem;
    color: var(--text-secondary, #4a4a6a);
}
.ds-ready-list li:last-child { border-bottom: none; }
.ds-ready-list li .fa {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(5,150,105,.1);
    color: #059669;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 992px) {
    .ds-ready-inner { grid-template-columns: 1fr; gap: 44px; }
    .ds-ready-panel { padding: 28px 26px; }
}
@media (max-width: 600px) {
    .ds-ready { padding: 64px 0; }
    .ds-ready-panel { padding: 24px 20px; }
}

/* ══════════════════════════════════════════
   VALUE STRIP
══════════════════════════════════════════ */
.ds-value-strip {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
    padding: 56px 0;
}
.ds-value-inner {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}
.ds-value-label { flex-shrink: 0; }
.ds-value-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.65);
    margin-bottom: 10px;
}
.ds-value-heading {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.15;
}
.ds-value-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-bottom: 20px;
}
.ds-value-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255,255,255,.9);
    font-weight: 600;
}
.ds-value-check .fa { color: #a3e635; }
.ds-value-cta {
    font-size: 0.9rem;
    color: rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ══════════════════════════════════════════
   FINAL CTA
══════════════════════════════════════════ */
.ds-final-cta {
    background: #0d0d22;
    padding: 80px 0;
    overflow: hidden;
}
.ds-final-cta-inner {
    position: relative;
    text-align: center;
}
.ds-final-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(109,40,217,.3) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.ds-final-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
}
.ds-final-cta p {
    font-size: 1.05rem;
    color: rgba(255,255,255,.65);
    margin-bottom: 32px;
}
.ds-final-cta-btns {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.ds-btn-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--accent-primary);
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity .15s;
}
.ds-btn-white:hover { opacity: .88; color: var(--accent-primary); }
.ds-btn-ghost-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: rgba(255,255,255,.85);
    border: 2px solid rgba(255,255,255,.3);
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .15s;
}
.ds-btn-ghost-white:hover { border-color: rgba(255,255,255,.6); color: #fff; }

/* ══════════════════════════════════════════
   MOBILE RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1100px) {
    .ds-layout-inner {
        grid-template-columns: 240px 1fr;
    }
}

@media (max-width: 900px) {
    .ds-mobile-filter-btn { display: flex; }

    .ds-layout-inner {
        grid-template-columns: 1fr;
    }

    .ds-sidebar {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 500;
        border-radius: 0;
        overflow-y: auto;
        top: 0;
    }
    .ds-sidebar.open { display: block; }
    .ds-sidebar-close { display: flex; }

    /* Tablet: 2 cards per row */
    .ds-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .ds-row-icon { height: 64px; font-size: 1.4rem; }
    .ds-row-info { padding: 10px 12px 2px; }
    .ds-row-title { font-size: 0.9rem; }
    .ds-row-desc { display: none; }
    .ds-row-tags { padding: 6px 12px 16px; }
    .ds-row-type { display: none; }
    .ds-row-footer { padding: 10px 12px 12px; }
    .ds-row-actions { justify-content: flex-start; }
}

@media (max-width: 600px) {
    /* Phone: 1 card per row */
    .ds-list { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 600px) {
    .ds-search-row { flex-direction: column; align-items: stretch; }
    .ds-sort-wrap { justify-content: flex-end; }
}
/* ══════════════════════════════════════════
   BUNDLE BANNER
══════════════════════════════════════════ */
.ds-bundle-banner {
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 28px;
    box-shadow: 0 8px 24px rgba(8,145,178,0.18);
}
.ds-bundle-banner .ds-sub-banner-text h3 {
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ds-bundle-banner .ds-sub-banner-text p  { color: rgba(255,255,255,0.9); margin-top: 4px; }
.ds-bundle-banner .ds-sub-banner-text strong { color: #fde68a; }
.ds-price-bundle {
    display: inline-block;
    background: #e0f2fe;
    color: #0e7490;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid #bae6fd;
}

/* Plain-language "how it works" strip inside the banner */
.ds-bundle-howto {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.2);
}
.ds-bundle-howto-step {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255,255,255,.95);
}
.ds-bundle-howto-arrow {
    color: rgba(255,255,255,.5);
    font-size: 13px;
}
.ds-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,.22);
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}
@media (max-width: 700px) {
    .ds-bundle-howto { flex-direction: column; align-items: flex-start; gap: 10px; }
    .ds-bundle-howto-arrow { display: none; }
}

/* ══════════════════════════════════════════
   BUNDLE ROW CHECKBOX
   A big, clearly-labeled checkbox is easier to
   spot and understand than a small text button.
══════════════════════════════════════════ */
.ds-list-pane.bundle-mode .ds-row { cursor: pointer; }

.ds-bundle-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 6px 12px 6px 8px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    font-family: 'Google Sans Flex', sans-serif;
    transition: border-color .15s, background .15s;
    white-space: nowrap;
}
.ds-bundle-checkbox:hover { border-color: #0e7490; }
.ds-bundle-checkbox input[type="checkbox"] {
    /* Keep it in the DOM and accessible, but hide the native box
       in favor of the custom one so it looks the same everywhere. */
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.ds-bundle-checkbox-box {
    width: 19px;
    height: 19px;
    border-radius: 5px;
    border: 2px solid #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    font-size: 11px;
    transition: all .15s;
}
.ds-bundle-checkbox-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
}
.ds-bundle-checkbox.is-selected {
    border-color: #0e7490;
    background: #ecfeff;
}
.ds-bundle-checkbox.is-selected .ds-bundle-checkbox-box {
    background: #0e7490;
    border-color: #0e7490;
    color: #fff;
}
.ds-bundle-checkbox.is-selected .ds-bundle-checkbox-label { color: #0e7490; }
.ds-bundle-checkbox.is-disabled {
    opacity: .45;
    cursor: not-allowed;
}

.ds-row.ds-bundle-selected {
    background: #f0fdff;
    border-color: #99e4ef;
    box-shadow: 0 0 0 2px rgba(8,145,178,.15);
}
.ds-row.ds-bundle-selected .ds-price-bundle {
    background: #0e7490;
    color: #fff;
    border-color: #0e7490;
}

/* ══════════════════════════════════════════
   BUNDLE FLOATING SELECTION BAR
══════════════════════════════════════════ */
.ds-bundle-sticky {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 500;
    background: #0f172a;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.35);
    padding: 16px 20px;
    max-width: calc(100vw - 40px);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(16px);
    transition: opacity .2s ease, transform .2s ease;
}
.ds-bundle-sticky.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.ds-bundle-sticky-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.ds-bundle-sticky-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.ds-bundle-sticky-top {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ds-bundle-sticky-count {
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    white-space: nowrap;
}
.ds-bundle-sticky-sep { color: rgba(255,255,255,.35); }
.ds-bundle-sticky-total {
    color: #fbbf24;
    font-weight: 800;
    font-size: 0.95rem;
    white-space: nowrap;
}
.ds-bundle-sticky-dots {
    display: flex;
    gap: 6px;
}
.ds-bundle-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    transition: background .15s;
}
.ds-bundle-dot.is-filled { background: #fbbf24; }
.ds-bundle-sticky-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.ds-btn-sticky-clear {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.25);
    color: rgba(255,255,255,.85);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Google Sans Flex', sans-serif;
    white-space: nowrap;
    transition: background .15s;
}
.ds-btn-sticky-clear:hover { background: rgba(255,255,255,.08); }
.ds-btn-bundle-buy-sticky {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fbbf24;
    color: #1e293b;
    border: none;
    padding: 11px 22px;
    border-radius: 9px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'Google Sans Flex', sans-serif;
    white-space: nowrap;
    transition: opacity .15s, transform .15s, background .15s;
}
.ds-btn-bundle-buy-sticky:hover:not(:disabled) { transform: translateY(-1px); background: #f59e0b; }
.ds-btn-bundle-buy-sticky:disabled { background: rgba(255,255,255,.15); color: rgba(255,255,255,.6); cursor: not-allowed; }

@media (max-width: 640px) {
    .ds-bundle-sticky { left: 12px; right: 12px; bottom: 12px; transform: translateY(16px); max-width: none; }
    .ds-bundle-sticky.is-visible { transform: translateY(0); }
    .ds-bundle-sticky-inner { justify-content: space-between; width: 100%; }
    .ds-bundle-sticky-actions { flex: 1; }
    .ds-btn-bundle-buy-sticky { flex: 1; justify-content: center; }
}

/* Bundle page: actions stack full-width in the card footer */
.ds-list-pane.bundle-mode .ds-row-actions {
    flex-direction: column;
    align-items: stretch;
}
.ds-list-pane.bundle-mode .ds-bundle-checkbox {
    justify-content: center;
}
/* ── PAGINATION ── */
.ds-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 4px 6px;
    margin-top: 6px;
    border-top: 1px solid var(--border-subtle);
}
.ds-pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.ds-pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ds-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1.5px solid var(--border-subtle);
    border-radius: 8px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Google Sans Flex', sans-serif;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.ds-page-btn:hover:not(:disabled):not(.active) {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}
.ds-page-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    cursor: default;
}
.ds-page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.ds-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
}
@media (max-width: 600px) {
    .ds-pagination { justify-content: center; text-align: center; }
    .ds-pagination-controls { justify-content: center; }
}