/* Husami Kalaam Library Search + Filter */
@import url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu:wght@400;500;600;700&display=swap');

.hsk-kalaam-library {
    --hsk-green: #003d2b;
    --hsk-gold: #d6bf72;
    --hsk-gold-light: #ead893;
    --hsk-beige: #f5efe2;
    --hsk-bg: #f8f6ef;
    --hsk-border: #eadfc8;
    --hsk-muted: #68736d;
    --hsk-text: #10372a;
    --hsk-radius: 14px;
    --hsk-pill: 999px;
    background: var(--hsk-bg);
    color: var(--hsk-text);
}

.hsk-kalaam-library * {
    box-sizing: border-box;
}

.hsk-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hsk-lib-hero {
    background: var(--hsk-green);
    padding: 62px 24px 58px;
    text-align: center;
    color: #fff;
}

.hsk-lib-inner {
    max-width: 880px;
    margin: 0 auto;
}

.hsk-lib-eyebrow {
    display: inline-block;
    color: var(--hsk-gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hsk-lib-hero h1 {
    color: #fff;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.05;
    margin: 0 0 12px;
    font-weight: 600;
}

.hsk-lib-hero p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
    margin: 16px auto 0;
    max-width: 650px;
}

.hsk-lib-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hsk-gold);
    opacity: 0.9;
}

.hsk-lib-search-band {
    background: var(--hsk-green);
    padding: 38px 24px 42px;
    border-top: 1px solid rgba(214, 191, 114, 0.13);
}

.hsk-lib-search-inner {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.hsk-lib-search-bar {
    display: flex;
    border-radius: var(--hsk-pill);
    overflow: hidden;
    border: 1px solid rgba(214, 191, 114, 0.28);
    background: rgba(255, 255, 255, 0.055);
}

.hsk-lib-search-input {
    flex: 1;
    min-width: 0;
    padding: 14px 24px;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #fff !important;
    font-size: 14px;
    box-shadow: none !important;
}

.hsk-lib-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.hsk-lib-search-btn {
    padding: 14px 28px;
    background: var(--hsk-gold);
    color: #0b0b0b;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: 0.2s ease;
}

.hsk-lib-search-btn:hover {
    background: var(--hsk-gold-light);
}

.hsk-lib-filter-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.hsk-lib-filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.hsk-lib-chip,
.hsk-lib-year-filter {
    min-height: 32px;
    padding: 6px 16px;
    border-radius: var(--hsk-pill);
    border: 1px solid rgba(214, 191, 114, 0.30) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.62) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s ease;
}

.hsk-lib-chip:hover,
.hsk-lib-chip.active {
    border-color: var(--hsk-gold) !important;
    color: var(--hsk-gold) !important;
    background: rgba(214, 191, 114, 0.09) !important;
}

.hsk-lib-year-filter option {
    color: #0b0b0b;
}

.hsk-lib-results-section {
    background: var(--hsk-bg);
    padding: 48px 24px 70px;
}

.hsk-lib-wrap {
    max-width: 1180px;
    margin: 0 auto;
}

.hsk-lib-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.hsk-lib-tabs {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.06);
    padding: 4px;
    border-radius: 12px;
}

.hsk-lib-tab {
    padding: 9px 22px;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--hsk-muted);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: 0.2s ease;
}

.hsk-lib-tab.active {
    background: var(--hsk-green);
    color: var(--hsk-gold);
}

.hsk-lib-result-count {
    color: var(--hsk-muted);
    margin: 0;
    font-size: 13px;
}

.hsk-lib-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.hsk-lib-empty {
    grid-column: 1 / -1;
    color: var(--hsk-muted);
    text-align: center;
    padding: 46px 18px;
    border: 1px solid var(--hsk-border);
    background: #fff;
    border-radius: var(--hsk-radius);
}

.hsk-lib-k-card {
    background: #fff;
    border-radius: var(--hsk-radius);
    border: 1px solid var(--hsk-border);
    overflow: hidden;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.hsk-lib-k-card:hover {
    transform: translateY(-4px);
    border-color: rgba(214, 191, 114, 0.70);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.07);
}

