/* --- Import Font --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* --- Category Colors --- */
:root {
    --category-world-updates: #e53935;
    --category-tech: #1e88e5;
    --category-entertainment: #fb8c00;
    --category-schemes: #43a047;
    --category-exams: #ffb300;
    --category-tips: #8e24aa;
}

/* --- Theme Variables --- */
:root {
    --primary-color-light: #e53935; --primary-dark-light: #c62828;
    --background-color-light: #f8f9fa; --text-color-light: #212529;
    --muted-text-color-light: #6c757d; --card-bg-light: #ffffff;
    --header-footer-bg-light: #ffffff; --border-color-light: #e9ecef;
    --card-shadow-light: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    --card-hover-shadow-light: 0 10px 25px rgba(0, 0, 0, 0.1), 0 5px 10px rgba(0, 0, 0, 0.05);
    --header-shadow-light: 0 2px 8px rgba(0, 0, 0, 0.04);

    --primary-color-dark: #ff5252; --primary-dark-dark: #ff6e6e;
    --background-color-dark: #121212; --text-color-dark: #f8f9fa;
    --muted-text-color-dark: #adb5bd; --card-bg-dark: #1e1e1e;
    --header-footer-bg-dark: #1a1a1a; --border-color-dark: #333;
    --card-shadow-dark: 0 5px 18px rgba(0, 0, 0, 0.25);
    --card-hover-shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.35);
    --header-shadow-dark: 0 2px 8px rgba(0, 0, 0, 0.2);

    --header-height: 65px; --header-height-mobile: 60px;
    --border-radius-base: 8px;
    --transition-speed: 0.25s;
    --container-max-width: 1700px;

    --ad-placeholder-bg: #f0f0f0; --ad-placeholder-border: #ddd; --ad-placeholder-text: #888;
}
html[data-theme="dark"] { --ad-placeholder-bg: #333; --ad-placeholder-border: #555; --ad-placeholder-text: #aaa; }

/* Apply Theme Variables */
:root {
    --primary-color: var(--primary-color-light); --primary-dark: var(--primary-dark-light);
    --background-color: var(--background-color-light); --text-color: var(--text-color-light);
    --muted-text-color: var(--muted-text-color-light); --card-bg: var(--card-bg-light);
    --header-footer-bg: var(--header-footer-bg-light); --border-color: var(--border-color-light);
    --card-shadow: var(--card-shadow-light); --card-hover-shadow: var(--card-hover-shadow-light);
    --header-shadow: var(--header-shadow-light);
}
html[data-theme="dark"] {
    --primary-color: var(--primary-color-dark); --primary-dark: var(--primary-dark-dark);
    --background-color: var(--background-color-dark); --text-color: var(--text-color-dark);
    --muted-text-color: var(--muted-text-color-dark); --card-bg: var(--card-bg-dark);
    --header-footer-bg: var(--header-footer-bg-dark); --border-color: var(--border-color-dark);
    --card-shadow: var(--card-shadow-dark); --card-hover-shadow: var(--card-hover-shadow-dark);
    --header-shadow: var(--header-shadow-dark);
}

/* --- Base & Typography --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Inter', system-ui, sans-serif; 
    background: var(--background-color); 
    color: var(--text-color); 
    line-height: 1.6; 
    font-size: 15px; 
    min-height: 100vh; 
    transition: background-color 0.3s ease, color 0.3s ease; 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale; 
    display: flex; 
    flex-direction: column; 
}
h1, h2, h3, h4, h5, h6 { 
    font-family: 'Poppins', 'Inter', system-ui, sans-serif; 
    font-weight: 600; 
    line-height: 1.25; 
    margin-bottom: 0.6em; 
    color: var(--text-color);
}
h1 { font-size: 2.4rem; font-weight: 700; } 
h2 { font-size: 1.8rem; } 
h3 { font-size: 1.3rem; }
p { margin-bottom: 1.2em; }
a { 
    color: var(--primary-color); 
    text-decoration: none; 
    transition: color 0.25s ease; 
}
a:hover, a:focus { 
    color: var(--primary-dark); 
    text-decoration: none; 
}

/* --- Layout & Structure --- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: static; width: auto; height: auto; padding: 8px 12px; margin: 0; overflow: visible; clip: auto; white-space: normal; border: 1px solid; }
.container { padding: 1.2rem; max-width: 100%; margin-inline: auto; position: relative; }
main { flex-grow: 1; }

/* --- Header --- */
.header { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    background: var(--header-footer-bg); 
    height: var(--header-height); 
    box-shadow: var(--header-shadow); 
    z-index: 1000; 
    transition: background-color 0.3s ease, box-shadow 0.3s ease; 
    font-family: 'Poppins', system-ui, sans-serif; 
}
.header-content-wrapper { 
    display: flex; 
    align-items: center; 
    max-width: var(--container-max-width); 
    height: 100%; 
    margin: 0 auto; 
    padding: 0 1.2rem; 
    gap: 1rem; 
}
.logo { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    color: var(--primary-color); 
    text-decoration: none; 
    font-size: 1.25rem; 
    flex-shrink: 0; 
}
.logo-link-text { 
    vertical-align: middle; 
    font-size: 1.3rem; 
    margin: 0; 
    display: inline; 
    font-weight: bold; 
    letter-spacing: -0.02em;
}
.logo h1 { font-size: 1.1rem; margin: 0; display: flex; align-items: center; }
.nav { 
    display: flex; 
    gap: 1.5rem; 
    height: 100%; 
    flex-grow: 1; 
    justify-content: center; 
    align-items: center; 
    overflow: hidden; 
}
.nav a { 
    color: var(--text-color); 
    text-decoration: none; 
    padding: 0.3rem 0.6rem; 
    transition: color 0.25s ease, background-color 0.25s ease; 
    border-radius: 6px; 
    position: relative; 
    font-weight: 500; 
    white-space: nowrap; 
}
.nav a:hover { 
    color: var(--primary-color); 
    background-color: rgba(229, 57, 53, 0.08); 
}
.nav a:focus { 
    outline: 2px solid var(--primary-color); 
    outline-offset: 2px; 
}
.nav a::after { 
    content: ''; 
    position: absolute; 
    bottom: -3px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 0; 
    height: 3px; 
    background-color: var(--primary-color); 
    transition: width 0.3s ease; 
    border-radius: 4px;
}
.nav a:hover::after, .nav a:focus::after { width: 85%; }
.header-controls { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.language-switcher { margin-left: auto; padding: 0 0.8rem; font-size: 0.85rem; display: flex; align-items: center; gap: 0.4em; }
.language-switcher a, .language-switcher strong { color: var(--muted-text-color); text-decoration: none; white-space: nowrap;}
.language-switcher a:hover { color: var(--primary-color); text-decoration: underline; }
.language-switcher strong { color: var(--text-color); font-weight: bold; }
.menu-icon { display: none; background: none; border: none; padding: 0.4rem; cursor: pointer; color: var(--primary-color); font-size: 1.5rem; }
.search-form { display: flex; align-items: center; gap: 0.4rem; }
.search-input { padding: 0.6rem 0.8rem; border: 1px solid var(--border-color); border-radius: 6px; width: 200px; background-color: var(--background-color); color: var(--text-color); transition: border-color 0.2s ease, box-shadow 0.2s ease; font-size: 0.9rem; }
.search-input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15); }
.search-button { padding: 0.6rem 0.8rem; background: var(--primary-color); color: white; border: none; border-radius: 6px; cursor: pointer; line-height: 1; font-size: 0.9rem; transition: background-color 0.2s ease, transform 0.1s ease; font-weight: 500; }
.search-button:hover, .search-button:focus { background: var(--primary-dark); outline: none; transform: translateY(-1px); }
.search-button:active { transform: translateY(0); }
.search-button:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 2px; }
.theme-toggle { background: none; border: none; font-size: 1.3rem; cursor: pointer; padding: 0.5rem; color: var(--text-color); line-height: 1; border-radius: 6px; transition: background-color 0.2s ease, color 0.2s ease; }
.theme-toggle:hover { color: var(--primary-color); background-color: rgba(229, 57, 53, 0.08); }
.theme-toggle:focus { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.theme-toggle:focus-visible { box-shadow: none; }

/* --- Footer --- */
.footer { background: var(--header-footer-bg); padding: 2.5rem 1.5rem 1.5rem; margin-top: auto; border-top: 1px solid var(--border-color); transition: background-color 0.3s ease, border-color 0.3s ease; }
.footer-content { display: flex; flex-wrap: wrap; justify-content: space-between; max-width: var(--container-max-width); margin: 0 auto; gap: 2rem; }
.footer-section { flex: 1; min-width: 170px; }
.footer-section h3 { margin-bottom: 1rem; color: var(--primary-color); font-size: 1.1rem; font-weight: 600; position: relative; padding-bottom: 0.5rem; }
.footer-section h3::after { content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 2px; background-color: var(--primary-color); border-radius: 2px; }
.footer-section ul { list-style: none; padding: 0; }
.footer-section li { margin-bottom: 0.5rem; }
.footer-section a { color: var(--muted-text-color); text-decoration: none; transition: color 0.25s ease, transform 0.25s ease; font-size: 0.9rem; font-weight: 400; display: inline-block; padding: 0.2rem 0; }
.footer-section a:hover, .footer-section a:focus { text-decoration: none; color: var(--primary-color); outline: none; transform: translateX(3px); }
.copyright { text-align: center; padding-top: 1.5rem; color: var(--muted-text-color); font-size: 0.85rem; border-top: 1px solid var(--border-color); margin-top: 2rem; }

/* --- Page Body Wrapper & Sidebar Layout --- */
.page-body-wrapper { display: flex; max-width: var(--container-max-width); margin: calc(var(--header-height) + 0.5rem) auto 1.2rem; padding: 0 1.2rem; gap: 1.2rem; width: 100%; }
.sidebar { width: 155px; flex-shrink: 0; height: fit-content; position: sticky; top: calc(var(--header-height) + 0.8rem); }
.sidebar-left { order: 1; } .sidebar-right { order: 3; }
.main-content-area { flex-grow: 1; min-width: 0; order: 2; width: 100%; }

/* --- Trending Bar Styles --- */
.trending-bar { 
    background: linear-gradient(135deg, var(--primary-color) 0%, #e53935 100%);
    color: white; 
    padding: 0.5rem 1.2rem; 
    display: flex; 
    align-items: center; 
    overflow: hidden; 
    margin-top: 0; 
    margin-bottom: 0.6rem; 
    border-radius: var(--border-radius-base); 
    box-sizing: border-box; 
    height: 38px; 
    max-width: none; 
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.15);
}
.trending-label { font-weight: 700; text-transform: uppercase; margin-right: 1rem; white-space: nowrap; font-size: 0.8rem; }
.trending-items-container { flex-grow: 1; overflow: hidden; position: relative; }
.trending-items { list-style: none; padding: 0; margin: 0; display: flex; white-space: nowrap; animation: marquee 30s linear infinite; }
.trending-items:hover { animation-play-state: paused; }
.trending-items li { padding: 0 0.8rem; display: inline-block; }
.trending-items li a { color: white; text-decoration: none; font-size: 0.85rem; transition: opacity 0.2s ease; }
.trending-items li a:hover { opacity: 0.8; text-decoration: underline; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- Homepage Hero Section Styles --- */
.hero-section { display: flex; flex-wrap: wrap; margin-top: 0; margin-bottom: 1.2rem; gap: 1.2rem; }
.hero-carousel-column { width: 55%; min-width: 0; }
.news-carousel { aspect-ratio: 16 / 7.8; height: 350px; width: 100%; border-radius: var(--border-radius-base); overflow: hidden; background-color: #eee; border: 1px solid var(--border-color); box-shadow: var(--card-shadow); }
.news-carousel .swiper-slide { text-align: center; font-size: 18px; background: #eee; display: flex; justify-content: center; align-items: center; position: relative; overflow: hidden; }
.news-carousel .swiper-slide img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.news-carousel .swiper-slide:hover img { transform: scale(1.03); }
.news-carousel .swiper-slide a { display: block; width: 100%; height: 100%; position: relative; color: inherit; text-decoration: none; }
.news-carousel .slide-caption { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%); padding: 1.2rem 1rem 1rem 1rem; text-align: left; box-sizing: border-box; }
.news-carousel .slide-caption h3 { color: #fff; font-size: 1.4rem; margin: 0; font-weight: 600; line-height: 1.25; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6); }
.news-carousel .swiper-button-next, .news-carousel .swiper-button-prev { color: #ffffff; background-color: rgba(0, 0, 0, 0.25); border-radius: 50%; width: 36px; height: 36px; transition: background-color 0.2s ease; }
.news-carousel .swiper-button-prev { left: 10px; } .news-carousel .swiper-button-next { right: 10px; }
.news-carousel .swiper-button-next:hover, .news-carousel .swiper-button-prev:hover { background-color: rgba(0, 0, 0, 0.5); }
.news-carousel .swiper-button-next::after, .news-carousel .swiper-button-prev::after { font-size: 1rem; font-weight: bold; }
.news-carousel .swiper-pagination { bottom: 8px; }
.news-carousel .swiper-pagination-bullet { background-color: rgba(255, 255, 255, 0.5); width: 7px; height: 7px; opacity: 1; transition: background-color 0.2s ease, transform 0.2s ease; margin: 0 3px !important; }
.news-carousel .swiper-pagination-bullet-active { background-color: var(--primary-color); transform: scale(1.1); }

/* Recent Posts Column within Hero (List, 2 Col, Img Right) */
.recent-posts-hero { width: calc(45% - 1.2rem); background: var(--card-bg); padding: 0.6rem 0.8rem; border-radius: var(--border-radius-base); box-shadow: var(--card-shadow); display: flex; flex-direction: column; border-left: 2px solid var(--primary-color); height: 350px; }
.recent-posts-hero .recent-posts-list-layout { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem 0.8rem; flex-grow: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--primary-color) var(--background-color); }
.recent-posts-hero .recent-post-list-item { padding: 0.4rem 0; border-bottom: 1px solid var(--border-color); }
.recent-posts-hero .recent-posts-list-layout > li:nth-last-child(-n+2) { border-bottom: none; }
.recent-posts-hero .recent-post-list-link { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: inherit; }
.recent-posts-hero .recent-post-list-link:hover .recent-post-list-title { color: var(--primary-color); text-decoration: underline; }
.recent-posts-hero .recent-post-list-title { order: 1; flex-grow: 1; font-size: 0.8rem; line-height: 1.3; -webkit-line-clamp: 3; line-clamp: 3; max-height: 3.9em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; display: box; -webkit-box-orient: vertical; box-orient: vertical; }
.recent-posts-hero .recent-post-list-image { order: 2; width: 75px; height: 50px; object-fit: cover; flex-shrink: 0; border-radius: 3px; border: 1px solid var(--border-color); }

/* --- Ad Placeholder & General Ad Styles --- */
.ad-slot { display: flex; background-color: var(--ad-placeholder-bg); border: 1px dashed var(--ad-placeholder-border); color: var(--ad-placeholder-text); align-items: center; justify-content: center; text-align: center; font-size: 0.9rem; margin: 0; width: 100%; overflow: hidden; position: relative; border-radius: var(--border-radius-base); min-height: 50px; }
.ad-slot p { margin: 0.5rem; font-size: 0.85rem; } .ad-label { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.5); color: white; font-size: 0.7rem; padding: 2px 4px; border-radius: 3px; line-height: 1; z-index: 1; }
.ad-slot-top-banner { min-height: 90px; } .ad-slot-in-grid { min-height: 200px; }
.news-card.ad-card-placeholder { background: none; border: none; box-shadow: none; padding: 0; display: flex; align-items: stretch; } .news-card.ad-card-placeholder .ad-slot { height: 100%; }
.ad-slot-below-title { min-height: 90px; max-width: 728px; margin: 1.2em auto 1.8em; }
.ad-slot-in-article { min-height: 200px; max-width: 350px; margin: 1.5em auto; }
.ad-slot-mid-content { margin: 1.5em auto; max-width: 480px; clear: both; display: block; }
.ad-slot-below-article { min-height: 90px; max-width: 728px; margin: 2em auto 0.8em; }
.ad-slot-section-banner { min-height: 90px; max-width: 970px; margin: 1.5rem auto 2rem; }
.ad-slot-sidebar { margin-bottom: 1.2rem; height: auto; min-height: 200px; width: 100%; }
.ad-slot-card-sibling { border-radius: 0 var(--border-radius-base) var(--border-radius-base) 0; }

/* --- Category Section Container --- */
.main-content-area > .container { max-width: 100%; padding-inline: 0; }

/* Category sections (World Updates and others) */
.category-section { margin-bottom: 1.5rem; position: relative; padding: 1.2rem; background: var(--card-bg); border-radius: var(--border-radius-base); box-shadow: var(--card-shadow); }
.featured-section { background: linear-gradient(to right, rgba(216, 68, 68, 0.02), rgba(216, 68, 68, 0.005)); border-left: 3px solid var(--category-world-updates); padding-left: calc(1.2rem - 3px); }
.dual-category-container { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-bottom: 1.5rem; } .dual-category-container > .category-section { margin-bottom: 0; }

/* Category Title */
.category-title { 
    color: var(--text-color); 
    margin-bottom: 1.2rem; 
    padding-bottom: 0.4rem; 
    border-bottom: 3px solid; 
    display: inline-flex; 
    align-items: center; 
    gap: 0.5em; 
    font-weight: 600; 
    font-size: 1.5rem; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    position: relative;
}
.category-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: currentColor;
    border-radius: 3px;
}
.category-world-updates .category-title { border-color: var(--category-world-updates); } .category-tech .category-title { border-color: var(--category-tech); } .category-entertainment .category-title { border-color: var(--category-entertainment); } .category-schemes .category-title { border-color: var(--category-schemes); } .category-exams .category-title { border-color: var(--category-exams); } .category-tips .category-title { border-color: var(--category-tips); }
.category-title::before { content: ''; display: inline-block; width: 1em; height: 1em; opacity: 0.8; font-size: 0.9em; }

/* News Grid (for Category Tiles - Default) */
.news-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.8rem; }
.dual-category-container .news-grid { grid-template-columns: repeat(4, 1fr); gap: 0.8rem; }

/* === Grid for World Updates Part 2 (3 Posts + 1 Ad) === */
.world-updates-grid-with-ad { display: grid; grid-template-columns: repeat(3, 1fr) 25%; gap: 0.8rem; margin-top: 1.5rem; }
.world-updates-grid-with-ad .world-ad-slot-container { grid-column: 4 / 5; grid-row: 1 / 5; display: flex; min-height: 250px; }
.world-updates-grid-with-ad .world-ad-slot-container .ad-slot { width: 100%; height: 100%; min-height: 100%; }
/* Style cards within WU grid as IMAGE LEFT, TEXT RIGHT */
.world-updates-grid-with-ad .news-card { display: flex; flex-direction: row; align-items: stretch; padding: 0; overflow: hidden; border: 1px solid var(--border-color); background: var(--card-bg); }
.world-updates-grid-with-ad .news-card .img-container { order: 1; width: 90px; height: 70px; flex-shrink: 0; border-radius: var(--border-radius-base) 0 0 var(--border-radius-base); position: relative; overflow: hidden; background-color: var(--ad-placeholder-bg); border: none; }
.world-updates-grid-with-ad .news-card .img-container img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.world-updates-grid-with-ad .news-card .news-card-body { order: 2; flex-grow: 1; padding: 0.5rem 0.7rem; display: flex; flex-direction: column; justify-content: center; border: none; border-radius: 0 var(--border-radius-base) var(--border-radius-base) 0; min-width: 0; }
.world-updates-grid-with-ad .news-card .card-title { font-size: 0.8rem; line-height: 1.3; -webkit-line-clamp: 3; line-clamp: 3; max-height: 3.9em; min-height: auto; margin-bottom: 0; }
.world-updates-grid-with-ad .news-card .news-card-body p, .world-updates-grid-with-ad .news-card .news-card-body .read-more, .world-updates-grid-with-ad .news-card .category-tag { display: none; }

/* News Card (Default Tile Style - for other sections) */
.news-card { 
    border-radius: var(--border-radius-base); 
    overflow: hidden; 
    box-shadow: var(--card-shadow); 
    background: var(--card-bg); 
    display: flex; 
    flex-direction: column; 
    border: 1px solid var(--border-color); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    padding: 0; 
    margin-bottom: 0; 
}
.world-updates-grid-with-ad .news-card { flex-direction: row; }
.news-card:hover { 
    transform: translateY(-4px); 
    box-shadow: var(--card-hover-shadow); 
} 
.news-card:focus-within { 
    outline: 2px solid var(--primary-color); 
    outline-offset: 2px; 
}
.news-card:not(.world-updates-grid-with-ad .news-card) .img-container { 
    position: relative; 
    overflow: hidden; 
    width: 100%; 
    height: 120px; 
    background-color: #eee; 
    order: 1; 
    flex-shrink: 0; 
    border-radius: var(--border-radius-base) var(--border-radius-base) 0 0; 
    border: none; 
}
.news-card img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    transition: transform 0.4s ease; 
} 
.news-card:hover img { 
    transform: scale(1.05); 
}
.news-card:not(.world-updates-grid-with-ad .news-card) .news-card-body { 
    order: 2; 
    padding: 0.7rem; 
    background: var(--card-bg); 
    color: var(--text-color); 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}
