/*
Theme Name: Nalanda Reporter
Theme URI: https://nalandareporter.com
Author: Nalanda Reporter Team
Author URI: https://nalandareporter.com
Description: Nalanda Reporter is a professional WordPress news theme built for local and regional journalism. Features a YouTube-style grid layout, category colour system, AMP support, and full Hindi/Devanagari typography.
Version: 1.0.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nalandareporter
Tags: blog, news, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, flexible-header, translation-ready
*/

/* ==========================================================================
   1. RESET & BASE
   ========================================================================== */

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

html { overflow-x: hidden; }

body {
    /* 'Google Sans' is NOT a free webfont — using Inter / system + Noto Devanagari for Hindi */
    font-family: 'Noto Sans', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #fff;
    color: #111;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Accessibility: skip link + screen-reader-only text */
.screen-reader-text {
    border: 0; clip: rect(1px,1px,1px,1px); -webkit-clip-path: inset(50%); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link:focus { position: absolute; top: 8px; left: 8px; z-index: 100000; padding: 10px 16px; background: #111; color: #fff; clip: auto; clip-path: none; width: auto; height: auto; }

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; }

input, select, textarea, button { font-family: inherit; font-size: 16px; }

/* Prevent iOS zoom on input focus */
input[type="search"],
input[type="text"],
input[type="email"],
textarea { font-size: 16px !important; }

/* ==========================================================================
   2. LAYOUT UTILITIES
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 767px)  { .container { padding: 0 14px; } }
@media (max-width: 479px)  { .container { padding: 0 12px; } }

:root {
    --red:        #e60000;
    --red-dark:   #c00;
    --black:      #111;
    --nav-bg:     #111;
    --cat-color:  #e60000;
    --accent:     #e60000;
    --border:     #e5e5e5;
    --bg-light:   #f5f5f5;
    --text-muted: #666;
    --radius:     8px;
    --shadow:     0 2px 12px rgba(0,0,0,.1);
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--red);
    display: inline-block;
    padding-bottom: 6px;
    letter-spacing: -0.01em;
}

.cat-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    text-decoration: none;
    background: var(--cat-color, var(--red));
    margin-bottom: 8px;
}

/* ==========================================================================
   3. HEADER — STICKY, SINGLE DEFINITION
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--border);
    transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,.12); }

/* Top bar */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;  /* logo LEFT, search/hamburger RIGHT */
    gap: 12px;
    padding: 13px 0;
}

/* Logo */
.site-logo {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--black);
    text-decoration: none;
    white-space: nowrap;
    flex: 1;           /* takes all space → pushes search/hamburger to right */
    min-width: 0;
    line-height: 1;
}
.site-logo:hover { color: var(--red); }
.site-logo .custom-logo-link { display: flex; align-items: center; }
.site-logo .custom-logo      { height: 48px; width: auto; max-width: 200px; }
.site-tagline { font-size: 0.75rem; color: var(--text-muted); margin-left: 10px; }

