/*
 Theme Name:   Astra Child
 Theme URI:    https://bcst.org.in
 Description:  Astra Child Theme for BCST Website
 Author:       BCST Web Team
 Author URI:   https://bcst.org.in
 Template:     astra
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  astra-child
*/

/* =====================================================
   BCST — NIC Government Style
   Primary  : #8B2500  (dark maroon)
   Secondary: #A83200  (maroon)
   Accent   : #F3A840  (gold)
   Light bg : #F7F3EF
   ===================================================== */

/* ─── CSS Variables ─────────────────────────────── */
:root {
    --bcst-primary:   #8B2500;
    --bcst-dark:      #5c1800;
    --bcst-mid:       #A83200;
    --bcst-gold:      #F3A840;
    --bcst-gold-dark: #d4861a;
    --bcst-light:     #FEF9F5;
    --bcst-bg:        #F5F0EB;
    --bcst-white:     #ffffff;
    --bcst-text:      #2c2c2c;
    --bcst-text-muted:#666666;
    --bcst-border:    #ddd0c5;
    --bcst-shadow:    0 2px 12px rgba(139,37,0,0.10);
}

/* ─── Top Info Bar ───────────────────────────────── */
.ast-above-header-wrap,
.ast-above-header {
    background: var(--bcst-dark) !important;
    color: rgba(255,255,255,0.85) !important;
    font-size: 0.82rem;
}
.ast-above-header a,
.ast-above-header-section a {
    color: var(--bcst-gold) !important;
}

/* ─── Hide Astra's default header (replaced by custom) ── */
.main-header-bar,
.ast-primary-header-bar {
    display: none !important;
}

/* ══ Custom BCST Header ═══════════════════════════════ */

/* Row 1 — Identity bar */
.bcst-identity-bar {
    background: #ffffff;
    border-bottom: 4px solid var(--bcst-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.bcst-identity-inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 10px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.bcst-logo-wrap img,
.bcst-logo-wrap .custom-logo {
    height: 70px !important;
    width: auto !important;
}
.bcst-title-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.bcst-site-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bcst-primary) !important;
    text-decoration: none !important;
    line-height: 1.2;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.bcst-site-name:hover {
    color: var(--bcst-dark) !important;
}
.bcst-site-tagline {
    font-size: 0.95rem;
    font-weight: 700;
    color: #000000;
    margin: 4px 0 0;
    letter-spacing: 0.3px;
}

/* Logo wrap hide karo (replaced by left/right) */
.bcst-logo-wrap { display: none; }

/* Left — Bihar Sarkar logo */
.bcst-logo-left {
    flex-shrink: 0;
    width: 120px;
    display: flex;
    justify-content: flex-start;
}
.bcst-left-logo {
    height: 80px !important;
    width: auto !important;
}

/* Right — BCST logo */
.bcst-logo-right {
    flex-shrink: 0;
    width: 120px;
    display: flex;
    justify-content: flex-end;
}
.bcst-right-logo {
    height: 80px !important;
    width: auto !important;
}

/* Row 2 — Nav bar */
.bcst-nav-bar {
    background: var(--bcst-primary);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}
.bcst-nav-inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    position: relative;
}

/* Menu list */
.bcst-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
}
.bcst-menu > li {
    position: relative;
}
.bcst-menu > li > a {
    display: block;
    color: rgba(255,255,255,0.92) !important;
    text-decoration: none !important;
    padding: 14px 13px;
    font-size: 0.83rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.2px;
    transition: background 0.2s, color 0.2s;
}
.bcst-menu > li:hover > a,
.bcst-menu > li.current-menu-item > a,
.bcst-menu > li.current-menu-ancestor > a {
    background: var(--bcst-dark);
    color: var(--bcst-gold) !important;
}
.bcst-menu > li.current-menu-item > a {
    border-bottom: 3px solid var(--bcst-gold);
}

/* Arrow on items with sub-menu */
.bcst-menu > li.menu-item-has-children > a::after {
    content: " \25BE";
    font-size: 0.7rem;
    margin-left: 3px;
    opacity: 0.8;
}

/* Sub-menu dropdown */
.bcst-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bcst-dark);
    min-width: 230px;
    list-style: none;
    padding: 6px 0;
    margin: 0;
    border-top: 3px solid var(--bcst-gold);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    z-index: 9999;
}
.bcst-menu li:hover > .sub-menu {
    display: block;
}
.bcst-menu .sub-menu li a {
    display: block;
    color: rgba(255,255,255,0.88) !important;
    text-decoration: none !important;
    padding: 9px 18px;
    font-size: 0.83rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    transition: background 0.15s, padding-left 0.15s;
    white-space: nowrap;
}
.bcst-menu .sub-menu li:last-child a { border-bottom: none; }
.bcst-menu .sub-menu li:hover > a {
    background: var(--bcst-mid);
    color: var(--bcst-gold) !important;
    padding-left: 24px;
}

