/*
Theme Name: Newspaper
Theme URI: https://sonalinews.com
Author: Sonali IT
Author URI: https://sonalinews.com
Description: A complete Bengali newspaper/news portal theme inspired by SonaliNews.com. Features multi-level navigation, category sections, video gallery, latest/popular sidebar widget, and full Bangla language support.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sonali-news
Tags: news, newspaper, magazine, blog, bengali, bangla, responsive-layout, custom-menu, custom-logo, featured-images, two-columns, three-columns, rtl-language-support
*/

/* ===========================
   FONTS
   The theme intentionally loads NO web font and forces NO specific typeface.
   Upload/activate your own font through WordPress (a custom-fonts plugin or
   Appearance → Customize → Additional CSS) by setting it on `body`, and it
   will cascade to the whole site — every element below uses inheritable fonts.
   The only declaration here is a neutral system fallback on `body` so the site
   still renders Bengali correctly before you set your own font.
=========================== */

/* ===========================
   CSS RESET & BASE
=========================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --nav-green: #2e7d32;
    --nav-green-dark: #1b5e20;
    --nav-green-light: #388e3c;
    --nav-maroon: #800000;
    --nav-maroon-dark: #5c0000;
    --logo-red: #cc1122;
    --logo-green: #1a8a1a;
    --accent-red: #cc1122;
    --misc-bg: #cc1122;
    --text-dark: #1a1a1a;
    --text-medium: #444444;
    --text-light: #777777;
    --bg-white: #ffffff;
    --bg-light: #f4f4f4;
    --bg-lightgray: #eeeeee;
    --border-color: #ddd;
    --footer-bg: #f8f8f8;
    --card-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Base font size — raise/lower this single value to scale ALL text site-wide
   (the theme uses rem units throughout). 16px = default, 17px ≈ +6%. */
html { font-size: 17px; scroll-behavior: smooth; }