/* Desktop search (hidden on mobile) */
.header-search-form {
    display: flex;
    align-items: center;       /* vertically centers input + button */
    background: var(--bg-light);
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    padding: 0 4px 0 16px;     /* equal top/bottom padding — no vertical offset */
    height: 44px;               /* fixed height — same as hamburger button */
    flex-shrink: 0;
    width: clamp(180px, 30%, 300px);
    transition: border-color .2s, box-shadow .2s;
}
.header-search-form:focus-within { border-color: var(--black); background: #fff; }
.header-search-form .search-field {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    color: var(--black);
    width: 100%;
    min-width: 0;
    padding: 0;
    height: 100%;              /* fills form height — no baseline misalignment */
    line-height: 1;
}
.header-search-form .search-field::placeholder { color: #aaa; }

.search-submit {
    background: var(--red);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    min-width: 34px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
    align-self: center;         /* vertically centered inside flex parent */
}
.search-submit:hover { background: var(--red-dark); }

/* Hamburger button (mobile only — hidden on desktop) */
.menu-toggle {
    display: none;              /* hidden on desktop */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;          /* always pushed to right on mobile */
}
.menu-toggle:hover { border-color: #999; }
.hamburger-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--black);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.menu-toggle.is-active .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active .hamburger-bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   4. DESKTOP PRIMARY NAV + DROPDOWN
   ========================================================================== */

.primary-nav {
    background: var(--nav-bg);
    border-top: 1px solid #1e1e1e;
}

.primary-menu-list,
.primary-menu-fallback {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Top-level links */
.primary-menu-list > li > a,
.primary-menu-fallback > li > a {
    display: block;
    padding: 10px 16px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
    line-height: 1;
}
.primary-menu-list > li > a:hover,
.primary-menu-list > li.current-menu-item > a,
.primary-menu-fallback > li > a:hover {
    background: var(--red);
}

/* Dropdown */
.primary-menu-list li { position: relative; }

.primary-menu-list .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    background: #1a1a1a;
    list-style: none;
    padding: 4px 0;
    margin: 0;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
/* HOVER only — no focus-within (prevents auto-open bug) */
.primary-menu-list > li:hover > .sub-menu { display: block; }

.primary-menu-list .sub-menu li a {
    display: block;
    padding: 10px 18px;
    color: #ddd;
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    border-bottom: 1px solid #252525;
    transition: background .15s, color .15s;
    text-decoration: none;
}
.primary-menu-list .sub-menu li a:hover { background: var(--red); color: #fff; }

/* Arrow on parent items */
.primary-nav .menu-item-has-children > a::after {
    content: ' ▾';
    font-size: 0.65em;
    opacity: 0.55;
}

/* ==========================================================================
   5. MOBILE DRAWER (hamburger → left-side panel)
   ========================================================================== */

/* Drawer hidden on desktop */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 82%;
    max-width: 310px;
    height: 100%;
    background: #111;
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform .3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.mobile-drawer.is-open { transform: translateX(0); }

/* Drawer top bar */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #222;
    flex-shrink: 0;
}
.drawer-site-name {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.drawer-close {
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.drawer-close:hover { color: #fff; background: #222; }

/* Search inside drawer */
.drawer-search {
    padding: 12px 16px;
    border-bottom: 1px solid #1e1e1e;
    flex-shrink: 0;
}
.drawer-search form {
    display: flex;
    align-items: center;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: var(--radius);
    overflow: hidden;
}
.drawer-search-field {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.95rem;
    min-width: 0;
}
.drawer-search-field::placeholder { color: #555; }
.drawer-search-submit {
    background: var(--red);
    border: none;
    color: #fff;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}
.drawer-search-submit:hover { background: var(--red-dark); }

/* Mobile menu list */
.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}
.mobile-menu-list > li {
    border-bottom: 1px solid #1c1c1c;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.mobile-menu-list > li > a {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 0 18px;
    color: #eee;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: color .15s;
}
.mobile-menu-list > li > a:hover,
.mobile-menu-list > li.current-menu-item > a { color: var(--red); }

/* Sub-menu expand arrow */
.sub-arrow {
    width: 50px;
    background: transparent;
    border: none;
    border-left: 1px solid #1c1c1c;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color .15s, background .15s, transform .2s;
}
.sub-arrow:hover { color: #fff; background: #1e1e1e; }
.sub-arrow svg { transition: transform .25s; }
.mobile-menu-list li.sub-open > .sub-arrow svg { transform: rotate(180deg); }

.mobile-menu-list .sub-menu {
    display: none;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #0e0e0e;
}
.mobile-menu-list li.sub-open > .sub-menu { display: block; }
.mobile-menu-list .sub-menu li a {
    display: block;
    padding: 12px 18px 12px 30px;
    color: #aaa;
    font-size: 0.88rem;
    text-decoration: none;
    border-bottom: 1px solid #1a1a1a;
    transition: color .15s, background .15s;
}
.mobile-menu-list .sub-menu li a:hover { color: #fff; background: #1a1a1a; }

/* Dark overlay */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.drawer-overlay.is-visible { opacity: 1; pointer-events: all; }

/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS — HEADER
   ========================================================================== */

/* Mobile ≤767px: hamburger only, no desktop search, no desktop nav */
@media (max-width: 767px) {
    .header-search-form  { display: none !important; }
    .menu-toggle         { display: flex !important; }   /* shows hamburger */
    .primary-nav         { display: none !important; }   /* nav in drawer */
    .header-top          { padding: 10px 0; }
    .site-logo           { font-size: 1.1rem; flex: 1; } /* logo left, gap, hamburger right */
}

/* Desktop ≥768px: hide hamburger & drawer */
@media (min-width: 768px) {
    .menu-toggle         { display: none !important; }
    .mobile-drawer       { display: none !important; }
    .drawer-overlay      { display: none !important; }
}

/* ==========================================================================
   7. CATEGORY HERO
   ========================================================================== */

.category-hero {
    background: #000;
    color: #fff;
    padding: 48px 0;
    margin-bottom: 32px;
    text-align: center;
    border-bottom: 4px solid var(--red);
}
.category-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.category-count { font-size: 1rem; color: #aaa; font-weight: 500; }

/* Category pills */
.category-pills { margin-bottom: 40px; }
.category-pills ul { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.category-pills a {
    display: block; padding: 8px 18px; background: var(--bg-light);
    border-radius: 99px; font-size: 0.875rem; font-weight: 600; color: var(--black);
    transition: all .2s; border: 1px solid transparent;
}
.category-pills a:hover,
.category-pills .current-cat a { background: var(--black); color: #fff; }

/* ==========================================================================
   8. NEWS GRID
   ========================================================================== */

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

@media (max-width: 1023px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { .news-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 479px)  { .news-grid { grid-template-columns: 1fr; gap: 16px; } }

/* On mobile, grid titles and excerpt slightly larger for readability */
@media (max-width: 767px) {
    .grid-title   { font-size: 0.98rem; line-height: 1.35; -webkit-line-clamp: 3; }
    .grid-excerpt { display: none; }   /* hide noisy excerpts on tight phone grids */
    .grid-meta    { font-size: 0.7rem; }
}
@media (max-width: 479px) {
    .grid-title   { font-size: 1.05rem; -webkit-line-clamp: 3; }
    .grid-excerpt { display: -webkit-box; font-size: 0.9rem; }
}

.grid-item { display: flex; flex-direction: column; }

.grid-card-link {
    display: flex; flex-direction: column; flex: 1;
    text-decoration: none; color: inherit;
}
.grid-card-link:hover .grid-title { text-decoration: underline; text-underline-offset: 3px; }

.grid-image {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 10px;
    aspect-ratio: 16 / 9;
    background: var(--bg-light);
    position: relative;
}
.grid-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.grid-item:hover .grid-image img { transform: scale(1.05); }

.grid-content { display: flex; flex-direction: column; flex-grow: 1; }

.grid-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.grid-excerpt {
    font-size: 0.875rem;
    color: #444;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.grid-excerpt p { margin: 0; }
.grid-meta {
    margin-top: auto;
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.grid-meta .author { color: var(--black); }
.grid-meta .dot::before { content: "•"; margin: 0 2px; }

/* Play badge */
.play-badge {
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(0,0,0,.75); color: #fff;
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.play-badge.large-badge { width: 56px; height: 56px; bottom: 20px; right: 20px; }

/* Featured category post */
.featured-category-post { margin-bottom: 40px; border-bottom: 1px solid var(--border); padding-bottom: 40px; }
.featured-category-post a { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1024px) { .featured-category-post a { grid-template-columns: 2fr 1fr; align-items: center; } }
.featured-category-post .featured-image { border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; }
.featured-category-post .featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.featured-category-post:hover .featured-image img { transform: scale(1.02); }
.featured-category-post .featured-title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; margin-bottom: 12px; }
.featured-category-post .featured-excerpt { font-size: 1rem; color: #444; }

/* ==========================================================================
   9. SINGLE POST
   ========================================================================== */

.single-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
}
@media (min-width: 1024px) { .single-layout { grid-template-columns: 1fr 380px; } }

.single-header { margin-bottom: 28px; }
.single-title {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}
.single-meta { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.single-meta .author { color: var(--black); font-weight: 600; }

.single-featured-image { margin-bottom: 28px; border-radius: 12px; overflow: hidden; }

.single-content { font-size: 1.1rem; line-height: 1.85; color: #1a1a1a; }
.single-content p { margin-bottom: 1.6em; }
.single-content a { color: #0066cc; text-decoration: underline; }
.single-content h2 { font-size: 1.6rem; margin: 2em 0 0.8em; }
.single-content h3 { font-size: 1.35rem; margin: 1.8em 0 0.6em; }
.single-content img { border-radius: var(--radius); margin: 2em 0; }
.single-content blockquote { border-left: 4px solid var(--black); padding-left: 1.2em; font-style: italic; margin: 2em 0; color: #444; font-size: 1.2rem; }
.single-content ul, .single-content ol { margin-bottom: 1.6em; padding-left: 1.5em; }
.single-content li { margin-bottom: 0.4em; }

/* Social share */
.social-share { display: flex; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.social-share a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); color: var(--black); transition: all .2s; }
.social-share a:hover { background: var(--black); color: #fff; border-color: var(--black); }
.social-share svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }

/* Sidebar */
.single-sidebar { display: none; }
@media (min-width: 1024px) { .single-sidebar { display: block; } }

.sticky-sidebar { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; padding-bottom: 24px; }
.sticky-sidebar::-webkit-scrollbar { width: 3px; }
.sticky-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.sidebar-title { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid var(--black); padding-bottom: 8px; margin-bottom: 20px; font-weight: 800; }
.sidebar-block { margin-bottom: 28px; }

/* Author box */
.author-box { margin-top: 40px; padding: 28px; background: #f9f9f9; border-radius: 14px; display: flex; gap: 20px; align-items: flex-start; border: 1px solid var(--border); }
.author-avatar { flex-shrink: 0; width: 80px; height: 80px; }
.author-avatar img,
.author-avatar .avatar,
.author-avatar .author-custom-photo {
    width: 80px !important; height: 80px !important;
    border-radius: 50% !important; object-fit: cover !important;
    object-position: center top !important; display: block !important;
}
@media (max-width: 600px) { .author-box { flex-direction: column; align-items: center; text-align: center; padding: 20px 14px; gap: 12px; } }
.author-info h4 { margin-bottom: 6px; font-size: 1.1rem; }
.author-desc { font-size: 0.9rem; color: #4a4a4a; margin-bottom: 10px; line-height: 1.6; }
.author-link { font-size: 0.875rem; font-weight: 600; }
.author-link:hover { text-decoration: underline; }

/* Breadcrumbs */
.breadcrumbs { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumbs a { color: var(--black); font-weight: 500; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .separator { color: #ccc; }
@media (max-width: 400px) { .breadcrumbs { display: none; } }

/* Tags */
.post-tags { margin-top: 40px; padding-top: 24px; border-top: 1px solid #eaeaea; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tags-label { font-weight: 800; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }
.post-tags a { background: #fff; color: var(--black); padding: 6px 16px; border-radius: 99px; font-size: 0.875rem; font-weight: 600; border: 1px solid var(--black); transition: all .2s; }
.post-tags a:hover { background: var(--black); color: #fff; }

/* Related articles */
.related-article-item { margin-bottom: 20px; }
.related-article-item:last-child { margin-bottom: 0; }
.related-article-link { display: flex; flex-direction: column; gap: 10px; transition: transform .2s; text-decoration: none; color: inherit; }
.related-article-link:hover { transform: translateY(-3px); }
.related-thumbnail { width: 100%; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: #f0f0f0; }
.related-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.related-article-link:hover .related-thumbnail img { transform: scale(1.05); }
.related-title { font-size: 1rem; line-height: 1.4; margin-bottom: 4px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.related-article-link:hover .related-title { color: var(--red); }
.related-meta, .related-date { font-size: 0.75rem; color: #666; }

/* ==========================================================================
   10. TRENDING WIDGET
   ========================================================================== */

.trending-list { list-style: none; padding: 0; margin: 0; }
.trending-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid #eaeaea; }
.trending-item:last-child { border-bottom: none; }
.trending-rank { font-size: 1.8rem; font-weight: 900; color: #ccc; line-height: 1; min-width: 28px; }
.trending-rank.top-rank { color: var(--red); }
.trending-info { flex: 1; }
.trending-title { font-size: 1rem; line-height: 1.4; margin-bottom: 4px; font-weight: 700; transition: color .2s; }
.trending-item a:hover .trending-title { color: var(--red); }
.trending-meta { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; }

/* ==========================================================================
   11. SEARCH RESULTS
   ========================================================================== */

.search-header { margin-bottom: 40px; padding-bottom: 20px; border-bottom: 2px solid var(--black); }
.search-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; }
.search-title span { color: var(--red); }
.search-count { color: var(--text-muted); font-weight: 500; }

/* ==========================================================================
   12. PAGINATION & POST NAV
   ========================================================================== */

.pagination-wrapper { display: flex; justify-content: center; margin: 40px 0; }
.pagination-wrapper .nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pagination-wrapper .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius); background: var(--bg-light); color: var(--black); font-weight: 600; font-size: 0.9rem; transition: all .2s; border: 1px solid transparent; }
.pagination-wrapper .page-numbers:hover { background: #e5e5e5; }
.pagination-wrapper .page-numbers.current { background: var(--black); color: #fff; }

.post-navigation { margin-top: 56px; }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 20px; }
@media (max-width: 600px) { .post-navigation .nav-links { flex-direction: column; } }
.nav-previous, .nav-next { flex: 1; background: #f9f9f9; border: 1px solid var(--border); border-radius: 12px; transition: all .3s; }
.nav-previous a, .nav-next a { display: block; padding: 20px; height: 100%; }
.nav-previous:hover, .nav-next:hover { background: #fff; border-color: var(--black); box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-3px); }
.nav-subtitle { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 10px; font-weight: 700; }
.nav-next .nav-subtitle { justify-content: flex-end; }
.nav-title { font-weight: 800; font-size: 1.1rem; line-height: 1.4; color: var(--black); display: block; }

/* Load More */
.load-more-btn {
    display: block; margin: 32px auto; padding: 14px 40px;
    background: var(--black); color: #fff; border: none; border-radius: var(--radius);
    font-size: 1rem; font-weight: 700; cursor: pointer; letter-spacing: 0.04em;
    transition: background .2s, transform .15s;
}
.load-more-btn:hover { background: #333; transform: translateY(-1px); }
@media (max-width: 767px) { .load-more-btn { width: 90%; max-width: 320px; min-height: 48px; } }

/* ==========================================================================
   13. ADS
   ========================================================================== */

.ad-container { margin: 28px 0; text-align: center; overflow: hidden; }
.ad-image-slot { text-align: center; margin: 16px 0; }
.ad-image-slot img { max-width: 100%; height: auto; border-radius: 4px; display: inline-block; }
@media (max-width: 767px) { .ad-container ins, .ad-container iframe { max-width: 100% !important; } }

/* ==========================================================================
   14. COMMENTS
   ========================================================================== */

.comments-area { margin-top: 56px; padding-top: 28px; border-top: 2px solid var(--black); }
.comments-title, .comment-reply-title { font-size: 1.4rem; margin-bottom: 20px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 28px; }
.comment-body { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #eaeaea; }
.comment-author { font-weight: bold; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.comment-author img { border-radius: 50%; }
.comment-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; }
.comment-content { font-size: 1rem; line-height: 1.6; color: #333; }
.reply { margin-top: 10px; font-size: 0.875rem; font-weight: 600; }
.comment-respond { margin-top: 40px; background: #f9f9f9; padding: 28px; border-radius: 12px; border: 1px solid var(--border); }
.comment-form-comment label, .comment-form-author label, .comment-form-email label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.875rem; }
.comment-form-comment textarea, .comment-form-author input, .comment-form-email input, .comment-form-url input { width: 100%; padding: 10px 14px; border: 1px solid #ccc; border-radius: var(--radius); margin-bottom: 20px; font-size: 1rem; transition: border-color .2s; outline: none; }
.comment-form-comment textarea:focus, .comment-form-author input:focus, .comment-form-email input:focus { border-color: var(--black); }
.submit-button { background: var(--black); color: #fff; padding: 12px 28px; border: none; border-radius: var(--radius); cursor: pointer; font-weight: 600; font-size: 1rem; transition: background .2s; }
.submit-button:hover { background: #333; }

/* ==========================================================================
   15. FOOTER
   ========================================================================== */

.site-footer { background: #000; color: #fff; padding: 50px 0 0; margin-top: 60px; }
.footer-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 30px; }
@media (max-width: 900px) { .footer-widgets { grid-template-columns: 1fr; } }
@media (min-width: 768px) and (max-width: 900px) { .footer-widgets { grid-template-columns: repeat(2, 1fr); } }

.footer-widget { background: #111; padding: 22px; border-radius: 12px; border: 1px solid #222; transition: transform .25s, border-color .25s; }
.footer-widget:hover { transform: translateY(-3px); border-color: #333; }
.widget-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.footer-icon { width: 18px; height: 18px; stroke: #fff; flex-shrink: 0; }
.footer-menu-list, .footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu-list li, .footer-menu li { margin-bottom: 7px; }
.footer-menu-list a, .footer-menu a { color: #cfcfcf; font-size: 0.88rem; transition: color .2s; text-decoration: none; }
.footer-menu-list a:hover, .footer-menu a:hover { color: #fff; }
.contact-info p { margin-bottom: 5px; font-size: 0.88rem; color: #cfcfcf; line-height: 1.6; }

.footer-bottom-wrapper { border-top: 1px solid #222; padding: 16px 0; margin-top: 20px; }
.footer-bottom { text-align: center; }
.copyright { font-size: 0.78rem; color: #777; }

.footer-logo { font-size: 1.8rem; font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; margin-bottom: 14px; color: #fff; display: block; }
.footer-desc { color: #aaa; font-size: 0.875rem; line-height: 1.6; }

/* ==========================================================================
   16. SCROLL TO TOP
   ========================================================================== */

.scroll-to-top {
    position: fixed; bottom: 25px; right: 25px;
    width: 42px; height: 42px; border: none; border-radius: 50%;
    background: var(--black); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s;
    z-index: 500;
}
.scroll-to-top.show { opacity: 1; visibility: visible; }
.scroll-to-top:hover { background: #333; }
@media (max-width: 767px) { .scroll-to-top { width: 46px; height: 46px; bottom: 16px; right: 14px; } }

/* ==========================================================================
   17. VIDEO EMBEDS
   ========================================================================== */

.responsive-video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; background: #000; border-radius: 12px; }
.responsive-video-container iframe,
.responsive-video-container object,
.responsive-video-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* ==========================================================================
   18. TOC COLLAPSIBLE
   ========================================================================== */

.toc-toggle-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 16px; background: #f4f4f4; border: none; border-bottom: 1px solid var(--border); font-size: 0.9rem; font-weight: 700; cursor: pointer; font-family: inherit; color: var(--black); }
.toc-body { padding: 10px 16px 14px; }
.toc-body.hidden { display: none; }
.toc-arrow { transition: transform .25s; }
.toc-toggle-btn.collapsed .toc-arrow { transform: rotate(-90deg); }

/* ==========================================================================
   19. NEWSLETTER / SOCIAL
   ========================================================================== */

.newsletter-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input { padding: 10px 14px; border: 1px solid #ddd; border-radius: 4px; font-size: 0.875rem; outline: none; transition: border-color .2s; }
.newsletter-form input:focus { border-color: var(--black); }
.btn-subscribe { background: var(--red); color: #fff; border: none; padding: 12px 16px; border-radius: 4px; font-weight: 700; cursor: pointer; transition: background .2s; text-transform: uppercase; letter-spacing: 0.05em; }
.btn-subscribe:hover { background: var(--red-dark); }

.social-icons-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.social-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--bg-light); color: #333; transition: all .2s; text-decoration: none; }
.social-icon:hover { transform: translateY(-2px); }
.social-icon.facebook:hover  { background: #1877F2; color: #fff; }
.social-icon.twitter:hover   { background: #000; color: #fff; }
.social-icon.instagram:hover { background: #E4405F; color: #fff; }
.social-icon.youtube:hover   { background: #FF0000; color: #fff; }
.social-icon.telegram:hover  { background: #0088cc; color: #fff; }

/* ==========================================================================
   20. MISC — PAGE, 404, AUTHOR ARCHIVE
   ========================================================================== */

.page-layout { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 56px; }
@media (min-width: 900px) { .page-layout { grid-template-columns: 1fr 340px; } }

.page-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--black); }
.page-title { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; margin-bottom: 8px; }

.not-found-section { padding: 80px 0; text-align: center; }
.not-found-title { font-size: 8rem; font-weight: 900; color: #f0f0f0; line-height: 1; margin-bottom: 20px; }
@media (max-width: 767px) { .not-found-title { font-size: 5rem; } }

.author-archive-header { margin-bottom: 40px; padding: 32px; background: #f9f9f9; border-radius: 14px; display: flex; gap: 20px; align-items: center; border: 1px solid var(--border); }
@media (max-width: 600px) { .author-archive-header { flex-direction: column; text-align: center; } }
.author-archive-avatar img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.author-archive-name { font-size: 1.6rem; font-weight: 900; margin-bottom: 6px; }
.author-archive-bio { font-size: 0.95rem; color: #555; }

.mt-48 { margin-top: 48px; }
.mt-32 { margin-top: 32px; }

/* ==========================================================================
   21. POST CONTENT — MOBILE READABILITY (v1.0.3)
   ========================================================================== */

/* Larger, more readable body type on phones for both English and Hindi.
   We bump min-readable size on small screens because Devanagari needs
   a touch more height than Latin to be comfortable. */
@media (max-width: 767px) {
    .single-content {
        font-size: 1.0625rem;    /* ~17px */
        line-height: 1.85;
        word-spacing: 0.02em;
    }
    .single-content p { margin-bottom: 1.3em; }
    .single-content h2 { font-size: 1.4rem;  margin: 1.6em 0 0.6em; line-height: 1.3; }
    .single-content h3 { font-size: 1.2rem;  margin: 1.4em 0 0.5em; line-height: 1.3; }
    .single-content blockquote { font-size: 1.05rem; padding-left: 0.9em; margin: 1.4em 0; }
    .single-content ul, .single-content ol { padding-left: 1.2em; }
    .single-content img { margin: 1.2em 0; }
    .single-title { font-size: 1.55rem; line-height: 1.25; }
    .single-meta  { font-size: 0.82rem; gap: 6px; }

    /* Improve readability for Devanagari text specifically */
    .single-content:lang(hi),
    .single-content:lang(mr),
    .single-content:lang(ne),
    body[lang^="hi"] .single-content,
    body[lang^="mr"] .single-content {
        font-size: 1.125rem;    /* 18px — Devanagari benefits from extra size */
        line-height: 1.95;
    }
}

/* Phones smaller than 380px (older Androids) — keep things readable without overflow */
@media (max-width: 379px) {
    .single-title { font-size: 1.4rem; }
    .single-content { font-size: 1rem; line-height: 1.8; }
}

/* Tablet bump for post body */
@media (min-width: 768px) and (max-width: 1023px) {
    .single-content { font-size: 1.12rem; line-height: 1.8; }
}

/* ==========================================================================
   22. 404 PAGE
   ========================================================================== */
.not-found-section { padding: 80px 0; text-align: center; }
.not-found-title { font-size: 8rem; font-weight: 900; color: #f0f0f0; line-height: 1; margin-bottom: 20px; }
.not-found-heading { font-size: clamp(1.4rem, 3.5vw, 2rem); margin-bottom: 14px; }
.not-found-desc { color: #555; max-width: 540px; margin: 0 auto 24px; }
.btn-home { display: inline-block; padding: 12px 28px; background: var(--black); color: #fff; border-radius: var(--radius); font-weight: 700; text-decoration: none; transition: background .2s; }
.btn-home:hover { background: #333; color: #fff; }
.not-found-search { max-width: 480px; margin: 28px auto 0; }
@media (max-width: 767px) { .not-found-title { font-size: 5rem; } .not-found-section { padding: 48px 0; } }

/* ==========================================================================
   23. CUSTOMIZER FALLBACK VARS (overridden by customizer-css inline style)
   ========================================================================== */
:root { --accent-color: #e60000; --nav-bg-color: #111; }

/* Footer scroll-to-top: ensure shows up via .show class set by JS */
.scroll-to-top { pointer-events: none; }
.scroll-to-top.show { pointer-events: auto; }

/* Print styles — clean printable single posts */
@media print {
    .site-header, .site-footer, .single-sidebar, .social-share, .post-navigation,
    .scroll-to-top, .mobile-drawer, .drawer-overlay, .ad-container, #wpadminbar { display: none !important; }
    body { color: #000; background: #fff; font-size: 12pt; line-height: 1.6; }
    .single-content a { color: #000; text-decoration: underline; }
    .single-content a[href]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
}