.news-card-body .card-title { 
    font-size: 0.9rem; 
    font-weight: 600; 
    margin-bottom: 0.3em; 
    line-height: 1.3; 
    display: -webkit-box; 
    display: box;
    -webkit-line-clamp: 2; 
    line-clamp: 2;
    -webkit-box-orient: vertical; 
    box-orient: vertical;
    overflow: hidden; 
    text-overflow: ellipsis; 
    min-height: 2.6em; 
}
.news-card-body .card-title a { 
    color: inherit; 
    text-decoration: none; 
} 
.news-card-body .card-title a:hover { 
    color: var(--primary-color); 
    text-decoration: underline; 
}
.news-card-body p { 
    display: -webkit-box; 
    display: box;
    margin-bottom: 0.4rem; 
    font-size: 0.85rem; 
    color: var(--muted-text-color); 
    line-height: 1.35; 
    -webkit-line-clamp: 2; 
    line-clamp: 2;
    -webkit-box-orient: vertical; 
    box-orient: vertical;
    overflow: hidden; 
    min-height: 2.7em; 
}
.read-more { 
    display: inline-block; 
    margin-top: auto; 
    color: var(--primary-color); 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.8rem; 
    align-self: flex-start; 
    padding: 0.15em 0; 
    position: relative; 
}
.read-more::after { 
    content: '→'; 
    margin-left: 0.3em; 
    transition: transform 0.2s ease; 
    display: inline-block; 
} 
.read-more:hover::after { 
    transform: translateX(3px); 
} 
.read-more:hover, .read-more:focus { 
    text-decoration: none; 
    color: var(--primary-dark); 
}
.news-card .category-tag { 
    display: block; 
    position: absolute; 
    top: 6px; 
    left: 6px; 
    font-size: 0.65rem; 
    font-weight: 600; 
    padding: 2px 6px; 
    border-radius: 3px; 
    color: white; 
    z-index: 1; 
    background-color: var(--muted-text-color); 
}
.news-card.category-world-updates .category-tag { background-color: var(--category-world-updates); } 
.news-card.category-tech .category-tag { background-color: var(--category-tech); } 
.news-card.category-entertainment .category-tag { background-color: var(--category-entertainment); } 
.news-card.category-schemes .category-tag { background-color: var(--category-schemes); } 
.news-card.category-exams .category-tag { background-color: var(--category-exams); } 
.news-card.category-tips .category-tag { background-color: var(--category-tips); }