.hsk-lib-k-card-top {
    display: grid;
    grid-template-columns: 105px 1fr;
    min-height: 128px;
}

.hsk-lib-k-thumb,
.hsk-lib-k-thumb-ph {
    width: 105px;
    height: 128px;
    min-height: 128px;
}

.hsk-lib-k-thumb {
    object-fit: cover;
    display: block;
}

.hsk-lib-k-thumb-ph {
    background: var(--hsk-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hsk-gold);
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 28px;
    line-height: 1;
}

.hsk-lib-k-head {
    padding: 18px 16px 12px;
}

.hsk-lib-k-code {
    color: var(--hsk-gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.hsk-lib-k-title-ur {
    font-family: 'Noto Nastaliq Urdu', serif !important;
    direction: rtl;
    text-align: right;
    color: var(--hsk-green);
    font-size: 18px;
    line-height: 2.1;
    margin: 0 0 4px;
    font-weight: 500;
}

.hsk-lib-k-title-en {
    color: #5f5f5f;
    font-size: 12px;
    line-height: 1.55;
    font-style: italic;
    margin: 0;
}

.hsk-lib-k-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 16px;
    border-top: 1px solid var(--hsk-border);
}

.hsk-lib-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--hsk-pill);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    padding: 8px 13px;
    white-space: nowrap;
}

.hsk-lib-bdg-cat {
    background: #e5f2ea;
    color: var(--hsk-green);
}

.hsk-lib-bdg-yr {
    background: #e8ddc5;
    color: #6a5d3c;
}

.hsk-lib-k-play {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--hsk-green);
    color: var(--hsk-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: 0.2s ease;
}

.hsk-lib-k-card:hover .hsk-lib-k-play {
    background: var(--hsk-gold);
    color: var(--hsk-green);
    transform: scale(1.08);
}

.hsk-lib-table-wrap {
    overflow-x: auto;
    border-radius: var(--hsk-radius);
    border: 1px solid var(--hsk-border);
}

.hsk-lib-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
    background: #fff;
}

.hsk-lib-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #77817c;
    background: var(--hsk-beige);
    border-bottom: 1px solid var(--hsk-border);
    white-space: nowrap;
}

.hsk-lib-table td {
    padding: 13px 14px;
    font-size: 13px;
    color: #39413d;
    border-bottom: 1px solid var(--hsk-border);
    vertical-align: middle;
}

.hsk-lib-table tr:hover td {
    background: #eef7f1;
}

.hsk-lib-ur {
    font-family: 'Noto Nastaliq Urdu', serif !important;
    direction: rtl;
    text-align: right;
    min-width: 220px;
    color: var(--hsk-green) !important;
    font-size: 15px !important;
    line-height: 2;
}

.hsk-lib-muted {
    color: #9a9a9a !important;
    font-size: 11px !important;
}

.hsk-lib-gold {
    color: var(--hsk-gold);
    font-size: 12px;
}

.hsk-lib-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 7px 12px;
    border-radius: var(--hsk-pill);
    text-decoration: none !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hsk-lib-pill-gr {
    background: var(--hsk-green);
    color: var(--hsk-gold) !important;
}

.hsk-lib-pill-go {
    background: var(--hsk-gold);
    color: var(--hsk-green) !important;
}

.hsk-lib-empty-td {
    text-align: center;
    padding: 40px !important;
    color: var(--hsk-muted) !important;
}

@media (max-width: 1024px) {
    .hsk-lib-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .hsk-lib-search-bar {
        flex-direction: column;
        border-radius: var(--hsk-radius);
    }

    .hsk-lib-search-btn {
        width: 100%;
    }

    .hsk-lib-topbar {
        align-items: flex-start;
    }

    .hsk-lib-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .hsk-lib-k-card-top {
        grid-template-columns: 100px 1fr;
    }

    .hsk-lib-k-thumb,
    .hsk-lib-k-thumb-ph {
        width: 100px;
    }

    .hsk-lib-tabs {
        width: 100%;
    }

    .hsk-lib-tab {
        flex: 1;
    }
}