body {
    /* Neutral system fallback only. Override this single line (e.g. via a fonts
       plugin or Additional CSS) to change the whole site's typeface. */
    font-family: sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

/* Headlines inherit the body font so your uploaded font applies everywhere. */
h1, h2, h3,
.entry-title,
.feat-title, .fi-title,
.s-news-item .s-title,
.cat-sec-head h2, .cat-sec-head h3,
.widget-head,
.sec-heading,
.archive-hdr h1,
.page-title,
.news-card .nc-title,
.news-hitem .nh-title {
    font-family: inherit;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-red); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { font-family: inherit; }

/* ===========================
   CONTAINER
=========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===========================
   TOP BAR
=========================== */
#topbar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 5px 0;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 14px;
}
.topbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 0.83rem;
    color: var(--text-medium);
}
/* Separator dot between topbar date items */
.topbar-greg { position: relative; }
.topbar-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 3px;
}
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 3px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    transition: opacity 0.2s;
}
.social-icon:hover { opacity: 0.82; color: #fff; }
.social-icon svg { display: block; }
.social-facebook  { background: #1877f2; }
.social-youtube   { background: #ff0000; }
.social-twitter   { background: #000000; }
.social-linkedin  { background: #0077b5; }
.social-pinterest { background: #e60023; }

/* ===========================
   SITE HEADER
=========================== */
#site-header {
    background: #fff;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo a { display: inline-block; }
.site-logo img { max-height: 85px; width: auto; }

/* Text logo (fallback / customizer) */
.text-logo {
    font-family: inherit;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
}
.text-logo .part-bangla,
.text-logo .part-khobar { color: var(--nav-maroon); }
.text-logo-sub { font-size: 0.95rem; font-weight: 600; color: var(--text-medium); margin-top: 2px; text-decoration: underline; }
.site-tagline { font-size: 0.88rem; color: var(--text-medium); margin-top: 4px; }
.header-ad-area { min-width: 300px; text-align: right; }

/* ===========================
   NAVIGATION
=========================== */
#main-nav {
    background: var(--nav-maroon);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px 14px;
    line-height: 1;
}

/* Primary menu */
#primary-menu {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}
#primary-menu li { position: relative; }
#primary-menu > li > a {
    display: block;
    padding: 13px 13px;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: background 0.2s;
}
#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a,
#primary-menu > li.current-menu-ancestor > a,
#primary-menu > li.current-menu-parent > a {
    background: rgba(0,0,0,0.22);
    border-bottom-color: #ffc107;
    color: #fff;
}
/* Home icon */
#primary-menu > li.menu-home > a,
#primary-menu > li:first-child > a { font-size: 1.1rem; padding: 13px 14px; }

/* Last item (বিবিধ) — red bg */
#primary-menu > li.menu-misc > a { background: var(--misc-bg); }
#primary-menu > li.menu-misc > a:hover { background: #aa0011; border-bottom-color: transparent; }

/* Dropdown arrow */
#primary-menu .menu-item-has-children > a::after { content: ' ▾'; font-size: 0.7rem; }

/* Dropdown */
#primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.2s ease;
    z-index: 1000;
}
#primary-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
#primary-menu .sub-menu li a {
    display: block;
    padding: 9px 16px;
    color: var(--text-dark);
    font-size: 0.88rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s, color 0.15s;
}
#primary-menu .sub-menu li:last-child a { border-bottom: none; }
#primary-menu .sub-menu li a:hover { background: var(--bg-light); color: var(--accent-red); }
/* 3rd-level */
#primary-menu .sub-menu .sub-menu { top: 0; left: 100%; transform: none; }

/* Nav search toggle */
.nav-search-btn {
    padding: 13px 14px;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    position: relative;
}
.nav-search-box {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    padding: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    width: 300px;
    z-index: 1001;
}
.nav-search-box.open { display: flex; }
.nav-search-box input[type="search"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-right: none;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}
.nav-search-box button {
    padding: 8px 14px;
    background: var(--nav-maroon);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

/* ===========================
   BREAKING NEWS TICKER
=========================== */
#breaking-news {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    overflow: hidden;
    min-height: 36px;
}
.breaking-label {
    background: var(--accent-red);
    color: #fff;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    align-self: stretch;
}
.breaking-label::before { content: '⚡'; }
.breaking-ticker-wrap { flex: 1; overflow: hidden; padding: 0 14px; position: relative; }
.breaking-ticker-track {
    display: flex;
    width: max-content;
    animation: sonali-ticker 35s linear infinite;
}
.breaking-ticker-wrap:hover .breaking-ticker-track { animation-play-state: paused; }
.ticker-content { display: flex; flex-shrink: 0; white-space: nowrap; }
.breaking-ticker-wrap a { color: var(--text-dark); margin-right: 50px; font-size: 0.88rem; white-space: nowrap; }
.breaking-ticker-wrap a:hover { color: var(--accent-red); }
@keyframes sonali-ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ===========================
   BREADCRUMB
=========================== */
.breadcrumb-wrap {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 9px 0;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-medium);
}
.breadcrumb a { color: var(--text-medium); }
.breadcrumb a:hover { color: var(--accent-red); }
.breadcrumb .bc-sep { color: var(--text-light); }
.breadcrumb .bc-home { font-size: 1rem; }
.breadcrumb .bc-current { color: var(--text-dark); }

/* ===========================
   MAIN CONTENT
=========================== */
#content { padding: 20px 0 30px; }

/* Two-column: content + sidebar */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