/* --- Single Article Styles --- */
.article-container { 
    max-width: 1000px; 
    margin-inline: auto; 
    background-color: var(--card-bg); 
    padding: 2.5rem 3.5rem; 
    box-shadow: var(--card-shadow); 
    border-radius: var(--border-radius-base); 
    margin-bottom: 2.5rem; 
    border: 1px solid var(--border-color); 
}
.article-category-badge { 
    padding: 0.3rem 1rem; 
    font-size: 0.85rem; 
    margin-bottom: 1rem; 
}
.article-title { 
    font-size: 2rem; 
    line-height: 1.25; 
    margin-bottom: 1rem; 
    font-weight: 700; 
}
.article-meta { 
    gap: 1rem 1.5rem; 
    margin-top: 1rem; 
    font-size: 0.95rem; 
    display: flex; 
    flex-wrap: wrap;
}
.article-meta .meta-item { 
    margin-bottom: 0.5rem; 
    display: inline-flex; 
    align-items: center; 
    gap: 0.4em;
}
.article-meta .meta-icon { 
    font-size: 1.05em; 
    line-height: 1; 
    margin-right: 0.1em; 
}
.article-meta a { 
    color: var(--muted-text-color); 
    text-decoration: underline; 
    font-weight: 500; 
} 
.article-meta a:hover { 
    color: var(--primary-color); 
}
figure.article-featured-image { 
    margin: 2rem 0 2.5rem; 
}
.article-featured-image img { 
    max-height: 500px; 
    width: 100%; 
    height: auto; 
    display: block; 
    border-radius: var(--border-radius-base); 
}
.image-caption { 
    padding: 0.8rem 1.5rem; 
    font-size: 0.9rem; 
}
.visually-hidden { 
    position: absolute; 
    width: 1px; 
    height: 1px; 
    margin: -1px; 
    padding: 0; 
    overflow: hidden; 
    clip: rect(0, 0, 0, 0); 
    border: 0; 
}
.article-body { 
    line-height: 1.75; 
    font-size: 1.05rem; 
}
.article-body p { 
    margin-bottom: 1.4em; 
} 
.article-body strong, .article-body b { 
    color: var(--primary-color); 
}
.article-body blockquote { 
    margin: 1.8em 0; 
    padding: 1em 1.5em; 
    font-size: 1.1rem; 
    border-left-width: 4px;
}
.article-body img { 
    margin: 1.5em auto; 
    max-width: 100%; 
    height: auto; 
    display: block; 
    border-radius: var(--border-radius-base); 
    box-shadow: var(--card-shadow);
}
.article-body h2 { 
    font-size: 1.6rem; 
    margin-top: 1.8em; 
    margin-bottom: 0.6em; 
} 
/* Specific heading sizes */
.article-body h3 { 
    font-size: 1.3rem; 
    margin-top: 1.6em; 
    margin-bottom: 0.5em; 
}
.article-body h4 { 
    font-size: 1.1rem; 
    margin-top: 1.5em; 
    margin-bottom: 0.5em; 
}
.language-notice { 
    padding: 0.75rem 1.25rem; 
    margin-bottom: 1.5rem; 
}

