/* Pakistan1.com - Authoritative Bilingual Digital Media & Intelligence Super-Portal */
:root {
    --emerald: #005A32;
    --emerald-dark: #004225;
    --emerald-light: #E6F2EC;
    --slate: #0F172A;
    --slate-muted: #475569;
    --gold: #C9A227;
    --gold-soft: #FEF9E7;
    --bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --border: #E2E8F0;
    --text: #0F172A;
    --text-muted: #64748B;
    --danger: #DC2626;
    --success: #16A34A;
    --warning: #D97706;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --radius: 10px;
}

[data-theme="dark"] {
    --bg: #0B1120;
    --card-bg: #1E293B;
    --border: #334155;
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --emerald-light: #064E3B;
    --gold-soft: #422006;
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', Tahoma, sans-serif;
    line-height: 2.1;
}

a { color: var(--emerald); text-decoration: none; }
a:hover { text-decoration: underline; }
[data-theme="dark"] a { color: #34D399; }

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

/* Top Utility & Market Bar */
.market-bar {
    background: var(--slate);
    color: #F8FAFC;
    font-size: 0.82rem;
    border-bottom: 2px solid var(--gold);
    padding: 6px 0;
}
.market-bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.market-items {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}
.market-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #E2E8F0;
}
.market-pill strong { color: var(--gold); font-weight: 700; }
.market-pill .stale-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--warning); display: inline-block;
}
.market-meta { color: #94A3B8; font-size: 0.75rem; }

/* Header & Nav */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 12px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.45rem;
    color: var(--emerald);
    letter-spacing: -0.02em;
}
[data-theme="dark"] .brand { color: #34D399; }
.brand-badge {
    background: var(--emerald);
    color: #fff;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--gold);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.header-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    padding: 2px 6px 2px 12px;
}
.header-search input {
    border: none;
    background: transparent;
    padding: 4px 6px;
    font-size: 0.82rem;
    width: 135px;
    outline: none;
}
@media (max-width: 640px) {
    .header-search input { width: 95px; }
}
.header-search button {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px 6px;
    color: var(--text-muted);
    font-size: 0.88rem;
}
.btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-pill:hover { border-color: var(--emerald); text-decoration: none; }
.btn-emerald {
    background: var(--emerald);
    color: #fff !important;
    border-color: var(--emerald);
}
.btn-emerald:hover { background: var(--emerald-dark); }

/* Category Nav */
.main-nav {
    border-top: 1px solid var(--border);
    position: relative;
}
.nav-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
    align-items: center;
}
.nav-list > li > a,
.nav-more-btn {
    display: block;
    padding: 10px 11px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.nav-list > li > a:hover, .nav-list > li > a.active,
.nav-more-btn:hover {
    color: var(--emerald);
    border-bottom-color: var(--emerald);
    text-decoration: none;
}
[data-theme="dark"] .nav-list > li > a:hover,
[data-theme="dark"] .nav-list > li > a.active,
[data-theme="dark"] .nav-more-btn:hover {
    color: #34D399;
    border-bottom-color: #34D399;
}
.nav-more {
    position: relative;
}
.nav-more-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 190px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    z-index: 100;
}
html[dir="rtl"] .nav-more-menu {
    right: auto;
    left: 0;
}
.nav-more:hover .nav-more-menu,
.nav-more.open .nav-more-menu {
    display: block;
}
.nav-more-menu a {
    display: block;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.nav-more-menu a:hover {
    background: var(--emerald-light);
    color: var(--emerald);
    text-decoration: none;
}

/* Breaking News Ticker */
.ticker-bar {
    background: var(--emerald-light);
    border-bottom: 1px solid var(--border);
    padding: 7px 0;
    overflow: hidden;
}
.ticker-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ticker-label {
    background: var(--danger);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}
.ticker-track {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 600;
    flex: 1;
    padding-inline-end: 24px;
    -webkit-mask-image: linear-gradient(to right, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, black 92%, transparent 100%);
}
html[dir="rtl"] .ticker-track {
    -webkit-mask-image: linear-gradient(to left, black 92%, transparent 100%);
    mask-image: linear-gradient(to left, black 92%, transparent 100%);
}
.ticker-track::-webkit-scrollbar { display: none; }

/* Top Picks Sub-grid under Hero */
.top-picks-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 18px;
}
@media (min-width: 768px) {
    .top-picks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.top-pick-card {
    display: flex;
    flex-direction: column;
    padding: 14px;
}
.top-pick-card .article-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.top-pick-card h3 {
    margin: 6px 0 6px;
    font-size: 1rem;
    line-height: 1.4;
}
html[dir="rtl"] .top-pick-card h3 { line-height: 1.85; }

/* Clamped 3-line excerpt */
.card-excerpt {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Layout Grids */
.main-content { padding: 20px 0 40px; }
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 28px;
}
@media (min-width: 960px) {
    .hero-grid { grid-template-columns: 2fr 1fr; }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}
.hero-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.hero-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--emerald-dark), var(--slate));
}
.hero-body { padding: 20px; }
.badge-cat {
    display: inline-block;
    background: var(--emerald-light);
    color: var(--emerald);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 4px;
    margin-bottom: 8px;
}
[data-theme="dark"] .badge-cat { color: #34D399; }
.hero-title { margin: 0 0 10px; font-size: 1.55rem; line-height: 1.3; }
html[dir="rtl"] .hero-title { line-height: 1.85; }
.meta-line { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }

/* Prayer Widget */
.prayer-widget {
    border-top: 4px solid var(--emerald);
}
.prayer-widget-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.prayer-countdown-box {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    color: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.prayer-countdown-timer {
    font-size: 1.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--gold);
}
.prayer-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.prayer-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 10px;
    background: var(--bg);
    border-radius: 6px;
    font-size: 0.86rem;
    border: 1px solid var(--border);
}
.prayer-row.is-next {
    border-color: var(--gold);
    background: var(--gold-soft);
    font-weight: 700;
}

