/* ==========================================================================
   HAX NEWS - Premium Modern News Portal Stylesheet
   Designed for High Visual Impact, Responsiveness, & Dainik Bhaskar Aesthetics
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Mukta:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --primary: #dc2626;
    --primary-hover: #b91c1c;
    --primary-dark: #991b1b;
    --primary-light: #fef2f2;
    --primary-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    
    /* Neutrals & Dark Tones */
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50:  #f8fafc;
    
    /* Text Hierarchy */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    
    /* Functional Colors */
    --whatsapp-green: #22c55e;
    --whatsapp-dark: #16a34a;
    --whatsapp-bg: #ecfdf5;
    --whatsapp-border: #a7f3d0;
    
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border-card: #e2e8f0;
    --border-subtle: #f1f5f9;
    
    /* Elevation Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 30px -10px rgba(0, 0, 0, 0.12);
    
    /* Typography */
    --font-hindi: 'Mukta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Outfit', 'Mukta', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Global Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-hindi);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   1. Top Utility Info Bar
   ========================================================================== */
.top-bar {
    background: linear-gradient(90deg, #090d16 0%, #111827 50%, #0f172a 100%);
    color: #cbd5e1;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 101;
}

.top-bar .container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.top-bar-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #94a3b8;
    font-size: 12px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-bar a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color var(--transition-fast);
}

.top-bar a:hover {
    color: #ffffff;
}

/* GPS Location Badge */
#locDetectBadge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 12px;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all var(--transition-fast);
    user-select: none;
}

#locDetectBadge:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.loc-pulse-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: locPulse 1.8s infinite;
}

@keyframes locPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==========================================================================
   2. Main Header
   ========================================================================== */
.main-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-card);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Logo Area */
.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
    transition: transform var(--transition-base);
}

.logo-area:hover .logo-badge {
    transform: rotate(8deg) scale(1.05);
}

.logo-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.5px;
}

.logo-title span {
    display: block;
    font-size: 10px;
    font-family: var(--font-sans);
    color: var(--slate-600);
    letter-spacing: 2.2px;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 3px;
}

/* Header Right Actions */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

/* Language Switch Pill */
.lang-switch-box {
    display: inline-flex;
    align-items: center;
    background: var(--slate-100);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-full);
    padding: 3px;
    font-size: 13px;
    font-weight: 700;
}

.lang-switch-box a {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-decoration: none;
    color: var(--slate-600);
    transition: all var(--transition-fast);
    font-size: 12px;
}

.lang-switch-box a.active {
    background: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* e-Paper Button */
.epaper-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--slate-800);
    border-radius: var(--radius-sm);
    color: var(--slate-900);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    background: #ffffff;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.epaper-btn:hover {
    background: var(--slate-900);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* WhatsApp Login / User Chip */
.wa-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff !important;
    border: none;
    border-radius: var(--radius-full);
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.28);
    white-space: nowrap;
}

.wa-login-btn:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.38);
}

.wa-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--slate-50);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-full);
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-900);
}

.wa-user-chip .logout-icon {
    color: #ef4444;
    text-decoration: none;
    padding-left: 6px;
    border-left: 1px solid var(--border-card);
    font-size: 12px;
}

/* Notification Bell */
.notif-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-card);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-700);
    text-decoration: none;
    font-size: 15px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.notif-btn:hover {
    background: var(--slate-50);
    border-color: var(--slate-400);
    color: var(--primary);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: var(--radius-full);
    border: 2px solid #ffffff;
    line-height: 1.2;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-full);
    padding: 5px 12px;
    background: var(--slate-50);
    transition: all var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    font-family: inherit;
    width: 130px;
    color: var(--text-primary);
    transition: width var(--transition-base);
}

.search-box input:focus {
    width: 170px;
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.search-box button:hover {
    color: var(--primary);
}

/* ==========================================================================
   3. Horizontal Category Navigation Bar
   ========================================================================== */
.category-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--border-card);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-container {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    padding: 0 16px;
    align-items: center;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 18px;
    color: var(--slate-700);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.category-link:hover {
    color: var(--primary);
    background: rgba(220, 38, 38, 0.03);
}

.category-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 800;
}

.category-link .cat-icon {
    font-size: 16px;
}

/* ==========================================================================
   4. Trending Topics Bar
   ========================================================================== */
.trending-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-card);
    padding: 8px 0;
}

.trending-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
}

.trending-container::-webkit-scrollbar {
    display: none;
}

