/* ========== Reset & Base ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Mukta', 'Noto Sans Devanagari', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    color: #222;
    background: #f5f6f8;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: #1a73e8; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

/* लगइन नभएका युजर: select disable */
body:not(.logged-in) { user-select: none; -webkit-user-select: none; }


/* ========== Header ========== */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto; /* लोगो, विज्ञापन, मेनु बटन */
    align-items: center;
    gap: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
    position: relative;
}

.site-branding { 
    display: flex;
    align-items: center;
    justify-self: start;
}

.site-name {
    font-size: 2rem;
    font-weight: 800;
    color: #c0392b;
    white-space: nowrap;
}

/* लोगोको साइज */
.my-custom-logo {
    max-height: 100px !important;
    width: auto !important;
    display: block;
    object-fit: contain;
}

/* विज्ञापनको लागि विशेष व्यवस्था */
.header-ad {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
    max-width: 100%;
    height: 90px; /* हेडरको उचाइ फिक्स गरिएको */
}

/* विज्ञापन भित्रको फोटो वा iframe लाई जबरजस्ती मिलाउन */
.header-ad img, 
.header-ad iframe, 
.header-ad ins,
.header-ad a {
    max-width: 100% !important;
    max-height: 90px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    display: block;
}

.header-ad .widget {
    margin: 0;
}

/* ========== Mobile Menu Toggle ========== */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1.5rem;
    padding: 4px 12px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ========== Primary Nav (Dropdown) ========== */
