/**
 * Johar Santhal News - Professional Design
 * Inspired by YouTube, BBC News, Google News
 */

/* ========== CSS Variables ========== */
:root {
    /* Brand Colors */
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #ef4444;

    /* Accent */
    --accent-blue: #2563eb;
    --accent-green: #16a34a;
    --accent-orange: #ea580c;

    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-hover: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.08);

    /* Typography */
    --font-primary: 'Noto Sans Devanagari', 'Segoe UI', system-ui, sans-serif;
    --font-heading: 'Mukta', 'Noto Sans Devanagari', sans-serif;

    /* Sizing */
    --container-max: 1280px;
    --header-height: 64px;
    --topbar-height: 36px;
    --catbar-height: 48px;

    /* Effects */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --transition: 0.2s ease;
    --shadow-sm: 0 1px 2px var(--shadow-color);
    --shadow: 0 2px 8px var(--shadow-color);
    --shadow-lg: 0 8px 24px var(--shadow-color);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hover: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul,
ol {
    list-style: none;
}

/* ========== Container ========== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 16px;
}

/* ========== Top Bar ========== */
.top-bar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    height: var(--topbar-height);
    font-size: 0.8125rem;
}

.top-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.current-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.social-icons {
    display: flex;
    gap: 4px;
}

.social-icons a {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.social-icons a:hover {
    background: var(--primary);
    color: white;
}

/* ========== Main Header ========== */
.main-header {
    background: var(--bg-primary);
    height: auto;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Left logo, Right actions */
    gap: 24px;
    height: 100%;
}

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

.logo-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-text .site-name {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    /* Revert to primary color */
    line-height: 1.1;
    background: none;
    /* Remove capsule background */
    padding: 0;
    box-shadow: none;
}

.logo-text .tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    /* Revert to muted text */
    margin-top: 2px;
    font-weight: 600;
    padding-left: 0;
    letter-spacing: 0.5px;
}

/* Search Box */
.search-box {
    flex: 1;
    max-width: 500px;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    overflow: hidden;
    transition: var(--transition);
    margin: 0 24px;
}

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

.search-box input {
    flex: 1;
    border: none;
    background: none;
    padding: 10px 16px;
    font-size: 0.9375rem;
    color: var(--text-primary);
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    width: 44px;
    height: 40px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--border-color);
}

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

/* Search Wrapper (For Autocomplete) */
.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 500px;
    margin: 0 24px;
}

.search-wrapper .search-box {
    margin: 0;
    max-width: none;
}

/* Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    animation: suggestionsFadeIn 0.2s ease;
}

@keyframes suggestionsFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--bg-secondary);
}

.suggestion-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.suggestion-text {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-text mark {
    background: linear-gradient(120deg, #fef08a 0%, #fde047 100%);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.suggestion-category {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    color: white;
    flex-shrink: 0;
}

.suggestion-divider {
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.suggestion-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

.suggestion-loading i {
    margin-right: 8px;
}

/* Dark theme adjustments for suggestions */
[data-theme="dark"] .search-suggestions {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .suggestion-item:hover,
[data-theme="dark"] .suggestion-item.active {
    background: var(--bg-tertiary);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle .dark-icon {
    display: none;
}

.theme-toggle .light-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .dark-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .light-icon {
    display: none;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 140px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 100;
}

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

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: var(--bg-secondary);
}

.dropdown-menu a.active {
    color: var(--primary);
    font-weight: 600;
}

/* ========== Category Bar (YouTube Style) ========== */
.category-bar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    height: var(--catbar-height);
    position: relative;
}

.category-bar .container {
    position: relative;
    height: 100%;
}

.category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 8px 40px 8px 0;
    height: 100%;
    align-items: center;
    scroll-behavior: smooth;
}

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

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: var(--transition);
}

.cat-chip:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.cat-chip.active {
    background: #000000;
    color: #ffffff;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.cat-chip i {
    font-size: 0.75rem;
}

/* Scroll Buttons */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow);
    z-index: 10;
    opacity: 0;
    transition: var(--transition);
}

.category-bar:hover .scroll-btn {
    opacity: 1;
}

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

.scroll-left {
    left: 0;
}

.scroll-right {
    right: 0;
}

/* ========== Breaking News Bar ========== */
.breaking-bar {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 8px 0;
    overflow: hidden;
}

.breaking-bar .container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.breaking-badge {
    background: white;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ticker-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    animation: ticker 25s linear infinite;
    white-space: nowrap;
}

