/**
 * Pakistan Cities National Digital Encyclopedia Stylesheet
 * Bespoke Design: Midnight Slate & Royal Sapphire Palette,
 * Cinematic 3-Layer Blended Hero Header, Frosted Glass Cards,
 * and Responsive Topic Cluster Subpage UI.
 *
 * @package UrduCoverage
 */

/* ==========================================================================
   1. COLOR VARIABLES & BASE RESET
   ========================================================================== */
:root {
    --city-bg-dark: #070b12;
    --city-bg-slate: #0f172a;
    --city-card-bg: rgba(15, 23, 42, 0.78);
    --city-card-border: rgba(255, 255, 255, 0.08);
    --city-card-hover: rgba(30, 41, 59, 0.85);
    --city-sapphire: #1d4ed8;
    --city-sapphire-light: #38bdf8;
    --city-amber: #f59e0b;
    --city-amber-glow: rgba(245, 158, 11, 0.35);
    --city-emerald: #10b981;
    --city-text-light: #f8fafc;
    --city-text-muted: #94a3b8;
    --city-text-silver: #cbd5e1;
}

.cities-portal-wrapper {
    background-color: var(--city-bg-dark);
    color: var(--city-text-light);
    font-family: 'Noto Nastaliq Urdu', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    direction: rtl;
    text-align: right;
    padding-bottom: 60px;
    min-height: 100vh;
}

.cities-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 18px;
}

/* ==========================================================================
   2. BREADCRUMBS
   ========================================================================== */
.cities-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 0 20px;
    font-size: 14px;
    color: var(--city-text-muted);
}

.cities-breadcrumbs a {
    color: var(--city-sapphire-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cities-breadcrumbs a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.cities-breadcrumbs .sep {
    color: rgba(255, 255, 255, 0.3);
}

.cities-breadcrumbs .current {
    color: #ffffff;
    font-weight: bold;
}

/* ==========================================================================
   3. CINEMATIC 3-LAYER BLENDED HERO HEADER
   ========================================================================== */
.cities-blended-masthead {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #05080f;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    margin-bottom: 30px;
}

.cities-blended-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

/* Single full-width hero image for cities with 1 dedicated photo */
.cities-blended-canvas .slice-single-hero {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: brightness(0.65) contrast(1.15);
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 3 Overlapping slices with smooth feathered gradient masks */
.cities-blended-canvas .blend-slice {
    position: absolute;
    top: 0;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) contrast(1.15);
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cities-blended-masthead:hover .blend-slice {
    transform: scale(1.03);
}

.cities-blended-canvas .slice-heritage {
    right: 0;
    width: 48%;
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 100%);
}

.cities-blended-canvas .slice-center {
    left: 24%;
    width: 52%;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 75%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 75%, rgba(0,0,0,0) 100%);
}

.cities-blended-canvas .slice-culture {
    left: 0;
    width: 48%;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 100%);
}

/* Deep radial vignette overlay for 100% readable typography */
.cities-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.72) 0%, rgba(7, 11, 18, 0.92) 80%, rgba(5, 8, 15, 0.98) 100%);
    backdrop-filter: blur(2px);
    z-index: 2;
}

/* Hero Content Block */
.cities-hero-content {
    position: relative;
    z-index: 3;
    padding: 45px 30px 30px;
    text-align: center;
}

.cities-kicker-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 58, 138, 0.45);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #e0f2fe;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 50px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 18px;
}

.cities-title {
    font-size: 32px !important;
    line-height: 1.65 !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 0 12px !important;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.85);
    display: block !important;
    visibility: visible !important;
}

.cities-nickname-pill {
    display: inline-block;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fef08a;
    font-size: 15px;
    font-weight: 700;
    padding: 5px 18px;
    border-radius: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px var(--city-amber-glow);
}

.cities-deck {
    max-width: 880px;
    margin: 0 auto 30px;
    font-size: 16px;
    line-height: 2.1;
    color: var(--city-text-silver);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Macro Metrics Ribbon */
.cities-macro-ribbon {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    max-width: 1060px;
    margin: 0 auto;
}

.cities-macro-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.cities-macro-card:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.cities-macro-label {
    font-size: 12px;
    color: var(--city-text-muted);
    margin-bottom: 4px;
}

.cities-macro-val {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.5px;
}

.cities-macro-sub {
    font-size: 11px;
    color: var(--city-amber);
    margin-top: 2px;
}

/* ==========================================================================
   4. 2-LINE SUB-PAGE NAVIGATION BAR (TOPIC CLUSTER TABS)
   ========================================================================== */
.cities-subnav-container {
    margin-bottom: 35px;
    position: sticky;
    top: 65px;
    z-index: 40;
}

.cities-subnav-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 10px 14px;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.cities-nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    min-width: 110px;
}

.cities-nav-tab .tab-ur {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1.4;
}