/* ===========================
   SECTION HEADINGS
=========================== */
.sec-heading {
    display: flex;
    align-items: stretch;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--nav-green);
}
.sec-heading h2, .sec-heading h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: var(--nav-green);
    padding: 7px 16px;
    margin: 0;
    display: flex;
    align-items: center;
}
.sec-heading .sec-more {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-medium);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    align-self: center;
    border-radius: 2px;
}
.sec-heading .sec-more:hover { background: var(--nav-green); color: #fff; border-color: var(--nav-green); }

/* ===========================
   NEWS CARD (vertical, 3-column grid)
=========================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.news-card {
    background: #fff;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.news-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.14); }
.news-card .nc-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #e8e8e8;
}
.news-card .nc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.news-card:hover .nc-thumb img { transform: scale(1.04); }
.nc-thumb .video-badge {
    position: absolute;
    top: 7px;
    left: 7px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 2px 7px;
    font-size: 0.7rem;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
}
.nc-thumb .thumb-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.78));
    padding: 22px 8px 7px;
    color: #fff;
    font-size: 0.75rem;
}
.nc-thumb .thumb-overlay a { color: #ffcc44; font-size: 0.72rem; }
.nc-thumb .no-image {
    width: 100%;
    height: 100%;
    min-height: 150px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 0.8rem;
}
.news-card .nc-body { padding: 11px 12px 13px; }
.news-card .nc-cat {
    color: var(--accent-red);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}
.news-card .nc-title {
    font-size: 0.97rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 7px;
}
.news-card .nc-title a { color: var(--text-dark); }
.news-card .nc-title a:hover { color: var(--accent-red); }
.news-card .nc-meta { font-size: 0.75rem; color: var(--text-light); display: flex; gap: 10px; }

/* ===========================
   NEWS CARD HORIZONTAL (list style)
=========================== */
.news-hlist { display: flex; flex-direction: column; gap: 10px; }
.news-hitem {
    background: #fff;
    display: flex;
    gap: 0;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.news-hitem .nh-thumb {
    flex-shrink: 0;
    width: 155px;
    height: 105px;
    overflow: hidden;
    position: relative;
    background: #e8e8e8;
}
.news-hitem .nh-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-hitem .nh-thumb .video-badge {
    position: absolute;
    top: 5px; left: 5px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 2px 6px;
    font-size: 0.68rem;
    border-radius: 2px;
}
.news-hitem .nh-thumb .thumb-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    padding: 16px 7px 5px;
    font-size: 0.68rem;
    color: #fff;
}
.news-hitem .nh-thumb .thumb-overlay a { color: #ffcc44; font-size: 0.68rem; }
.news-hitem .nh-body {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.news-hitem .nh-cat { color: var(--accent-red); font-size: 0.75rem; font-weight: 600; margin-bottom: 4px; }
.news-hitem .nh-title { font-size: 0.95rem; font-weight: 600; line-height: 1.45; }
.news-hitem .nh-title a { color: var(--text-dark); }
.news-hitem .nh-title a:hover { color: var(--accent-red); }
.news-hitem .nh-meta { margin-top: 5px; font-size: 0.75rem; color: var(--text-light); }

/* ===========================
   VIDEO GALLERY PAGE
=========================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.video-grid .news-hitem { flex-direction: column; }
.video-grid .news-hitem .nh-thumb { width: 100%; height: 150px; }

/* Load more */
.load-more-wrap { text-align: center; margin: 22px 0; }
.btn-more {
    display: inline-block;
    padding: 10px 35px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-medium);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-more:hover { background: var(--nav-green); color: #fff; border-color: var(--nav-green); }

/* ===========================
   HOMEPAGE FEATURED
=========================== */
.home-featured {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    background: #000;
}
.home-featured img { width: 100%; height: 380px; object-fit: cover; opacity: 0.88; }
.home-featured .feat-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.88));
    padding: 50px 22px 22px;
    color: #fff;
}
.home-featured .feat-cat { background: var(--accent-red); color: #fff; font-size: 0.8rem; padding: 2px 10px; margin-bottom: 8px; display: inline-block; }
.home-featured .feat-title { font-size: 1.5rem; font-weight: 700; line-height: 1.4; }
.home-featured .feat-title a { color: #fff; }
.home-featured .feat-title a:hover { color: #ffdd88; }

/* ===========================
   ARCHIVE HEADER
=========================== */
.archive-hdr {
    background: #fff;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--accent-red);
}
.archive-hdr h1 { font-size: 1.3rem; font-weight: 700; color: var(--nav-green); }
.archive-hdr .archive-desc { font-size: 0.88rem; color: var(--text-medium); margin-top: 4px; }

/* ===========================
   SIDEBAR
=========================== */
.widget { background: #fff; margin-bottom: 18px; box-shadow: var(--card-shadow); overflow: hidden; }

/* Latest/Popular tabs widget */
.widget-tabs .tab-nav { display: flex; }
.widget-tabs .tab-btn {
    flex: 1;
    padding: 11px 8px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: #f0f0f0;
    color: var(--text-dark);
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.widget-tabs .tab-btn:hover { background: #d8e8d8; }
.widget-tabs .tab-btn.active { background: var(--nav-green); color: #fff; }
.widget-tabs .tab-btn.active:hover { background: var(--nav-green-dark); }
.widget-tabs .tab-pane { display: none; padding: 10px; }
.widget-tabs .tab-pane.active { display: block; }

/* Sidebar news items */
.s-news-item {
    display: flex;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px solid #f0f0f0;
}
.s-news-item:last-child { border-bottom: none; padding-bottom: 0; }
.s-news-item .s-thumb { flex-shrink: 0; width: 72px; height: 54px; overflow: hidden; background: #e8e8e8; }
.s-news-item .s-thumb img { width: 100%; height: 100%; object-fit: cover; }
.s-news-item .s-body { flex: 1; }
.s-news-item .s-title { font-size: 0.84rem; font-weight: 500; line-height: 1.4; color: var(--text-dark); }
.s-news-item .s-title a { color: inherit; }
.s-news-item .s-title a:hover { color: var(--accent-red); }
.s-news-item .s-meta { font-size: 0.73rem; color: var(--text-light); margin-top: 3px; }

/* Standard widget title */
.widget-head {
    background: var(--nav-green);
    color: #fff;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: 700;
}
/* Reset heading tags inside widget-head (WP outputs <h2 class="widget-title"> wrapped by before_title) */
.widget-head h2,
.widget-head h3,
.widget-head .widget-title {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
    background: none;
    line-height: 1.3;
}
.widget-head.red { background: var(--accent-red); }
.widget-body { padding: 12px; }

/* Standalone widget titles (block widgets / fallback when before_title not applied) */
.widget h2.widget-title,
.widget h3.widget-title,
.widget h2.wp-block-heading,
.widget h3.wp-block-heading,
h2.widget-title,
h3.widget-title {
    background: var(--nav-green);
    color: #fff;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0 0;
    line-height: 1.3;
}

/* WordPress default widget lists (Archives, Categories, Recent Posts, etc.) */
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0 14px;
}
.widget ul li {
    padding: 7px 0;
    border-bottom: 1px solid #f3f3f3;
    font-size: 0.88rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a {
    color: var(--text-dark);
    flex: 1;
    line-height: 1.4;
}
.widget ul li a:hover { color: var(--nav-green); }
.widget ul li .post-count,
.widget ul li span { color: var(--text-light); font-size: 0.8rem; margin-left: 6px; }

/* Recent Comments: inline text "author on post" — reset flex */
.widget_recent_comments ul li.recentcomments,
.widget_recent_comments ul li {
    display: block;
    font-size: 0.85rem;
    line-height: 1.5;
}
.widget_recent_comments ul li a { flex: none; display: inline; }

/* Recent Posts: show date below title */
.widget_recent_entries ul li { display: block; }
.widget_recent_entries ul li a { display: block; flex: none; }
.widget_recent_entries .post-date { display: block; font-size: 0.75rem; color: var(--text-light); margin-top: 2px; }

/* Tag cloud widget */
.widget.widget_tag_cloud .widget-body,
.widget.widget_tag_cloud > .tagcloud { padding: 10px 14px 12px; }
.tagcloud a {
    display: inline-block;
    background: #f0f0f0;
    color: var(--text-dark);
    font-size: 0.8rem !important;
    padding: 3px 8px;
    margin: 3px;
    border-radius: 3px;
    line-height: 1.5;
}
.tagcloud a:hover { background: var(--nav-green); color: #fff; }

/* Search widget in sidebar — handles both WP html5 and legacy output */
.widget.widget_search .search-form,
.widget.widget_search form,
.sidebar-search-wrap form {
    display: flex;
    align-items: stretch;
    margin: 12px 14px;
    height: 42px;
    border: 2px solid #e3e3e3;
    border-radius: 4px;
    overflow: hidden;
}
.widget.widget_search .search-form:focus-within,
.widget.widget_search form:focus-within { border-color: var(--nav-maroon); }
/* WP html5 search wraps input in <label> — make it a flex child */
.widget.widget_search .search-form label,
.widget.widget_search form label {
    flex: 1;
    display: flex;
    margin: 0;
    min-width: 0;
}
/* Hide WP's "Search for:" / "Search" label text, keep it for screen readers */
.widget.widget_search .screen-reader-text,
.widget.widget_search label > span {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
.widget.widget_search .search-field,
.widget.widget_search input[type="search"],
.widget.widget_search input[type="text"],
.sidebar-search-wrap input[type="search"] {
    flex: 1;
    border: none;
    padding: 0 12px;
    font-size: 0.88rem;
    outline: none;
    font-family: inherit;
    background: #fafafa;
    color: var(--text-dark);
    min-width: 0;
    width: 100%;
}
.widget.widget_search .search-submit,
.widget.widget_search button[type="submit"],
.widget.widget_search input[type="submit"],
.sidebar-search-wrap button[type="submit"] {
    background: var(--nav-maroon);
    color: #fff;
    border: none;
    padding: 0 18px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s;
}
.widget.widget_search .search-submit:hover,
.widget.widget_search button[type="submit"]:hover,
.widget.widget_search input[type="submit"]:hover,
.sidebar-search-wrap button[type="submit"]:hover { background: var(--nav-maroon-dark); }

/* Custom sidebar search */
.sb-search-form {
    display: flex;
    margin: 0;
    border: none;
}
.sb-search-form input[type="search"] {
    flex: 1;
    border: 2px solid #e8e8e8;
    border-right: none;
    padding: 9px 11px;
    font-size: 0.88rem;
    outline: none;
    font-family: inherit;
    background: #fafafa;
    color: var(--text-dark);
    min-width: 0;
    border-radius: 3px 0 0 3px;
}
.sb-search-form input[type="search"]:focus { border-color: var(--nav-maroon); }
.sb-search-form button[type="submit"] {
    background: var(--nav-maroon);
    color: #fff;
    border: none;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 0 3px 3px 0;
    transition: background 0.2s;
}
.sb-search-form button[type="submit"]:hover { background: var(--nav-maroon-dark); }

/* Ad widget */
.widget-ad { overflow: hidden; }
.widget-ad img { width: 100%; height: auto; display: block; }
.widget-ad .ad-placeholder {
    background: #eee;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 0.82rem;
}

/* Square ad (1:1) — keeps a perfect square regardless of widget content */
.widget-ad-square { max-width: 300px; margin-left: auto; margin-right: auto; }
.widget-ad-square img { width: 100%; height: auto; }
.ad-square {
    aspect-ratio: 1 / 1;
    width: 100%;
    min-height: 0;
    border: 1px dashed #ccc;
    background: #f3f3f3;
}
/* Fallback for old browsers without aspect-ratio support */
@supports not (aspect-ratio: 1 / 1) {
    .ad-square { height: 300px; }
}

/* ===========================
   SINGLE POST
=========================== */
.single-post-wrap {
    background: #fff;
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}
.post-cat-tag { color: var(--accent-red); font-size: 0.82rem; font-weight: 600; display: inline-block; margin-bottom: 8px; }
.entry-title { font-size: 1.65rem; font-weight: 700; line-height: 1.4; margin-bottom: 12px; color: var(--text-dark); }
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--text-light);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}
.entry-meta span { display: flex; align-items: center; gap: 4px; }
.entry-feat-image { margin-bottom: 18px; }
.entry-feat-image img { width: 100%; height: auto; }
.entry-feat-image .caption { font-size: 0.78rem; color: var(--text-light); text-align: center; padding: 5px; background: #f9f9f9; }

.entry-content { font-size: 1.1rem; line-height: 1.9; color: var(--text-dark); }
.entry-content p { margin-bottom: 1rem; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.3rem 0 0.6rem; font-weight: 700; }
.entry-content img { max-width: 100%; height: auto; margin: 1rem 0; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.entry-content li { margin-bottom: 0.3rem; }
.entry-content blockquote {
    border-left: 4px solid var(--nav-green);
    padding: 12px 20px;
    margin: 1rem 0;
    background: var(--bg-light);
    font-style: italic;
    color: var(--text-medium);
}
.entry-content a { color: var(--nav-green); text-decoration: underline; }
.entry-content a:hover { color: var(--accent-red); }

/* Share buttons */
.post-share {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 16px 0;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}
.share-label { font-size: 0.83rem; font-weight: 600; color: var(--text-medium); }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    font-size: 0.8rem;
    color: #fff;
    border-radius: 3px;
    transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.85; color: #fff; }
.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-wa { background: #25d366; }

/* Tags */
.post-tags { margin-top: 14px; }
.post-tags .tag-label { font-size: 0.83rem; color: var(--text-medium); margin-bottom: 5px; display: block; }
.post-tags a {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    margin: 3px 2px;
    color: var(--text-medium);
    border-radius: 2px;
    transition: all 0.2s;
}
.post-tags a:hover { background: var(--nav-green); color: #fff; border-color: var(--nav-green); }

/* ===========================
   RELATED POSTS
=========================== */
.related-posts { margin-top: 22px; }

/* ===========================
   COMMENTS
=========================== */
.comments-section {
    background: #fff;
    padding: 20px;
    box-shadow: var(--card-shadow);
}
.comments-section h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--nav-green); }
.comment-list { margin-bottom: 22px; }
.comment { padding: 13px 0; border-bottom: 1px solid var(--border-color); }
.comment:last-child { border-bottom: none; }
.comment-author-name { font-weight: 600; font-size: 0.9rem; }
.comment-date { font-size: 0.76rem; color: var(--text-light); margin-bottom: 6px; }
.comment-text { font-size: 0.9rem; color: var(--text-medium); line-height: 1.6; }
.comment-reply-link { font-size: 0.8rem; color: var(--nav-green); margin-top: 5px; display: inline-block; }

.comment-form-wrap h4 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.2s;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--nav-green); }
.comment-form textarea { height: 120px; resize: vertical; }
.comment-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.comment-form .btn-comment {
    padding: 10px 26px;
    background: var(--nav-green);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.92rem;
    font-family: inherit;
    transition: background 0.2s;
}
.comment-form .btn-comment:hover { background: var(--nav-green-dark); }

/* ===========================
   PAGINATION
=========================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.pagination a, .pagination span.current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    border: 1px solid var(--border-color);
    font-size: 0.88rem;
    background: #fff;
    color: var(--text-dark);
    transition: all 0.2s;
}
.pagination .current, .pagination a:hover { background: var(--nav-green); color: #fff; border-color: var(--nav-green); }

/* ===========================
   SEARCH PAGE
=========================== */
.search-bar-wrap { background: #fff; padding: 16px; box-shadow: var(--card-shadow); margin-bottom: 16px; }
.search-big { display: flex; }
.search-big input[type="search"] {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-right: none;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}
.search-big button {
    padding: 11px 20px;
    background: var(--nav-green);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
}
.search-result-count { font-size: 0.88rem; color: var(--text-medium); margin-bottom: 14px; }

/* ===========================
   404 PAGE
=========================== */
.error-404-wrap {
    background: #fff;
    text-align: center;
    padding: 60px 20px;
    box-shadow: var(--card-shadow);
}
.error-404-wrap .num-404 { font-size: 6rem; font-weight: 700; color: var(--nav-green); line-height: 1; }
.error-404-wrap h2 { font-size: 1.5rem; margin: 10px 0; }
.error-404-wrap p { color: var(--text-medium); margin-bottom: 20px; }

/* ===========================
   FOOTER
=========================== */
#site-footer { background: var(--footer-bg); border-top: 2px solid var(--border-color); padding: 28px 0 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 240px 1fr 1fr;
    gap: 30px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}
.footer-brand .foot-logo img { max-height: 60px; margin-bottom: 8px; }
.footer-brand .text-logo { font-size: 1.9rem; }
.footer-brand .foot-tag { font-size: 0.83rem; color: var(--text-medium); margin-top: 5px; }
.footer-col p { font-size: 0.85rem; color: var(--text-medium); margin-bottom: 5px; line-height: 1.65; }
.footer-col a { color: var(--text-medium); }
.footer-col a:hover { color: var(--accent-red); }

.footer-bottom { background: var(--bg-lightgray); padding: 11px 0; margin-top: 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: var(--text-medium); flex-wrap: wrap; gap: 6px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--text-medium); }
.footer-links a:hover { color: var(--accent-red); }
.footer-powered a { color: var(--nav-green); font-weight: 600; }

/* ===========================
   STATIC PAGE
=========================== */
.page-content-wrap { background: #fff; padding: 24px; box-shadow: var(--card-shadow); }
.page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--nav-green); color: var(--text-dark); }

/* ===========================
   HOMEPAGE — AD BANNER ROW
=========================== */
.home-ad-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}
.home-ad-row .ad-slot {
    overflow: hidden;
    background: #f0f0f0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-ad-row .ad-slot img { width: 100%; height: auto; display: block; }
.home-ad-row .ad-placeholder {
    color: #aaa;
    font-size: 0.8rem;
    text-align: center;
    padding: 20px;
}

/* ===========================
   HOMEPAGE — ROWS
=========================== */
.home-row { margin-bottom: 22px; }

/* 3 equal-width columns */
.home-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

/* 2 columns: 2:1 wide:narrow */
.home-2col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 22px;
}

/* 2 columns: 1:1 equal */
.home-2col-eq {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 22px;
}

/* ===========================
   CATEGORY SECTION HEADING
   (green box + extending green line)
=========================== */
.cat-sec { }
.cat-sec-head {
    border-bottom: 3px solid var(--nav-green);
    margin-bottom: 13px;
    line-height: 1;
}
.cat-sec-head h2,
.cat-sec-head h3 {
    display: inline-block;
    background: var(--nav-green);
    color: #fff;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.2px;
}

/* ===========================
   SECTION TYPE A — Featured image + list
   (1 large hero image + 4 list items)
=========================== */
.feat-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    background: #e8e8e8;
}
.feat-hero a { display: block; }
.feat-hero img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.feat-hero:hover img { transform: scale(1.03); }
.feat-hero .feat-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.82));
    padding: 30px 10px 10px;
    color: #fff;
}
.feat-hero .feat-caption .feat-cat-tag {
    font-size: 0.72rem;
    background: var(--accent-red);
    color: #fff;
    padding: 2px 7px;
    display: inline-block;
    margin-bottom: 5px;
}
.feat-hero .feat-caption .feat-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
}
.feat-hero .feat-caption .feat-title a { color: #fff; }
.feat-hero .feat-caption .feat-title a:hover { color: #ffdd88; }
.feat-hero .no-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.8rem;
}

/* List items below featured */
.feat-items { border-top: 1px solid var(--border-color); }
.feat-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}
.feat-item:last-child { border-bottom: none; }
.feat-item .fi-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 58px;
    overflow: hidden;
    background: #e0e0e0;
}
.feat-item .fi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feat-item .fi-title {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-dark);
}
.feat-item .fi-title a { color: inherit; }
.feat-item .fi-title a:hover { color: var(--accent-red); }

