/* ===== Database Section Styles ===== */

/* Hero */
.db-hero {
    padding: 160px 0 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.95));
}

.db-hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 25% 35%, rgba(59, 130, 246, 0.12) 0%, transparent 55%),
        radial-gradient(circle at 75% 65%, rgba(6, 182, 212, 0.12) 0%, transparent 55%);
    z-index: 0;
}

.db-hero .container {
    position: relative;
    z-index: 1;
}

.db-hero-content {
    text-align: center;
    max-width: 750px;
    margin: 0 auto;
}

.db-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.db-hero-content h1 span {
    background: linear-gradient(90deg, var(--accent, #3b82f6), var(--neon, #06b6d4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.db-hero-content > p {
    font-size: 1.2rem;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 2rem;
}

.db-hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.stat-item i {
    font-size: 28px;
    color: var(--neon, #06b6d4);
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent, #3b82f6), var(--neon, #06b6d4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary, #94a3b8);
}

/* ===== Database Catalog Layout ===== */
.db-catalog {
    padding: 40px 0 80px;
    min-height: 400px;
}

.db-catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* ===== Sidebar Catalog Component ===== */
.db-sidebar-catalog {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Desktop sticky sidebar on the list page */
@media (min-width: 1025px) {
    .db-catalog-layout > .db-sidebar-catalog {
        width: 280px;
        min-width: 280px;
        height: fit-content;
        position: sticky;
        top: 120px;
    }
}

/* Desktop: hide mobile toggle & close buttons */
.db-sidebar-toggle,
.db-sidebar-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.db-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 16px;
}

.db-sidebar-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--light, #f8fafc);
    letter-spacing: 0.3px;
}

.db-sidebar-header h3 i {
    color: var(--neon, #06b6d4);
    font-size: 1.1rem;
}

.db-tree {
    padding: 4px 0;
}

.db-tree-root {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.db-tree-children {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.db-tree-item {
    width: 100%;
}

.db-tree-item.expanded > .db-tree-children {
    max-height: 2000px;
    opacity: 1;
    margin-top: 4px;
    margin-bottom: 8px;
}

.db-tree-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
}

.db-tree-link:hover {
    color: var(--light, #f8fafc);
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.db-tree-link i {
    width: 16px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
    color: var(--neon, #06b6d4);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.db-tree-count {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-secondary, #94a3b8);
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

/* Active State */
.db-tree-item.active > .db-tree-link,
.db-tree-item.active > .db-tree-parent > .db-tree-link {
    color: #fff;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(6, 182, 212, 0.15));
    font-weight: 600;
    border-left: 3px solid var(--neon, #06b6d4);
    border-radius: 4px 12px 12px 4px;
}

.db-tree-parent {
    display: flex;
    align-items: stretch;
    border-radius: 12px;
    transition: background 0.2s ease;
    margin-bottom: 2px;
}

.db-tree-toggle {
    background: none;
    border: none;
    color: var(--text-secondary, #94a3b8);
    width: 38px;
    cursor: pointer;
    font-size: 11px;
    border-radius: 0 12px 12px 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.db-tree-toggle::before,
.db-tree-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background-color: currentColor;
    border-radius: 2px;
    transform: translate(-50%, -50%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.db-tree-toggle::before { width: 10px; height: 1.5px; }
.db-tree-toggle::after { width: 1.5px; height: 10px; }

.expanded > .db-tree-parent .db-tree-toggle::after,
.expanded > .db-tree-toggle::after {
    transform: translate(-50%, -50%) rotate(180deg);
    opacity: 0;
}

.expanded > .db-tree-parent .db-tree-toggle::before,
.expanded > .db-tree-toggle::before {
    transform: translate(-50%, -50%) rotate(180deg);
}

/* ===== Active Category Header ===== */
.db-active-category {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.db-active-category .breadcrumbs {
    margin-bottom: 12px;
}

.db-active-category h2 {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.db-active-category h2 i {
    color: var(--neon, #06b6d4);
}

.db-active-category p {
    color: var(--text-secondary, #94a3b8);
    margin-top: 8px;
    font-size: 0.95rem;
}

/* ===== Mobile Catalog Toggle Button ===== */
.db-mobile-catalog-btn {
    display: none; /* hidden on desktop */
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: #fff;
    border-radius: 14px;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    font-family: inherit;
}

.db-mobile-catalog-btn:hover {
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 4px 25px rgba(6, 182, 212, 0.15);
}

.db-mobile-catalog-btn i {
    color: var(--neon, #06b6d4);
    font-size: 16px;
}

/* ===== Cards Grid ===== */
.db-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.db-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    text-decoration: none;
    color: var(--text, #e2e8f0);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.db-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
    border-color: rgba(59, 130, 246, 0.25);
}

.db-card-header {
    display: flex;
    gap: 8px;
    padding: 18px 22px 0;
    flex-wrap: wrap;
}

.db-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 50px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent, #3b82f6);
    font-size: 13px;
    font-weight: 600;
}

.db-badge.free {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.db-badge.format {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-secondary, #94a3b8);
}

.db-card-image {
    padding: 16px 22px 0;
}

.db-card-image img {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.db-card-body {
    padding: 18px 22px;
    flex: 1;
}

.db-card-body h2,
.db-card-body h3 {
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
    color: var(--light, #f8fafc);
    line-height: 1.4;
}

.db-card-body > p {
    font-size: 0.95rem;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.db-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.db-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
}

.db-card-meta span i {
    color: var(--neon, #06b6d4);
    font-size: 12px;
}

.db-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    gap: 15px;
}

/* Category path on cards (footer) */
.db-card-category-path {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    opacity: 0.8;
    flex-wrap: wrap;
    flex: 1;
}

.db-card-category-path i {
    font-size: 9px;
    color: rgba(148, 163, 184, 0.4);
}

.db-btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--neon, #06b6d4);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.db-card:hover .db-btn-detail {
    gap: 10px;
}

/* ===== Pagination ===== */
.db-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.5);
    color: var(--text-secondary, #94a3b8);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: all 0.3s ease;
}

.page-btn:hover {
    color: var(--neon, #06b6d4);
    border-color: var(--neon, #06b6d4);
}

.page-btn.active {
    background: linear-gradient(90deg, var(--accent, #3b82f6), var(--neon, #06b6d4));
    color: var(--primary, #0f172a);
    border-color: transparent;
}

/* ===== Empty State ===== */
.db-empty {
    text-align: center;
    padding: 80px 20px;
}

.db-empty i {
    font-size: 60px;
    color: var(--text-secondary, #94a3b8);
    opacity: 0.4;
    margin-bottom: 20px;
}

.db-empty h2 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}

.db-empty p {
    color: var(--text-secondary, #94a3b8);
    font-size: 1.1rem;
}

/* ===== Detail Page ===== */

/* Detail Hero */
.db-detail-hero {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.97));
    position: relative;
}

.db-detail-hero:before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(circle at 20% 40%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 60%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.db-detail-hero .container {
    position: relative;
    z-index: 1;
}

.breadcrumbs {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--text-secondary, #94a3b8);
    text-decoration: none;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--neon, #06b6d4);
}

.breadcrumbs .sep {
    color: rgba(148, 163, 184, 0.3);
}

.db-detail-header {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.db-detail-info {
    flex: 1;
}

.db-detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.db-detail-info h1 {
    font-size: 2.4rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.db-detail-preview {
    font-size: 1.15rem;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.db-detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 2rem;
}

.detail-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--text-secondary, #94a3b8);
}

.detail-stat i {
    color: var(--neon, #06b6d4);
    width: 18px;
    text-align: center;
}

.db-detail-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.db-detail-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.db-detail-image {
    flex: 0 0 45%;
    max-width: 500px;
}

.db-detail-image img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Detail Content */
.db-detail-content {
    padding: 70px 0;
}

.db-content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.db-description h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.db-description h2 span {
    background: linear-gradient(90deg, var(--accent, #3b82f6), var(--neon, #06b6d4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.db-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary, #94a3b8);
}

.db-text p {
    margin-bottom: 1.2rem;
}

/* Sidebar */
.sidebar-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    margin-bottom: 20px;
}

.sidebar-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-card h3 i {
    color: var(--neon, #06b6d4);
}

.sidebar-card.highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(6, 182, 212, 0.08));
    border-color: rgba(59, 130, 246, 0.2);
}

.fields-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fields-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text, #e2e8f0);
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}

.fields-list li:last-child {
    border-bottom: none;
}

.fields-list li i {
    color: var(--neon, #06b6d4);
    font-size: 12px;
    width: 16px;
    text-align: center;
}

.price-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent, #3b82f6), var(--neon, #06b6d4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.btn-full {
    width: 100%;
    margin-bottom: 10px;
    justify-content: center;
}

/* Related Section */
.db-related {
    padding: 70px 0;
    background: var(--secondary, #1e293b);
}

.section-title span {
    background: linear-gradient(90deg, var(--accent, #3b82f6), var(--neon, #06b6d4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* CTA */
.db-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary, #0f172a) 0%, #0c1220 100%);
    text-align: center;
}

.db-cta .cta-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 24px;
    padding: 60px;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.db-cta h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.db-cta h2 span {
    background: linear-gradient(90deg, var(--accent, #3b82f6), var(--neon, #06b6d4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.db-cta p {
    font-size: 1.15rem;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 2rem;
}


/* ========================================================================
   RESPONSIVE — Tablets (max-width: 1024px)
   ======================================================================== */
@media (max-width: 1024px) {

    /* ---- Hero ---- */
    .db-hero {
        padding: 130px 0 50px;
    }

    .db-hero-content h1 {
        font-size: 2.2rem;
    }

    .db-hero-content > p {
        font-size: 1.05rem;
    }

    /* ---- Catalog layout switches to single column ---- */
    .db-catalog-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Show mobile catalog button */
    .db-mobile-catalog-btn {
        display: flex;
    }

    /* ---- Sidebar becomes a slide-in drawer (LIST PAGE ONLY) ---- */
    .db-catalog-layout > .db-sidebar-catalog {
        position: fixed;
        top: 0;
        left: -100%;
        width: 88%;
        max-width: 340px;
        height: 100vh;
        height: 100dvh;
        z-index: 10000;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: none;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 0;
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.8);
        border-radius: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .db-catalog-layout > .db-sidebar-catalog.open {
        left: 0;
    }

    .db-catalog-layout > .db-sidebar-catalog .db-sidebar-header {
        padding: 20px 20px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(30, 41, 59, 0.4);
        margin-bottom: 0;
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .db-catalog-layout > .db-sidebar-catalog .db-tree {
        padding: 12px 16px 24px;
    }

    /* Show close button in mobile drawer (list page) */
    .db-catalog-layout > .db-sidebar-catalog .db-sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        font-size: 20px;
        color: var(--text-secondary, #94a3b8);
        border-radius: 10px;
        transition: all 0.2s ease;
    }

    .db-catalog-layout > .db-sidebar-catalog .db-sidebar-close:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }

    /* ---- Detail page: catalog sidebar stays inline ---- */
    .db-sidebar .db-sidebar-catalog {
        position: static;
        width: 100%;
        max-width: none;
        height: auto;
        z-index: auto;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        padding: 24px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        overflow-y: visible;
        transition: none;
    }

    .db-sidebar .db-sidebar-catalog .db-sidebar-toggle,
    .db-sidebar .db-sidebar-catalog .db-sidebar-close {
        display: none;
    }

    /* Backdrop overlay */
    body.sidebar-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        z-index: 9999;
        animation: fadeIn 0.3s ease;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* ---- Cards grid: 2 columns on tablet ---- */
    .db-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* ---- Detail page ---- */
    .db-detail-hero {
        padding: 120px 0 40px;
    }

    .db-detail-info h1 {
        font-size: 2rem;
    }

    .db-detail-header {
        flex-direction: column;
        gap: 30px;
    }

    .db-detail-image {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .db-content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .db-detail-content {
        padding: 50px 0;
    }

    /* ---- CTA ---- */
    .db-cta .cta-container {
        padding: 40px 30px;
    }

    .db-cta h2 {
        font-size: 1.6rem;
    }

    /* ---- Related ---- */
    .db-related {
        padding: 50px 0;
    }
}


/* ========================================================================
   RESPONSIVE — Mobile (max-width: 768px)
   ======================================================================== */
@media (max-width: 768px) {

    .db-hero {
        padding: 120px 0 40px;
    }

    .db-hero-content h1 {
        font-size: 1.9rem;
    }

    .db-hero-content > p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .db-hero-stats {
        gap: 30px;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    /* Cards grid: 1 column */
    .db-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .db-card:hover {
        transform: translateY(-4px);
    }

    .db-card-header {
        padding: 14px 18px 0;
    }

    .db-card-body {
        padding: 14px 18px;
    }

    .db-card-footer {
        padding: 12px 18px;
    }

    /* Detail page */
    .db-detail-hero {
        padding: 110px 0 30px;
    }

    .db-detail-info h1 {
        font-size: 1.6rem;
        line-height: 1.35;
    }

    .db-detail-preview {
        font-size: 1rem;
    }

    .db-detail-stats {
        gap: 16px;
    }

    .detail-stat {
        font-size: 14px;
    }

    .db-detail-actions {
        flex-direction: column;
    }

    .db-detail-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .db-description h2 {
        font-size: 1.5rem;
    }

    .sidebar-card {
        padding: 22px;
        border-radius: 16px;
    }

    /* Breadcrumbs wrap */
    .breadcrumbs {
        gap: 6px;
        margin-bottom: 20px;
    }

    .breadcrumbs a {
        font-size: 13px;
    }

    /* Pagination */
    .db-pagination {
        margin-top: 35px;
        gap: 6px;
    }

    .page-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
        border-radius: 10px;
    }

    /* CTA */
    .db-cta {
        padding: 50px 0;
    }

    .db-cta .cta-container {
        padding: 30px 20px;
        border-radius: 18px;
    }

    .db-cta h2 {
        font-size: 1.4rem;
    }

    .db-cta p {
        font-size: 1rem;
    }

    /* Detail content sidebar: full width */
    .db-sidebar {
        width: 100%;
    }
}


/* ========================================================================
   RESPONSIVE — Small phones (max-width: 480px)
   ======================================================================== */
@media (max-width: 480px) {

    .db-hero {
        padding: 110px 0 30px;
    }

    .db-hero-content h1 {
        font-size: 1.6rem;
    }

    .db-hero-content > p {
        font-size: 0.9rem;
    }

    .db-hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-item {
        flex-direction: row;
        gap: 10px;
    }

    .stat-item i {
        font-size: 22px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    /* Card meta stacks vertically on small screens */
    .db-card-meta {
        flex-direction: column;
        gap: 6px;
    }

    .db-card-body h2,
    .db-card-body h3 {
        font-size: 1.05rem;
    }

    .db-card-body > p {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }

    .db-card-category-path {
        font-size: 11px;
    }

    /* Detail page */
    .db-detail-info h1 {
        font-size: 1.35rem;
    }

    .db-detail-preview {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .db-detail-stats {
        gap: 12px;
    }

    .detail-stat {
        font-size: 13px;
        gap: 6px;
    }

    .db-description h2 {
        font-size: 1.3rem;
    }

    .db-text {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .db-detail-content {
        padding: 35px 0;
    }

    /* Sidebar drawer wider on small phones (list page only) */
    .db-catalog-layout > .db-sidebar-catalog {
        width: 92%;
        max-width: none;
    }

    /* Mobile filter button smaller padding */
    .db-mobile-catalog-btn {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 12px;
    }

    /* Active category */
    .db-active-category h2 {
        font-size: 1.2rem;
    }

    .db-active-category p {
        font-size: 0.85rem;
    }

    /* Empty state */
    .db-empty {
        padding: 50px 15px;
    }

    .db-empty i {
        font-size: 45px;
    }

    .db-empty h2 {
        font-size: 1.3rem;
    }

    .db-empty p {
        font-size: 0.95rem;
    }

    /* CTA */
    .db-cta h2 {
        font-size: 1.2rem;
    }

    .db-cta p {
        font-size: 0.9rem;
    }
}