/* --- Responsive --- */
@media (max-width: 1400px) {
     .sidebar { width: 140px; } .news-grid { grid-template-columns: repeat(6, 1fr); } .dual-category-container .news-grid { grid-template-columns: repeat(3, 1fr); }
     .world-updates-grid-with-ad { grid-template-columns: repeat(3, 1fr) 28%; }
}
@media (max-width: 1200px) {
    .sidebar { width: 126px; } .page-body-wrapper { gap: 1rem; padding: 0 1rem;}
    .news-grid { grid-template-columns: repeat(5, 1fr); } .dual-category-container .news-grid { grid-template-columns: repeat(3, 1fr); }
    .world-updates-grid-with-ad { grid-template-columns: repeat(3, 1fr) 22%; }
}
@media (max-width: 992px) { /* Tablet Breakpoint */
     .page-body-wrapper {
         margin-top: calc(var(--header-height-mobile) + 0.4rem);
         margin-bottom: 1rem;
         padding: 0;
     }
     .main-content-area { width: 100%; order: 1; }
     .main-content-area > .trending-bar,
     .main-content-area > .hero-section,
     .main-content-area > .container {
         padding-inline: 0.6rem;
     }

     .main-content-area > .container {
         max-width: none;
         padding-inline: 0;
         padding-top: 0;
         padding-bottom: 0.8rem;
     }

     .category-section {
         padding: 0.6rem 0.5rem;
         margin-bottom: 0.8rem;
         border-radius: 0;
         box-shadow: none;
         background: none;
         border-top: 1px solid var(--border-color);
     }
     .category-section:first-of-type { border-top: none; }
     .featured-section { border-left: none; }

     .dual-category-container {
         padding-inline: 0.5rem;
         gap: 0; /* Remove gap for stacking */
         margin-bottom: 0.8rem;
         display: block; /* Stack dual categories */
     }
      .dual-category-container .category-section {
         margin-bottom: 0.8rem;
     }


     .main-content-area > .trending-bar {
         padding: 0.25rem 0.5rem;
         height: 30px;
         margin-bottom: 0.4rem;
         border-radius: 0;
    }
    .trending-label { font-size: 0.7rem; margin-right: 0.5rem; }
    .trending-items li a { font-size: 0.7rem; }
    .trending-items li { padding: 0 0.5rem; }

    .main-content-area > .hero-section { display: block; margin-top: 0; margin-bottom: 0; gap: 0; padding-inline: 0.5rem; }
    .main-content-area > .hero-section > .hero-carousel-column { width: 100%; margin-bottom: 0.8rem; order: 1; }

    /* Recent Posts Mobile (Container - using provided styles) */
     .recent-posts-hero { /* Renamed from .recent-posts in user CSS */
         width: 100%; margin-bottom: 0.8rem; height: auto; max-height: none; order: 2; overflow-y: visible; padding: 0.5rem; border-left: none; box-shadow: none; background: none; border-radius: 0;
     }
     /* Recent posts list layout - stack items */
      .recent-posts-hero .recent-posts-list-layout {
         grid-template-columns: 1fr !important; /* Force single column */
         gap: 0.5rem 0 !important; margin: 0;
         display: block !important; /* Override grid */
     }
      /* Recent posts list item */
     .recent-posts-hero .recent-post-list-item {
         padding: 0.5rem 0 !important;
         border-bottom: 1px solid var(--border-color) !important;
         /* Ensure it behaves like other list items */
         display: block !important;
         background: none !important;
         margin-bottom: 0 !important;
         overflow: visible !important;
         border-radius: 0 !important;
         box-shadow: none !important;
         border-top: none !important;
         border-left: none !important;
         border-right: none !important;
     }
     .recent-posts-hero .recent-post-list-item:last-child { border-bottom: none !important; }

     /* Apply specific styling for text/image within recent posts link */
     .recent-posts-hero .recent-post-list-link {
         display: flex !important; /* Make link flex */
         align-items: center !important;
         gap: 0.6rem !important; /* Match user's mobile gap */
         text-decoration: none !important;
         color: inherit !important;
     }
      .recent-posts-hero .recent-post-list-link:hover .recent-post-list-title {
         color: var(--primary-color) !important; text-decoration: underline !important;
     }
     .recent-posts-hero .recent-post-list-title {
         order: 1 !important; /* Text Left */
         flex-grow: 1;
         font-size: 0.8rem !important; /* Match user's mobile style */
         line-height: 1.3 !important;
         max-height: 3.9em !important;
         font-weight: 500 !important;
         display: -webkit-box !important; -webkit-line-clamp: 3 !important; -webkit-box-orient: vertical !important; overflow: hidden !important; text-overflow: ellipsis !important;
         margin-bottom: 0 !important; /* Overrides from h tags */
     }
     .recent-posts-hero .recent-post-list-image {
         order: 2 !important; /* Image Right */
         width: 70px !important; /* Match user's mobile style */
         height: 45px !important;
         object-fit: cover !important;
         flex-shrink: 0 !important;
         border-radius: 3px !important;
         border: 1px solid var(--border-color) !important;
         background-color: var(--ad-placeholder-bg) !important; /* Added */
         display: block !important; /* Ensure image displays */
     }


    .news-carousel { aspect-ratio: 16 / 8.5; max-height: 200px; border-radius: 4px; height: auto; }
    .news-carousel .slide-caption h3 { font-size: 0.85rem; padding-bottom: 22px; }
    .news-carousel .swiper-button-next, .news-carousel .swiper-button-prev { width: 25px; height: 25px; }
    .news-carousel .swiper-button-next::after, .news-carousel .swiper-button-prev::after { font-size: 0.65rem; }
    .news-carousel .swiper-pagination-bullet { width: 4px; height: 4px; }
    .news-carousel .swiper-button-prev { left: 5px; } .news-carousel .swiper-button-next { right: 5px; }

    /* Ad Slot Mobile Adjustments */
    .ad-slot-top-banner { min-height: 50px; margin-bottom: 0.6rem; }
    .ad-slot-in-grid { min-height: 140px; }
    .news-card.ad-card-placeholder { min-height: 140px; }
    .ad-slot-section-banner { min-height: 50px; max-width: 300px; margin: 1.2rem auto; }
    .ad-slot-below-title { margin: 1em auto 1.2em; min-height: 50px; max-width: 300px; }
    .ad-slot-in-article { min-height: 150px; max-width: 280px; margin: 1.2em auto; }
    .ad-slot-mid-content { margin: 1.2em auto; max-width: 300px; }
    .ad-slot-below-article { margin: 2em auto 0.8em; min-height: 50px; max-width: 300px; }
    .ad-slot-card-sibling { min-height: 70px; }


    /* Mobile Category Title */
    .category-title {
        font-size: 1rem; /* User preferred mobile size */
        margin-bottom: 0.6rem; padding-bottom: 0.2rem; border-bottom-width: 2px;
        display: inline-flex !important; align-items: center !important; gap: 0.4em !important;
    }
     .category-title::before { display: none; } /* Hide icon placeholder */

    /* Hide section subtitle on mobile */
    .section-subtitle { display: none; }

    /* --- Mobile List View Override --- */
    /* Stack grids */
    .news-grid, .featured-grid,
    .dual-category-container .news-grid,
    .world-updates-grid-with-ad, /* ADDED: Stack the 3+1 grid */
    .recent-posts-list-layout { /* Covers hero list */
        display: block !important; grid-template-columns: none !important; gap: 0 !important; overflow: visible !important;
    }

    /* Style news cards (from WU tiles) as rows (Image Left) */
    .news-card { /* Applies to cards in WU grid and other category grids */
        display: flex !important; flex-direction: row !important; align-items: center !important;
        gap: 0.75rem !important; border: none !important; box-shadow: none !important; border-radius: 0 !important;
        padding: 0.8rem 0 !important; border-bottom: 1px solid var(--border-color) !important;
        background: none !important; margin-bottom: 0 !important; overflow: visible !important;
    }
    /* Remove border on last card within its specific grid container */
     .news-grid > .news-card:last-child,
     .world-updates-grid-with-ad > .news-card:last-child {
          border-bottom: none !important;
     }
    .news-card:hover { transform: none; box-shadow: none; }
    .news-card .news-card-body .card-title a:hover { color: var(--primary-color); text-decoration: underline; }
    /* Text body container */
    .news-card .news-card-body { order: 2 !important; flex-grow: 1 !important; padding: 0 !important; background: none !important; width: auto !important; display: block !important; }
    /* Title styling */
    .news-card .news-card-body .card-title { font-size: 0.9rem !important; line-height: 1.4 !important; font-weight: 500 !important; display: -webkit-box !important; -webkit-line-clamp: 3 !important; -webkit-box-orient: vertical !important; line-clamp: 3 !important; overflow: hidden !important; text-overflow: ellipsis !important; max-height: 4.2em !important; min-height: auto !important; margin-bottom: 0 !important; }
     .news-card .news-card-body .card-title a { color: inherit !important; text-decoration: none !important; transition: color 0.2s ease !important; }
    /* Hide elements */
    .news-card .news-card-body p, .news-card .news-card-body .read-more, .news-card .category-tag { display: none !important; }
    /* Image container */
    .news-card .img-container { order: 1 !important; width: 85px !important; height: 70px !important; flex-shrink: 0 !important; border-radius: 5px !important; overflow: hidden !important; background-color: var(--ad-placeholder-bg) !important; border: none !important; display: block !important; }
    .news-card .img-container img { display: block !important; width: 100% !important; height: 100% !important; object-fit: cover !important; }
    .news-card .img-container a { display: block !important; width: 100% !important; height: 100% !important; }
    /* --- End Mobile News Card Layout --- */

    /* Style the large ad container on mobile */
     .world-updates-grid-with-ad .world-ad-slot-container {
         grid-column: auto; grid-row: auto; width: 100%; margin-top: 0.8rem;
         min-height: 150px; margin-bottom: 0.8rem; order: 99;
         border-bottom: 1px solid var(--border-color);
     }
      .world-updates-grid-with-ad .world-ad-slot-container:last-child { border-bottom: none; }
     .world-updates-grid-with-ad .world-ad-slot-container .ad-slot { min-height: 150px; }

     /* --- Mobile Styles for .recent-post-list-item (Hero List ONLY) --- */
     /* These rules were already present and style the hero list correctly */


    /* Article specific styles - ADJUSTED FOR READABILITY */
    .article-container {
        padding: 1.2rem 0.8rem;
        margin-bottom: 1rem;
        max-width: none;
    }
    .article-title {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.8em;
    }
    .article-meta {
        font-size: 0.8rem;
        gap: 0.6rem 1rem;
        margin-top: 1rem;
        flex-wrap: wrap;
    }
    .article-meta .meta-item {
        margin-bottom: 0.3rem;
    }
    .article-body {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    .article-body p {
        margin-bottom: 1.2em;
    }
    .article-body h2 {
        font-size: 1.3rem;
        margin-top: 1.8em;
        margin-bottom: 0.6em;
    }
    .article-body h3 {
        font-size: 1.1rem;
        margin-top: 1.6em;
        margin-bottom: 0.5em;
    }
    .article-body h4 {
        font-size: 1rem;
        margin-top: 1.5em;
        margin-bottom: 0.5em;
    }
    .article-body blockquote {
        font-size: 0.9rem;
        padding: 0.8em 1.2em;
        margin: 1.5em 0.5em;
        border-left-width: 4px;
    }
    figure.article-featured-image {
        margin: 1.5em 0 1.8em;
    }
    .article-featured-image img {
        max-height: 250px;
        width: 100%;
        height: auto;
        border-radius: var(--border-radius-base);
    }
    .image-caption {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    .article-body img {
        margin: 1.2em auto;
        border-radius: var(--border-radius-base);
        max-width: 100%;
        height: auto;
    }
    .breadcrumbs {
        margin-bottom: 1rem;
        font-size: 0.7rem;
    }
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    font-size: 0.8rem;
    margin-bottom: 1rem;
    color: var(--muted-text-color);
    display: flex;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.breadcrumbs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4em;
    white-space: nowrap;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.breadcrumbs li:not(:last-child)::after {
    content: '\003e';
    margin-left: 0.4em;
    opacity: 0.7;
    display: inline-block;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs li[aria-current="page"] {
    font-weight: 600;
    color: var(--text-color);
}

/* Mobile breadcrumbs adjustments */
@media (max-width: 768px) {
    .breadcrumbs {
        font-size: 0.75rem;
        margin-bottom: 0.8rem;
        padding: 0 0.25rem;
    }
    
    .breadcrumbs ol {
        gap: 0.3em;
    }
}

/* --- Text Ad Styling --- */
.text-ad-container { text-align: center; padding: 18px 15px 15px; background-color: #fdf0f0; border: 1px solid var(--primary-color-light); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08); border-radius: var(--border-radius-base); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 75px; transition: transform 0.2s ease, box-shadow 0.2s ease; animation: glow-border 2.5s ease-in-out infinite; }
.text-ad-container:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(216, 68, 68, 0.15); animation: glow-border 2.5s ease-in-out infinite, pulse 0.8s ease-in-out; }
.text-ad-link { text-decoration: none; color: var(--text-color); display: block; width: 100%; } .text-ad-link:hover { color: var(--primary-dark); }
.ad-text-quiz-bold { margin: 4px 0; font-weight: 700; font-size: 1.05rem; color: var(--primary-color); } .ad-text-quiz-normal { margin: 4px 0 0.5em; font-size: 0.9rem; color: var(--muted-text-color); font-weight: 500; }
.text-ad-container .ad-label { background: rgba(0,0,0,0.6); color: white; font-size: 0.65rem; padding: 2px 5px; border-radius: 3px; position: absolute; top: 5px; right: 5px; z-index: 1; }
html[data-theme="dark"] .text-ad-container { border-color: var(--primary-color-dark); background-color: #2f2a2a; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); animation: glow-border-dark 2.5s ease-in-out infinite; } html[data-theme="dark"] .text-ad-container:hover { box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2); animation: glow-border-dark 2.5s ease-in-out infinite, pulse 0.8s ease-in-out; }
html[data-theme="dark"] .text-ad-link { color: var(--text-color-dark); } html[data-theme="dark"] .text-ad-link:hover { color: var(--primary-color-dark); } html[data-theme="dark"] .ad-text-quiz-bold { color: var(--primary-color-dark); } html[data-theme="dark"] .ad-text-quiz-normal { color: var(--muted-text-color-dark); }
.ad-rating-stars { display: block; margin-top: 0.5em; margin-bottom: 0.5em; font-size: 1.5em; color: #FFC107; line-height: 1; }
.ad-rating-stars .star-filled { color: #FFC107; }
.ad-rating-stars .star-empty { color: #ccc; }
.ad-explore-text { font-weight: 600; margin-top: 0.8em; margin-bottom: 0.3em; font-size: 0.9em; color: var(--text-color); }
.ad-topic-list { list-style: none; padding: 0; margin: 0 auto 0.5em; font-size: 0.9em; color: var(--muted-text-color); line-height: 1.4; text-align: center; } .ad-topic-list li { display: inline-block; margin: 0 0.5em; } html[data-theme="dark"] .ad-topic-list { color: var(--muted-text-color-dark); }
.ad-more-text { margin-top: 0.5em; margin-bottom: 0; font-size: 0.85em; color: var(--muted-text-color); line-height: 1.3; } html[data-theme="dark"] .ad-more-text { color: var(--muted-text-color-dark); } .text-ad-container { padding: 18px 15px 15px; }

/* --- Animations --- */
@keyframes glow-border { 0% { border-color: var(--primary-color); box-shadow: 0 0 3px var(--primary-color); } 50% { border-color: var(--primary-dark); box-shadow: 0 0 8px var(--primary-dark); } 100% { border-color: var(--primary-color); box-shadow: 0 0 3px var(--primary-color); } }
@keyframes glow-border-dark { 0% { border-color: var(--primary-color-dark); box-shadow: 0 0 4px var(--primary-color-dark); } 50% { border-color: #ff8a8a; box-shadow: 0 0 10px #ff8a8a; } 100% { border-color: var(--primary-color-dark); box-shadow: 0 0 4px var(--primary-color-dark); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.03); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .text-ad-container, html[data-theme="dark"] .text-ad-container { animation: none !important; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08); }
  html[data-theme="dark"] .text-ad-container { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
  .trending-items { animation: none; }
}

/* --- Article Page Improvements Styling --- */
.breadcrumbs { font-size: 0.8rem; margin-bottom: 1rem; color: var(--muted-text-color); }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4em; }
.breadcrumbs li { display: flex; align-items: center; } .breadcrumbs li:not(:last-child)::after { content: '>'; margin-left: 0.4em; opacity: 0.7; display: inline-block; }
.breadcrumbs a { color: var(--primary-color); text-decoration: none; } .breadcrumbs a:hover { text-decoration: underline; } .breadcrumbs li[aria-current="page"] { font-weight: 600; color: var(--text-color); }
.related-articles { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
.related-articles h2 { font-size: 1.4rem; margin-bottom: 1.2rem; text-align: center; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.related-card .img-container { height: 110px; } .related-card .card-title { font-size: 0.85rem; min-height: auto; -webkit-line-clamp: 2; }
.related-card p { display: none; } .social-sharing { margin: 1.5rem 0; padding: 0.8rem 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); text-align: center; }
.social-sharing h4 { margin-bottom: 0.6rem; font-size: 0.9rem; font-weight: 600; } .social-sharing a { margin: 0 0.4em; text-decoration: none; color: var(--primary-color); font-weight: 500; display: inline-block; padding: 0.2em 0; font-size: 0.9rem; }
.social-sharing a:hover { text-decoration: underline; color: var(--primary-dark); }

/* --- Language Switcher Styles --- */
.header-controls .language-switcher { display: flex; }
@media (max-width: 768px) { .header-controls .language-switcher { display: none; } }

/* --- Language Specific Adjustments --- */
html[lang="ta"] .nav a { font-size: 0.9rem; } html[lang="ta"] .nav { gap: 1.2rem; }

/* --- Category Page Specific Styles --- */
.category-page-title { font-size: 1.8rem; margin-bottom: 1.2rem; color: var(--primary-color); border-bottom: 2px solid var(--border-color); padding-bottom: 0.4rem; }
.category-listing .news-grid { /* Grid container on category page */
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem;
    /* This assumes category.php uses .news-grid > .news-card */
}
.category-listing .news-card { /* Style for standard cards on category page */
    display: flex; flex-direction: column; padding: 0; border: 1px solid var(--border-color);
    border-radius: var(--border-radius-base); background: var(--card-bg); margin-bottom: 0; overflow: hidden;
}
.category-listing .news-card .img-container { height: 140px; order: 1; width: 100%; border-radius: var(--border-radius-base) var(--border-radius-base) 0 0; border: none; flex-shrink: 0; }
.category-listing .news-card .news-card-body { order: 2; padding: 0.7rem; background: var(--card-bg); flex-grow: 1; }
 .category-listing .news-card .news-card-body .card-title { font-size: 0.9rem; line-height: 1.3; min-height: 2.6em; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; box-orient: vertical; margin-bottom: 0.3em; }
 .category-listing .news-card .news-card-body p { display: -webkit-box; font-size: 0.8rem; min-height: 4.05em; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; box-orient: vertical; margin-bottom: 0.4rem; }
 .category-listing .news-card .news-card-body .read-more { display: inline-block; font-size: 0.75rem; margin-top: auto; }

@media (max-width: 768px) { /* Mobile category page uses the unified list override */
    .category-page-title { font-size: 1.4rem; margin-bottom: 0.8rem; }
    /* Mobile list override handles the rest */
}

/* Mobile: reduce article heading size */
@media (max-width: 768px) {
    .article-title { font-size: 1.3rem; }
    article.post-content h1 { font-size: 1.3rem; }
}

/* --- Form Elements --- */
.search-input {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 200px;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.9rem;
}
.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
}
.search-button {
    padding: 0.6rem 0.8rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: 500;
}
.search-button:hover, .search-button:focus {
    background: var(--primary-dark);
    outline: none;
    transform: translateY(-1px);
}
.search-button:active {
    transform: translateY(0);
}
.search-button:focus-visible {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-color);
    line-height: 1;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover {
    color: var(--primary-color);
    background-color: rgba(229, 57, 53, 0.08);
}
.theme-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.theme-toggle:focus-visible {
    box-shadow: none;
}

/* Fix line-clamp warnings by adding standard property */
.news-card-body .card-title {
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.news-card-body p {
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}
.world-updates-grid-with-ad .news-card .card-title {
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recent-posts-hero .recent-post-list-title {
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fix additional line-clamp warnings */
.news-card-body .card-title {
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-body p {
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}

.recent-posts-hero .recent-post-list-title {
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-listing .news-card .news-card-body .card-title {
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Enhanced Mobile Styles --- */
@media (max-width: 992px) { /* Tablet Breakpoint */
    .page-body-wrapper {
        flex-direction: column;
        margin-top: calc(var(--header-height-mobile) + 0.4rem);
        padding: 0;
        gap: 0;
    }
    .sidebar { display: none; }
    .main-content-area { order: 1; width: 100%; }
    
    .main-content-area > .trending-bar,
    .main-content-area > .hero-section,
    .main-content-area > .container {
        padding-inline: 0.8rem;
        margin-inline: auto;
    }
    
    .main-content-area > .trending-bar {
        margin-top: 0.5rem;
        margin-bottom: 0.8rem;
        border-radius: var(--border-radius-base);
    }
    
    .main-content-area > .hero-section {
        margin-bottom: 1.2rem;
    }
    
    .main-content-area > .container {
        padding-top: 0;
        padding-bottom: 1rem;
    }
    
    /* Article adjustments for tablet */
    .article-container {
        padding: 2rem 1.8rem;
        margin-bottom: 1.5rem;
        max-width: 800px;
    }
    
    .article-title {
        font-size: 1.9rem;
    }
    
    .article-body {
        font-size: 1.02rem;
        line-height: 1.7;
    }
    
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .dual-category-container .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .news-card:not(.world-updates-grid-with-ad .news-card) .img-container {
        height: 120px;
    }
    
    .news-card-body {
        padding: 0.8rem;
    }
    
    .news-card-body .card-title {
        font-size: 0.9rem;
    }
    
    .news-card-body p {
        font-size: 0.85rem;
    }
    
    .read-more {
        font-size: 0.8rem;
    }
    
    .ad-slot-section-banner {
        max-width: 728px;
        margin: 1.5rem auto 1.8rem;
    }
    
    /* Hero stacking */
    .hero-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-carousel-column {
        width: 100%;
    }
    
    .recent-posts-hero {
        width: 100%;
        border-left: none;
        padding: 1rem;
        height: auto;
        overflow-y: visible;
    }
    
    /* Switch Recent Posts list to 1 column */
    .recent-posts-hero .recent-posts-list-layout {
        grid-template-columns: 1fr;
        overflow-y: visible;
        height: auto;
        gap: 0.6rem 0;
    }
    
    .recent-posts-hero .recent-posts-list-layout > li:nth-last-child(-n+2) {
        border-bottom: 1px solid var(--border-color);
    }
    
    .recent-posts-hero .recent-posts-list-layout > li:last-child {
        border-bottom: none;
    }
    
    .news-carousel {
        height: auto;
    }
    
    .language-switcher {
        order: -1;
        margin-left: 0;
        padding-left: 0;
    }
    
    /* World Updates 3+1 Grid on Tablet */
    .world-updates-grid-with-ad {
        grid-template-columns: repeat(2, 1fr) 30%;
    }
    
    .world-updates-grid-with-ad .world-ad-slot-container {
        grid-column: 3 / 4;
        grid-row: 1 / 7;
        min-height: 350px;
    }
    
    .world-updates-grid-with-ad .news-card:nth-child(n+13) {
        display: none;
    }
    
    .world-updates-grid-with-ad .news-card .img-container {
        width: 90px;
        height: 70px;
        min-height: 70px;
    }
    
    .world-updates-grid-with-ad .news-card .card-title {
        font-size: 0.85rem;
    }
    
    /* Category Listing on Tablet */
    .category-listing .card-top-row {
        height: 140px;
    }
    
    .category-listing .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) { /* Mobile Breakpoint */
    body {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .header {
        height: var(--header-height-mobile);
    }
    
    .header-content-wrapper {
        padding: 0 1rem;
        gap: 0.5rem;
    }
    
    .logo h1 {
        font-size: 1.1rem;
    }
    
    .logo-link-text {
        font-size: 1.1rem;
    }
    
    .nav {
        top: var(--header-height-mobile);
    }
    
    .menu-icon {
        font-size: 1.5rem;
        padding: 0.4rem;
        background-color: rgba(229, 57, 53, 0.08);
        border-radius: 6px;
    }
    
    .menu-icon:hover {
        background-color: rgba(229, 57, 53, 0.15);
    }
    
    .theme-toggle {
        font-size: 1.3rem;
        padding: 0.4rem;
    }
    
    .search-form {
        display: none;
    }
    
    .nav {
        display: none;
        position: fixed;
        left: 0;
        right: 0;
        background: var(--header-footer-bg);
        padding: 0;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        z-index: 998;
        animation: slideDown 0.3s ease-out;
        height: auto;
        border-top: 1px solid var(--border-color);
        flex-grow: 0;
        justify-content: flex-start;
    }
    
    .nav a {
        padding: 1rem;
        width: 100%;
        height: auto;
        justify-content: center;
        border-bottom: 1px solid var(--border-color);
        font-weight: 500;
        font-size: 0.95rem;
        color: var(--text-color);
        border-radius: 0;
        text-align: center;
        transition: background-color 0.2s ease, color 0.2s ease;
    }
    
    .nav a:hover {
        background-color: rgba(229, 57, 53, 0.08);
        color: var(--primary-color);
    }
    
    .nav a:last-child {
        border-bottom: none;
    }
    
    .nav a::after {
        display: none;
    }
    
    .nav.active {
        display: flex;
    }
    
    .menu-icon {
        display: block;
    }
    
    .sidebar {
        display: none;
    }
    
    .page-body-wrapper {
        margin-top: calc(var(--header-height-mobile) + 0.5rem);
        margin-bottom: 1rem;
        padding: 0;
    }
    
    .main-content-area {
        width: 100%;
        order: 1;
    }
    
    .main-content-area > .trending-bar,
    .main-content-area > .hero-section,
    .main-content-area > .container {
        padding-inline: 0.8rem;
    }
    
    .main-content-area > .container {
        max-width: none;
        padding-inline: 0;
        padding-top: 0;
        padding-bottom: 0.8rem;
    }
    
    /* Enhanced mobile section styling */
    .category-section {
        padding: 0.8rem 0.6rem;
        margin-bottom: 0.8rem;
        border-radius: var(--border-radius-base);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
        background: var(--card-bg);
        border-top: none;
        border-left: 3px solid var(--border-color);
    }
    
    .category-world-updates {
        border-left-color: var(--category-world-updates);
    }
    
    .category-tech {
        border-left-color: var(--category-tech);
    }
    
    .category-entertainment {
        border-left-color: var(--category-entertainment);
    }
    
    .category-schemes {
        border-left-color: var(--category-schemes);
    }
    
    .category-exams {
        border-left-color: var(--category-exams);
    }
    
    .category-tips {
        border-left-color: var(--category-tips);
    }
    
    .category-section:first-of-type {
        border-top: none;
    }
    
    .dual-category-container {
        padding-inline: 0.8rem;
        gap: 1rem;
        margin-bottom: 1rem;
        display: flex;
        flex-direction: column;
    }
    
    .dual-category-container .category-section {
        margin-bottom: 0;
    }
    
    .main-content-area > .trending-bar {
        padding: 0.4rem 1rem;
        height: 38px;
        margin-bottom: 0.8rem;
        border-radius: var(--border-radius-base);
    }
    
    .trending-label {
        font-size: 0.75rem;
        margin-right: 0.8rem;
    }
    
    .trending-items li a {
        font-size: 0.75rem;
    }
    
    .trending-items li {
        padding: 0 0.6rem;
    }
    
    /* Article specific styles - IMPROVED FOR READABILITY */
    .article-container {
        padding: 1.5rem 1.2rem;
        margin-bottom: 1.2rem;
        border-radius: var(--border-radius-base);
    }
    
    .article-title {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.8em;
    }
    
    .article-meta {
        font-size: 0.85rem;
        gap: 0.8rem 1.2rem;
        margin-top: 1rem;
        flex-wrap: wrap;
    }
    
    .article-meta .meta-item {
        margin-bottom: 0.4rem;
    }
    
    .article-body {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .article-body p {
        margin-bottom: 1.2em;
    }
    
    .article-body h2 {
        font-size: 1.35rem;
        margin-top: 1.8em;
        margin-bottom: 0.6em;
    }
    
    .article-body h3 {
        font-size: 1.2rem;
        margin-top: 1.6em;
        margin-bottom: 0.5em;
    }
    
    .article-body h4 {
        font-size: 1.05rem;
        margin-top: 1.5em;
        margin-bottom: 0.5em;
    }
    
    .article-body blockquote {
        font-size: 0.95rem;
        padding: 0.8em 1.2em;
        margin: 1.5em 0.5em;
        border-left-width: 4px;
        background-color: rgba(229, 57, 53, 0.04);
        border-left-color: var(--primary-color);
    }
    
    figure.article-featured-image {
        margin: 1.5em 0 1.8em;
    }
    
    .article-featured-image img {
        max-height: 250px;
        width: 100%;
        height: auto;
        border-radius: var(--border-radius-base);
    }
    
    .image-caption {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        color: var(--muted-text-color);
        font-style: italic;
    }
    
    .article-body img {
        margin: 1.2em auto;
        border-radius: var(--border-radius-base);
        max-width: 100%;
        height: auto;
    }
    
    .breadcrumbs {
        margin-bottom: 1rem;
        font-size: 0.75rem;
    }
}

/* --- Footer Enhancements --- */
.footer {
    background: var(--header-footer-bg);
    padding: 2.5rem 1.5rem 1.5rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: var(--container-max-width);
    margin: 0 auto;
    gap: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 170px;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--muted-text-color);
    text-decoration: none;
    transition: color 0.25s ease, transform 0.25s ease;
    font-size: 0.9rem;
    font-weight: 400;
    display: inline-block;
    padding: 0.2rem 0;
}

.footer-section a:hover, .footer-section a:focus {
    text-decoration: none;
    color: var(--primary-color);
    outline: none;
    transform: translateX(3px);
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    color: var(--muted-text-color);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 1rem 1rem;
        margin-top: 0.6rem;
    }
    
    .footer-content {
        gap: 1.2rem;
    }
    
    .footer-section h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.4rem;
    }
    
    .footer-section li {
        margin-bottom: 0.3rem;
    }
    
    .footer-section a {
        font-size: 0.85rem;
    }
    
    .copyright {
        padding-top: 1rem;
        margin-top: 1.2rem;
        font-size: 0.75rem;
    }
}

/* --- Language Switcher Mobile Styles --- */
.mobile-language-toggle {
    display: none; /* Hidden by default, shown only on mobile */
    background: rgba(229, 57, 53, 0.08);
    border: none;
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-language-toggle:hover,
.mobile-language-toggle:focus {
    background: rgba(229, 57, 53, 0.15);
    color: var(--primary-color);
}

.mobile-language-toggle .current-lang {
    font-weight: 600;
}

.mobile-language-toggle .lang-separator {
    margin: 0 0.2rem;
    opacity: 0.6;
}

@media (max-width: 768px) {
    /* --- Mobile Header Adjustments --- */
    .header {
        height: var(--header-height-mobile);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    }
    
    .header-content-wrapper {
        padding: 0 0.8rem;
        gap: 0.4rem;
        justify-content: space-between;
    }
    
    .logo {
        gap: 0.3rem;
    }
    
    .logo h1 {
        font-size: 1rem;
    }
    
    .logo-link-text {
        font-size: 1rem;
        letter-spacing: -0.01em;
    }
    
    /* Show mobile language toggle */
    .mobile-language-toggle {
        display: flex;
        align-items: center;
        order: 1;
    }
    
    /* Rearrange header icons */
    .header-controls {
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }
    
    .menu-icon {
        font-size: 1.3rem;
        padding: 0.35rem;
        margin-left: 0.2rem;
    }
    
    .theme-toggle {
        font-size: 1.2rem;
        padding: 0.35rem;
    }
    
    /* Hide regular language switcher */
    .header-controls .language-switcher {
        display: none;
    }
    
    /* Fix modal menu position */
    .nav {
        top: var(--header-height-mobile);
        max-height: calc(100vh - var(--header-height-mobile));
        overflow-y: auto;
        padding-bottom: 1rem;
    }
    
    /* Make navigation items more touch-friendly */
    .nav a {
        padding: 0.9rem 1rem;
        font-size: 0.9rem;
    }
    
    /* --- Fix World Updates Layout in Mobile --- */
    /* Convert to single column layout with optimized spacing */
    .world-updates-grid-with-ad {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        margin-top: 1rem;
    }
    
    .world-updates-grid-with-ad .world-ad-slot-container {
        order: 2; /* Place ad after a few news items */
        width: 100%;
        margin: 0.5rem 0;
        min-height: auto;
        height: auto;
    }
    
    .world-updates-grid-with-ad .world-ad-slot-container .ad-slot {
        min-height: 250px;
        height: auto;
    }
    
    /* Remove excessive spacing after ad */
    .world-updates-grid-with-ad .news-card:nth-child(n+7) {
        margin-top: 0;
    }
    
    /* Space news cards evenly */
    .world-updates-grid-with-ad .news-card {
        margin-bottom: 0.6rem;
        border-radius: 8px;
    }
    
    .world-updates-grid-with-ad .news-card:last-child {
        margin-bottom: 0;
    }

    /* Enhanced News Card Mobile Styling */
    .news-card {
        border-radius: 8px;
    }

    .news-card:hover {
        transform: none; /* No hover effects on mobile */
    }

    .news-card .img-container {
        border-radius: 6px;
        height: 80px;
        width: 80px;
    }

    .news-card .news-card-body {
        padding-left: 0.5rem;
    }

    .news-card .news-card-body .card-title {
        font-size: 0.9rem !important;
    }

    /* --- Better Handling of Category Sections --- */
    .category-section {
        padding: 0.8rem 0.6rem;
        margin-bottom: 0.8rem;
    }

    .category-title {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
        letter-spacing: 0.3px;
    }

    /* --- Enhanced Trending Bar for Mobile --- */
    .main-content-area > .trending-bar {
        padding: 0.35rem 0.8rem;
        height: 32px;
        margin-top: 0.5rem;
        margin-bottom: 0.8rem;
    }

    .trending-label {
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.4px;
    }

    .trending-items li a {
        font-size: 0.7rem;
    }

    /* --- Improved Mobile Spacing --- */
    .page-body-wrapper {
        margin-top: calc(var(--header-height-mobile) + 0.3rem);
    }

    .main-content-area > .container {
        padding-bottom: 0.5rem;
    }

    .main-content-area > .hero-section {
        margin-bottom: 0.8rem;
    }

    /* --- Improve Carousel for Mobile --- */
    .news-carousel {
        border-radius: 8px;
        aspect-ratio: 16 / 9;
        max-height: 180px;
    }

    .news-carousel .slide-caption h3 {
        font-size: 0.85rem;
        padding-bottom: 1.2rem;
    }

    /* --- Make Recent Posts More Touch-Friendly --- */
    .recent-posts-hero {
        padding: 0.8rem;
        border-radius: 8px;
    }

    .recent-posts-hero .recent-post-list-item {
        padding: 0.6rem 0 !important;
    }

    .recent-posts-hero .recent-post-list-link {
        gap: 0.8rem !important;
    }

    .recent-posts-hero .recent-post-list-image {
        width: 75px !important;
        height: 50px !important;
        border-radius: 5px !important;
    }
}

/* --- Mobile Search Overlay --- */
.mobile-search-overlay {
    position: fixed;
    top: var(--header-height-mobile);
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 1rem;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: none;
}

.mobile-search-overlay.active {
    transform: translateY(0);
    opacity: 1;
    display: block;
}

.mobile-search-form {
    display: flex;
    width: 100%;
    gap: 0.5rem;
}

.mobile-search-input {
    flex-grow: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: var(--background-color);
    color: var(--text-color);
}

.mobile-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.mobile-search-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
}

.mobile-search-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--muted-text-color);
    cursor: pointer;
    padding: 0.3rem;
}

/* --- Mobile Styles --- */
@media (max-width: 768px) {
    /* Navigation and Layout Adjustments */
    .category-section,
    .category-section.exam-tips,
    .category-section.tech {
        border-left: none !important;
        padding: 1rem 0.8rem !important;
        box-shadow: none !important;
        background: transparent !important;
    }
    
    /* Category-specific styling for mobile */
    .exam-tips .news-card,
    .tech .news-card {
        border-radius: var(--border-radius-base);
        box-shadow: var(--card-shadow);
        overflow: hidden;
        border: 1px solid var(--border-color);
    }
    
    /* Category listing style for mobile */
    .category-listing .news-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* First article as big tile in category page */
    .category-listing .news-grid article:first-child {
        grid-column: 1 / -1;
    }
    
    .category-listing .news-grid article:first-child .img-container {
        height: 200px;
    }
    
    .category-listing .news-grid article:first-child .card-title {
        font-size: 1.2rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    
    .category-listing .news-grid article:first-child p {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        margin-bottom: 0.8rem;
    }
    
    /* Load more button for category pages */
    .load-more-container {
        text-align: center;
        margin: 2rem 0;
    }
    
    .load-more-btn {
        background-color: var(--primary-color);
        color: white;
        border: none;
        padding: 0.8rem 1.5rem;
        border-radius: var(--border-radius-base);
        font-size: 0.9rem;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }
    
    .load-more-btn:hover {
        background-color: var(--primary-color-dark);
    }
    
    .load-more-btn:disabled {
        background-color: var(--muted-text-color);
        cursor: not-allowed;
    }
    
    /* Show only first 5 articles initially in mobile category view */
    .category-listing .news-grid article:nth-child(n+6) {
        display: none;
    }
    
    .category-listing .news-grid.show-all article:nth-child(n+6) {
        display: block;
    }
    
    /* Mobile language toggle styling */
    .mobile-language-toggle {
        display: flex;
        align-items: center;
        background: transparent;
        border: 1px solid var(--border-color);
        padding: 0.35rem 0.6rem;
        border-radius: var(--border-radius-base);
        font-size: 0.8rem;
        cursor: pointer;
        margin-right: 0.8rem;
        transition: all 0.2s ease;
    }
    
    .mobile-language-toggle:hover {
        border-color: var(--primary-color);
    }
    
    .mobile-language-toggle .current-lang {
        font-weight: bold;
        color: var(--primary-color);
    }
    
    .mobile-language-toggle .lang-separator {
        margin: 0 0.3rem;
        color: var(--muted-text-color);
    }
    
    @media (min-width: 769px) {
        .mobile-language-toggle {
            display: none;
        }
    }
}