/*
Theme Name: Sarkaridaftar
Theme URI: https://sarkaridaftar.com
Author: Sarkaridaftar Team
Author URI: https://sarkaridaftar.com
Description: A professional Sarkari Naukri style WordPress theme for government job portals. Compatible with AI Article Generator plugin. Features customizable header, footer, 404 page, comments, search and more.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sarkaridaftar
Tags: government, jobs, portal, news, blog, custom-header, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   SARKARIDAFTAR THEME — Main Styles
   Plugin CSS ke saath conflict-free
   ============================================================ */

/* ── CSS Variables ── */
:root {
    --sd-primary:      #1a3a6b;
    --sd-primary-dark: #0d2444;
    --sd-red:          #CC0000;
    --sd-red-dark:     #990000;
    --sd-gold:         #e8a000;
    --sd-gold-dark:    #c07000;
    --sd-green:        #006600;
    --sd-blue:         #003399;
    --sd-blue-light:   #e8f0fe;
    --sd-bg:           #f5f5f5;
    --sd-white:        #ffffff;
    --sd-text:         #1a1a2e;
    --sd-text-soft:    #444444;
    --sd-border:       #cccccc;
    --sd-shadow:       0 2px 12px rgba(0,0,50,.10);
    --sd-radius:       4px;
    --sd-max-width:    1010px;
    --sd-font:         'Noto Sans', 'Noto Sans Devanagari', Arial, sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sd-font);
    font-size: 14px;
    background: var(--sd-bg);
    color: var(--sd-text);
    overflow-x: hidden;
    line-height: 1.6;
}
a { color: var(--sd-blue); text-decoration: none; }
a:hover { color: var(--sd-red); text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* ── Page Center Wrapper ── */
.sd-page-center { text-align: center; }

/* ════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════ */
#sd-header {
    max-width: var(--sd-max-width);
    width: 100%;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--sd-primary) 0%, var(--sd-primary-dark) 50%, var(--sd-primary) 100%);
    border-bottom: 3px solid var(--sd-gold);
    position: relative;
}
/* ── Desktop: horizontal [Logo | Text] ── */
@media (min-width: 769px) {
    #sd-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 16px 20px;
        min-height: unset;
        text-align: center;
        position: relative;
        gap: 0;
    }
    .sd-header-logo-wrap {
        display: contents;
    }
    .sd-logo-img {
        width: 150px;
        height: 150px;
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 2;
        margin: 0;
    }
    .sd-logo-img img { width: 100%; height: 100%; object-fit: cover; }
    .sd-logo-text-fallback {
        font-size: 48px;
        font-weight: 900;
        color: #fff;
        line-height: 1;
    }
    /* Text block — absolutely centered over full header width */
    .sd-header-text {
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        pointer-events: none;
        z-index: 1;
    }
    .sd-header-text a,
    .sd-header-text * { pointer-events: auto; }
    #sd-head-title {
        font-size: 36px;
        font-weight: 900;
        letter-spacing: 2px;
        line-height: 1.15;
        color: #fff;
        margin: 0;
    }
    #sd-head-title a { color: #fff; text-decoration: none; }
    #sd-head-subtitle {
        font-size: 15px;
        font-weight: 600;
        color: rgba(255,255,255,0.85);
        letter-spacing: 1px;
        margin-top: 8px;
    }
    .sd-header-ad {
        margin-left: auto;
        margin-top: 0;
        flex-shrink: 0;
    }
}
/* ── Mobile: original centered column layout ── */
@media (max-width: 768px) {
    #sd-header {
        text-align: center;
        padding: 10px 0;
        min-height: 160px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .sd-header-logo-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    .sd-logo-img {
        width: 80px; height: 80px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 2px auto 0;
        overflow: hidden;
    }
    .sd-logo-img img { width: 100%; height: 100%; object-fit: contain; }
    .sd-logo-text-fallback {
        font-size: 22px;
        font-weight: 900;
        color: var(--sd-primary);
        line-height: 1;
    }
    #sd-head-title {
        color: #fff;
        font-size: 22px;
        font-weight: bold;
        letter-spacing: 1px;
        line-height: 1.3;
    }
    #sd-head-title a { color: #fff; text-decoration: none; }
    #sd-head-subtitle {
        color: rgba(255,255,255,0.85);
        font-size: 14px;
        font-weight: 600;
        margin-top: 3px;
        letter-spacing: 0.5px;
    }
    .sd-header-ad {
        margin-top: 8px;
        width: 100%;
        text-align: center;
    }
}

