/* HindiBhashi Core PHP Theme - Inspired by Catch Themes Chicago (Light) */
:root {
    --hb-bg: #f2f2f2;
    --hb-surface: #ffffff;
    --hb-text: #404040;
    --hb-muted: #7b7b7b;
    --hb-accent: #21759b;
    --hb-accent-dark: #175978;
    --hb-nav-bg: #3a3d41;
    --hb-nav-hover: #242629;
    --hb-border: #e5e5e5;
    --hb-btn: #212121;
}

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

body {
    margin: 0;
    background-color: var(--hb-bg);
    color: var(--hb-text);
    font-family: 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

a { color: var(--hb-accent); text-decoration: none; transition: color 0.15s ease; }
a:hover, a:focus { color: var(--hb-text); text-decoration: underline; }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.wrapper {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Utility & User Profile Bar */
.hb-topbar {
    background: #23282d;
    color: #d5d9de;
    font-size: 13px;
    border-bottom: 1px solid #16191d;
}
.hb-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    gap: 12px;
}
.hb-topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hb-topbar a { color: #d5d9de; text-decoration: none; }
.hb-topbar a:hover { color: #ffffff; }
.hb-topbar-right { position: relative; }

.hb-login-link {
    display: inline-block;
    padding: 4px 12px;
    background: var(--hb-accent);
    color: #fff !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}
.hb-login-link:hover { background: var(--hb-accent-dark); }

.hb-profile-dropdown { position: relative; }
.hb-profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 20px;
    padding: 3px 10px 3px 4px;
    cursor: pointer;
    font-size: 13px;
}
.hb-profile-trigger:hover { background: rgba(255,255,255,0.16); }
.hb-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
}
.hb-role-pill {
    background: rgba(33,117,155,0.35);
    color: #9ed8f5;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
}
.hb-profile-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 215px;
    background: #fff;
    border: 1px solid var(--hb-border);
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 6px 0;
}
.hb-profile-dropdown.open .hb-profile-menu { display: block; }
.hb-profile-menu a {
    display: block;
    padding: 8px 14px;
    color: var(--hb-text) !important;
    font-size: 13.5px;
}
.hb-profile-menu a:hover { background: #f3f6f9; color: var(--hb-accent) !important; }
.hb-profile-menu a.hb-logout-link { border-top: 1px solid var(--hb-border); color: #b91c1c !important; margin-top: 4px; }

/* Site Banner with Cultural Heritage Artwork */
.site-banner {
    position: relative;
    background-color: #1c2841;
    background-image:
        linear-gradient(90deg, rgba(15, 23, 42, 0.82) 0%, rgba(18, 29, 51, 0.48) 46%, rgba(18, 29, 51, 0.12) 100%),
        url('../images/hindibhashi-banner.jpg');
    background-size: cover;
    background-position: center 62%;
    background-repeat: no-repeat;
    min-height: 230px;
    display: flex;
    align-items: center;
    padding: 36px 0;
    border-bottom: 3px solid #d97706;
}
.site-banner .banner-inner {
    width: 100%;
    position: relative;
    z-index: 2;
}
.site-title {
    margin: 0;
    font-family: 'Noto Serif Devanagari', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.site-title a { color: #fef3c7; text-decoration: none; }
.site-title a:hover { color: #fde68a; }
.site-description {
    margin: 6px 0 0;
    color: #e2e8f0;
    font-size: 1.05rem;
    font-weight: 500;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

/* Primary Navigation */
.main-navigation {
    background-color: var(--hb-nav-bg);
    position: relative;
    z-index: 500;
}
.menu-toggle {
    display: none;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 14px;
    margin: 8px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.chicago-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}
.chicago-nav-menu > li { position: relative; }
.chicago-nav-menu a {
    display: block;
    padding: 12px 16px;
    color: #f3f4f6;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}
.chicago-nav-menu > li > a:hover,
.chicago-nav-menu > li:hover > a {
    background-color: var(--hb-nav-hover);
    color: #ffffff;
}
.chicago-nav-menu > li.menu-item-has-children > a::after {
    content: " ▾";
    font-size: 11px;
    opacity: 0.75;
}

/* Multi-level Dropdowns */
.chicago-nav-menu .sub-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 240px;
    max-width: 300px;
    background: #2f3236;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
    z-index: 1000;
}
.chicago-nav-menu li:hover > .sub-menu { display: block; }
.chicago-nav-menu .sub-menu li { position: relative; }
.chicago-nav-menu .sub-menu a {
    padding: 8px 14px;
    font-size: 14px;
    white-space: normal;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.chicago-nav-menu .sub-menu a:hover { background: var(--hb-accent); color: #fff; }
.chicago-nav-menu .sub-menu .sub-menu {
    left: 100%;
    top: 0;
    max-height: 70vh;
    overflow-y: auto;
}

/* Content Grid */
.site-content { padding: 30px 0 48px; }
.content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}
body.layout-left-sidebar .content-wrapper {
    grid-template-columns: 320px minmax(0, 1fr);
}
body.layout-no-sidebar .content-wrapper {
    grid-template-columns: minmax(0, 1fr);
}

/* Breadcrumbs */
.hb-breadcrumbs {
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    border-radius: 4px;
    padding: 10px 18px;
    margin-bottom: 18px;
    font-size: 13.5px;
    color: var(--hb-muted);
}
.hb-breadcrumbs .sep { margin: 0 6px; }

/* Article Card */
.hb-article, .page-header, .comments-area {
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    border-radius: 4px;
    padding: 28px 32px;
    margin-bottom: 24px;
}
.entry-meta {
    font-size: 13px;
    color: var(--hb-muted);
    margin-bottom: 8px;
}
.entry-title, .page-title {
    margin: 0 0 18px;
    font-family: 'Noto Serif Devanagari', Georgia, serif;
    font-size: 1.85rem;
    line-height: 1.35;
    color: #2b2d30;
}
.hb-archive-card .entry-title { font-size: 1.4rem; margin-bottom: 10px; }

.entry-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 18px;
}

.entry-content {
    font-size: 16.5px;
    line-height: 1.85;
    overflow-wrap: break-word;
}
.entry-content img { max-width: 100%; height: auto; border-radius: 4px; }
.entry-content h1, .entry-content h2, .entry-content h3 {
    font-family: 'Noto Serif Devanagari', Georgia, serif;
    margin-top: 1.5em;
    margin-bottom: 0.6em;
    line-height: 1.35;
}
.entry-content blockquote {
    margin: 1.25em 0;
    padding: 12px 18px;
    border-left: 4px solid var(--hb-accent);
    background: #f8fafc;
}
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin: 18px 0;
}
.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
    border-radius: 4px;
}

.entry-footer {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid var(--hb-border);
    font-size: 13.5px;
    color: var(--hb-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Child Pages Index on Section Hubs */
.hb-child-pages {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 2px solid var(--hb-border);
}
.hb-child-pages h2 {
    font-size: 1.2rem;
    margin: 0 0 14px;
    color: var(--hb-accent-dark);
}
.hb-child-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}
.hb-child-grid li {
    background: #f9fafb;
    border: 1px solid var(--hb-border);
    border-radius: 4px;
    padding: 12px 14px;
}
.hb-child-grid li a { font-weight: 600; font-size: 15px; }
.hb-child-grid li p { margin: 6px 0 0; font-size: 13px; color: var(--hb-muted); line-height: 1.5; }

/* Sidebar */
.sidebar .widget {
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    border-radius: 4px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.widget-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
}
.widget-title-accent {
    background: var(--hb-accent);
    color: #fff;
    padding: 7px 12px;
    border-radius: 3px;
    text-align: center;
}
.sidebar-link-list, .sidebar-comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar-link-list li, .sidebar-comment-list li {
    padding: 7px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.sidebar-link-list li:last-child, .sidebar-comment-list li:last-child { border-bottom: 0; }

.search-row { display: flex; gap: 6px; }
.search-field {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}
button, .button, input[type="submit"], .search-submit {
    background: var(--hb-btn);
    color: #fff;
    border: 0;
    padding: 9px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}
button:hover, .button:hover, input[type="submit"]:hover, .search-submit:hover {
    background: var(--hb-accent);
}

/* Comments & Forms */
.comments-title { margin-top: 0; font-size: 1.35rem; }
.comment-list, .comment-list .children { list-style: none; padding-left: 0; margin: 0; }
.comment-list .children { padding-left: 26px; border-left: 2px solid var(--hb-border); margin-top: 10px; }
.comment-body {
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid var(--hb-border);
    border-radius: 4px;
    margin-bottom: 12px;
}
.comment-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--hb-muted); margin-bottom: 6px; }
.comment-content p { margin: 0; font-size: 14.5px; }
.reply { margin-top: 6px; font-size: 12.5px; }

.comment-respond { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hb-border); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comment-form label, .hb-contact-form label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.comment-form input, .comment-form textarea, .hb-contact-form input, .hb-contact-form textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14.5px;
}

.hb-alert { padding: 12px 15px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.hb-alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.hb-alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* Pagination */
.posts-navigation .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.posts-navigation .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid var(--hb-border);
    border-radius: 4px;
}
.posts-navigation .page-numbers.current { background: var(--hb-accent); color: #fff; border-color: var(--hb-accent); }

/* Footer */
.site-info {
    background: #000000;
    color: #d1d5db;
    padding: 18px 0;
    font-size: 13.5px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-links { display: flex; gap: 8px; }
.site-info a { color: #9ca3af; }
.site-info a:hover { color: #ffffff; }

.scrollup-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: #555;
    border-radius: 4px;
    z-index: 900;
}
.scrollup-btn.visible { display: flex; }

@media (max-width: 900px) {
    .content-wrapper, body.layout-left-sidebar .content-wrapper {
        grid-template-columns: 1fr;
    }
    .menu-toggle { display: inline-block; }
    .chicago-nav-menu { display: none; flex-direction: column; padding-bottom: 10px; }
    .chicago-nav-menu.toggled { display: flex; }
    .chicago-nav-menu .sub-menu {
        position: static;
        box-shadow: none;
        padding-left: 16px;
        max-width: none;
    }
    .chicago-nav-menu li.sub-open > .sub-menu { display: block; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .hb-article { padding: 20px; }
}


/* Langlex Language Captcha */
.langlex-captcha-box {
    background: #f8fafc;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px 14px;
    margin: 12px 0 14px;
}
.langlex-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1e293b;
}
.langlex-script-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13.5px;
    background: #fff;
    margin-bottom: 8px;
}
.langlex-prompt-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 8px 10px;
    text-align: center;
    margin-bottom: 8px;
}
.langlex-prompt-title { font-size: 12px; color: #64748b; margin-bottom: 4px; }
.langlex-prompt-imgs { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.langlex-options-list { display: flex; flex-direction: column; gap: 6px; }
.langlex-opt-row {
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    margin-bottom: 0 !important;
}
.langlex-opt-row:hover { border-color: #21759b; }
.langlex-opt-row.is-correct { border-color: #16a34a; background: #f0fdf4; }
.langlex-opt-row.is-wrong { border-color: #dc2626; background: #fef2f2; }
.langlex-opt-imgs { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.langlex-captcha-feedback { font-size: 12.5px; margin-top: 6px; }
.langlex-ok { color: #15803d; font-weight: 600; }
.langlex-err { color: #b91c1c; font-weight: 600; }
.langlex-loading { font-size: 12.5px; color: #64748b; padding: 6px 0; }
button[disabled] { opacity: 0.55; cursor: not-allowed; }

.langlex-header-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.langlex-reload-btn { background: #fff !important; color: #21759b !important; border: 1px solid #cbd5e1 !important; padding: 3px 9px !important; font-size: 12px !important; border-radius: 4px; cursor: pointer; font-weight: 600; }
.langlex-reload-btn:hover { background: #e2e8f0 !important; }

/* Clean Gallery Grid for Restored Images */
.hb-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.hb-gallery-card {
    background: #f8fafc;
    border: 1px solid var(--hb-border);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    margin: 0;
}
.hb-gallery-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
.hb-gallery-card figcaption {
    font-size: 13px;
    color: var(--hb-muted);
    margin-top: 6px;
    line-height: 1.4;
}
figure.wp-caption {
    margin: 18px auto;
    text-align: center;
}
figure.wp-caption figcaption {
    font-size: 13px;
    color: var(--hb-muted);
    margin-top: 6px;
}