.ticker-content:hover {
    animation-play-state: paused;
}

.ticker-content a {
    font-size: 0.875rem;
    padding: 0 8px;
}

.ticker-content a:hover {
    text-decoration: underline;
}

.ticker-sep {
    opacity: 0.5;
    padding: 0 8px;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ========== Mobile Menu ========== */
.mobile-toggle {
    display: none;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    z-index: 2000;
    transition: 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.open {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-header .site-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

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

.mobile-menu-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
}

.mobile-menu-content a:hover {
    background: var(--bg-secondary);
}

.cat-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ========== Main Content ========== */
.main-content {
    min-height: calc(100vh - 200px);
}

/* ========== Hero Section ========== */
.hero-section {
    padding: 24px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    height: 380px;
    /* Reduced fixed height to match sidebar without views */
}

.hero-main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    /* Fill grid cell */
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    color: white;
}

.category-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.hero-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    color: white;
}

.hero-meta {
    font-size: 0.8125rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Hero Sidebar */
.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: opacity 0.3s ease-in-out;
    /* Smooth fade switch */
}

.hero-card {
    display: flex;
    gap: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.hero-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.hero-card .thumb {
    width: 100px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.hero-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card .info {
    flex: 1;
}

.hero-card .cat {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.hero-card h4 {
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.hero-card .time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Sidebar Animation State */
.hero-sidebar {
    transition: opacity 0.3s ease-in-out;
}

/* ========== Enhanced Hero Hover Effects ========== */
/* Hero Main - animated bottom border and zoom */
.hero-main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #ff6b6b 50%, var(--primary-light) 100%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.hero-main:hover::after {
    width: 100%;
}

.hero-main img {
    transition: transform 0.6s ease;
}

.hero-main:hover img {
    transform: scale(1.03);
}

.hero-content h1 {
    transition: color 0.3s ease;
}

.hero-main:hover .hero-content h1 {
    color: #ff6b6b;
}

/* Hero Card - animated left border and heading color */
.hero-card {
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius) 0 0 var(--radius);
}

.hero-card:hover::before {
    height: 100%;
}

.hero-card h4 {
    transition: color 0.3s ease;
}

.hero-card:hover h4 {
    color: var(--primary);
}

.hero-card .thumb img {
    transition: transform 0.4s ease;
}

.hero-card:hover .thumb img {
    transform: scale(1.08);
}


/* ========== News Grid ========== */
.section-block {
    padding: 32px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.section-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h2 i {
    color: var(--primary);
}

.see-all {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.see-all:hover {
    text-decoration: underline;
}

/* News Cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

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

.news-card .card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    /* Enforce standard video-like ratio */
    overflow: hidden;
}

.news-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.news-card .card-img {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.news-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 12px;
}

.news-card .card-overlay-title {
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.news-card:hover .card-img img {
    transform: scale(1.05);
}

.news-card .category-tag {
    position: absolute;
    top: 8px;
    left: 8px;
}

.news-card .card-body {
    padding: 14px;
}

.news-card h3 {
    font-size: 0.9375rem;
    line-height: 1.4;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

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

/* Enhanced news-card hover - animated bottom border */
.news-card {
    position: relative;
}

.news-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 var(--radius) var(--radius);
}

.news-card:hover::after {
    width: 100%;
}

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

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


.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Video Cards */
.video-card {
    position: relative;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(220, 38, 38, 0.9);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.video-card:hover .play-btn {
    transform: translate(-50%, -50%) scale(1.1);
}

/* ========== Trending Section ========== */
.trending-section {
    padding: 32px 0;
    background: var(--bg-primary);
}

.trending-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.trending-list {
    display: flex;
    flex-direction: column;
}

.trend-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.trend-item:hover {
    background: var(--bg-secondary);
    margin: 0 -12px;
    padding: 14px 12px;
    border-radius: var(--radius);
}

.trend-item:last-child {
    border-bottom: none;
}

.trend-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.trend-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trend-info h4 {
    font-size: 0.9375rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.trend-info .views {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-about .logo-text {
    margin-bottom: 16px;
}

.footer-about .site-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.footer-about .tagline {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-about p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links i {
    font-size: 0.75rem;
    color: var(--primary);
}

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

.footer-bottom i {
    color: var(--primary);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-box {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hero-card {
        flex: 1 1 calc(50% - 6px);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trending-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .top-bar {
        display: none;
    }

    .main-header .container {
        gap: 12px;
    }

    .logo {
        gap: 8px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .logo-text .site-name {
        font-size: 1rem;
        padding: 2px 10px;
    }

    /* Keep tagline visible but smaller if space allows, or hide if too cramped 
       User wanted tagline below, so let's try to keep it small */
    .logo-text .tagline {
        font-size: 0.65rem;
        margin-top: 2px;
        padding-left: 4px;
    }

    .header-actions {
        gap: 8px;
    }

    .search-form {
        display: none;
        /* Hide search input on mobile, maybe show only icon if needed, or rely on mobile menu */
    }

    .hero-card {
        flex: 1 1 100%;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 1.25rem;
    }
}

/* ========== Utility Classes ========== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

/* Load More Button */
.load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.load-more:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

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

/* Article Page Styles */
.article-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 32px;
    padding: 24px 0;
}

.article-main {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-header {
    padding: 24px 24px 0;
}

.article-header .category-tag {
    margin-bottom: 12px;
}

.article-header h1 {
    font-size: 1.75rem;
    line-height: 1.35;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-image {
    margin: 20px 0;
}

.article-image img {
    width: 100%;
    border-radius: var(--radius);
}

.article-content {
    padding: 0 24px 24px;
    font-size: 1.0625rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 16px;
}

.article-content a {
    color: var(--accent-blue);
    text-decoration: underline;
    font-weight: 500;
}

.article-content a:hover {
    color: var(--primary);
    text-decoration: none;
}

.article-content h2,
.article-content h3 {
    margin: 24px 0 12px;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

.article-share span {
    font-weight: 600;
    margin-right: 8px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    transition: var(--transition);
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.telegram {
    background: #0088cc;
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--catbar-height) + 20px);
}

.sidebar-widget {
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

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

.sidebar-list a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
}

.sidebar-list a:last-child {
    border-bottom: none;
}

.sidebar-list a:hover {
    color: var(--primary);
}

@media (max-width: 1024px) {
    .article-container {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
    }
}

@media (max-width: 480px) {
    .article-header h1 {
        font-size: 1.375rem;
    }

    .article-content {
        font-size: 1rem;
    }
}

/* ========== Catchy News Badges ========== */
.news-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: absolute;
    z-index: 10;
}

.news-badge.breaking {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
    animation: pulse 2s infinite;
    top: 8px;
    right: 8px;
}

.news-badge.trending {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #1e293b;
    top: 8px;
    right: 8px;
}

.news-badge.live {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    top: 8px;
    right: 8px;
}

.news-badge.live::before {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

.news-badge.exclusive {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    top: 8px;
    right: 8px;
}

.news-badge.viral {
    background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
    color: #1e293b;
    top: 8px;
    right: 8px;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Enhanced Card Hover Effects */
.news-card {
    position: relative;
}

.news-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-card:hover::after {
    transform: scaleX(1);
}

/* Hero Card Enhancements */
.hero-main .hero-item {
    position: relative;
    overflow: hidden;
}

.hero-main .hero-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: 5;
}

.hero-main .hero-item:hover::before {
    left: 100%;
}

/* Time Badges with Icons */
.time-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 4px;
    font-size: 0.75rem;
    color: white;
}

/* Category Pills with Gradient */
.category-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--cat-color, var(--primary)) 0%, color-mix(in srgb, var(--cat-color, var(--primary)) 80%, white) 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Shimmer Loading Effect */
.shimmer {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* View Count Badge */
.views-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.views-badge i {
    color: var(--primary);
}

/* Read Time Indicator */
.read-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 4px 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
}

/* Floating Action on Cards */
.card-action {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.news-card:hover .card-action {
    bottom: 16px;
    opacity: 1;
}

/* ========== Tabbed News Section (Like Reference) ========== */
.tabbed-news-section {
    background: var(--bg-primary);
    padding: 30px 0;
}

/* Tab Buttons */
.category-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

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

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    margin-bottom: -2px;
}

.tab-btn i {
    font-size: 1rem;
}

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

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

/* Tab Content */
.tab-content {
    min-height: 300px;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--primary);
}

/* News Item (Like Reference Image) */
.tab-news-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.tab-news-item:hover {
    background: var(--bg-secondary);
    margin: 0 -16px;
    padding: 16px;
}

.tab-news-item:last-child {
    border-bottom: none;
}

.tab-news-thumb {
    width: 140px;
    height: 95px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
}

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

.tab-news-item:hover .tab-news-thumb img {
    transform: scale(1.05);
}

.tab-news-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tab-news-info h4 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tab-news-excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tab-news-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Tab Footer */
.tab-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.see-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.see-all-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
}

/* Mobile Responsive Tabs */
@media (max-width: 768px) {
    .tab-btn {
        padding: 12px 16px;
        font-size: 0.875rem;
    }

    .tab-btn span {
        display: none;
    }

    .tab-btn i {
        font-size: 1.25rem;
    }

    .tab-news-thumb {
        width: 100px;
        height: 70px;
    }

    .tab-news-info h4 {
        font-size: 0.9375rem;
    }

    .tab-news-excerpt {
        display: none;
    }
}

/* Dark Theme for Tabs */
[data-theme="dark"] .category-tabs {
    border-color: var(--border-color);
}

[data-theme="dark"] .tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .tab-news-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* ========== Global Scroll Progress Bar ========== */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent-orange));
    z-index: 99999;
    transition: width 0.1s linear;
}

/* ========== Global News Card Hover Effects ========== */
/* Base transitions for all cards */
.hero-item,
.hero-thumb-item,
.sidebar-item,
.trend-item,
.tab-news-item,
.news-card-block,
.related-card,
.news-grid article,
[class*="news-card"] {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Enhanced hover - lift effect */
.hero-item:hover,
.hero-thumb-item:hover,
.news-card-block:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.sidebar-item:hover,
.trend-item:hover,
.tab-news-item:hover {
    transform: translateX(4px);
}

/* Image zoom on hover */
.hero-item img,
.hero-thumb-item img,
.news-card-block img,
.tab-news-item img,
.trend-item img,
.sidebar-item img {
    transition: transform 0.4s ease;
}

.hero-item:hover img,
.hero-thumb-item:hover img,
.news-card-block:hover img,
.tab-news-item:hover img,
.trend-item:hover img,
.sidebar-item:hover img {
    transform: scale(1.05);
}

/* ========== Article Action Buttons ========== */
.action-btn-lg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn-lg:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.action-btn-lg i {
    font-size: 1rem;
}

/* Reading state for TTS */
.action-btn-lg.reading {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
}

/* ========== For You Section ========== */
.for-you-section {
    padding: 32px 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.for-you-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.for-you-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.for-you-header h2 i {
    color: var(--primary);
}

.for-you-badge {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Reading History Section */
.history-section {
    padding: 32px 0;
}

.history-items {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
}

.history-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: var(--bg-primary);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.history-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.history-item .info {
    padding: 12px;
}

.history-item h4 {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.history-item .meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========== Responsive Design - Tablet (max-width: 1024px) ========== */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 16px;
    }

    .main-with-sidebar {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .sidebar {
        order: 2;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }

    .hero-grid {
        grid-template-columns: 1fr !important;
        height: auto !important;
        gap: 20px;
    }

    .hero-main {
        min-height: 280px;
        height: 280px;
    }

    .hero-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hero-main h1 {
        font-size: 1.4rem;
    }

    .search-wrapper {
        max-width: 350px;
        margin: 0 16px;
    }

    .logo-text .site-name {
        font-size: 1.3rem;
    }

    .logo-text .tagline {
        font-size: 0.65rem;
    }

    .logo-icon {
        width: 45px;
        height: 45px;
    }
}

/* ========== Responsive Design - Mobile (max-width: 768px) ========== */
@media screen and (max-width: 768px) {
    :root {
        --header-height: 60px;
        --topbar-height: 0px;
    }

    .container {
        padding: 0 12px;
    }

    /* Hide top bar on mobile */
    .top-bar {
        display: none;
    }

    /* Header adjustments */
    .main-header .container {
        padding: 0 12px;
    }

    .logo-link {
        gap: 8px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .logo-text .site-name {
        font-size: 1.1rem;
    }

    .logo-text .tagline {
        display: none;
    }

    /* Hide desktop search, show mobile menu toggle */
    .search-wrapper {
        display: none;
    }

    .header-actions .action-btn:not(.mobile-toggle) {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    /* Category bar */
    .category-bar {
        padding: 8px 0;
    }

    .cat-chip {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .scroll-btn {
        display: none;
    }

    /* Breaking news ticker */
    .breaking-ticker {
        padding: 8px 0;
    }

    .breaking-label {
        padding: 4px 10px;
        font-size: 0.65rem;
    }

    .ticker-content a {
        font-size: 0.8rem;
    }

    /* Hero section */
    .hero-section {
        padding: 16px 0;
    }

    .hero-grid {
        grid-template-columns: 1fr !important;
        height: auto !important;
        gap: 16px;
    }

    .hero-main {
        min-height: 200px;
        height: 200px;
        border-radius: var(--radius);
    }

    .hero-main h1 {
        font-size: 1.2rem;
        line-height: 1.4;
    }

    .hero-excerpt {
        display: none !important;
    }

    .hero-sidebar {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .hero-card {
        flex-direction: row;
        min-height: auto;
        padding: 10px;
        gap: 10px;
    }

    .hero-card .thumb {
        width: 90px;
        height: 65px;
        flex-shrink: 0;
    }

    .hero-card .thumb img {
        border-radius: var(--radius-sm);
    }

    .hero-card h4 {
        font-size: 0.85rem;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-card .time {
        font-size: 0.7rem;
    }

    /* News grid - single column on mobile */
    .news-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .news-card {
        flex-direction: row !important;
        gap: 12px;
        padding: 10px;
        border-radius: var(--radius);
    }

    .news-card .card-img {
        width: 110px !important;
        min-width: 110px;
        height: 80px;
        aspect-ratio: auto;
        flex-shrink: 0;
        border-radius: var(--radius-sm);
        overflow: hidden;
    }

    .news-card .card-img img {
        border-radius: var(--radius-sm);
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

    .news-card .card-body {
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1;
    }

    .news-card h3,
    .news-card .card-title {
        font-size: 0.9rem !important;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 4px;
    }

    .news-card .card-excerpt,
    .news-card .excerpt {
        display: none !important;
    }

    .news-card .card-footer,
    .news-card .card-meta {
        padding: 0;
        margin-top: 6px;
        border-top: none;
        font-size: 0.75rem;
    }

    /* Section headers */
    .section-header h2 {
        font-size: 1.1rem;
    }

    /* Article page */
    .article-header {
        padding: 20px 0;
    }

    .article-header h1 {
        font-size: 1.5rem;
        line-height: 1.4;
    }

    .article-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .article-content {
        font-size: 1rem;
        line-height: 1.8;
    }

    .article-content img {
        margin: 16px 0;
        border-radius: var(--radius-sm);
    }

    .share-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }

    .share-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    /* Action buttons */
    .action-btn-lg {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    /* Sidebar */
    .sidebar {
        margin-top: 24px;
    }

    .sidebar-widget {
        margin-bottom: 20px;
        padding: 16px;
    }

    .sidebar-news-item {
        padding: 12px 0;
    }

    .sidebar-news-item h4 {
        font-size: 0.85rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    /* Search page */
    .search-page {
        padding: 20px 0;
    }

    .search-result-card {
        flex-direction: column;
    }

    .search-result-card .result-image {
        width: 100%;
        height: 180px;
    }

    .search-result-card .result-content {
        padding: 16px;
    }

    .search-result-card h3 {
        font-size: 1rem;
    }

    /* Category page */
    .category-header {
        padding: 20px 0;
    }

    .category-header h1 {
        font-size: 1.5rem;
    }

    /* All news page */
    .all-news .filter-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }

    .filter-tab {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    /* Back to top button */
    #back-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }

    /* Reading history section */
    .history-items {
        gap: 12px;
    }

    .history-item {
        flex: 0 0 200px;
    }

    .history-item img {
        height: 100px;
    }

    /* For You section */
    .for-you-header h2 {
        font-size: 1.1rem;
    }

    /* Animations - reduce on mobile */
    * {
        animation-duration: 0.3s !important;
    }
}

/* ========== Responsive Design - Small Mobile (max-width: 480px) ========== */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .logo-text .site-name {
        font-size: 1rem;
    }

    .hero-main {
        min-height: 180px;
    }

    .hero-main h2 {
        font-size: 1.1rem;
    }

    .news-card .card-image {
        width: 100px;
        height: 75px;
    }

    .news-card h3 {
        font-size: 0.85rem;
    }

    .article-header h1 {
        font-size: 1.3rem;
    }

    .article-content {
        font-size: 0.95rem;
    }

    .share-btn {
        min-width: 100%;
    }

    .history-item {
        flex: 0 0 160px;
    }

    .cat-chip {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
}

/* ========== Print Styles ========== */
@media print {

    .top-bar,
    .main-header,
    .category-bar,
    .breaking-ticker,
    .sidebar,
    .footer,
    .mobile-menu,
    .overlay,
    #back-to-top,
    .share-buttons,
    .action-btn-lg {
        display: none !important;
    }

    .main-with-sidebar {
        display: block;
    }

    .article-content {
        max-width: 100%;
    }

    body {
        font-size: 12pt;
        line-height: 1.6;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* ========== Final UI Fixes & Mobile Refinements ========== */

/* 1. Custom Footer Links (Moved from inline) */
.custom-footer-link {
    display: inline-block;
    margin: 0 6px;
    padding: 6px 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.custom-footer-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 2. Close Button Fix */
.close-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 1.1rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. Mobile Specific Overrides */
@media screen and (max-width: 768px) {

    /* Fix Hero Grid on Mobile */
    .hero-grid {
        display: block !important;
        grid-template-columns: 1fr !important;
        height: auto !important;
    }

    .hero-main {
        height: 220px !important;
        margin-bottom: 20px !important;
    }

    /* Fix Sidebar Horizontal Alignment & Count */
    .hero-sidebar {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding: 0 !important;
        margin-top: 0 !important;
        gap: 12px !important;
    }

    .hero-sidebar .sidebar-item,
    .hero-sidebar .hero-card,
    .hero-sidebar .news-card {
        display: flex !important;
        width: 100% !important;
        margin-bottom: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    /* Fix Footer Buttons Layout */
    .footer-custom-links .container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .custom-footer-link {
        margin: 0;
        font-size: 0.75rem;
        padding: 6px 12px;
        flex: 0 0 auto;
    }

    /* Fix Page Overflow / Horizontal Scroll */
    body,
    html {
        overflow-x: hidden;
        width: 100%;
    }

    .container {
        max-width: 100%;
        overflow-x: hidden;
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Category Tabs - Show icons only, expand text on active */
    .category-tabs {
        justify-content: space-around;
        gap: 4px;
        padding: 0 8px;
    }

    .tab-btn {
        padding: 12px 10px;
        flex-direction: column;
        gap: 4px;
        font-size: 0.75rem;
        min-width: 50px;
    }

    .tab-btn span {
        display: none;
        font-size: 0.65rem;
        text-align: center;
        white-space: nowrap;
    }

    .tab-btn.active span {
        display: block;
    }

    .tab-btn i {
        font-size: 1.1rem;
    }

    /* Section Headers Mobile */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-header h2 {
        font-size: 1.1rem;
    }

    /* News Grid Mobile */
    .news-grid,
    .news-grid-block {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .news-card,
    .news-card-block {
        margin-bottom: 0;
    }

    /* Tab News Items Mobile */
    .tab-news-item {
        flex-direction: column;
        gap: 8px;
    }

    .tab-news-thumb {
        width: 100%;
        height: 160px;
    }

    .tab-news-info h4 {
        font-size: 0.95rem;
    }

    /* Article Page Mobile */
    .article-content {
        padding: 0 12px;
    }

    .article-content h1 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .article-content img {
        margin: 16px 0;
        border-radius: 8px;
    }

    /* Better Spacing */
    .section-block {
        padding: 20px 0;
    }

    /* Improved Card Thumbnails */
    .hero-card .thumb {
        width: 90px;
        height: 65px;
    }

    .hero-card .info h4 {
        font-size: 0.85rem;
        line-height: 1.3;
    }
}

/* Tablet Improvements */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        height: auto;
    }

    .hero-main {
        height: 280px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-tabs {
        justify-content: flex-start;
    }
}

/* ========== Enhanced Search Dropdown ========== */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestion-section {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.suggestion-section:last-child {
    border-bottom: none;
}

.section-label {
    display: block;
    padding: 8px 16px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-label i {
    margin-right: 6px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--bg-secondary);
}

.suggestion-icon {
    width: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.suggestion-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-text mark {
    background: rgba(220, 38, 38, 0.15);
    color: var(--primary);
    padding: 0 2px;
    border-radius: 2px;
}

.suggestion-category {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
}

.remove-recent {
    padding: 4px 8px;
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

.remove-recent:hover {
    opacity: 1;
    color: var(--primary);
}

/* Category Chips */
.category-chips .chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px 12px;
}

.category-chip {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.category-chip:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.suggestion-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

/* Trending Item Icon */
.trending-item .suggestion-icon {
    color: #f97316;
}