/* ============================================
   AL JAZEERA NEWS - MAIN STYLESHEET
   Theme: Deep Navy Blue + Crimson Red
   Fonts: Noto Nastaliq Urdu + Merriweather
   ============================================ */

:root {
    --primary:     #1a237e;   /* Deep navy blue */
    --primary-dark:#0d1654;
    --primary-light:#3949ab;
    --accent:      #c62828;   /* Crimson red */
    --accent-dark: #8e0000;
    --accent-light:#ef5350;
    --white:       #ffffff;
    --off-white:   #f5f5f5;
    --light-gray:  #eceff1;
    --mid-gray:    #b0bec5;
    --dark-gray:   #546e7a;
    --text-dark:   #1a1a2e;
    --text-body:   #2d3748;
    --text-muted:  #718096;
    --border:      #e2e8f0;
    --shadow-sm:   0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
    --shadow-md:   0 4px 6px rgba(0,0,0,.1), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg:   0 10px 25px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.08);
    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   12px;
    --transition:  0.3s ease;
}

/* ============ BASE RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Source Sans 3', sans-serif;
    color: var(--text-body);
    background: var(--off-white);
    line-height: 1.6;
}

/* RTL (Urdu) base */
body.rtl {
    font-family: 'Noto Nastaliq Urdu', 'Source Sans 3', sans-serif;
    direction: rtl;
    text-align: right;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
input, button, textarea, select { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}
.container-fluid { padding: 0 16px; }

/* ============ TYPOGRAPHY ============ */
.urdu-mode h1,
.urdu-mode h2,
.urdu-mode h3,
.urdu-mode h4,
.urdu-mode h5,
.urdu-mode .card-title,
.urdu-mode .news-title,
.urdu-mode .hero-title { font-family: 'Noto Nastaliq Urdu', serif; line-height: 1.8; }

.english-mode h1,
.english-mode h2,
.english-mode h3,
.english-mode .card-title,
.english-mode .news-title,
.english-mode .hero-title { font-family: 'Merriweather', serif; }

/* ============ BREAKING BAR ============ */
.breaking-bar {
    background: var(--accent);
    color: var(--white);
    padding: 7px 0;
    overflow: hidden;
    position: relative;
    z-index: 100;
}
.breaking-inner { display: flex; align-items: center; gap: 12px; }
.breaking-label {
    background: var(--accent-dark);
    padding: 2px 14px;
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: 1px;
    white-space: nowrap;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.ticker-wrap { overflow: hidden; flex: 1; }
.ticker-move {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
    gap: 20px;
}
.ticker-item { font-size: .88rem; font-weight: 500; color: #ffe; }
.ticker-item:hover { color: #fff; text-decoration: underline; }
.ticker-sep { color: #ffcc80; font-size: .7rem; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
.rtl .ticker-move { animation: ticker-rtl 30s linear infinite; }
@keyframes ticker-rtl { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ============ STICKY BAR (header + nav together) ============ */
.sticky-bar {
    position: sticky;
    top: 0;
    z-index: 999;
}

/* ============ HEADER ============ */
.site-header {
    background: var(--primary);
    box-shadow: var(--shadow-md);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    gap: 16px;
}

/* Logo image — responsive across all screen sizes */
.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.logo-img {
    display: block;
    height: 64px;          /* Desktop: tall enough to fill header comfortably */
    width: auto;           /* Keep original aspect ratio */
    max-width: 220px;      /* Never stretch too wide */
    object-fit: contain;
    object-position: left center;
}

/* Header Right */
.header-right { display: flex; align-items: center; gap: 10px; }
.header-date { color: rgba(255,255,255,0.75); font-size: .82rem; display: flex; align-items: center; gap: 5px; }
.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
    color: rgba(255,255,255,0.7);
    font-size: .8rem;
    font-weight: 600;
    padding: 3px 8px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.lang-btn.active,
.lang-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.lang-btn:first-child { font-family: 'Noto Nastaliq Urdu', serif; font-size: .9rem; }

.search-toggle, .nav-toggle {
    color: var(--white);
    font-size: 1.1rem;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.search-toggle:hover, .nav-toggle:hover { background: rgba(255,255,255,0.15); }
.nav-toggle { display: none; flex-direction: column; gap: 4px; width: 32px; height: 32px; justify-content: center; align-items: center; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Search Bar */
.search-bar-wrap {
    background: var(--primary-dark);
    padding: 10px 0;
    display: none;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.search-bar-wrap.open { display: block; }
.search-form { display: flex; gap: 8px; }
.search-input {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: var(--radius-md);
    font-size: 1rem;
}
.search-input::placeholder { color: rgba(255,255,255,0.5); }
.search-input:focus { outline: none; border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.15); }
.search-btn, .search-close {
    padding: 9px 16px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}
.search-btn { background: var(--accent); color: var(--white); }
.search-btn:hover { background: var(--accent-dark); }
.search-close { color: rgba(255,255,255,0.7); }
.search-close:hover { color: var(--white); }

/* ============ NAVIGATION ============ */
.main-nav {
    background: var(--white);
    border-bottom: 3px solid var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.nav-inner { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-list { display: flex; align-items: center; gap: 0; white-space: nowrap; }
.nav-item a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    position: relative;
}
.nav-item a:hover,
.nav-item.active a {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.rtl .nav-item a { padding: 12px 16px; }

/* ============ HERO / FEATURED ============ */
.hero-section { padding: 20px 0; background: var(--white); }
.hero-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.hero-main-card { position: relative; overflow: hidden; border-radius: var(--radius-md); }
.hero-main-card .card-img-wrap { position: relative; height: 420px; overflow: hidden; }
.hero-main-card .card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.hero-main-card:hover .card-img { transform: scale(1.03); }
.hero-main-card .card-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(10,10,40,.9));
    padding: 30px 20px 20px;
    color: var(--white);
}
.hero-main-card .category-badge {
    background: var(--accent);
    color: var(--white);
    font-size: .75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
    display: inline-block;
}
.hero-title {
    font-size: 1.55rem;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--white);
}
.hero-meta { font-size: .8rem; color: rgba(255,255,255,.75); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-meta i { margin-right: 3px; }

/* Side stack */
.hero-side { display: flex; flex-direction: column; gap: 10px; }
.hero-side-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px;
    background: var(--off-white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.hero-side-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.hero-side-card .side-img { width: 100px; height: 80px; object-fit: cover; flex-shrink: 0; }
.hero-side-card .side-content { padding: 8px 10px 8px 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.rtl .hero-side-card .side-content { padding: 8px 0 8px 10px; }
.hero-side-card .side-title { font-size: .87rem; font-weight: 700; line-height: 1.4; color: var(--text-dark); }
.hero-side-card .side-meta { font-size: .73rem; color: var(--text-muted); }

/* ============ SECTION HEADINGS ============ */
.section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
.section-heading h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-heading h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: var(--accent);
    border-radius: 2px;
}
.section-heading .view-all {
    margin-left: auto;
    font-size: .83rem;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}
.rtl .section-heading .view-all { margin-left: 0; margin-right: auto; }
.section-heading .view-all:hover { color: var(--accent-dark); }

/* ============ NEWS CARDS ============ */
.news-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.card-img-wrap { position: relative; overflow: hidden; height: 190px; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover .card-img { transform: scale(1.05); }
.card-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: var(--white);
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.rtl .card-category-badge { left: auto; right: 10px; }

.breaking-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff1744;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 3px;
    animation: blink 1.5s infinite;
}
.rtl .breaking-badge { right: auto; left: 10px; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:.4;} }

.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.urdu-mode .card-title { font-size: 1.05rem; line-height: 1.9; -webkit-line-clamp: 3; }
.card-title:hover { color: var(--accent); }
.card-excerpt {
    font-size: .85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    flex: 1;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: auto;
}
.card-author { display: flex; align-items: center; gap: 4px; font-weight: 600; color: var(--primary); }
.card-date { display: flex; align-items: center; gap: 4px; }
.card-views { display: flex; align-items: center; gap: 3px; }

/* News grid layouts */
.news-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.news-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ============ HOME PAGE SECTIONS ============ */
.home-section { padding: 28px 0; }
.home-section.bg-white { background: var(--white); }

/* Latest + Sidebar layout */
.content-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.rtl .content-sidebar { }

/* ============ SIDEBAR ============ */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.widget-heading {
    background: var(--primary);
    color: var(--white);
    padding: 10px 16px;
    font-size: .95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-body { padding: 12px; }

/* Popular/Recent widget */
.widget-news-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    align-items: center;
}
.widget-news-item:last-child { border-bottom: none; }
.widget-rank {
    background: var(--accent);
    color: var(--white);
    min-width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 800;
    flex-shrink: 0;
}
.widget-news-img { width: 60px; height: 50px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.widget-news-title { font-size: .82rem; font-weight: 600; line-height: 1.5; color: var(--text-dark); }
.urdu-mode .widget-news-title { font-size: .85rem; line-height: 1.8; }
.widget-news-title:hover { color: var(--accent); }
.widget-news-date { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

/* Tags widget */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; }
.tag-pill {
    background: var(--light-gray);
    color: var(--dark-gray);
    font-size: .78rem;
    padding: 4px 10px;
    border-radius: 20px;
    transition: var(--transition);
    border: 1px solid var(--border);
}
.tag-pill:hover { background: var(--accent); color: var(--white); border-color: var(--accent); }

/* ============ TRENDING STRIP ============ */
.trending-strip {
    background: var(--primary);
    padding: 12px 0;
    color: var(--white);
}
.trending-inner { display: flex; align-items: center; gap: 16px; overflow-x: auto; scrollbar-width: none; }
.trending-inner::-webkit-scrollbar { display: none; }
.trending-label { font-size: .8rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; color: #ffcc80; }
.trending-items { display: flex; gap: 10px; white-space: nowrap; }
.trending-item {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    font-size: .83rem;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: var(--transition);
}
.trending-item:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.trending-num { color: var(--accent-light); font-weight: 700; margin-right: 5px; }
.rtl .trending-num { margin-right: 0; margin-left: 5px; }

/* ============ NEWS LIST PAGE ============ */
.page-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 28px 0 20px;
    position: relative;
    overflow: hidden;
}
.page-banner::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 4px;
    background: var(--accent);
}
.page-banner h1 { font-size: 1.9rem; margin-bottom: 4px; }
.page-banner .breadcrumb { font-size: .83rem; color: rgba(255,255,255,.75); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.page-banner .breadcrumb a { color: rgba(255,255,255,.75); }
.page-banner .breadcrumb a:hover { color: #fff; }

/* Filters bar */
.filters-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 60px;
    z-index: 90;
    box-shadow: var(--shadow-sm);
}
.filters-inner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-label { font-size: .8rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.filter-select, .filter-input {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    color: var(--text-dark);
    background: var(--off-white);
    min-width: 120px;
}
.filter-select:focus, .filter-input:focus { outline: none; border-color: var(--primary); }
.filter-btn {
    background: var(--accent);
    color: var(--white);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 600;
    transition: var(--transition);
}
.filter-btn:hover { background: var(--accent-dark); }
.filter-reset {
    background: var(--light-gray);
    color: var(--dark-gray);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: .83rem;
    font-weight: 600;
    transition: var(--transition);
}
.filter-reset:hover { background: var(--border); }

/* Results count */
.results-info { font-size: .85rem; color: var(--text-muted); padding: 10px 0; }
.results-info strong { color: var(--text-dark); }

/* ============ PAGINATION ============ */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.page-btn {
    min-width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--white);
    transition: var(--transition);
    cursor: pointer;
    padding: 0 10px;
}
.page-btn:hover, .page-btn.active { background: var(--accent); color: var(--white); border-color: var(--accent); }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ============ NEWS DETAIL PAGE ============ */
.news-detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 28px; padding: 30px 0; }
.news-detail-main {}

.news-detail-header { margin-bottom: 20px; }
.detail-category { display: inline-block; background: var(--accent); color: var(--white); font-size: .78rem; font-weight: 700; padding: 3px 12px; border-radius: 3px; margin-bottom: 12px; }
.detail-title { font-size: 1.8rem; line-height: 1.4; color: var(--text-dark); margin-bottom: 14px; }
.urdu-mode .detail-title { font-size: 1.7rem; line-height: 1.9; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-muted); font-size: .83rem; padding-bottom: 14px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.detail-meta-item { display: flex; align-items: center; gap: 5px; }
.detail-meta-item i { color: var(--accent); }
.detail-author-link { color: var(--primary); font-weight: 600; }
.detail-author-link:hover { color: var(--accent); }

.detail-banner { border-radius: var(--radius-md); overflow: hidden; margin-bottom: 20px; max-height: 500px; }
.detail-banner img { width: 100%; height: 100%; object-fit: cover; }
.detail-banner-caption { font-size: .78rem; color: var(--text-muted); padding: 6px 0 0; font-style: italic; }

.detail-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-body);
}
.urdu-mode .detail-content { font-size: 1.1rem; line-height: 2.2; }
.detail-content p { margin-bottom: 16px; }
.detail-content h2, .detail-content h3 { color: var(--primary); margin: 20px 0 10px; }
.detail-content img { border-radius: var(--radius-md); margin: 16px 0; }
.detail-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 12px 20px;
    background: var(--off-white);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 20px 0;
    font-style: italic;
    color: var(--dark-gray);
}
.rtl .detail-content blockquote { border-left: none; border-right: 4px solid var(--accent); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }

.detail-side-image { float: right; margin: 0 0 16px 20px; max-width: 280px; border-radius: var(--radius-md); overflow: hidden; }
.rtl .detail-side-image { float: left; margin: 0 20px 16px 0; }
.detail-side-image img { width: 100%; }

.detail-tags { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail-tags-label { font-size: .85rem; font-weight: 700; color: var(--text-dark); margin-right: 4px; }

/* Share buttons */
.share-bar { display: flex; gap: 8px; align-items: center; margin-top: 20px; padding: 14px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.share-label { font-size: .85rem; font-weight: 700; color: var(--text-dark); }
.share-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--white);
    transition: var(--transition);
}
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter  { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.copy     { background: var(--dark-gray); }
.share-btn:hover    { opacity: .85; }

/* Related news */
.related-section { padding-top: 24px; margin-top: 24px; border-top: 2px solid var(--border); }

/* ============ BLOGS PAGE ============ */
.blog-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.blog-card .card-img-wrap { height: 220px; }
.blog-card .card-body { padding: 18px; }
.blog-card .card-title { font-size: 1.1rem; -webkit-line-clamp: 3; }
.blog-card .card-excerpt { font-size: .88rem; -webkit-line-clamp: 3; }
.read-more-link { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: .85rem; font-weight: 600; margin-top: 8px; transition: var(--transition); }
.read-more-link:hover { color: var(--accent-dark); gap: 8px; }

/* ============ ABOUT PAGE ============ */
.about-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, var(--accent) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}
.about-hero h1 { font-size: 2.5rem; margin-bottom: 12px; }
.about-hero p { font-size: 1.1rem; opacity: .85; max-width: 600px; margin: 0 auto; }
.about-content { padding: 50px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-img { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-text h2 { font-size: 1.6rem; color: var(--primary); margin-bottom: 14px; }
.about-text p { font-size: .97rem; line-height: 1.8; color: var(--text-body); margin-bottom: 14px; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 30px 0; }
.value-card { text-align: center; padding: 24px 16px; background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.value-icon { font-size: 2rem; color: var(--accent); margin-bottom: 10px; }
.value-card h3 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.value-card p { font-size: .85rem; color: var(--text-muted); }

/* ============ CONTACT PAGE ============ */
.contact-section { padding: 50px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h2 { font-size: 1.6rem; color: var(--primary); margin-bottom: 16px; }
.contact-info p { color: var(--text-muted); line-height: 1.8; margin-bottom: 20px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.contact-item-icon { background: var(--primary); color: var(--white); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .9rem; }
.contact-item-text h4 { font-weight: 700; color: var(--text-dark); margin-bottom: 2px; font-size: .93rem; }
.contact-item-text p { font-size: .87rem; color: var(--text-muted); margin: 0; }
.contact-form-box { background: var(--white); padding: 30px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.contact-form-box h2 { font-size: 1.4rem; color: var(--primary); margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-dark); margin-bottom: 5px; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .93rem;
    color: var(--text-dark);
    background: var(--off-white);
    transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(26,35,126,.08); }
textarea.form-control { min-height: 120px; resize: vertical; }
.btn-submit {
    background: var(--accent);
    color: var(--white);
    padding: 11px 28px;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .5px;
    transition: var(--transition);
    width: 100%;
}
.btn-submit:hover { background: var(--accent-dark); }
.form-msg { padding: 10px 14px; border-radius: var(--radius-sm); font-size: .87rem; margin-top: 12px; display: none; }
.form-msg.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; display: block; }
.form-msg.error   { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; display: block; }

/* ============ FOOTER ============ */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.8); margin-top: 40px; }
.footer-top { padding: 40px 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 30px; }
.footer-heading { color: var(--white); font-size: 1rem; font-weight: 700; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); display: inline-block; }
.footer-desc { font-size: .87rem; line-height: 1.7; margin-bottom: 16px; color: rgba(255,255,255,.65); }
.social-links { display: flex; gap: 10px; }
.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    transition: var(--transition);
    color: var(--white);
}
.social-link.whatsapp { background: #64ea3b; }
.social-link.facebook { background: #1877f2; }
.social-link.twitter  { background: #1da1f2; }
.social-link.youtube  { background: #ff0000; }
.social-link.instagram{ background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-link:hover    { transform: scale(1.15); opacity: .9; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: .86rem; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 6px; transition: var(--transition); }
.footer-links a:hover { color: var(--white); padding-left: 4px; }
.rtl .footer-links a:hover { padding-left: 0; padding-right: 4px; }
.footer-links i { font-size: .7rem; color: var(--accent-light); }
.newsletter-form { display: flex; gap: 6px; margin: 10px 0 16px; }
.newsletter-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.08);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: .85rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form input:focus { outline: none; border-color: rgba(255,255,255,.4); }
.newsletter-form button { background: var(--accent); color: var(--white); padding: 8px 14px; border-radius: var(--radius-sm); font-size: .83rem; font-weight: 700; transition: var(--transition); white-space: nowrap; }
.newsletter-form button:hover { background: var(--accent-dark); }
.footer-contact-info { display: flex; flex-direction: column; gap: 6px; }
.footer-contact-info p { font-size: .83rem; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: 8px; }
.footer-contact-info i { color: var(--accent-light); width: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.copyright { font-size: .82rem; color: rgba(255,255,255,.5); }
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { font-size: .82rem; color: rgba(255,255,255,.5); transition: var(--transition); }
.footer-bottom-links a:hover { color: var(--white); }

/* ============ BACK TO TOP ============ */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--accent);
    color: var(--white);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 500;
}
.rtl .back-to-top { right: auto; left: 24px; }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--accent-dark); transform: translateY(-3px); }

/* ============ LOADING / SKELETON ============ */
.skeleton { background: linear-gradient(90deg, #e8eaed 25%, #f4f5f7 50%, #e8eaed 75%); background-size: 200% 100%; animation: skeleton-wave 1.5s infinite; border-radius: 4px; }
@keyframes skeleton-wave { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }
.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 40px;
}
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ NO RESULTS ============ */
.no-results { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.no-results i { font-size: 3rem; color: var(--mid-gray); margin-bottom: 14px; }
.no-results h3 { font-size: 1.2rem; color: var(--text-dark); margin-bottom: 8px; }
.no-results p { font-size: .9rem; }

/* ============ ADMIN LOGIN ============ */
.admin-login-wrap {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.admin-login-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.admin-login-logo { text-align: center; margin-bottom: 28px; }
.admin-login-box h2 { font-size: 1.4rem; color: var(--primary); text-align: center; margin-bottom: 24px; font-weight: 800; }

/* ============ ADMIN DASHBOARD ============ */
.admin-body { background: #f0f2f5; min-height: 100vh; }
.admin-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 240px;
    background: var(--primary-dark);
    color: var(--white);
    z-index: 200;
    overflow-y: auto;
    transition: var(--transition);
}
.admin-sidebar-logo { padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-nav { padding: 10px 0; }
.admin-nav-group { padding: 0; margin-bottom: 4px; }
.admin-nav-title { font-size: .7rem; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.35); padding: 10px 18px 4px; font-weight: 700; }
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: rgba(255,255,255,.7);
    font-size: .88rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
.admin-nav-link:hover, .admin-nav-link.active { color: var(--white); background: rgba(255,255,255,.08); border-left-color: var(--accent); }
.admin-nav-link i { width: 18px; text-align: center; font-size: .95rem; }
.admin-main {
    margin-left: 240px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.admin-topbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-topbar h1 { font-size: 1.1rem; font-weight: 700; color: var(--text-dark); }
.admin-topbar-right { display: flex; align-items: center; gap: 16px; }
.admin-user-badge { display: flex; align-items: center; gap: 8px; font-size: .87rem; color: var(--text-muted); }
.admin-user-badge i { color: var(--primary); }
.admin-logout { color: var(--accent); font-size: .87rem; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.admin-logout:hover { color: var(--accent-dark); }
.admin-content { flex: 1; padding: 24px; }

/* Stats cards */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--white); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 52px; height: 52px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.stat-icon.blue   { background: #e3f2fd; color: var(--primary); }
.stat-icon.red    { background: #ffebee; color: var(--accent); }
.stat-icon.green  { background: #e8f5e9; color: #2e7d32; }
.stat-icon.orange { background: #fff3e0; color: #e65100; }
.stat-value { font-size: 1.7rem; font-weight: 800; color: var(--text-dark); line-height: 1.2; }
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* Admin table */
.admin-card { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 20px; }
.admin-card-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.admin-card-title { font-size: 1rem; font-weight: 700; color: var(--text-dark); display: flex; align-items: center; gap: 8px; }
.admin-card-title i { color: var(--accent); }
.btn-add { background: var(--accent); color: var(--white); padding: 7px 16px; border-radius: var(--radius-sm); font-size: .83rem; font-weight: 600; display: flex; align-items: center; gap: 6px; transition: var(--transition); }
.btn-add:hover { background: var(--accent-dark); }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: var(--off-white); padding: 10px 14px; font-size: .78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 11px 14px; font-size: .87rem; color: var(--text-dark); border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--off-white); }
.admin-table .thumb { width: 50px; height: 40px; object-fit: cover; border-radius: var(--radius-sm); }
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.status-badge.published { background: #e8f5e9; color: #2e7d32; }
.status-badge.draft     { background: #fff3e0; color: #e65100; }
.status-badge.archived  { background: var(--light-gray); color: var(--dark-gray); }
.featured-badge { background: #e3f2fd; color: var(--primary); }
.breaking-badge-sm { background: #ffebee; color: var(--accent); }
.trending-badge { background: #d9f1b6; color: #2e7d32; }
.trending-badge { background: #d9f1b6; color: #2e7d32; }
.action-btns { display: flex; gap: 6px; align-items: center; }
.action-btn { padding: 5px 10px; border-radius: var(--radius-sm); font-size: .78rem; font-weight: 600; transition: var(--transition); display: flex; align-items: center; gap: 4px; }
.action-btn.edit   { background: #e3f2fd; color: var(--primary); }
.action-btn.edit:hover { background: var(--primary); color: var(--white); }
.action-btn.delete { background: #ffebee; color: var(--accent); }
.action-btn.delete:hover { background: var(--accent); color: var(--white); }
.action-btn.view { background: #f3e5f5; color: #7b1fa2; }
.action-btn.view:hover { background: #7b1fa2; color: var(--white); }

/* Admin form */
.admin-form { padding: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.single { grid-template-columns: 1fr; }
.admin-form .form-group { margin-bottom: 0; }
.admin-form label { font-size: .83rem; font-weight: 700; color: var(--text-dark); margin-bottom: 5px; display: block; }
.admin-form .form-control { border: 1px solid var(--border); background: var(--white); padding: 9px 12px; }
.checkbox-group { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.checkbox-item { display: flex; align-items: center; gap: 6px; font-size: .87rem; }
.checkbox-item input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.image-preview { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); margin-top: 6px; display: none; }
.image-preview.show { display: block; }
.btn-save { background: var(--primary); color: var(--white); padding: 10px 24px; border-radius: var(--radius-sm); font-size: .93rem; font-weight: 700; transition: var(--transition); }
.btn-save:hover { background: var(--primary-dark); }
.btn-cancel { background: var(--light-gray); color: var(--dark-gray); padding: 10px 20px; border-radius: var(--radius-sm); font-size: .93rem; font-weight: 600; transition: var(--transition); }
.btn-cancel:hover { background: var(--border); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; pointer-events: none; transition: var(--transition); }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal { background: var(--white); border-radius: var(--radius-lg); padding: 28px; max-width: 540px; width: 100%; box-shadow: var(--shadow-lg); transform: scale(.9); transition: var(--transition); }
.modal-overlay.open .modal { transform: scale(1); }
.modal-title { font-size: 1.15rem; font-weight: 800; color: var(--text-dark); margin-bottom: 14px; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
    .news-grid-4 { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .content-sidebar { grid-template-columns: 1fr; }
    .news-detail-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .news-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .logo-img { height: 54px; max-width: 190px; }
}

@media (max-width: 680px) {
    .news-grid-4, .news-grid-3, .news-grid-2 { grid-template-columns: 1fr 1fr; gap: 12px; }
    .hero-side { grid-template-columns: 1fr; }
    .hero-main-card .card-img-wrap { height: 260px; }
    .hero-title { font-size: 1.2rem; }
    .detail-title { font-size: 1.35rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .filters-inner { gap: 8px; }
    .filter-select, .filter-input { min-width: 100px; }
    .header-date { display: none; }
    .nav-toggle { display: flex; }
    .logo-img { height: 46px; max-width: 160px; }

    /* Mobile nav: floating dropdown anchored to bottom of header */
    .main-nav {
        position: fixed !important;
        top: auto !important;
        /* JS will set top dynamically via data attribute */
        left: 0;
        right: 0;
        z-index: 997;
        display: none;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 8px 32px rgba(0,0,0,0.22);
        border-top: 3px solid var(--accent);
    }
    .main-nav.mobile-open {
        display: block;
    }
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        white-space: normal;
    }
    .nav-item { width: 100%; }
    .nav-item a {
        border-bottom: 1px solid var(--border);
        border-right: none;
        padding: 13px 20px;
        font-size: .95rem;
    }
    .nav-item:last-child a { border-bottom: none; }
    .values-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .page-banner h1 { font-size: 1.4rem; }
    .about-hero h1 { font-size: 1.8rem; }
}

@media (max-width: 420px) {
    .news-grid-4, .news-grid-3, .news-grid-2 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .hero-main-card .card-img-wrap { height: 220px; }
    .logo-img { height: 38px; max-width: 130px; }
}

/* ============ UTILITY ============ */
.text-accent  { color: var(--accent); }
.text-primary { color: var(--primary); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-10       { gap: 10px; }
.mb-0  { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.py-20 { padding: 20px 0; }
.py-30 { padding: 30px 0; }
.hidden { display: none !important; }

/* Print */
@media print { .site-header, .main-nav, .breaking-bar, .sidebar, .site-footer, .share-bar, .back-to-top { display: none !important; } .news-detail-grid { grid-template-columns: 1fr; } }

/* ============ ADMIN EXTENDED STYLES ============ */

/* Admin Pagination */
.admin-pagination { display: flex; gap: 6px; padding: 14px 18px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--border); }
.admin-page-btn { padding: 5px 11px; border-radius: var(--radius-sm); font-size: .83rem; font-weight: 600; color: var(--text-dark); background: var(--off-white); border: 1px solid var(--border); transition: var(--transition); }
.admin-page-btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }
.admin-page-btn.active { background: var(--accent); color: var(--white); border-color: var(--accent); }

/* Urdu input fields */
.urdu-input { font-family: 'Noto Nastaliq Urdu', 'Noto Sans Arabic', serif !important; direction: rtl; text-align: right; line-height: 2.2; }

/* Admin two-col responsive */
@media (max-width: 900px) {
    .admin-two-col { grid-template-columns: 1fr !important; }
}
@media (max-width: 580px) {
    .admin-content { padding: 14px; }
    .admin-topbar { padding: 0 14px; }
    .admin-topbar h1 { font-size: .95rem; }
}


.btn-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all var(--transition-normal);
}