.trending-label {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trending-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--slate-100);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-full);
    color: var(--slate-800);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.trending-pill:hover {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   5. Page Layout Grid
   ========================================================================== */
.page-container {
    max-width: 1240px;
    margin: 20px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(320px, 1fr);
    gap: 26px;
    flex: 1;
    width: 100%;
}

/* Generic Card */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

/* ==========================================================================
   6. News Feed & Cards (Dainik Bhaskar Style)
   ========================================================================== */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-card);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* Card Header Tag Row */
.card-header-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 10px;
}

.cat-tag {
    font-weight: 800;
    color: var(--slate-900);
    background: var(--slate-100);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.state-tag-top {
    color: var(--slate-500);
    font-weight: 600;
    font-size: 13px;
}

/* Card Body Row: Left Headline, Right Thumbnail */
.card-body-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.headline-area {
    flex: 1;
    min-width: 0;
}

.news-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.42;
    color: var(--slate-900);
    text-decoration: none;
    display: block;
    transition: color var(--transition-fast);
}

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

.news-title .red-text {
    color: var(--primary);
    font-weight: 800;
    margin-right: 5px;
}

.news-title .black-text {
    color: var(--slate-900);
    font-weight: 800;
}

.news-summary {
    font-size: 14px;
    color: var(--slate-600);
    margin-top: 8px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Thumbnail Box with Play Circle & Duration Badge */
.thumbnail-box {
    position: relative;
    width: 140px;
    height: 95px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.thumbnail-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.news-card:hover .thumbnail-box img {
    transform: scale(1.06);
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.news-card:hover .play-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.play-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.92);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    transition: transform var(--transition-fast);
}

.news-card:hover .play-circle {
    transform: scale(1.12);
}

.duration-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.2;
}

/* Bottom Action Bar */
.card-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
}

.action-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.state-pill {
    background: var(--slate-100);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    color: var(--slate-700);
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid var(--border-card);
    transition: all var(--transition-fast);
}

.state-pill:hover {
    background: #ffffff;
    color: var(--primary);
    border-color: var(--primary);
}

.time-ago-text {
    color: var(--text-muted);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* WhatsApp Share Button */
.share-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #065f46;
    background: var(--whatsapp-bg);
    border: 1px solid var(--whatsapp-border);
    font-weight: 700;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    transition: all var(--transition-fast);
}

.share-whatsapp:hover {
    background: var(--whatsapp-green);
    color: #ffffff;
    border-color: var(--whatsapp-green);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.share-more-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: all var(--transition-fast);
}

.share-more-btn:hover {
    background: var(--slate-100);
    color: var(--slate-900);
}

/* ==========================================================================
   7. Right Sidebar Section & Widgets
   ========================================================================== */
.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
    height: fit-content;
}

.widget-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-card);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.widget-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 8px;
}

.widget-title i {
    color: var(--primary);
}

/* Shorts / Reels Widget in Sidebar */
.shorts-reel-item {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    text-decoration: none;
    color: inherit;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.shorts-reel-item:hover {
    background: var(--slate-50);
}

.shorts-thumb {
    width: 70px;
    height: 98px;
    border-radius: 8px;
    background: #000;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.shorts-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.shorts-reel-item:hover .shorts-thumb img {
    transform: scale(1.08);
}

.shorts-title-sub {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--slate-900);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Reporter VIP Card */
.reporter-vip-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e293b 50%, #0f172a 100%);
    color: #ffffff;
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: 0 10px 25px -5px rgba(30, 58, 138, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.reporter-vip-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* ==========================================================================
   8. Mobile Bottom Navigation Bar (Dainik Bhaskar App Style)
   ========================================================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-card);
    z-index: 9999;
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.06);
}

.mobile-bottom-nav .nav-tabs {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.mobile-bottom-nav .nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--slate-500);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    gap: 3px;
    padding: 4px 12px;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.mobile-bottom-nav .nav-tab i {
    font-size: 18px;
}

.mobile-bottom-nav .nav-tab.active {
    color: var(--primary);
}

.mobile-bottom-nav .nav-tab:hover {
    color: var(--primary);
}

/* ==========================================================================
   9. Footer
   ========================================================================== */
footer {
    background: #090d16;
    color: #94a3b8;
    margin-top: auto;
    padding: 45px 0 25px;
    border-top: 3px solid var(--primary);
}

.footer-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
}

footer h4 {
    color: #ffffff;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 800;
}

footer a {
    color: #94a3b8;
    text-decoration: none;
    display: block;
    margin-bottom: 9px;
    font-size: 14px;
    transition: color var(--transition-fast);
}

footer a:hover {
    color: #ffffff;
    padding-left: 3px;
}

/* ==========================================================================
   10. Comprehensive Mobile & Desktop Responsive System
   ========================================================================== */