.cities-nav-tab .tab-en {
    font-size: 10px;
    font-weight: 500;
    color: var(--city-text-muted);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.cities-nav-tab:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(56, 189, 248, 0.3);
}

.cities-nav-tab:hover .tab-ur {
    color: #ffffff;
}

.cities-nav-tab.is-active {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-color: #38bdf8;
    box-shadow: 0 4px 15px rgba(29, 78, 216, 0.4);
}

.cities-nav-tab.is-active .tab-ur {
    color: #ffffff;
}

.cities-nav-tab.is-active .tab-en {
    color: #bae6fd;
}

/* ==========================================================================
   5. CITY PILLAR & SUBPAGE CONTENT CARDS
   ========================================================================== */
.cities-section-card {
    background: var(--city-card-bg);
    border: 1px solid var(--city-card-border);
    border-radius: 18px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cities-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 18px;
    margin-bottom: 22px;
}

.cities-section-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.cities-section-title .icon {
    font-size: 24px;
}

.cities-section-badge {
    font-size: 12px;
    color: var(--city-sapphire-light);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
}

.cities-prose {
    font-size: 16px;
    line-height: 2.2;
    color: var(--city-text-silver);
}

.cities-prose p {
    margin-bottom: 18px;
}

/* Feature Grid for Pillars */
.cities-pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.cities-pillar-box {
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 22px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cities-pillar-box:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.cities-pillar-box h4 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cities-pillar-box p {
    font-size: 14px;
    line-height: 2.0;
    color: var(--city-text-muted);
    margin: 0 0 18px;
    flex-grow: 1;
}

.cities-pillar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--city-amber);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cities-pillar-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================================================================
   6. MASTER CITIES HUB & LEDGER TABLE
   ========================================================================== */
.cities-filter-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.cities-filter-btn {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--city-text-silver);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.cities-filter-btn:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
}

.cities-filter-btn.is-active {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(29, 78, 216, 0.4);
}

.cities-search-bar-wrap {
    max-width: 550px;
    margin: 0 auto 35px;
    position: relative;
}

.cities-search-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 12px 24px 12px 50px;
    color: #ffffff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.cities-search-input:focus {
    border-color: var(--city-sapphire-light);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.cities-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--city-text-muted);
    font-size: 18px;
    pointer-events: none;
}

/* Master Ledger Table */
.cities-table-responsive {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
}

.cities-ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: right;
}

.cities-ledger-table th {
    background: rgba(30, 41, 59, 0.9);
    color: #e2e8f0;
    padding: 14px 16px;
    font-weight: 700;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.cities-ledger-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--city-text-silver);
    vertical-align: middle;
}

.cities-ledger-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.5);
}

.cities-city-link {
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cities-city-link:hover {
    color: var(--city-sapphire-light);
}

.cities-btn-view {
    display: inline-block;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #bae6fd;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cities-btn-view:hover {
    background: var(--city-sapphire);
    color: #ffffff;
}

/* ==========================================================================
   7. FAQS ACCORDION / CARDS
   ========================================================================== */
.cities-faq-item {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 14px;
}

.cities-faq-q {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cities-faq-q .q-badge {
    color: var(--city-amber);
}

.cities-faq-a {
    font-size: 14px;
    line-height: 2.1;
    color: var(--city-text-silver);
    margin: 0;
}

/* ==========================================================================
   8. MOBILE RESPONSIVE ADAPTATIONS
   ========================================================================== */
@media (max-width: 768px) {
    .cities-title {
        font-size: 20px !important;
        line-height: 1.6 !important;
    }

    .cities-hero-content {
        padding: 30px 15px 20px;
    }

    .cities-deck {
        font-size: 14px;
        line-height: 2.0;
        margin-bottom: 20px;
    }

    .cities-macro-ribbon {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .cities-subnav-container {
        top: 50px;
    }

    .cities-subnav-bar {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .cities-nav-tab {
        min-width: 90px;
        padding: 6px 10px;
        flex-shrink: 0;
    }

    .cities-nav-tab .tab-ur {
        font-size: 12px;
    }

    .cities-section-card {
        padding: 20px 15px;
    }

    .cities-pillar-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   9. ENHANCED SUBPAGE SPOTLIGHT ITEMS & FACT GRIDS
   ========================================================================== */
.cities-spotlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin: 22px 0 10px;
}

.cities-spotlight-card {
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.cities-spotlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #f59e0b, #38bdf8);
    opacity: 0.6;
}

.cities-spotlight-card:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.cities-spotlight-card:hover::before {
    opacity: 1;
}

.cities-spotlight-title {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cities-spotlight-desc {
    font-size: 14px;
    line-height: 2.1;
    color: var(--city-text-silver);
    margin: 0 0 14px;
    flex-grow: 1;
}

.cities-spotlight-meta {
    font-size: 12px;
    color: var(--city-amber);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
}