/* ════════════════════════════════════════════
   NAVBAR — 3-column sticky bar
   Desktop : [Logo | Menu | Search]
   Mobile  : [Hamburger | Logo | Search]
   ════════════════════════════════════════════ */
#sd-navbar-wrap {
    max-width: var(--sd-max-width);
    width: 100%;
    margin: 0 auto;
    background: #000;
    position: relative;   /* scroll-up pe sticky NAHI — naya #sd-fxh-* header handle karega */
    top: auto;
    z-index: 200;
    box-shadow: 0 2px 6px rgba(0,0,0,.4);
    border-radius: 0 0 4px 4px;
}

/* Inner row — 3 columns */
.sd-navbar-inner {
    max-width: var(--sd-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 48px;
    padding: 0 12px;
    gap: 0;
}

/* ── LEFT col ── */
.sd-navbar-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Desktop: hide logo + site name — menu shifts left */
@media (min-width: 769px) {
    .sd-nav-logo { display: none; }
    .sd-navbar-inner {
        grid-template-columns: 0 1fr auto;
    }
    .sd-navbar-left { width: 0; overflow: hidden; padding: 0; }
    .sd-navbar-centre { justify-content: flex-start; }
    .sd-navbar { justify-content: flex-start; }
}

/* Desktop logo (left col) */
.sd-nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}
.sd-nav-logo-img {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.sd-nav-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sd-gold, #e8a000);
    color: #000;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}
.sd-nav-site-name {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .3px;
    line-height: 1.2;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hamburger button — hidden on desktop */
.sd-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px 8px;
    line-height: 1;
    flex-shrink: 0;
}
.sd-hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
}
.sd-hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
/* Animate to X when open */
.sd-menu-toggle[aria-expanded="true"] .sd-hamburger-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.sd-menu-toggle[aria-expanded="true"] .sd-hamburger-icon span:nth-child(2) {
    opacity: 0;
}
.sd-menu-toggle[aria-expanded="true"] .sd-hamburger-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── CENTRE col ── */
.sd-navbar-centre {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Desktop horizontal menu */
.sd-navbar {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
    background: transparent;
}
.sd-navbar li {
    position: relative;
    display: flex;
    align-items: center;
}
/* Divider between items — using ::after on li */
.sd-navbar li + li::before {
    content: '';
    display: block;
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.25);
    flex-shrink: 0;
}
.sd-navbar li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    transition: background .2s;
    white-space: nowrap;
}
.sd-navbar li a:hover,
.sd-navbar li.current-menu-item > a,
.sd-navbar li.current_page_item > a { background: #333; }

/* Mobile centre logo — hidden on desktop */
.sd-nav-mobile-logo { display: none; }

/* ── RIGHT col ── */
.sd-navbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    flex-shrink: 0;
}

.sd-search-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sd-search-toggle:hover { opacity: .8; }