/* Universal Overflow & Media Protection */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* Tablet & Medium Screen Optimization (<= 992px) */
@media (max-width: 992px) {
    .page-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 14px auto;
        padding: 0 14px;
    }
    
    .sidebar-section {
        position: static;
        margin-top: 10px;
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px; /* Crucial: Prevents content from hiding under mobile bottom bar */
    }
    
    .mobile-bottom-nav {
        display: block;
    }
    
    /* Top Utility Bar */
    .top-bar-date {
        display: none;
    }
    .top-bar .container {
        padding: 0 12px;
    }
    #locDetectBadge {
        padding: 3px 10px;
        font-size: 11px;
    }
    
    /* Main Header */
    .main-header {
        position: sticky;
        top: 0;
        z-index: 999;
    }
    .header-container {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .logo-area {
        gap: 8px;
    }
    .header-logo-img {
        width: 38px !important;
        height: 38px !important;
        border-radius: 6px !important;
    }
    .logo-title span:first-child {
        font-size: 18px !important;
    }
    .logo-title span:last-child {
        font-size: 9.5px !important;
    }
    
    .header-right {
        gap: 8px;
    }
    .epaper-btn {
        display: none; /* Accessible in bottom nav & categories */
    }
    
    .lang-switch-box {
        padding: 2px;
    }
    .lang-switch-box a {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .notif-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .search-box {
        padding: 4px 10px;
    }
    .search-box input {
        width: 95px;
        font-size: 14px; /* Prevents auto-zoom on iOS */
    }
    .search-box input:focus {
        width: 125px;
    }
    
    /* Category Bar */
    .category-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .category-nav::-webkit-scrollbar {
        display: none;
    }
    .category-container {
        padding: 0 10px;
    }
    .category-link {
        padding: 10px 14px;
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Breaking News Ticker */
    .breaking-news-bar {
        padding: 6px 0;
        font-size: 12.5px;
    }
    .breaking-news-bar .container {
        padding: 0 10px;
        gap: 8px;
    }
    
    /* News Cards */
    .news-feed {
        gap: 12px;
    }
    .news-card {
        padding: 13px 14px;
        border-radius: 12px;
    }
    .card-header-tags {
        font-size: 11.5px;
        margin-bottom: 6px;
        gap: 6px;
    }
    .news-title {
        font-size: 16px;
        line-height: 1.38;
    }
    .news-summary {
        font-size: 13px;
        margin-top: 5px;
        -webkit-line-clamp: 2;
    }
    .thumbnail-box {
        width: 110px;
        height: 78px;
        border-radius: 8px;
    }
    .card-body-row {
        gap: 12px;
    }
    .card-action-bar {
        margin-top: 10px;
        padding-top: 8px;
        font-size: 12px;
        gap: 8px;
    }
    .share-whatsapp {
        padding: 4px 10px;
        font-size: 12px;
        min-height: 32px;
    }
    
    /* Footer */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 0 14px;
    }
}

/* Small Smartphone Optimization (<= 480px) */
@media (max-width: 480px) {
    .page-container {
        padding: 0 8px;
        margin: 8px auto;
    }
    
    .header-container {
        padding: 6px 8px;
        gap: 6px;
    }
    
    .logo-area {
        gap: 6px;
    }
    .header-logo-img {
        width: 34px !important;
        height: 34px !important;
    }
    .logo-title span:first-child {
        font-size: 16px !important;
    }
    .logo-title span:last-child {
        font-size: 8.5px !important;
    }
    
    .header-right {
        gap: 6px;
    }
    .search-box {
        padding: 3px 8px;
    }
    .search-box input {
        width: 75px;
    }
    .search-box input:focus {
        width: 110px;
    }
    
    .news-card {
        padding: 11px 11px;
        border-radius: 10px;
    }
    .news-title {
        font-size: 14.5px;
        line-height: 1.35;
    }
    .thumbnail-box {
        width: 92px;
        height: 68px;
        border-radius: 7px;
    }
    .news-summary {
        display: none; /* Clean compact app feel on small mobile */
    }
    .card-body-row {
        gap: 10px;
    }
    .play-circle {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .state-pill {
        padding: 2px 7px;
        font-size: 11px;
    }
    .time-ago-text {
        font-size: 11px;
    }
    .share-whatsapp {
        padding: 3px 8px;
        font-size: 11px;
    }
}

/* Desktop High-End Optimization (>= 1200px) */
@media (min-width: 1200px) {
    .page-container {
        max-width: 1240px;
        gap: 28px;
        margin: 24px auto;
    }
    .news-card {
        padding: 20px 22px;
    }
    .news-title {
        font-size: 19px;
    }
    .thumbnail-box {
        width: 150px;
        height: 102px;
    }
}