/* Hamburger (mobile) */
.bcst-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
}
.bcst-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
}

/* ── Mobile ────────────────────────────────────────── */
@media (max-width: 768px) {
    .bcst-identity-inner { padding: 10px 16px; gap: 12px; }
    .bcst-site-name { font-size: 1.1rem; }
    .bcst-logo-wrap img,
    .bcst-logo-wrap .custom-logo { height: 48px !important; }
    .bcst-nav-inner { padding: 0 12px; flex-wrap: wrap; }
    .bcst-hamburger { display: flex; }
    .bcst-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--bcst-dark);
    }
    .bcst-menu.open { display: flex; }
    .bcst-menu > li > a { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .bcst-menu .sub-menu {
        position: static;
        box-shadow: none;
        border-top: none;
        background: rgba(0,0,0,0.15);
        display: none;
    }
    .bcst-menu li:hover > .sub-menu { display: none; }
    .bcst-menu li.open > .sub-menu { display: block !important; }
}

/* Site title */
.site-title a,
.ast-site-name-wrap .site-title a {
    color: var(--bcst-primary) !important;
    font-weight: 800 !important;
    font-size: 1.5rem !important;
    letter-spacing: 0.3px;
}
.site-description {
    color: var(--bcst-text-muted) !important;
    font-size: 0.8rem !important;
}

/* Logo */
.custom-logo { max-height: 70px; width: auto; }

/* ─── Navigation Bar ─────────────────────────────── */
#site-navigation,
.main-navigation,
.ast-main-header-bar-alignment,
.main-header-bar-navigation {
    background: var(--bcst-primary) !important;
    width: 100% !important;
}

.main-header-menu,
.ast-nav-menu {
    background: var(--bcst-primary) !important;
    flex-wrap: nowrap !important;       /* single line */
    width: 100% !important;
    justify-content: space-between !important;
}

/* Nav links — compact to fit single line */
.main-header-menu > .menu-item > .menu-link,
.ast-nav-menu > .menu-item > .menu-link {
    color: rgba(255,255,255,0.93) !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    padding: 13px 11px !important;
    letter-spacing: 0.1px;
    white-space: nowrap !important;
    transition: background 0.2s, color 0.2s !important;
}

.main-header-menu > .menu-item:hover > .menu-link,
.main-header-menu > .menu-item.current-menu-item > .menu-link,
.main-header-menu > .menu-item.current-menu-ancestor > .menu-link {
    background: var(--bcst-dark) !important;
    color: var(--bcst-gold) !important;
}

/* Active item — gold bottom border */
.main-header-menu > .menu-item.current-menu-item > .menu-link {
    border-bottom: 3px solid var(--bcst-gold) !important;
}

/* Nav container full width */
.main-header-bar-navigation {
    width: 100% !important;
    padding: 0 !important;
}
.main-header-bar-navigation > div,
.ast-main-navigation {
    width: 100% !important;
    max-width: 100% !important;
}

/* ─── Dropdown Sub-menu ──────────────────────────── */
.main-header-menu .sub-menu {
    background: var(--bcst-dark) !important;
    border-top: 3px solid var(--bcst-gold) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25) !important;
    min-width: 230px !important;
}
.main-header-menu .sub-menu .menu-link {
    color: rgba(255,255,255,0.88) !important;
    padding: 10px 18px !important;
    font-size: 0.85rem !important;
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
    transition: background 0.15s !important;
}
.main-header-menu .sub-menu .menu-item:last-child .menu-link {
    border-bottom: none !important;
}
.main-header-menu .sub-menu .menu-item:hover > .menu-link {
    background: var(--bcst-mid) !important;
    color: var(--bcst-gold) !important;
    padding-left: 24px !important;
}

/* ─── Mobile Nav ─────────────────────────────────── */
.ast-mobile-header-wrap,
.ast-header-break-point .main-header-bar {
    background: var(--bcst-primary) !important;
}
.menu-toggle,
.ast-mobile-menu-trigger {
    color: white !important;
    border-color: rgba(255,255,255,0.4) !important;
}

/* ─── Page / Body Background ─────────────────────── */
body {
    background: var(--bcst-bg) !important;
    color: var(--bcst-text) !important;
}
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single,
.ast-separate-container #primary,
.ast-separate-container .entry-content,
.entry {
    background: var(--bcst-white) !important;
    box-shadow: var(--bcst-shadow) !important;
    border-radius: 6px !important;
}