/* Search box dropdown */
.sd-nav-search-box {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 8px;
    width: 260px;
    z-index: 300;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.sd-nav-search-box[hidden] { display: none; }
.sd-nav-search-box form {
    display: flex;
    align-items: center;
    gap: 6px;
}
.sd-nav-search-input {
    flex: 1;
    background: #222;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    padding: 6px 10px;
    font-size: 13px;
    outline: none;
}
.sd-nav-search-input::placeholder { color: #888; }
.sd-nav-search-input:focus { border-color: var(--sd-gold, #e8a000); }
.sd-nav-search-submit {
    background: var(--sd-red, #cc0000);
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.sd-nav-search-submit:hover { opacity: .85; }

/* ── Mobile full-width dropdown menu ── */
.sd-mobile-menu-wrap {
    background: #111;
    border-top: 1px solid #333;
}
.sd-mobile-menu-wrap[hidden] { display: none; }
.sd-navbar-mobile {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sd-navbar-mobile li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #222;
    transition: background .15s, padding-left .15s;
}
.sd-navbar-mobile li a:hover,
.sd-navbar-mobile li.current-menu-item > a,
.sd-navbar-mobile li.current_page_item > a {
    background: #1a1a1a;
    padding-left: 28px;
    color: var(--sd-gold, #e8a000);
}


/* ════════════════════════════════════════════
   APP/SOCIAL BAR
   ════════════════════════════════════════════ */
.sd-social-bar {
    max-width: var(--sd-max-width);
    margin: 0 auto;
    background: #f0f8ff;
    padding: 6px 10px;
    border-bottom: 1px solid #ccc;
    text-align: center;
    font-size: 14px;
}
.sd-social-bar a {
    color: #0055a5;
    font-weight: bold;
    text-decoration: none;
}
.sd-social-bar a:hover { text-decoration: underline; }
.sd-social-sep { margin: 0 8px; color: #888; }

/* ════════════════════════════════════════════
   TICKER / MARQUEE
   ════════════════════════════════════════════ */
.sd-ticker-area {
    max-width: var(--sd-max-width);
    margin: 0 auto;
}
.sd-ticker-row {
    background: #fffbe6;
    padding: 4px 8px;
    border-bottom: 1px solid #ddd;
    font-size: 13px;
    text-align: center;
}
.sd-ticker-row a { color: #c00; font-weight: bold; text-decoration: none; }
.sd-ticker-row a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════
   PAGE HEADINGS (H1/H2 in homepage)
   ════════════════════════════════════════════ */
.sd-page-headings {
    max-width: var(--sd-max-width);
    margin: 8px auto 0;
    text-align: center;
    padding: 4px 8px;
}
.sd-page-headings h1 {
    font-size: 13px;
    font-weight: bold;
    color: #000;
    margin: 4px 0;
}
.sd-page-headings h2 {
    font-size: 13px;
    font-weight: bold;
    color: #c00;
    margin: 4px 0;
}

/* ════════════════════════════════════════════
   MAIN CONTENT AREA (homepage)
   ════════════════════════════════════════════ */
.sd-main-wrap {
    max-width: var(--sd-max-width);
    margin: 10px auto;
    width: 100%;
    padding: 0 6px;
}

/* ════════════════════════════════════════════
   LAYOUT — FULL WIDTH (Default)
   Sidebar fully removed. sd-full-width = no flex gap.
   ════════════════════════════════════════════ */
.sd-content-layout {
    max-width: var(--sd-max-width);
    margin: 15px auto;
    padding: 0 8px;
    display: block; /* Full width — no flex */
}

/* .sd-full-width class explicitly ensures no sidebar space */
.sd-content-layout.sd-full-width {
    display: block;
}

.sd-main-content {
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--sd-radius);
    padding: 20px;
}

/* ── Post Header ── */
.sd-post-header { margin-bottom: 16px; }
.sd-post-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--sd-text);
    line-height: 1.35;
    margin-bottom: 10px;
}
.sd-post-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.sd-post-meta a { color: var(--sd-blue); }
.sd-post-meta a:hover { color: var(--sd-red); }

/* ── Featured Image ── */
.sd-featured-image {
    margin: 0 0 18px;
    text-align: center;
    border-radius: var(--sd-radius);
    overflow: hidden;
}
.sd-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--sd-radius);
    border: 1px solid #eee;
}

/* ── Entry Content ── */
/* NOTE: Plugin CSS (.aigm-* classes) handles inner content styling.
   Theme only sets base typography — no conflicts with plugin tables/boxes. */
.entry-content {
    font-family: var(--sd-font);
    color: var(--sd-text);
    line-height: 1.8;
    font-size: 16px;
}
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
    margin: 18px 0 10px;
    line-height: 1.4;
    color: var(--sd-primary);
}
.entry-content p { margin-bottom: 14px; }
.entry-content ul, .entry-content ol {
    padding-left: 24px;
    margin-bottom: 14px;
    list-style: disc;
}
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 6px; }
.entry-content a { color: var(--sd-blue); }
.entry-content a:hover { color: var(--sd-red); }
.entry-content strong { color: var(--sd-primary); }
.entry-content blockquote {
    border-left: 4px solid var(--sd-red);
    background: #fff8f8;
    padding: 12px 16px;
    margin: 16px 0;
    font-style: italic;
    color: #555;
}
.entry-content pre, .entry-content code {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: monospace;
    font-size: 14px;
    padding: 2px 6px;
}
.entry-content pre { padding: 12px; overflow-x: auto; }
/* Base table styles — plugin overrides these with specificity for its own tables */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}
.entry-content table td, .entry-content table th {
    border: 1px solid #ddd;
    padding: 8px 12px;
}
.entry-content table th { background: #f0f4ff; font-weight: 700; }

/* ── Post Footer (Tags) ── */
.sd-post-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #f0f0f0;
}
.sd-post-tags { font-size: 13px; }
.sd-post-tags a {
    display: inline-block;
    background: #f0f4ff;
    border: 1px solid #ccd6f6;
    color: var(--sd-blue);
    padding: 3px 10px;
    border-radius: 20px;
    margin: 2px 3px;
    font-size: 12px;
}
.sd-post-tags a:hover { background: var(--sd-red); color: #fff; border-color: var(--sd-red); text-decoration: none; }

/* ── Prev/Next Navigation ── */
.sd-post-navigation {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}
.sd-post-navigation a {
    flex: 1;
    background: var(--sd-primary);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--sd-radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sd-post-navigation a:hover { background: var(--sd-red); color: #fff; text-decoration: none; }
.sd-nav-prev { text-align: left; }
.sd-nav-next { text-align: right; }

/* ════════════════════════════════════════════
   COMMENTS SECTION
   ════════════════════════════════════════════ */
.sd-comments-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #cc0000;
}
.sd-comments-title {
    background: #cc0000;
    color: #fff;
    padding: 8px 14px;
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--sd-radius) var(--sd-radius) 0 0;
    margin-bottom: 0;
}
.sd-comments-list { list-style: none; padding: 0; margin: 0; }
.sd-comment {
    padding: 14px 0;
    border-bottom: 1px dotted #ddd;
}
.sd-comment-author {
    font-weight: 700;
    color: var(--sd-primary);
    font-size: 14px;
}
.sd-comment-date { font-size: 12px; color: #888; margin-left: 8px; }
.sd-comment-body { font-size: 14px; margin-top: 6px; line-height: 1.6; }
.sd-comment-reply a { font-size: 12px; color: var(--sd-red); }
.children { padding-left: 24px; border-left: 2px solid #eee; margin-top: 10px; }

.sd-comment-form-wrap {
    background: #f9f9ff;
    border: 1px solid #dde;
    border-radius: var(--sd-radius);
    padding: 18px;
    margin-top: 20px;
}
.sd-comment-form-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--sd-primary);
    margin-bottom: 14px;
}
.comment-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--sd-text);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: var(--sd-radius);
    font-family: var(--sd-font);
    font-size: 14px;
    margin-bottom: 12px;
    background: #fff;
    transition: border-color 0.2s;
}
.comment-form input:focus, .comment-form textarea:focus {
    border-color: var(--sd-blue);
    outline: none;
}
.comment-form textarea { min-height: 100px; resize: vertical; }
.comment-form .submit input,
.comment-form input[type="submit"] {
    background: var(--sd-red);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: var(--sd-radius);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--sd-font);
}
.comment-form .submit input:hover,
.comment-form input[type="submit"]:hover { background: var(--sd-red-dark); }