.primary-nav {
    background: #c0392b;
}
.primary-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
}
.primary-menu > li { position: relative; }
.primary-menu > li > a {
    display: block;
    color: #fff;
    padding: 12px 18px;
    font-weight: 600;
}
.primary-menu > li > a:hover { background: #96291d; text-decoration: none; }

/* Dropdown level 1 */
.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    list-style: none;
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
    display: none;
    z-index: 50;
}
.primary-menu li:hover > .sub-menu { display: block; }
.primary-menu .sub-menu a {
    display: block;
    padding: 10px 16px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.primary-menu .sub-menu a:hover { background: #f7f7f7; text-decoration: none; }

/* PHP बाट आएको थोप्लाको स्टाइल (मेनुको लागि) */
.menu-arrow {
    font-size: 10px;
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.3s ease;
    vertical-align: middle;
}
.primary-menu > li:hover > a .menu-arrow {
    transform: rotate(180deg);
}

/* ========== Hero Slider ========== */
.hero-slider { background: #000; }
.heroSwiper { width: 100%; height: 55vh; max-height: 520px; }
.heroSwiper .swiper-slide { position: relative; }
.slide-img img {
    width: 100%;
    height: 55vh;
    max-height: 520px;
    object-fit: cover;
    opacity: .85;
}
.slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    color: #fff;
}
.slide-caption h2 { font-size: 1.4rem; margin-bottom: 6px; }
.slide-caption .btn {
    margin-top: 10px;
    font-size: 0.9rem;
    padding: 8px 18px;
}
.hero-placeholder {
    padding: 60px 16px;
    text-align: center;
    color: #999;
    background: #222;
}

/* ========== Content Layout (70/30) ========== */
.content-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 24px;
    padding-bottom: 24px;
}
.content-area {
    background: #fff;
    padding: 22px;
    border-radius: 8px;
    min-width: 0;
}
.main-sidebar {
    background: #fff;
    padding: 18px;
    border-radius: 8px;
    min-width: 0;
}
@media (min-width: 900px) {
    .content-wrap { grid-template-columns: 70% 1fr; }
}

/* ========== Widgets ========== */
.widget { margin-bottom: 22px; }
.widget-title {
    font-size: 1.05rem;
    border-left: 4px solid #c0392b;
    padding-left: 10px;
    margin-bottom: 10px;
    color: #c0392b;
}

/* ========== Posts ========== */
.post-card { padding: 16px 0; border-bottom: 1px solid #eee; }
.post-card:last-child { border-bottom: none; }
.post-card h2 { font-size: 1.2rem; margin-bottom: 6px; }
.post-card h2 a { color: #222; }
.meta { font-size: .85rem; color: #888; margin-bottom: 8px; }
.read-more { font-weight: 600; }

/* Single post */
.single-post .post-title { font-size: 1.6rem; margin-bottom: 8px; }
.single-post .post-meta { color: #888; margin-bottom: 14px; font-size: .9rem; }
.single-post .post-meta span a {
    background: #f1f1f1;
    padding: 2px 8px;
    border-radius: 4px;
    color: #c0392b;
    font-weight: 600;
}
.single-post .post-meta span a:hover {
    background: #c0392b;
    color: #fff;
    text-decoration: none;
}

.post-content { line-height: 1.85; }
.post-content img { border-radius: 6px; margin: 12px 0; }
.post-content h2, .post-content h3 { margin: 20px 0 10px; }

/* ⚠️ Featured image लुकाउने */
.single-post .post-thumbnail,
.single-post .featured-image,
.single-post .wp-post-image:not(.related-thumb img):not(.archive-grid img) {
    display: none !important;
}

/* ========== Rating ========== */
.post-rating { margin: 10px 0; }
.post-rating .star { color: #ccc; font-size: 1.2rem; }
.post-rating .star.filled { color: #f39c12; }

/* ========== Social Share ========== */
.social-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 22px 0;
    padding: 14px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.share-label { font-weight: 600; margin-right: 6px; }
.share-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
}
.share-btn.fb { background: #1877f2; }
.share-btn.tw { background: #1da1f2; }
.share-btn.wa { background: #25d366; }
.share-btn:hover { opacity: .9; text-decoration: none; color: #fff; }

/* ========== Related Posts ========== */
.related-posts { margin-top: 30px; }
.related-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 6px;
}
.related-head h3 { font-size: 1.2rem; color: #c0392b; }
.view-all { font-weight: 600; font-size: .9rem; }
.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 600px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }
.related-item { background: #fafafa; border-radius: 8px; overflow: hidden; }
.related-thumb img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.related-item h4 { padding: 10px; font-size: .95rem; color: #222; }
.related-item a { display: block; text-decoration: none; }

/* ========== Comments ========== */
.comments-area { margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; }
.comments-title { margin-bottom: 14px; }
.comment-list { list-style: none; }
.comment-list li { margin-bottom: 16px; }
.comment-list .children { list-style: none; margin-left: 20px; margin-top: 12px; }
.comment-form label { display: block; margin-bottom: 4px; font-weight: 600; }
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    margin-bottom: 12px;
}
.comment-form .submit {
    background: #c0392b;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* ========== Custom Post Widget (List & Grid) ========== */
.ourrasuwa-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* सूची (List) लेआउट — फोटो सानो, गोलो र शीर्षक छेउमै */
.ourrasuwa-posts.layout-list .widget-post-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px dashed #eee;
}
.ourrasuwa-posts.layout-list .widget-post-item:last-child {
    border-bottom: none;
}

.ourrasuwa-posts.layout-list .widget-post-thumb {
    flex: 0 0 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #f0f0f0;
}
.ourrasuwa-posts.layout-list .widget-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget-post-content {
    flex: 1;
    min-width: 0;
}

/* ग्रिड (Grid) लेआउट */
.ourrasuwa-posts.layout-grid {
    display: grid !important;
    gap: 15px;
}
.ourrasuwa-posts.cols-1 { grid-template-columns: 1fr !important; }
.ourrasuwa-posts.cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.ourrasuwa-posts.cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.ourrasuwa-posts.cols-4 { grid-template-columns: repeat(4, 1fr) !important; }

.ourrasuwa-posts.layout-grid .widget-post-thumb {
    display: block;
    width: 100%;
    margin-bottom: 8px;
}
.ourrasuwa-posts.layout-grid .widget-post-thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.widget-post-title {
    font-size: 1rem;
    margin-bottom: 4px;
    line-height: 1.4;
}
.widget-post-title a {
    color: #1a73e8;
}
.widget-post-title a:hover {
    color: #c0392b;
    text-decoration: none;
}
.widget-post-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 6px;
}
.widget-post-excerpt {
    font-size: 0.9rem;
    color: #555;
    margin-top: 5px;
}

/* ========== Category Archive Page ========== */
.archive-header {
    margin-bottom: 24px;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 10px;
}
.archive-title {
    font-size: 1.8rem;
    color: #222;
    margin-bottom: 6px;
}
.archive-description {
    color: #666;
    font-size: 0.95rem;
}

.cat-grid-wrapper {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px;
    margin-bottom: 30px;
}
@media (min-width: 768px) {
    .cat-grid-wrapper {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

.cat-article-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.cat-article-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.cat-card-thumb {
    display: block !important;
    width: 100% !important;
    height: 180px !important;
    overflow: hidden;
}
.cat-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.cat-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.cat-card-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}
.cat-card-title a {
    color: #222;
    text-decoration: none;
}
.cat-card-title a:hover {
    color: #c0392b;
}
.cat-card-excerpt {
    font-size: 0.9rem;
    color: #555;
    flex-grow: 1;
    margin-bottom: 12px;
}
.cat-read-more {
    display: inline-block;
    background: #c0392b;
    color: #fff !important;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    align-self: flex-start;
    text-decoration: none !important;
}
.cat-read-more:hover {
    background: #96291d;
}

/* पुछारको श्रेणी सूची (Pill Style) */
.cat-footer-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px dashed #ccc;
}
.cat-footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}
.cat-pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.cat-pill-item {
    display: inline-flex !important;
    align-items: center;
    background: #f0f4f8;
    border: 1px solid #d0d7de;
    padding: 8px 16px !important;
    border-radius: 30px !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.cat-pill-item:hover {
    background: #c0392b !important;
    color: #fff !important;
    border-color: #c0392b !important;
}
.cat-pill-item .pill-name {
    margin-right: 8px;
}
.cat-pill-item .pill-count {
    background: #c0392b;
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: bold;
}
.cat-pill-item:hover .pill-count {
    background: #fff;
    color: #c0392b;
}


/* ========== Footer (Light Theme) ========== */
.site-footer { 
    background: #f9f9f9;
    color: #333; 
    margin-top: 40px; 
    border-top: 1px solid #e0e0e0;
}
.site-footer a { 
    color: #c0392b;
}
.site-footer a:hover { 
    color: #96291d; 
    text-decoration: underline;
}

/* फुल विड्थ फुटर विजेट */
.footer-full {
    background: #f1f1f1;
    padding: 22px 0;
    border-bottom: 1px solid #e0e0e0;
}

/* फुटर मेनु */
.footer-menu-wrap {
    background: #ffffff;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}
.footer-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    justify-content: center;
}
.footer-menu > li { position: relative; }
.footer-menu > li > a {
    display: block;
    padding: 8px 14px;
    color: #444;
    font-size: .9rem;
    font-weight: 600;
}
.footer-menu > li > a:hover {
    color: #c0392b;
    text-decoration: none;
}
.footer-menu .sub-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #fff;
    min-width: 180px;
    list-style: none;
    box-shadow: 0 -4px 14px rgba(0,0,0,.1);
    border: 1px solid #eee;
}
.footer-menu li:hover > .sub-menu { display: block; }
.footer-menu .sub-menu a { padding: 8px 14px; display: block; color: #444; }
.footer-menu .sub-menu a:hover { background: #f5f5f5; }

/* ४ कोलम फुटर विजेट */
.footer-widgets { 
    padding: 30px 0; 
    background: #f9f9f9;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.footer-col .widget-title {
    color: #c0392b;
    border-left-color: #c0392b;
    font-size: 1.1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { 
    padding: 6px 0; 
    border-bottom: 1px dashed #ddd; 
}

/* ========== Footer Credit (कालो भाग) ========== */
.footer-credit {
    background: #222;
    padding: 15px 0;
    text-align: center;
    font-size: .85rem;
    color: #aaa;
}
.footer-credit strong { color: #fff; }
.footer-credit a { color: #f5b6b0; }
.footer-credit a:hover { color: #fff; text-decoration: none; }

/* ========== Buttons / Misc ========== */
.btn {
    display: inline-block;
    padding: 10px 22px;
    background: #c0392b;
    color: #fff !important;
    border-radius: 6px;
    font-weight: 600;
}
.btn:hover { background: #96291d; text-decoration: none; }
.pagination { margin-top: 20px; text-align: center; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.search-form { display: flex; gap: 6px; }
.search-form input { flex: 1; padding: 8px; border: 1px solid #ccc; border-radius: 6px; }
.search-form button { padding: 8px 14px; border: none; background: #c0392b; color: #fff; border-radius: 6px; cursor: pointer; }

/* ========== Mobile Menu & Responsive Fixes ========== */
@media (max-width: 768px) {
    .menu-toggle { 
        display: block; 
        margin-left: auto; 
    }
    
    .header-ad { display: none; }

    .header-inner {
        display: flex;
        flex-wrap: nowrap; 
        justify-content: space-between;
        gap: 10px;
        padding: 10px 0;
    }

    .my-custom-logo {
        max-height: 50px !important; 
        max-width: 180px !important; 
        object-fit: contain; 
    }

    /* मुख्य नेभिगेसन (Menu) */
    .primary-nav { display: none; }
    .primary-nav.open { display: block; }
    .primary-menu { flex-direction: column; }
    .primary-menu > li { border-bottom: 1px solid rgba(255,255,255,.15); }
    
    .primary-menu .sub-menu {
        position: static;
        box-shadow: none;
        display: none;
        background: #8e2a20;
    }
    .primary-menu .sub-menu a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); }
    .primary-menu li.submenu-open > .sub-menu { display: block; }
    
    /* मोबाइलको लागि अलि ठूलो थोप्लो (▼) */
    .menu-arrow {
        float: right;
        font-size: 12px;
        margin-top: 6px;
    }

    /* मोबाइलमा ग्रिडलाई मिलाउने */
    .ourrasuwa-posts.layout-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .ourrasuwa-posts.layout-grid {
        grid-template-columns: 1fr !important;
    }
}