/* --- ग्लोबल सेटिंग्स --- */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
html, body { background-color: #f1f5f9; color: #1e293b; line-height: 1.6; overflow-x: hidden; max-width: 100%; }
.container { max-width: 850px; width: 100%; margin: 0 auto; padding: 20px; position: relative; }

img, iframe, video { max-width: 100%; height: auto; }

/* --- टॉप नेविगेशन बार और मोबाइल मेनू सिस्टम --- */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #ffffff; 
    padding: 12px 20px; 
    border-radius: 16px; 
    margin-bottom: 25px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); 
    border: 1px solid #e2e8f0; 
    position: relative;
    z-index: 1002;
    gap: 12px;
}

.nav-brand { 
    font-weight: 800; 
    color: #2563eb; 
    text-decoration: none; 
    font-size: 17px; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    flex-wrap: nowrap;
}

.nav-links a { 
    text-decoration: none; 
    font-size: 13px; 
    font-weight: 600; 
    color: #475569; 
    transition: color 0.2s; 
    white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active { 
    color: #2563eb; 
}

.nav-right-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* भाषा स्विचिंग बटन */
.lang-switch { display: flex; background: #f1f5f9; padding: 3px; border-radius: 8px; border: 1px solid #cbd5e1; }
.lang-switch a { padding: 4px 10px; font-size: 11px; font-weight: 700; text-decoration: none; border-radius: 6px; color: #475569; }
.lang-switch a.active { background: #2563eb; color: #fff; }

/* मोबाइल हैमबर्गर बटन (☰) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #1e3a8a;
    border-radius: 3px;
}

/* --- डेस्कटॉप लेफ्ट-राइट साइड ऐड लेआउट (बीच की पोस्ट/कैलकुलेटर पूरी चौड़ाई में) --- */
.view-page-layout {
    display: block;
    width: 100%;
}

.view-main-column {
    display: block;
    width: 100%;
    max-width: 100%;
}

.desktop-side-ad {
    display: none;
}

@media (min-width: 1260px) {
    .desktop-side-ad {
        display: block;
        position: fixed;
        top: calc(100vh - 100%);
        width: 190px;
        z-index: 900;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .desktop-side-left {
        left: 10px;
    }

    .desktop-side-right {
        right: 10px;
    }

    .desktop-side-ad.is-closed {
        display: none !important;
    }

    .desktop-side-sticky,
    .desktop-side-inner {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .desktop-side-inner .ad-box,
    .desktop-side-inner .ad-device-desktop,
    .desktop-side-inner .ad-device-desktop > *,
    .desktop-side-inner iframe,
    .desktop-side-inner img {
        max-width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
    }
}

@media (max-width: 1259px) {
    .desktop-side-ad {
        display: none !important;
    }
}

/* --- बॉर्डरलेस कॉमन ऐड बॉक्स व डेस्कटॉप/मोबाइल विजिबिलिटी --- */
.ad-box {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 8px 0;
    margin: 14px 0;
    text-align: center;
    box-shadow: none;
    max-width: 100%;
    overflow: hidden;
}

.ad-device-desktop {
    display: block;
    max-width: 100%;
}

.ad-device-mobile {
    display: none;
    max-width: 100%;
}

/* --- स्क्रॉल-ट्रिगर्ड फिक्स्ड मोबाइल ऐड व गोल क्रॉस (×) बटन --- */
.page-fixed-mobile-ad {
    display: none !important;
}

@media (min-width: 769px) {
    .page-fixed-mobile-ad {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .page-fixed-mobile-ad {
        display: none !important;
        position: fixed;
        top: 72px;
        left: 50%;
        transform: translateX(-50%);
        width: fit-content;
        max-width: calc(100vw - 16px);
        height: auto;
        z-index: 990;
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        box-shadow: none;
        text-align: center;
    }

    .page-fixed-mobile-ad.is-home-fixed-ad {
        top: 125px;
    }

    .page-fixed-mobile-ad.is-scroll-visible:not(.is-user-dismissed) {
        display: inline-block !important;
    }

    .page-fixed-mobile-ad.is-user-dismissed {
        display: none !important;
    }

    .page-fixed-ad-close {
        position: absolute;
        top: -8px;
        right: -6px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        border: none;
        background: rgba(15, 23, 42, 0.85);
        color: #ffffff;
        font-size: 15px;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
        padding: 0;
    }

    .page-fixed-ad-close:hover {
        background: #dc2626;
    }

    .page-fixed-ad-body {
        display: flex;
        justify-content: center;
        align-items: center;
        width: auto;
        max-width: 100%;
        height: auto;
        text-align: center;
        background: transparent;
    }

    .page-fixed-ad-body iframe,
    .page-fixed-ad-body img,
    .page-fixed-ad-body ins.adsbygoogle {
        max-width: calc(100vw - 16px) !important;
        height: auto;
    }
}

/* --- हेडर --- */
header { text-align: center; margin-bottom: 25px; }
.badge { display: inline-block; background-color: #dbeafe; color: #1d4ed8; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; text-transform: uppercase; margin-bottom: 8px; }
h1 { font-size: 26px; color: #0f172a; font-weight: 800; word-wrap: break-word; }
p.subtitle { color: #64748b; font-size: 14px; margin-top: 4px; }

/* --- कार्ड बॉक्स --- */
.card { background: #ffffff; border-radius: 20px; padding: 25px; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05); border: 1px solid #e2e8f0; margin-bottom: 25px; max-width: 100%; overflow-x: hidden; }
.card h2 { font-size: 17px; color: #1e293b; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; }

.post-article-body p {
    margin-bottom: 14px;
    word-wrap: break-word;
}

.post-article-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

/* --- फॉर्म ग्रिड और इनपुट्स --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media(max-width: 600px) { .grid-2 { grid-template-columns: 1fr; gap: 12px; } }

.form-group { margin-bottom: 15px; min-width: 0; }
label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
input, select, textarea { width: 100%; max-width: 100%; padding: 12px 15px; background-color: #f8fafc; border: 1px solid #cbd5e1; border-radius: 12px; font-size: 14px; color: #1e293b; outline: none; transition: all 0.2s; }
input:focus, select:focus, textarea:focus { border-color: #2563eb; background-color: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }

/* --- बटन --- */
.btn-primary { width: 100%; background-color: #2563eb; color: #fff; border: none; padding: 14px; font-size: 15px; font-weight: 700; border-radius: 12px; cursor: pointer; transition: background 0.2s, transform 0.1s; margin-top: 10px; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); }
.btn-primary:hover { background-color: #1d4ed8; }
.btn-primary:active { transform: scale(0.99); }

/* --- रिजल्ट बॉक्स --- */
.result-box { margin-top: 20px; padding: 20px; background-color: #eff6ff; border-radius: 16px; border: 1px solid #bfdbfe; display: none; }
.result-title { font-weight: 700; color: #1e3a8a; margin-bottom: 15px; font-size: 15px; }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media(max-width: 600px) { .result-grid { grid-template-columns: 1fr; gap: 12px; } }

.result-card { background: #fff; padding: 15px; border-radius: 12px; border: 1px solid #dbeafe; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.result-card span.label { font-size: 11px; font-weight: 700; text-transform: uppercase; display: block; margin-bottom: 5px; border-bottom: 1px solid #f1f5f9; padding-bottom: 4px; }
.result-card.miti span.label { color: #1d4ed8; }
.result-card.days span.label { color: #475569; }
.val-text { font-size: 13px; color: #334155; margin-top: 4px; display: block; }
.val-amount { font-size: 15px; font-weight: 700; color: #059669; margin-top: 4px; display: block; }
.val-total { font-size: 14px; font-weight: 700; color: #2563eb; margin-top: 2px; display: block; }

/* --- एक्शन बटन --- */
.action-buttons { margin-top: 15px; padding-top: 15px; border-top: 1px solid #bfdbfe; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.btn-whatsapp { background-color: #059669; color: white; border: none; padding: 8px 14px; font-size: 13px; font-weight: 700; border-radius: 10px; cursor: pointer; }
.btn-whatsapp:hover { background-color: #047857; }
.btn-print { background-color: #334155; color: white; border: none; padding: 8px 14px; font-size: 13px; font-weight: 700; border-radius: 10px; cursor: pointer; }
.btn-print:hover { background-color: #1e293b; }

/* --- पोस्ट ग्रिड --- */
.posts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media(max-width: 600px) { .posts-grid { grid-template-columns: 1fr; gap: 12px; } }

.post-card { display: block; padding: 15px; border-radius: 14px; border: 1px solid #e2e8f0; background: #f8fafc; text-decoration: none; transition: all 0.2s; min-width: 0; }
.post-card:hover { background: #fff; border-color: #2563eb; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.post-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 8px; }
.post-lang { font-size: 9px; font-weight: 700; background: #dbeafe; color: #1d4ed8; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; white-space: nowrap; }
.post-amt { font-size: 12px; font-weight: 600; color: #64748b; }
.post-title { font-size: 14px; font-weight: 700; color: #1e293b; word-wrap: break-word; }
.post-card:hover .post-title { color: #2563eb; }

/* --- फुटर --- */
footer { text-align: center; font-size: 12px; color: #94a3b8; padding: 20px 0; border-top: 1px solid #e2e8f0; margin-top: 30px; }
footer a { color: #64748b; text-decoration: underline; margin: 0 5px; }

/* ==========================================================
   मोबाइल स्क्रीन के लिए रेस्पॉन्सिव, हैमबर्गर मेनू और टॉप ऐड (Max-width: 900px)
   ========================================================== */
@media (max-width: 900px) {
    .menu-toggle {
        display: flex !important;
    }
    
    .nav-links {
        display: none !important;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        background: #ffffff;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.15);
        padding: 14px 18px;
        border-radius: 0 0 16px 16px;
        z-index: 9999;
        gap: 8px;
        border-top: 1px solid #e2e8f0;
    }

    .nav-links.show {
        display: flex !important;
    }

    .nav-links a {
        font-size: 14px;
        width: 100%;
        padding: 7px 0;
        border-bottom: 1px solid #f1f5f9;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .navbar {
        padding: 12px 16px;
        border-radius: 14px;
        margin-bottom: 18px;
    }

    .nav-brand {
        font-size: 16px;
    }

    h1 {
        font-size: 22px;
    }

    p.subtitle {
        font-size: 13px;
    }

    .card {
        padding: 16px;
        border-radius: 16px;
        margin-bottom: 18px;
    }

    .result-box {
        padding: 14px;
        border-radius: 14px;
    }

    .ad-box {
        padding: 6px 0;
        margin: 12px 0;
        border-radius: 0;
        border: none;
        background: transparent;
        box-shadow: none;
    }

    .action-buttons .btn-whatsapp,
    .action-buttons .btn-print {
        flex: 1 1 auto;
        text-align: center;
    }

    /* मोबाइल पर डेस्कटॉप ऐड और साइड पैनल छिपाएं */
    .ad-device-desktop {
        display: none !important;
    }

    .ad-device-mobile {
        display: block !important;
    }

    .desktop-side-ad {
        display: none !important;
    }
}