/* News Grids */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--emerald);
    padding-bottom: 6px;
    margin: 26px 0 16px;
    font-size: 1.15rem;
    font-weight: 800;
}
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.article-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s;
}
.article-card:hover { transform: translateY(-2px); }
.article-card h3 { margin: 6px 0 8px; font-size: 1.05rem; line-height: 1.4; }
html[dir="rtl"] .article-card h3 { line-height: 1.9; }

/* GEO Key Takeaways & FAQ */
.geo-summary-box {
    background: var(--emerald-light);
    border-inline-start: 4px solid var(--emerald);
    padding: 14px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-weight: 500;
}
.takeaways-box {
    background: var(--gold-soft);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 18px 0;
}
.takeaways-box h3 { margin: 0 0 8px; font-size: 1rem; color: var(--slate); }
[data-theme="dark"] .takeaways-box h3 { color: var(--gold); }
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.faq-q { font-weight: 700; margin-bottom: 4px; }

/* AdSense Reserved Slot */
.ad-slot {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 8px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin: 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table th, .data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: start;
}
.data-table th {
    background: var(--bg);
    font-weight: 700;
}
.table-scroll { overflow-x: auto; }

/* Forms & Inputs */
select, input[type="text"], input[type="password"], input[type="number"], input[type="url"], textarea {
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
}

/* Footer */
.site-footer {
    background: var(--slate);
    color: #CBD5E1;
    padding: 32px 0 20px;
    margin-top: 40px;
    border-top: 3px solid var(--gold);
    font-size: 0.88rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 20px;
}
.site-footer a { color: #E2E8F0; }

/* Print Styles for Prayer Calendar */
@media print {
    .market-bar, .site-header, .ticker-bar, .ad-slot, .site-footer, .no-print {
        display: none !important;
    }
    body { background: #fff; color: #000; }
    .card { box-shadow: none; border: 1px solid #ccc; }
}

/* Social Share Bar & Rich News Cards */
.share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0 18px;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.share-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-inline-end: 4px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff !important;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: opacity 0.15s, transform 0.15s;
}
.share-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.share-wa { background: #16A34A; }
.share-fb { background: #1877F2; }
.share-x  { background: #0F172A; }
[data-theme="dark"] .share-x { background: #334155; }
.share-li { background: #0A66C2; }
.share-copy {
    background: var(--card-bg);
    color: var(--text) !important;
    border: 1px solid var(--border);
}
.article-thumb {
    width: 100%;
    height: 175px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}
.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.desk-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--emerald-light);
    color: var(--emerald);
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
}
[data-theme="dark"] .desk-badge { color: #34D399; }

/* Mobile Header, Search Toggle & Single-Row Horizontal Swipe Nav */
.mobile-only-btn,
.mobile-only-cat,
.mobile-search-bar {
    display: none;
}
.mobile-search-bar.open {
    display: flex;
    gap: 8px;
    padding: 0 0 10px;
}
.mobile-search-bar input {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .site-header {
        position: static;
    }
    .header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 0;
        gap: 6px;
        flex-wrap: nowrap;
    }
    .brand {
        font-size: 0.96rem;
        gap: 6px;
        white-space: nowrap;
        letter-spacing: -0.02em;
    }
    .brand-badge {
        padding: 2px 7px;
        font-size: 0.78rem;
    }
    .header-actions {
        gap: 0.4rem;
        flex-wrap: nowrap;
    }
    .header-search,
    .hide-mobile,
    .nav-more {
        display: none !important;
    }
    .mobile-only-btn {
        display: inline-flex;
    }
    .mobile-only-cat {
        display: block;
    }
    .btn-pill {
        padding: 5px 9px;
        font-size: 0.78rem;
    }
    .nav-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.75rem;
        padding: 0.5rem 0.25rem;
        scrollbar-width: none;
    }
    .nav-list::-webkit-scrollbar {
        display: none;
    }
    .nav-list > li > a {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 0.85rem;
        padding: 4px 2px;
    }
}