/* ===========================
   SECTION TYPE B — 2x2 Grid
=========================== */
.grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.grid-2x2 .grid-item {}
.grid-2x2 .grid-item .gi-thumb {
    overflow: hidden;
    aspect-ratio: 3/2;
    background: #e0e0e0;
    margin-bottom: 5px;
}
.grid-2x2 .grid-item .gi-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.grid-2x2 .grid-item:hover .gi-thumb img { transform: scale(1.04); }
.grid-2x2 .grid-item .gi-title {
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-dark);
    padding: 0 2px;
}
.grid-2x2 .grid-item .gi-title a { color: inherit; }
.grid-2x2 .grid-item .gi-title a:hover { color: var(--accent-red); }

/* ===========================
   SECTION TYPE C — 3-Col Image Grid
   (for entertainment, sports wide sections)
=========================== */
.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.grid-3col .gi-thumb {
    overflow: hidden;
    aspect-ratio: 3/2;
    background: #e0e0e0;
    margin-bottom: 7px;
}
.grid-3col .gi-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.grid-3col .grid-item:hover .gi-thumb img { transform: scale(1.04); }
.grid-3col .gi-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
}
.grid-3col .gi-title a { color: inherit; }
.grid-3col .gi-title a:hover { color: var(--accent-red); }

