/* frontend/public/css/downloads.css */

/* ── Downloads-Seite ─────────────────────────────────────── */
.dl-page {
    min-height: 60vh;
}

.dl-header {
    background: linear-gradient(135deg, #1a3a5c, #004080);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.dl-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: .4rem;
}

.dl-header p {
    font-size: 1rem;
    opacity: .85;
}

.dl-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dl-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
}

.dl-empty p {
    font-size: 1rem;
    margin-top: .5rem;
}

/* Sektion */
.dl-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: .8rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.dl-count {
    font-size: .72rem;
    background: #e2e8f0;
    color: #475569;
    padding: .1rem .45rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Download-Liste */
.dl-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

/* Download-Item */
.dl-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #004080;
    border-radius: 7px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .15s;
}

.dl-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    transform: translateX(3px);
    text-decoration: none;
    color: inherit;
}

.dl-item-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.dl-item-info {
    flex: 1;
    min-width: 0;
}

.dl-item-name {
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-item-meta {
    font-size: .78rem;
    color: #9ca3af;
    margin-top: .1rem;
}

.dl-item-btn {
    white-space: nowrap;
    font-size: .82rem;
    font-weight: 600;
    color: #004080;
    background: #eff6ff;
    padding: .35rem .8rem;
    border-radius: 6px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .dl-layout {
        padding: 1.5rem .8rem 3rem;
    }

    .dl-item-btn {
        display: none;
    }
}

/* Layout mit Sidebar */
.dl-layout-sidebar {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Kategorien-Sidebar */
.dl-sidebar {
    position: sticky;
    top: 1.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
}

.dl-sidebar-title {
    font-size: .82rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 .7rem;
}

.dl-cat-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.dl-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .45rem .6rem;
    border-radius: 6px;
    font-size: .87rem;
    color: #374151;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.dl-cat-link:hover {
    background: #f0f7ff;
    color: #004080;
    text-decoration: none;
}

.dl-cat-link.active {
    background: #004080;
    color: #fff;
    font-weight: 600;
}

.dl-cat-link.active:hover {
    background: #002d5e;
}

.dl-cat-count {
    font-size: .72rem;
    background: rgba(0, 0, 0, .1);
    padding: .1rem .4rem;
    border-radius: 10px;
    flex-shrink: 0;
}

.dl-cat-link.active .dl-cat-count {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

.dl-back-btn {
    display: inline-block;
    margin-top: .8rem;
    color: #004080;
    font-size: .9rem;
    text-decoration: none;
}

.dl-back-btn:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .dl-layout-sidebar {
        grid-template-columns: 1fr;
    }

    .dl-sidebar {
        position: static;
        /* Horizontal scrollen auf Mobil */
        overflow-x: auto;
    }

    .dl-cat-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: .3rem;
    }

    .dl-cat-link {
        padding: .3rem .6rem;
        font-size: .82rem;
        white-space: nowrap;
    }
}