/* ============================================================
   A2ZGT News Portal - Main Stylesheet
   Inspired by Aaj Tak design language
   ============================================================ */

:root {
    --primary: #c00;
    --primary-dark: #900;
    --secondary: #1a1a2e;
    --accent: #f77f00;
    --bg: #f4f4f4;
    --card-bg: #fff;
    --border: #e0e0e0;
    --text: #1a1a1a;
    --text-muted: #666;
    --font-hi: 'Noto Sans Devanagari', 'Noto Sans', sans-serif;
    --shadow: 0 2px 10px rgba(0,0,0,.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,.12);
    --radius: 6px;
}

* { box-sizing: border-box; }
body {
    font-family: var(--font-hi);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding-top: 0;
    font-size: 15px;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }

/* ============================
   TOPBAR
   ============================ */
.topbar {
    background: #1a1a2e;
    color: #ccc;
    font-size: 12px;
    padding: 5px 0;
}
.topbar-date { color: #aaa; }
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    font-size: 12px;
    color: #fff;
    transition: opacity .2s;
}
.social-link:hover { opacity: .85; color: #fff; }
.social-link.fb { background: #1877f2; }
.social-link.tw { background: #000; }
.social-link.yt { background: #ff0000; }
.social-link.wa { background: #25d366; }
.rss-link { color: #f77f00; font-size: 14px; }
.lang-switcher .btn { color: #ccc; border-color: #444; font-size: 12px; padding: 2px 8px; }

/* ============================
   HEADER
   ============================ */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    z-index: 1000;
}
.logo-text {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}
.logo-img { max-height: 55px; }
.header-ad .ad-placeholder-header {
    background: #f0f0f0;
    border: 1px dashed #ccc;
    padding: 8px 20px;
    color: #999;
    font-size: 11px;
    text-align: center;
    border-radius: 4px;
    min-width: 300px;
}
.btn-epaper {
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 4px;
}
.btn-epaper:hover { background: var(--primary-dark); color: #fff; }
.search-toggle { border-color: #ddd; }

/* ============================
   NAVIGATION
   ============================ */
.main-nav {
    background: #fff;
    border-top: 1px solid #eee;
    border-bottom: 3px solid var(--primary);
    overflow: visible;
    position: relative;
    z-index: 1020;
}
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    overflow: visible;
    flex-wrap: nowrap;
}
.nav-item { white-space: nowrap; }
.nav-link {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text) !important;
    border-bottom: 3px solid transparent;
    transition: all .2s;
    text-decoration: none;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary);
}

/* Mobile Nav */
.mobile-nav li { border-bottom: 1px solid #f0f0f0; }
.mobile-nav a {
    display: block;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    border-left: 4px solid transparent;
    transition: all .2s;
}
.mobile-nav a:hover { background: #f9f9f9; color: var(--primary); }

/* ============================
   BREAKING NEWS TICKER
   ============================ */
.breaking-bar {
    background: var(--secondary);
    color: #fff;
    padding: 6px 0;
    overflow: hidden;
}
.breaking-label {
    background: var(--primary);
    color: #fff;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-right: 12px;
}
.breaking-ticker-wrap { overflow: hidden; flex: 1; }
.breaking-ticker {
    display: flex;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
}
.ticker-item {
    padding: 0 40px;
    font-size: 13px;
    flex-shrink: 0;
}
.ticker-item a { color: #fff; }
.ticker-item::before { content: '◆ '; color: var(--primary); }
@keyframes tickerScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
.btn-ticker-ctrl {
    background: none;
    border: none;
    color: #aaa;
    font-size: 11px;
    cursor: pointer;
    padding: 0 8px;
    flex-shrink: 0;
}
.btn-ticker-ctrl:hover { color: #fff; }

/* ============================
   HEADER SEARCH
   ============================ */
.header-search { padding: 8px 0; }
.search-form .form-control:focus { border-color: var(--primary); box-shadow: none; }

/* ============================
   CARDS & ARTICLES
   ============================ */
.news-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 100%;
    transition: transform .2s, box-shadow .2s;
}
.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.news-card-img-wrap { position: relative; overflow: hidden; aspect-ratio: 3/2; }
.news-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .news-card-img { transform: scale(1.04); }
.news-card-body { padding: 12px; }
.news-card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 6px 0 6px;
}
.news-card-title a:hover { color: var(--primary); }
.news-card-summary { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.5; }
.news-card-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 10px; }

/* Hero Card */
.hero-card { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-img-wrap { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.hero-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.hero-card:hover .hero-img { transform: scale(1.03); }
.hero-body { padding: 15px; }
.hero-title { font-size: 20px; font-weight: 800; line-height: 1.35; margin-bottom: 8px; }
.hero-title a:hover { color: var(--primary); }
.hero-summary { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }

/* Sub Featured */
.sub-featured-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow);
    flex: 1;
    transition: box-shadow .2s;
}
.sub-featured-card:hover { box-shadow: var(--shadow-lg); }
.sf-img-wrap { flex-shrink: 0; width: 90px; height: 70px; border-radius: 4px; overflow: hidden; }
.sf-img { width: 100%; height: 100%; object-fit: cover; }
.sf-title { font-size: 13px; font-weight: 700; line-height: 1.4; margin-top: 4px; }

/* Horizontal Card */
.news-card-horizontal { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.nch-img { width: 100%; height: 100%; object-fit: cover; min-height: 200px; }
.nch-body { padding: 20px; }
.nch-title { font-size: 20px; font-weight: 800; line-height: 1.4; margin-bottom: 10px; }
.nch-title a:hover { color: var(--primary); }
.nch-summary { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }

/* List Items */
.news-list-item { }
.nli-img-wrap { flex-shrink: 0; width: 100px; height: 75px; border-radius: 4px; overflow: hidden; }
.nli-img { width: 100%; height: 100%; object-fit: cover; }
.nli-title { font-size: 13px; font-weight: 700; line-height: 1.4; margin: 0; }
.nli-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.nli-img-wrap-lg { flex-shrink: 0; width: 140px; height: 105px; border-radius: 4px; overflow: hidden; }
.nli-img-lg { width: 100%; height: 100%; object-fit: cover; }
.nli-title-lg { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.nli-title-lg a:hover { color: var(--primary); }
.nli-summary { font-size: 13px; color: var(--text-muted); }

/* ============================
   BADGES
   ============================ */
.category-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.breaking-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 3px;
    margin-right: 5px;
    animation: blink 1.5s step-end infinite;
    text-transform: uppercase;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.5} }
.tag-chip {
    display: inline-block;
    background: #f0f0f0;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin: 3px 3px 3px 0;
    transition: background .2s;
}
.tag-chip:hover { background: var(--primary); color: #fff; }
.cat-chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: opacity .2s;
}
.cat-chip:hover { opacity: .85; color: #fff; }

/* ============================
   SECTION HEADERS
   ============================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}
.section-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
}
.section-title span {
    background: var(--primary);
    color: #fff;
    padding: 4px 14px;
    border-radius: 4px 4px 0 0;
}
.see-all {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

/* Article Meta */
.article-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-muted); }
.article-meta-sm { font-size: 11px; color: var(--text-muted); }

/* ============================
   ARTICLE FULL PAGE
   ============================ */
.article-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 12px;
}
.article-meta-bar {
    font-size: 13px;
    color: var(--text-muted);
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.article-figure { margin: 0; }
.article-hero-img { width: 100%; border-radius: var(--radius); }
.image-caption { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-style: italic; }
.article-summary {
    background: #fff8e1;
    border-left: 4px solid var(--accent);
    padding: 12px 16px;
    border-radius: 0 4px 4px 0;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 16px;
}
.article-content { font-size: 16px; line-height: 1.8; }
.article-content p { margin-bottom: 1.2em; }
.article-content h2, .article-content h3 { font-weight: 700; margin-top: 1.5em; color: var(--secondary); }
.article-content img { border-radius: var(--radius); margin: 1em 0; }
.article-source { font-size: 13px; color: var(--text-muted); padding-top: 10px; border-top: 1px solid var(--border); }
.article-tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.amp-link { font-size: 11px; background: #005AF0; color: #fff; padding: 2px 8px; border-radius: 3px; font-weight: 700; }
.amp-link:hover { background: #003da0; color: #fff; }

/* Share Bar */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: opacity .2s;
    text-decoration: none;
}
.share-btn:hover { opacity: .85; color: #fff; }
.share-btn.wa { background: #25d366; }
.share-btn.fb { background: #1877f2; }
.share-btn.tw { background: #000; }
.share-btn.tg { background: #0088cc; }
.share-btn.copy { background: #666; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; background: none; padding: 0; margin: 0; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }
.breadcrumb-item a { color: var(--primary); }

/* ============================
   SIDEBAR & WIDGETS
   ============================ */
.sticky-sidebar { position: sticky; top: 80px; }
.widget { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.widget-header { background: var(--secondary); color: #fff; padding: 10px 15px; }
.widget-title { font-size: 15px; font-weight: 700; margin: 0; }
.widget-body { padding: 15px; }

/* Trending */
.trending-num { font-size: 22px; font-weight: 800; color: #ddd; line-height: 1; min-width: 32px; }
.trending-cat { font-size: 11px; font-weight: 700; display: block; margin-bottom: 3px; }
.trending-title { font-size: 13px; font-weight: 600; line-height: 1.4; margin: 0; }
.trending-title a:hover { color: var(--primary); }
.trending-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.trending-item:not(:last-child) { border-bottom: 1px solid var(--border); padding-bottom: 10px; }

/* Follow Buttons */
.follow-btn {
    display: block;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    transition: opacity .2s;
    text-decoration: none;
}
.follow-btn:hover { opacity: .9; color: #fff; }
.follow-btn.fb { background: #1877f2; }
.follow-btn.tw { background: #000; }
.follow-btn.yt { background: #ff0000; }
.follow-btn.wa { background: #25d366; }

/* ============================
   CATEGORY PAGE
   ============================ */
.category-page-title { font-size: 24px; font-weight: 800; margin-bottom: 5px; }
.category-stats { margin-top: 5px; }

/* ============================
   SEARCH PAGE
   ============================ */
.search-page-title { font-size: 22px; font-weight: 700; }

/* ============================
   AD SPACES
   ============================ */
.ad-space { text-align: center; }
.ad-placeholder {
    background: #f9f9f9;
    border: 1px dashed #ccc;
    padding: 15px;
    color: #aaa;
    font-size: 11px;
    border-radius: 4px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-placeholder-sidebar {
    background: #f9f9f9;
    border: 1px dashed #ccc;
    padding: 20px;
    color: #aaa;
    font-size: 11px;
    border-radius: 4px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Footer News Widget */
.footer-news-img { width: 70px; height: 50px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.footer-news-title { font-size: 13px; font-weight: 600; line-height: 1.4; display: block; color: #ccc; }
.footer-news-title:hover { color: #fff; }
.footer-news-time { font-size: 11px; color: #888; margin-top: 3px; }

/* ============================
   FOOTER
   ============================ */
.site-footer { background: #1a1a2e; color: #bbb; margin-top: 30px; }
.footer-top { padding: 40px 0 20px; }
.footer-title { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.footer-desc { font-size: 13px; line-height: 1.7; color: #999; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: #999; transition: color .2s; }
.footer-links a:hover { color: #fff; padding-left: 3px; }
.footer-bottom { border-top: 1px solid #2a2a3e; }
.footer-copy { font-size: 13px; color: #888; }
.footer-bottom-links a { font-size: 12px; color: #888; }
.footer-bottom-links a:hover { color: #fff; }
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    transition: opacity .2s;
}
.social-btn:hover { opacity: .8; color: #fff; }
.social-btn.fb { background: #1877f2; }
.social-btn.tw { background: #000; }
.social-btn.yt { background: #ff0000; }
.social-btn.wa { background: #25d366; }

/* Translate widget in footer */
.translate-widget { font-size: 12px; }
.goog-te-combo { font-size: 12px; padding: 4px 8px; border-radius: 4px; }

/* ============================
   BACK TO TOP
   ============================ */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 42px; height: 42px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 3px 12px rgba(0,0,0,.3);
    z-index: 999;
    transition: background .2s, transform .2s;
}
.back-to-top.show { display: flex; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ============================
   PAGINATION
   ============================ */
.pagination-wrap .pagination { margin: 0; }
.page-link { color: var(--primary); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ============================
   GOOGLE TRANSLATE OVERRIDES
   ============================ */
body > .skiptranslate { display: none; }
.goog-te-banner-frame.skiptranslate { display: none !important; }
body { top: 0 !important; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 991px) {
    .main-nav { display: none; }
    .hero-title { font-size: 18px; }
    .article-title { font-size: 20px; }
    .sticky-sidebar { position: static; }
}
@media (max-width: 767px) {
    .hero-body { padding: 10px; }
    .hero-title { font-size: 16px; }
    .nch-img { min-height: 150px; }
    .nch-title { font-size: 16px; }
    .article-title { font-size: 18px; }
    .share-btn span { display: none; }
    .section-title { font-size: 15px; }
}
@media (max-width: 575px) {
    .article-meta-bar { flex-direction: column; gap: 6px; }
    .nli-img-wrap-lg { width: 90px; height: 70px; }
}

/* RTL Support */
body.rtl { direction: rtl; }
body.rtl .nav-list { flex-direction: row-reverse; }
body.rtl .breaking-label { margin-right: 0; margin-left: 12px; }
body.rtl .article-summary { border-left: none; border-right: 4px solid var(--accent); border-radius: 4px 0 0 4px; }

/* ── Homepage Slider ─────────────────────────────────── */
.slider-img {
    height: 420px;
    object-fit: cover;
}
.slider-img-placeholder {
    height: 420px;
}
#heroSlider .carousel-caption {
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    left: 0; right: 0; bottom: 0;
    padding: 40px 24px 20px;
    text-align: left;
}
.carousel-caption-inner { max-width: 680px; }
.carousel-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.carousel-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,.85);
    margin: 0 0 10px;
}
@media (max-width: 767px) {
    .slider-img, .slider-img-placeholder { height: 220px; }
    .carousel-title { font-size: 15px; }
    #heroSlider .carousel-caption { padding: 20px 12px 10px; }
}

/* ── Multilevel Categories ───────────────────────────── */
.subcategory-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    opacity: .75;
    transition: opacity .2s, transform .15s;
}
.subcategory-chip:hover,
.subcategory-chip.active {
    opacity: 1;
    color: #fff;
    transform: translateY(-1px);
}

/* ── Nav multilevel dropdown ─────────────────────────── */

/* Every nav-item must be relative so dropdown positions under it */
.nav-has-dropdown {
    position: relative;
    white-space: nowrap;
}

/* Wrap category link + caret into one inline-flex row */
.nav-split-wrap {
    display: inline-flex;
    align-items: stretch;
    border-bottom: 3px solid var(--cat-color, var(--primary));
}
.nav-split-wrap .nav-link-main {
    border-bottom: none !important; /* border is on the wrapper */
    padding-right: 4px;
}

/* Small caret button beside the link */
.nav-caret {
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    font-size: 11px;
    transition: color .2s;
    line-height: 1;
}
.nav-caret:hover,
.nav-split-wrap.active .nav-caret {
    color: var(--primary);
}
.nav-caret i {
    transition: transform .2s;
    pointer-events: none;
}
.nav-caret[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Dropdown menu: appear below the nav item */
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    min-width: 200px;
    border-top: 3px solid var(--cat-color, var(--primary));
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: 4px 0;
}
.nav-dropdown-menu .dropdown-item {
    font-size: 13px;
    padding: 8px 16px;
    font-weight: 500;
}
.nav-dropdown-menu .dropdown-item:hover,
.nav-dropdown-menu .dropdown-item.active {
    background: #fff5f5;
    color: var(--primary);
}

/* Remove the default BS5 caret from dropdown-toggle (we use our own) */
.main-nav .dropdown-toggle::after { display: none; }

/* Mobile subnav */
.mobile-subnav { margin: 0; background: rgba(0,0,0,.03); }
.mobile-subnav li a {
    display: block;
    padding: 8px 12px 8px 32px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    border-bottom: 1px solid rgba(0,0,0,.05);
}
.mobile-subnav li a:hover { background: rgba(0,0,0,.05); }

/* ── Multi-category badges ───────────────────────────── */
.category-badge-sm {
    font-size: 10px;
    padding: 2px 7px;
    vertical-align: middle;
}