/* ─── Content Container — Full Width ────────────── */
.ast-container {
    max-width: 1380px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    width: 100% !important;
}

/* Header + Nav bhi full stretch */
.main-header-bar .ast-container,
.ast-primary-header-bar .ast-container {
    max-width: 100% !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

/* Page content area full width */
#page,
.hfeed,
.site,
.ast-separate-container {
    max-width: 100% !important;
}

/* Primary + sidebar layout */
#primary {
    width: 100% !important;
}
.site-content {
    padding: 28px 0 40px !important;
}

/* ─── Page Titles (h1, h2, h3) ───────────────────── */
h1, h2, h3 {
    color: var(--bcst-primary) !important;
    font-weight: 700 !important;
}
h1 { font-size: 1.9rem !important; }
h2 { font-size: 1.5rem !important; }
h3 { font-size: 1.2rem !important; }

.entry-title a {
    color: var(--bcst-primary) !important;
}
.entry-title a:hover {
    color: var(--bcst-mid) !important;
    text-decoration: underline;
}

/* ─── Links ──────────────────────────────────────── */
a { color: var(--bcst-mid) !important; }
a:hover { color: var(--bcst-primary) !important; }

/* ─── Buttons ────────────────────────────────────── */
.ast-button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"],
.button {
    background: var(--bcst-primary) !important;
    color: var(--bcst-white) !important;
    border-radius: 4px !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    border: none !important;
    transition: background 0.2s, transform 0.15s !important;
}
.ast-button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    background: var(--bcst-dark) !important;
    transform: translateY(-1px);
}

/* ─── Post / Article Cards ───────────────────────── */
.ast-article-post {
    border-radius: 8px !important;
    overflow: hidden;
    border: 1px solid var(--bcst-border) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    margin-bottom: 24px !important;
}
.ast-article-post:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 28px rgba(139,37,0,0.14) !important;
}

/* Post meta */
.entry-meta,
.posted-on,
.post-author {
    color: var(--bcst-text-muted) !important;
    font-size: 0.82rem !important;
}
.entry-meta a { color: var(--bcst-mid) !important; }

/* Featured image */
.post-thumb img,
.ast-blog-featured-section img {
    border-bottom: 3px solid var(--bcst-gold) !important;
}

/* ─── Sidebar Widgets ────────────────────────────── */
#secondary .widget,
.widget {
    background: var(--bcst-white) !important;
    border: 1px solid var(--bcst-border) !important;
    border-radius: 6px !important;
    padding: 20px !important;
    margin-bottom: 24px !important;
    box-shadow: var(--bcst-shadow) !important;
}
.widget-title {
    color: var(--bcst-white) !important;
    background: var(--bcst-primary) !important;
    margin: -20px -20px 16px !important;
    padding: 10px 20px !important;
    border-radius: 6px 6px 0 0 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
}
.widget ul li {
    border-bottom: 1px dashed var(--bcst-border) !important;
    padding: 6px 0 !important;
}
.widget ul li:last-child { border-bottom: none !important; }
.widget ul li a { color: var(--bcst-mid) !important; }
.widget ul li a:hover { color: var(--bcst-primary) !important; }

/* ─── Notice / Announcement Box ─────────────────── */
.wp-block-group,
.notice-box {
    background: #fff8ee !important;
    border-left: 5px solid var(--bcst-gold) !important;
    border-radius: 0 6px 6px 0 !important;
    padding: 16px 20px !important;
}

/* ─── Tables ─────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}
table th {
    background: var(--bcst-primary) !important;
    color: var(--bcst-white) !important;
    padding: 10px 14px !important;
    font-size: 0.88rem;
    text-align: left;
}
table td {
    padding: 9px 14px !important;
    border-bottom: 1px solid var(--bcst-border) !important;
    font-size: 0.88rem;
}
table tr:nth-child(even) td {
    background: #fdf5ee !important;
}
table tr:hover td {
    background: #fde8d4 !important;
}

/* ─── Forms ──────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
    border: 1px solid var(--bcst-border) !important;
    border-radius: 4px !important;
    padding: 9px 12px !important;
    color: var(--bcst-text) !important;
    transition: border-color 0.2s !important;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--bcst-mid) !important;
    outline: 2px solid rgba(168,50,0,0.15) !important;
}

/* ─── Breadcrumbs ────────────────────────────────── */
.ast-breadcrumbs-wrapper,
#breadcrumbs {
    background: var(--bcst-light) !important;
    padding: 8px 20px !important;
    border-bottom: 1px solid var(--bcst-border) !important;
    font-size: 0.82rem !important;
    color: var(--bcst-text-muted) !important;
}
.ast-breadcrumbs a { color: var(--bcst-mid) !important; }

