/* ============================================
   Data Bank Page - Enterprise Specification Cards
   ============================================ */

.db-section {
    padding-bottom: 100px;
}

/* === Unit Toggle Toolbar === */
.db-unit-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.06);
}

.db-unit-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    white-space: nowrap;
}

.db-unit-toggle {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
}

.db-unit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.db-unit-btn:hover:not(.active) {
    background: rgba(0, 209, 193, 0.12);
    color: #0a2540;
}

.db-unit-btn.active {
    background: #0a2540;
    color: #fff;
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.25);
}

.db-unit-btn.active svg {
    stroke: #00d1c1;
}

.db-unit-hint {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.75;
}

/* Smooth value transition when unit switches */
.db-val-num[data-metric] {
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.db-val-num.unit-imperial {
    color: #0a2540;
}


/* === Empty State === */
.db-empty {
    text-align: center;
    padding: 100px 0;
    color: var(--text-secondary, #64748b);
}
.db-empty svg {
    margin-bottom: 20px;
    opacity: 0.3;
}

/* === Category Block === */
.db-category {
    margin-top: 60px;
}

.db-cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.db-cat-header svg {
    color: var(--navy, #0a2540);
    flex-shrink: 0;
}

.db-cat-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy, #0a2540);
    margin: 0;
    flex: 1;
}

.db-cat-count {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #edf2f7;
    color: #64748b;
    padding: 4px 12px;
    border-radius: 20px;
}

/* === Specification Card === */
.db-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
    border: 1px solid #edf2f7;
    border-top: 3px solid var(--c, #1565c0);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.db-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* === Card Header === */
.db-card-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: var(--cl, #f8faff);
}

.db-card-left {
    display: contents;
}

.db-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    order: 3;
}

.db-card-icon {
    width: 46px;
    height: 46px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c, #1565c0);
    border: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    overflow: hidden;
    position: relative;
    order: 1;
}

.db-card-drawing {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.db-card-icon:hover .db-card-drawing {
    transform: scale(1.15);
}

.db-card-title-wrap {
    flex: 1;
    min-width: 0;
    order: 2;
}

.db-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-card-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.db-card-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c, #1565c0);
    background: #fff;
    border: 1.5px solid var(--c, #1565c0);
    padding: 4px 10px;
    border-radius: 20px;
    flex-shrink: 0;
    opacity: 0.85;
}

.db-card-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--navy, #0a2540);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.db-card-link:hover {
    background: var(--cl, #f8faff);
    border-color: var(--c, #1565c0);
    color: var(--c, #1565c0);
}

.db-card-link svg {
    opacity: 0.7;
}

/* === Specs Grid === */
.db-specs {
    display: flex;
    align-items: stretch;
    padding: 0;
}

.db-spec-group {
    flex: 1;
    padding: 18px 20px;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    min-width: 0;
}

.db-spec-group:last-child {
    border-right: none;
}

.db-spec-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c, #1565c0);
    margin-bottom: 12px;
}

.db-spec-vals {
    display: flex;
    gap: 0;
    align-items: flex-end;
}

.db-val {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 6px;
}

.db-val:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: #e8edf2;
}

.db-val--wide {
    flex: 1;
    text-align: left;
}

.db-val-name {
    display: block;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 4px;
}

.db-val-num {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* === Responsive === */
@media (max-width: 991px) {
    .db-specs {
        flex-wrap: wrap;
    }
    .db-spec-group {
        flex: 1 1 45%;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        border-right: none;
    }
    .db-spec-group:nth-last-child(-n+2) {
        border-bottom: none;
    }
}

@media (max-width: 576px) {

    /* ── Category header ── */
    .db-cat-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .db-cat-header h2 {
        font-size: 1.2rem;
        flex: 1 1 auto;
    }
    .db-cat-count {
        margin-left: auto;
    }

    /* ── Card header (Grid Layout for Mobile) ── */
    .db-card-head {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 12px 16px;
        padding: 16px;
        align-items: center;
    }

    .db-card-left {
        display: contents; /* Let children participate in grid */
    }

    .db-card-icon {
        grid-column: 1;
        grid-row: 1;
        width: 44px;
        height: 44px;
    }

    .db-card-title-wrap {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
    }

    .db-card-name {
        font-size: 1.05rem;
        white-space: normal;
        line-height: 1.3;
        margin-bottom: 4px;
    }

    .db-card-desc {
        font-size: 0.8rem;
        margin: 0;
    }

    /* Buton grubu alt satıra tam genişlik yayılır */
    .db-card-actions {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        padding-top: 4px;
        gap: 8px;
    }

    .db-card-link {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .db-card-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    /* ── Specs: 1 sütun (değerler taşmasın diye) ── */
    .db-specs {
        display: flex;
        flex-direction: column;
    }

    .db-spec-group {
        padding: 14px 16px;
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    .db-spec-group:last-child {
        border-bottom: none;
    }

    .db-spec-label {
        font-size: 0.6rem;
        margin-bottom: 8px;
    }

    /* Değer kutucukları */
    .db-val-name {
        font-size: 0.58rem;
    }

    .db-val-num {
        font-size: 0.82rem;
        white-space: nowrap; /* 2 sütunda artık yer var */
    }

    .db-val {
        padding: 0 4px;
    }
}

/* === Lightbox === */
.db-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 37, 64, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
    cursor: zoom-out;
}

.db-lightbox.active {
    display: flex;
    opacity: 1;
}

.db-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.db-lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 4px solid #fff;
    background: #fff;
}

.db-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    line-height: 1;
}

.db-lightbox-title {
    margin-top: 15px;
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
}

.db-lightbox-info {
    text-align: center;
    padding: 0 10px;
}

.db-lightbox-desc {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    line-height: 1.5;
}

.db-lightbox-meta {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
    font-style: italic;
    line-height: 1.4;
}

/* === SEO Content Block === */
.db-seo-section {
    background: #f8fafc;
    padding: 60px 0;
    border-top: 1px solid #e2e8f0;
}

.db-seo-block {
    width: 100%;
    margin: 0 auto;
}

.db-seo-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0a2540;
    margin-bottom: 20px;
}

.db-seo-block p,
.db-seo-content p {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.db-seo-block p:last-child,
.db-seo-content p:last-child {
    margin-bottom: 0;
}

.db-seo-block a,
.db-seo-content a {
    color: #0a2540;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.db-seo-block a:hover,
.db-seo-content a:hover {
    color: #00b4d8;
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
    .db-unit-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
    }
    
    .db-unit-label {
        text-align: center;
        font-size: 11px;
    }
    
    .db-unit-toggle {
        flex-direction: column;
        width: 100%;
        gap: 4px;
        background: transparent;
        padding: 0;
    }
    
    .db-unit-btn {
        width: 100%;
        justify-content: center;
        background: #f1f5f9;
        border-radius: 8px;
        padding: 12px;
        font-size: 12px;
    }
    
    .db-unit-btn.active {
        background: #0a2540;
    }

    .db-unit-hint {
        display: block;
        margin-top: 2px;
        font-size: 10px;
    }
}