/* ===========================
   DISTRICT MAP WIDGET
=========================== */
.district-map-section { }
.district-map-section .map-img-wrap {
    position: relative;
    text-align: center;
}
.district-map-section .map-img-wrap img {
    max-width: 100%;
    height: auto;
}
.district-map-section .district-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.district-map-section .district-links a {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-medium);
    border-radius: 2px;
    transition: all 0.15s;
}
.district-map-section .district-links a:hover {
    background: var(--nav-green);
    color: #fff;
    border-color: var(--nav-green);
}
/* Simple inline Bangladesh map */
.bd-map-simple {
    width: 100%;
    max-height: 260px;
    text-align: center;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bd-map-simple svg { max-height: 240px; width: auto; }

/* ===========================
   HOMEPAGE INTER-ROW AD
=========================== */
.home-inline-ad {
    margin: 0 0 20px;
    text-align: center;
}
.home-inline-ad img { max-width: 100%; height: auto; margin: 0 auto; }
.home-inline-ad .ad-placeholder {
    background: #f0f0f0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.82rem;
}

/* ===========================
   RESPONSIVE — HOMEPAGE ROWS
=========================== */
@media (max-width: 1024px) {
    .home-3col { grid-template-columns: repeat(2, 1fr); }
    .home-3col > *:last-child { grid-column: 1/-1; }
    .home-2col { grid-template-columns: 1fr; }
    .home-2col-eq { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .home-ad-row { grid-template-columns: 1fr; }
    .home-3col { grid-template-columns: 1fr; }
    .home-3col > *:last-child { grid-column: auto; }
    .home-2col { grid-template-columns: 1fr; }
    .home-2col-eq { grid-template-columns: 1fr; }
    .grid-2x2 { grid-template-columns: 1fr; }
    .grid-3col { grid-template-columns: 1fr 1fr; }
    .feat-hero img { aspect-ratio: 16/9; }
}

@media (max-width: 480px) {
    .grid-3col { grid-template-columns: 1fr; }
    .home-ad-row .ad-slot { min-height: 60px; }
}

/* ===========================
   UTILITIES
=========================== */
.clearfix::after { content: ''; display: table; clear: both; }
.screen-reader-text { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; border: 0!important; }
.alignleft { float: left; margin: 0 20px 10px 0; }
.alignright { float: right; margin: 0 0 10px 20px; }
.aligncenter { display: block; margin: 0 auto 10px; }
.wp-caption-text { font-size: 0.8rem; color: var(--text-light); text-align: center; margin-top: 4px; }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
    .layout-with-sidebar { grid-template-columns: 1fr 270px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid .footer-brand { grid-column: 1/-1; }
    #primary-menu > li > a { padding: 13px 10px; font-size: 0.87rem; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-inner { flex-wrap: wrap; justify-content: space-between; }
    #primary-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        max-height: 75vh;
        overflow-y: auto;
    }
    #primary-menu.open { display: flex; }
    #primary-menu > li > a { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.12); border-bottom-width: 1px!important; border-left-color: transparent; }
    #primary-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: rgba(0,0,0,0.18); display: none; }
    #primary-menu .sub-menu.open { display: block; }
    #primary-menu .sub-menu li a { color: rgba(255,255,255,0.9); background: transparent; padding-left: 32px; border-bottom-color: rgba(255,255,255,0.1); }
    #primary-menu .sub-menu li a:hover { background: rgba(0,0,0,0.12); color: #fff; }

    .layout-with-sidebar { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .video-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 18px; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
    .header-inner { flex-direction: column; align-items: flex-start; }
    .header-ad-area { display: none; }
    .topbar-item.location { display: none; }
    .home-featured img { height: 240px; }
    .entry-title { font-size: 1.3rem; }
    .comment-form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .news-grid { grid-template-columns: 1fr; }
    .video-grid { grid-template-columns: 1fr; }
    .video-grid .news-hitem { flex-direction: column; }
    .video-grid .news-hitem .nh-thumb { width: 100%; height: 180px; }
    .text-logo { font-size: 2.2rem; }
    .topbar-right .social-icon { width: 24px; height: 24px; font-size: 0.7rem; }
    .home-featured img { height: 190px; }
}