/* ════════════════════════════════════════════
   ARCHIVE / CATEGORY PAGE
   ════════════════════════════════════════════ */
.sd-archive-title {
    background: var(--sd-primary);
    color: #fff;
    padding: 10px 16px;
    font-size: 18px;
    font-weight: 700;
    border-radius: var(--sd-radius) var(--sd-radius) 0 0;
    margin-bottom: 0;
}
.sd-post-list { list-style: none; padding: 0; }
.sd-post-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #e8edf3;
    background: #fff;
    transition: background .12s;
}
.sd-post-item:hover { background: #f0f6ff; }
.sd-post-item:first-child { border-top: 1px solid #e8edf3; }
.sd-post-thumb {
    width: 80px; height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}
.sd-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sd-post-thumb-placeholder {
    width: 80px; height: 60px;
    background: var(--sd-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    flex-shrink: 0;
}
.sd-post-item-body { flex: 1; min-width: 0; }
.sd-post-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--sd-text);
    line-height: 1.4;
    text-decoration: none;
    display: block;
}
.sd-post-item-title:hover { color: var(--sd-red); text-decoration: underline; }
.sd-post-item-meta { font-size: 12px; color: #888; margin-top: 4px; }
.sd-new-badge {
    display: inline-block;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

/* ── Pagination ── */
.sd-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin: 20px 0;
    padding: 10px 0;
}
.sd-pagination a, .sd-pagination span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    color: var(--sd-blue);
    background: #fff;
    text-decoration: none;
    transition: all .15s;
}
.sd-pagination a:hover { background: var(--sd-red); color: #fff; border-color: var(--sd-red); }
.sd-pagination .current { background: var(--sd-red); color: #fff; border-color: var(--sd-red); font-weight: 700; }

/* ════════════════════════════════════════════
   SEARCH PAGE
   ════════════════════════════════════════════ */
.sd-search-page-header {
    background: var(--sd-primary);
    color: #fff;
    padding: 14px 18px;
    border-radius: var(--sd-radius) var(--sd-radius) 0 0;
}
.sd-search-page-header h1 { font-size: 18px; color: #fff; }
.sd-search-form-large {
    display: flex;
    gap: 0;
    background: #fff;
    border: 2px solid var(--sd-primary);
    border-radius: var(--sd-radius);
    overflow: hidden;
    margin: 16px 0;
}
.sd-search-form-large input[type="search"] {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-size: 15px;
    font-family: var(--sd-font);
    outline: none;
}
.sd-search-form-large button {
    background: var(--sd-red);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--sd-font);
}
.sd-search-form-large button:hover { background: var(--sd-red-dark); }
.sd-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 16px;
}
.sd-no-results .sd-emoji { font-size: 48px; display: block; margin-bottom: 12px; }

/* ════════════════════════════════════════════
   404 PAGE
   ════════════════════════════════════════════ */
.sd-404-wrap {
    max-width: 700px;
    margin: 40px auto;
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border: 2px solid var(--sd-red);
    border-radius: 10px;
    box-shadow: var(--sd-shadow);
}
.sd-404-number {
    font-size: 100px;
    font-weight: 900;
    color: var(--sd-red);
    line-height: 1;
    margin-bottom: 10px;
}
.sd-404-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--sd-primary);
    margin-bottom: 14px;
}
.sd-404-msg {
    font-size: 15px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.7;
}
.sd-404-search { max-width: 400px; margin: 0 auto 24px; }
.sd-404-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sd-404-links a {
    background: var(--sd-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}
.sd-404-links a:hover { background: var(--sd-red); color: #fff; text-decoration: none; }

/* ════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════ */
#sd-footer {
    background: #f0f0f0;
    border-top: 3px solid #cc0000;
    margin-top: 24px;
}
.sd-footer-inner {
    max-width: var(--sd-max-width);
    margin: 0 auto;
    padding: 20px 10px 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 16px;
    text-align: left;
}
.sd-footer-col h3 {
    font-size: 14px;
    color: #222;
    border-bottom: 2px solid #cc0000;
    padding-bottom: 6px;
    margin-bottom: 10px;
    font-weight: 700;
}
.sd-footer-col a {
    display: block;
    color: rgba(0,0,0,0.75);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 6px;
    transition: color .15s;
}
.sd-footer-col a:hover { color: #cc0000; text-decoration: none; }
.sd-footer-col p { font-size: 13px; color: #555; line-height: 1.7; margin-bottom: 8px; }
.sd-footer-menu { list-style: none; padding: 0; }
.sd-footer-menu li a {
    display: block;
    color: rgba(0,0,0,0.75);
    font-size: 13px;
    margin-bottom: 6px;
}
.sd-footer-menu li a:hover { color: #cc0000; }
.sd-footer-widget-area {
    max-width: var(--sd-max-width);
    margin: 0 auto;
    padding: 0 10px;
}
.sd-footer-bottom {
    background: #222;
    color: #ccc;
    text-align: center;
    font-size: 12px;
    padding: 10px;
    margin-top: 10px;
    line-height: 1.8;
}
.sd-footer-bottom a { color: #ff9999; text-decoration: none; }
.sd-footer-bottom a:hover { color: #fff; text-decoration: underline; }

/* ════════════════════════════════════════════
   AD AREAS
   ════════════════════════════════════════════ */
.sd-ad-area { text-align: center; margin: 10px auto; max-width: var(--sd-max-width); }

/* ════════════════════════════════════════════
   ACCESSIBILITY & SKIP LINK
   ════════════════════════════════════════════ */
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 0; top: 0; z-index: 999; background: #000; color: #fff; padding: 8px; }

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Desktop menu & logo hidden on mobile */
    .sd-navbar { display: none !important; }
    .sd-nav-logo { display: none; }

    /* Show hamburger & mobile logo */
    .sd-menu-toggle { display: flex; align-items: center; }
    .sd-nav-mobile-logo {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #fff;
        text-decoration: none;
        white-space: nowrap;
    }
    .sd-nav-mobile-logo .sd-nav-site-name { font-size: 12px; font-weight: 800; max-width: 120px; }

    /* Navbar inner: hamburger | logo(centre) | search */
    .sd-navbar-inner { padding: 0 6px; min-height: 46px; }
    .sd-navbar-left { order: 1; }
    .sd-navbar-centre { order: 2; justify-content: center; }
    .sd-navbar-right { order: 3; }

    /* Search box full width on mobile */
    .sd-nav-search-box { width: calc(100vw - 20px); right: -8px; }

    #sd-head-title { font-size: 18px; }
    .sd-logo-img { width: 60px; height: 60px; }
    .sd-logo-text-fallback { font-size: 18px; }
    .sd-footer-inner { grid-template-columns: 1fr 1fr; }
    .sd-post-navigation { flex-direction: column; }
}
@media (max-width: 480px) {
    .sd-footer-inner { grid-template-columns: 1fr; }
    .sd-404-number { font-size: 70px; }
}

/* ════════════════════════════════════════════
   DISCLAIMER STRIP
   ════════════════════════════════════════════ */
.sd-footer-disclaimer {
    background: #fff8e1;
    border-top: 3px solid #e8a000;
    border-bottom: 1px solid #f0d060;
    padding: 14px 0;
}
.sd-disclaimer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 12.5px;
    color: #555;
    line-height: 1.7;
    text-align: justify;
}
.sd-disclaimer-inner strong {
    color: #b35a00;
    font-size: 13px;
}
.sd-disclaimer-inner a {
    color: #1a3a6b;
    text-decoration: underline;
}

/* ════════════════════════════════════════════
   HIDE ELEMENTS (per-post meta / body class)
   ════════════════════════════════════════════ */
body.sd-hide-header #sd-header,
body.sd-hide-header #sd-navbar-wrap,
body.sd-hide-header .sd-social-bar { display: none !important; }

body.sd-hide-footer #sd-footer { display: none !important; }

body.sd-hide-sidebar .sd-sidebar { display: none !important; }

/* Responsive disclaimer */
@media (max-width: 600px) {
    .sd-disclaimer-inner { font-size: 11.5px; }
}

/* ════════════════════════════════════════════
   SCROLL-UP FLOATING HEADERS
   #sd-fxh-desktop  — Desktop (> 768px)
   #sd-fxh-mobile   — Mobile  (≤ 768px)

   Dono position:fixed hain, top se bahar start karte hain.
   JS class 'sd-fxh-on' add karta hai scroll-up par.
   ════════════════════════════════════════════ */

/* ── Shared base ── */
#sd-fxh-desktop,
#sd-fxh-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 500;
    background: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,.55);
    /* Hidden by default — slide up off-screen */
    transform: translateY(-110%);
    transition: transform .26s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

/* JS adds this class on scroll-up */
#sd-fxh-desktop.sd-fxh-on,
#sd-fxh-mobile.sd-fxh-on {
    transform: translateY(0);
}

/* Which one shows depends on screen width */
#sd-fxh-desktop { display: none; } /* hidden until media query enables */
#sd-fxh-mobile  { display: none; }

/* ── Inner 3-col grid (shared) ── */
.sd-fxh-inner {
    max-width: var(--sd-max-width, 1200px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 48px;
    padding: 0 12px;
}

/* ── LEFT col ── */
.sd-fxh-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Logo link */
.sd-fxh-logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}
.sd-fxh-logo-img {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.sd-fxh-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sd-gold, #e8a000);
    color: #000;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}
.sd-fxh-site-name {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .3px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hamburger (mobile only) */
.sd-fxh-hamburger {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px 8px;
    flex-shrink: 0;
}
.sd-fxh-ham-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
}
.sd-fxh-ham-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.sd-fxh-hamburger[aria-expanded="true"] .sd-fxh-ham-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.sd-fxh-hamburger[aria-expanded="true"] .sd-fxh-ham-icon span:nth-child(2) {
    opacity: 0;
}
.sd-fxh-hamburger[aria-expanded="true"] .sd-fxh-ham-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── CENTRE col ── */
.sd-fxh-centre {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop horizontal menu */
.sd-fxh-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
}
.sd-fxh-menu li { position: relative; }
.sd-fxh-menu li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 14px 13px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .18s;
}
.sd-fxh-menu li a:hover,
.sd-fxh-menu li.current-menu-item > a,
.sd-fxh-menu li.current_page_item > a { background: #333; }

/* ── RIGHT col ── */
.sd-fxh-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    flex-shrink: 0;
}

.sd-fxh-search-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px 8px;
    display: flex;
    align-items: center;
}
.sd-fxh-search-btn:hover { opacity: .8; }

/* Search dropdown */
.sd-fxh-search-box {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 8px;
    width: 260px;
    z-index: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,.55);
}
.sd-fxh-search-box[hidden] { display: none; }
.sd-fxh-search-box form { display: flex; align-items: center; gap: 6px; }
.sd-fxh-search-input {
    flex: 1;
    background: #222;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    padding: 6px 10px;
    font-size: 13px;
    outline: none;
}
.sd-fxh-search-input::placeholder { color: #888; }
.sd-fxh-search-input:focus { border-color: var(--sd-gold, #e8a000); }
.sd-fxh-search-submit {
    background: var(--sd-red, #cc0000);
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.sd-fxh-search-submit:hover { opacity: .85; }

/* Mobile dropdown menu (only in #sd-fxh-mobile) */
.sd-fxh-mobile-dropdown {
    background: #111;
    border-top: 1px solid #2a2a2a;
}
.sd-fxh-mobile-dropdown[hidden] { display: none; }
.sd-fxh-mobile-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sd-fxh-mobile-list li a {
    display: block;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #222;
    transition: background .18s;
}
.sd-fxh-mobile-list li a:hover,
.sd-fxh-mobile-list li.current-menu-item > a { background: #333; }

/* ── MEDIA QUERIES — which header shows ── */

/* Desktop (> 768px): show desktop header, hide mobile header */
@media (min-width: 769px) {
    #sd-fxh-desktop { display: block; }
    #sd-fxh-mobile  { display: none !important; }
}

/* Mobile (≤ 768px): show mobile header, hide desktop header */
@media (max-width: 768px) {
    #sd-fxh-mobile  { display: block; }
    #sd-fxh-desktop { display: none !important; }

    .sd-fxh-inner { padding: 0 6px; min-height: 46px; }

    /* Mobile search box full width */
    #sd-fxh-mobile .sd-fxh-search-box {
        width: calc(100vw - 20px);
        right: -8px;
    }
}

/* ══════════════════════════════════════════
   PERFORMANCE v1.2.0 ADDITIONS
   ══════════════════════════════════════════ */

/* Back-to-top — CSS class toggle (no JS forced reflow) */
.sd-back-to-top {
    display: none;
}
.sd-back-to-top.sd-btt-visible {
    display: block;
}

/* Image: prevent layout shift with aspect-ratio hint */
img {
    height: auto;
    max-width: 100%;
}

/* Contain paint for card/widget areas (reduce repaint scope) */
.sd-post-card,
.widget,
.sd-card-wrap {
    contain: layout style;
}
