/* ============================================
   Urdu News - Dark Mode Only Theme
   WCAG 2.1 AA Compliant
   ============================================ */

:root {
    /* Dark Theme Colors - WCAG AA Compliant */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-hover: #252525;
    
    --text-primary: #e8e8e8;
    --text-secondary: #b8b8b8;
    --text-muted: #888888;
    
    --accent-primary: #4a9eff;
    --accent-hover: #6bb0ff;
    --accent-secondary: #7c3aed;
    
    --border-color: #2a2a2a;
    --border-hover: #3a3a3a;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.6);
    
    --font-urdu: 'Noto Nastaliq Urdu', serif;
    --font-size-base: 18px;
    --line-height-base: 1.8;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-urdu);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-urdu);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* ============================================
   Container & Layout
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* ============================================
   Navbar
   ============================================ */

.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-brand .site-title {
    font-size: 1.75rem;
    margin: 0;
    color: var(--text-primary);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu li a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu li a:hover {
    color: var(--accent-primary);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
}

.dropdown-menu li a:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
}

.search-icon a {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.search-icon a:hover {
    color: var(--accent-primary);
}

/* ============================================
   Hero Section
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 20px 20px;
}

.hero-content {
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Featured Slider
   ============================================ */

.featured-slider {
    margin-bottom: 3rem;
}

.slider-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.slide {
    display: none;
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
}

.slide.active {
    display: block;
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 2rem;
    color: var(--text-primary);
}

.slide-overlay h2 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.slide-overlay p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.slide-overlay a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent-primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.slide-overlay a:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   News Grid
   ============================================ */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-hover);
}

.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.news-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.news-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.news-card-title a {
    color: var(--text-primary);
}

.news-card-title a:hover {
    color: var(--accent-primary);
}

.news-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex: 1;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   Sidebar
   ============================================ */

.content-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-bottom: 3rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.widget-list {
    list-style: none;
}

.widget-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list li a {
    color: var(--text-secondary);
    display: block;
    transition: var(--transition);
}

.widget-list li a:hover {
    color: var(--accent-primary);
    padding-right: 0.5rem;
}

/* ============================================
   Single Post
   ============================================ */

.post-header {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.post-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.post-content {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.post-content a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.post-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.share-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    color: white;
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   Table of Contents
   ============================================ */

.toc {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.toc ul {
    list-style: none;
    padding-right: 1rem;
}

.toc ul li {
    margin-bottom: 0.75rem;
}

.toc ul li a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.toc ul li a:hover {
    color: var(--accent-primary);
    padding-right: 0.5rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-col p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent-primary);
    padding-right: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    padding: 0.75rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ============================================
   Cookie Consent
   ============================================ */

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    z-index: 10000;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-content p {
    margin: 0;
    flex: 1;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-urdu);
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-link {
    background: transparent;
    color: var(--accent-primary);
    text-decoration: underline;
}

/* ============================================
   Search
   ============================================ */

.search-container {
    max-width: 800px;
    margin: 2rem auto;
}

.search-box {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font-urdu);
    transition: var(--transition);
}

.search-box:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.search-results {
    margin-top: 2rem;
}

/* ============================================
   Pagination
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pagination .active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-xl);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .post-title {
        font-size: 1.75rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
}

/* ============================================
   Loading & Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card,
.sidebar-widget {
    animation: fadeIn 0.5s ease-out;
}

/* Lazy Loading Images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

