﻿
/* ===== CSS Variables — Government DISCOM soothing palette ===== */
:root {
    --dl-primary: #1a3a5c;
    --dl-primary-light: #24507a;
    --dl-primary-soft: #2d6396;
    --dl-accent: #2e8b7a;
    --dl-accent-light: #3ba894;
    --dl-accent-pale: #e6f5f2;
    --dl-teal: #3a9bbf;
    --dl-teal-light: #5cb8d6;
    --dl-cream: #f7f9fb;
    --dl-cream-warm: #f0f4f8;
    --dl-sand: #e8ecf1;
    --dl-text-dark: #1e2d3d;
    --dl-text-mid: #4a5e73;
    --dl-text-light: #7b8fa3;
    --dl-border: #d4dce6;
    --dl-border-light: #e4eaf0;
    --dl-shadow-sm: 0 2px 8px rgba(26,58,92,0.06);
    --dl-shadow-md: 0 4px 20px rgba(26,58,92,0.08);
    --dl-shadow-lg: 0 8px 40px rgba(26,58,92,0.12);
    --dl-shadow-hover: 0 12px 36px rgba(26,58,92,0.15);
    --dl-radius: 14px;
    --dl-radius-sm: 10px;
    --dl-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --dl-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== Page Background ===== */
.content-wrap {
    background: linear-gradient(170deg, var(--dl-cream) 0%, var(--dl-cream-warm) 40%, var(--dl-sand) 100%) !important;
    min-height: calc(100vh - 120px);
    padding-bottom: 80px !important;
}

/* ===== Page Header Section ===== */
.dl-page-header {
    text-align: center;
    padding: 36px 20px 28px;
    margin-bottom: 8px;
}

    .dl-page-header .dl-icon-wrap {
        width: 64px;
        height: 64px;
        margin: 0 auto 16px;
        background: linear-gradient(135deg, var(--dl-primary), var(--dl-primary-soft));
        border-radius: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 16px rgba(26,58,92,0.18);
    }

        .dl-page-header .dl-icon-wrap i {
            font-size: 28px;
            color: #fff;
        }

    .dl-page-header h2 {
        font-family: var(--dl-font);
        font-size: 1.55rem;
        font-weight: 800;
        color: var(--dl-primary);
        margin: 0 0 6px;
        letter-spacing: 0.3px;
    }

    .dl-page-header p {
        font-size: 0.9rem;
        color: var(--dl-text-light);
        margin: 0;
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.55;
    }

/* ===== Breadcrumb / Info Bar ===== */
.dl-info-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    margin: 0 auto 24px;
    max-width: 520px;
    background: var(--dl-accent-pale);
    border: 1px solid rgba(46,139,122,0.15);
    border-radius: 30px;
    font-size: 0.8rem;
    color: var(--dl-accent);
    font-weight: 600;
}

    .dl-info-bar i {
        font-size: 0.9rem;
    }

/* ===== Card Grid ===== */
.dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 0 8px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ===== Individual Card ===== */
.dl-card {
    background: #fff;
    border: 1px solid var(--dl-border-light);
    border-radius: var(--dl-radius);
    overflow: hidden;
    box-shadow: var(--dl-shadow-sm);
    transition: var(--dl-transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

    .dl-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--dl-shadow-hover);
        border-color: var(--dl-teal-light);
    }

/* Thumbnail area */
.dl-card-thumb {
    position: relative;
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: var(--dl-cream-warm);
}

    .dl-card-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
    }

.dl-card:hover .dl-card-thumb img {
    transform: scale(1.08);
    filter: brightness(0.75);
}

/* PDF badge */
.dl-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(192,57,43,0.3);
    z-index: 2;
}

/* Download overlay */
.dl-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
    text-decoration: none;
}

.dl-card:hover .dl-card-overlay {
    opacity: 1;
}

.dl-card-overlay .dl-download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--dl-accent), var(--dl-accent-light));
    color: #fff;
    font-family: var(--dl-font);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(46,139,122,0.35);
    transform: translateY(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dl-card:hover .dl-card-overlay .dl-download-btn {
    transform: translateY(0);
}

.dl-card-overlay .dl-download-btn:hover {
    box-shadow: 0 6px 24px rgba(46,139,122,0.45);
}

/* Card body */
.dl-card-body {
    padding: 14px 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dl-card-title {
    font-family: var(--dl-font);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--dl-text-dark);
    line-height: 1.45;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dl-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--dl-border-light);
}

.dl-card-type {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--dl-text-light);
    font-weight: 600;
}

    .dl-card-type i {
        color: #c0392b;
        font-size: 0.85rem;
    }

.dl-card-action {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--dl-teal);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--dl-transition);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--dl-font);
}

    .dl-card-action:hover {
        color: var(--dl-primary);
        gap: 7px;
    }

/* ===== Bottom Help Section ===== */
.dl-help-section {
    max-width: 700px;
    margin: 40px auto 0;
    padding: 0 8px;
}

.dl-help-card {
    background: #fff;
    border: 1px solid var(--dl-border-light);
    border-radius: var(--dl-radius);
    padding: 24px 28px;
    box-shadow: var(--dl-shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.dl-help-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--dl-teal), var(--dl-teal-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 3px 10px rgba(58,155,191,0.2);
}

.dl-help-text h4 {
    font-family: var(--dl-font);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--dl-text-dark);
    margin: 0 0 4px;
}

.dl-help-text p {
    font-size: 0.82rem;
    color: var(--dl-text-mid);
    margin: 0;
    line-height: 1.55;
}

.dl-help-text a {
    color: var(--dl-teal);
    font-weight: 600;
    text-decoration: none;
}

    .dl-help-text a:hover {
        text-decoration: underline;
    }

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .dl-grid {
        grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 767px) {
    .dl-page-header {
        padding: 24px 16px 18px;
    }

        .dl-page-header .dl-icon-wrap {
            width: 52px;
            height: 52px;
            border-radius: 14px;
        }

            .dl-page-header .dl-icon-wrap i {
                font-size: 22px;
            }

        .dl-page-header h2 {
            font-size: 1.25rem;
        }

        .dl-page-header p {
            font-size: 0.82rem;
        }

    .dl-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 4px;
    }

    .dl-card-thumb {
        height: 130px;
    }

    .dl-card-body {
        padding: 10px 12px 14px;
    }

    .dl-card-title {
        font-size: 0.75rem;
    }

    .dl-card-badge {
        font-size: 0.58rem;
        padding: 3px 7px;
    }

    .dl-help-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 20px;
    }
}

@media (max-width: 400px) {
    .dl-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
    }

    .dl-card-thumb {
        height: 160px;
    }
}

/* ===== Animation on scroll ===== */
.dl-card {
    opacity: 0;
    transform: translateY(24px);
    animation: dlFadeUp 0.5s ease forwards;
}

    .dl-card:nth-child(1) {
        animation-delay: 0.05s;
    }

    .dl-card:nth-child(2) {
        animation-delay: 0.10s;
    }

    .dl-card:nth-child(3) {
        animation-delay: 0.15s;
    }

    .dl-card:nth-child(4) {
        animation-delay: 0.20s;
    }

    .dl-card:nth-child(5) {
        animation-delay: 0.25s;
    }

    .dl-card:nth-child(6) {
        animation-delay: 0.30s;
    }

    .dl-card:nth-child(7) {
        animation-delay: 0.35s;
    }

    .dl-card:nth-child(8) {
        animation-delay: 0.40s;
    }

    .dl-card:nth-child(9) {
        animation-delay: 0.45s;
    }

@keyframes dlFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