/* ─── Pagination ─────────────────────────────────── */
.page-numbers {
    background: var(--bcst-white) !important;
    border: 1px solid var(--bcst-border) !important;
    color: var(--bcst-primary) !important;
    border-radius: 4px !important;
    padding: 6px 12px !important;
    transition: background 0.2s !important;
}
.page-numbers.current,
.page-numbers:hover {
    background: var(--bcst-primary) !important;
    color: var(--bcst-white) !important;
    border-color: var(--bcst-primary) !important;
}

/* ─── Footer ─────────────────────────────────────── */
.site-footer,
.footer-widget-area {
    background: var(--bcst-dark) !important;
    color: rgba(255,255,255,0.80) !important;
    border-top: 4px solid var(--bcst-gold) !important;
}
.site-footer a,
.footer-widget-area a {
    color: var(--bcst-gold) !important;
}
.site-footer a:hover,
.footer-widget-area a:hover {
    color: var(--bcst-white) !important;
    text-decoration: underline;
}
.ast-footer-widget-area .widget-title {
    background: rgba(255,255,255,0.08) !important;
    border-bottom: 2px solid var(--bcst-gold) !important;
    border-radius: 0 !important;
    color: var(--bcst-gold) !important;
    margin: 0 0 12px !important;
    padding: 8px 0 !important;
}
.site-below-footer-wrap,
.ast-footer-copyright {
    background: var(--bcst-dark) !important;
    border-top: 1px solid rgba(255,255,255,0.10) !important;
    color: rgba(255,255,255,0.55) !important;
    font-size: 0.82rem !important;
    padding: 12px 0 !important;
    text-align: center;
}

/* Hide Astra/WordPress credit */
.ast-footer-copyright .ast-credit-link,
.ast-footer-copyright a[href*="astra"],
.ast-footer-copyright a[href*="wordpress"] {
    display: none !important;
}
.ast-footer-copyright .sep {
    display: none !important;
}

/* ─── Scroll to Top ──────────────────────────────── */
#scroll-to-top {
    background: var(--bcst-primary) !important;
    color: white !important;
    border-radius: 4px !important;
    box-shadow: 0 3px 12px rgba(139,37,0,0.35) !important;
}
#scroll-to-top:hover {
    background: var(--bcst-dark) !important;
}

/* ─── WP Block Colors ────────────────────────────── */
.has-primary-background-color { background: var(--bcst-primary) !important; }
.has-primary-color { color: var(--bcst-primary) !important; }
.wp-block-separator { border-color: var(--bcst-gold) !important; }

/* ─── Government Banner Strip ────────────────────── */
.ast-banner-notice-wrap,
.ast-above-header-section {
    border-bottom: 2px solid var(--bcst-gold);
}

/* ─── Search ─────────────────────────────────────── */
.ast-search-icon svg,
.search-submit {
    color: var(--bcst-primary) !important;
    fill: var(--bcst-primary) !important;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
    .ast-container { padding: 0 14px !important; }
    .site-content { padding: 16px 0 28px !important; }
    .ast-separate-container .ast-article-post { border-radius: 0 !important; }

    /* Identity bar — shrink logos */
    .bcst-logo-left,
    .bcst-logo-right { width: 60px; }
    .bcst-left-logo,
    .bcst-right-logo { height: 52px !important; }

    /* Tagline — smaller on mobile */
    .bcst-site-tagline { font-size: 0.72rem; line-height: 1.3; }

    /* Tables — horizontal scroll on small screens */
    .entry-content table,
    .wp-block-table table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
    }

    /* Images stay within bounds */
    .entry-content img,
    .wp-block-image img { max-width: 100% !important; height: auto !important; }
}

/* ─── Extra small screens (≤480px) ──────────────── */
@media (max-width: 480px) {
    .bcst-logo-left,
    .bcst-logo-right { width: 44px; }
    .bcst-left-logo,
    .bcst-right-logo { height: 38px !important; }
    .bcst-site-name { font-size: 0.88rem; }
    .bcst-site-tagline { font-size: 0.62rem; }
    .bcst-identity-inner { gap: 8px; padding: 8px 12px; }
    h1 { font-size: 1.25rem !important; }
    h2 { font-size: 1.05rem !important; }
    .ast-container { padding: 0 10px !important; }
}
