/* GLOBAL FONT (Fixed for desktop + mobile) */
html, body {
    font-family: "Anek Devanagari", sans-serif !important;
    font-size: 18px !important;
    line-height: 1.6 !important;
    color: #111 !important;
    background: #fff !important;
    margin: 0;
    padding: 0;
   scroll-behavior: auto;
    overflow-x: hidden;
    text-align: justify;
    text-justify: inter-word;
    touch-action: pan-y;
    
}

/* ALL CONTENT BLOCKS */
.content,
.post-container,
.post-content,
.quiz-card,
.text-content {
    font-size: 18px !important;
    line-height: 1.6 !important;
}

/* HEADING STYLES */
h1, h2, h3, h4, h5, h6 {
    font-family: "Anek Devanagari", sans-serif !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin-top: 22px;
    margin-bottom: 12px;
    text-align: left !important;
}

h1 { font-size: 28px !important; }
h2 { font-size: 24px !important; }
h3 { font-size: 21px !important; }
h4 { font-size: 18px !important; }
h5, h6 { font-size: 17px !important; }

/* INHERIT RULE (safe for layout) */
div, li, p, span, td, th {
    font-size: inherit !important;
    line-height: inherit !important;
   
}

/* LINKS + BUTTONS */
.btn, a, button, .quiz-btn, .nav-links a {
    text-decoration: none !important;
    font-size: 16px !important;
    color: #0056b3;
    transition: color 0.3s;
}
.btn:hover, a:hover, button:hover {
    color: #d32f2f;
}

/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}
td, th {
    border: 1px solid #ddd;
    padding: 10px;
}
th {
    background: #f5f5f5;
    font-weight: 600;
}

/* IMAGES */
img {
    max-width: 100%;
    height: auto;
    margin: 12px auto;
    display: block;
    border-radius: 10px;
}

/* ----------------------------- */
/* 📱 MOBILE OPTIMIZATION BELOW  */
/* ----------------------------- */
@media (max-width: 768px) {

    /* FIXED global font for mobile */
    html, body {
        font-size: 17px !important;
        line-height: 1.55 !important;
    }

    /* Smaller headings for mobile (perfect readability, no layout shift) */
    h1 { font-size: 24px !important; }
    h2 { font-size: 21px !important; }
    h3 { font-size: 19px !important; }
    h4 { font-size: 17px !important; }
    h5, h6 { font-size: 16px !important; }

    /* Content spacing balanced */
    .content,
    .post-container,
    .post-content,
    .quiz-card,
    .text-content {
        font-size: 17px !important;
        line-height: 1.55 !important;
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Buttons auto-fit mobile width */
    .btn, button, .quiz-btn {
        font-size: 15px !important;
        padding: 10px 14px;
    }

    /* Prevent overflow */
    table, td, th {
        font-size: 15px !important;
       
    }
}

.main-header{position:sticky!important;top:0;width:100%;z-index:1030;background:#fff!important;border-bottom:1px solid #eaeaea;box-shadow:0 1px 4px rgba(0,0,0,.08)}
header.main-header,.header-flex{min-height:62px;height:62px}
.nav-logo img{width:140px!important;height:40px!important;display:block}
@media(min-width:769px){
#mobileMenu{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;position:absolute!important;top:-9999px!important;left:-9999px!important;width:0!important;height:0!important;overflow:hidden!important;z-index:-1!important}
.mobile-toggle,.offcanvas-logo{display:none!important;visibility:hidden!important;opacity:0!important}
}
@media(max-width:768px){
#mobileMenu{position:fixed;top:0;left:0;width:240px;height:100vh;background:#fff;padding:70px 20px;overflow-y:auto;z-index:999999;transform:translateX(-100%);transition:transform .28s ease-in-out}
#mobileMenu.open{transform:translateX(0)}
#mobileMenu .btn-close{position:absolute;top:15px;right:15px;font-size:32px;background:0 0;border:none;cursor:pointer}
#mobileMenu a{display:block;padding:12px 0;margin:4px 0;font-size:17px;font-weight:500;color:#1a1a1a;text-align:center;border-radius:6px;transition:background .2s}
#mobileMenu a:hover{background:#f4f4f4}
#mobileMenu hr{margin:6px auto;width:80%;border-bottom:1px solid #ddd;border:none}
}
.header-flex{max-width:1200px;margin:auto;padding:10px 20px;display:flex;align-items:center;justify-content:space-between;position:relative}
.nav-menu{position:static!important;margin-left:20px}
.nav-menu ul{display:flex;list-style:none;gap:25px;margin:0;padding:0}
.nav-menu ul li a{text-decoration:none;font-weight:500;color:#111;font-size:16px}
@media(max-width:768px){
.header-flex{justify-content:center}
.left-space,.nav-menu{display:none!important}
.mobile-toggle{display:block!important;position:absolute;right:16px;top:50%;transform:translateY(-50%);background:0 0;border:none;padding:4px}
}
@media(min-width:769px){.mobile-toggle{display:none!important}}

/* ============================
   PART 3 : QUIZ PAGE STYLES
============================ */

/* Quiz Heading */
.quiz-heading {
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    padding: 20px 25px;
    background-color: #fff;
    color: #0056b3;
    font-weight: 800;
    font-size: 2rem;
    border-radius: 10px;
    border: 2px solid #007bff;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.15);
    line-height: 1.4;
    text-align: center !important;
}

/* Extra Font Rendering (CLEANED) */
.content *,
.post-content *,
.quiz-card *,
.text-content *,
body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga" 1, "clig" 1, "kern" 1;
    font-family: "Anek Devanagari", "Noto Sans Devanagari", sans-serif !important;
}

/* GRID – TEST + QUIZ (NO DUPLICATE) */
.test-grid,
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 20px 0;
}

.quiz-grid { margin: 30px 0; }

/* TEST CARD */
.ts-card {
    padding: 22px;
    border-radius: 16px;
    border: 1px solid #eee;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
}

/* Center Text */
.quiz-card,
.quiz-title,
.ts-title {
    text-align: center !important;
}

/* Test Title */
.ts-title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Row Inside Test Card */
.ts-row div {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ts-row strong {
    font-size: 22px;
    font-weight: 700;
    margin-top: 15px !important;
}
.ts-row span {
    font-size: 14px;
    color: #555;
}

/* BUTTON */
.ts-btn {
    width: 100%;
    padding: 12px 0;
    color: #06f;
    font-size: 16px;
    border-radius: 30px;
    border: 2px solid #06f;
    cursor: pointer;
    transition: 0.25s ease-in-out;
}
.ts-btn:hover,
.quiz-btn:hover {
    background: #eaf1ff;
}

/* RESPONSIVE GRID FIX */
@media (max-width: 992px) {
    .quiz-grid,
    .test-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .quiz-grid,
    .test-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* QUIZ CARD */
.quiz-card {
    border: 1px solid #e5e5e5;
    border-radius: 18px;
    padding: 25px 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: 0.25s;
}
.quiz-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.quiz-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
}
.quiz-badge {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 10px auto 25px !important;
    width: fit-content !important;
}
.quiz-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
    margin: 10px auto 0;
    padding: 12px 0;
    border-radius: 28px;
    border: 2px solid #0d6efd;
    background: none;
    color: #0d6efd;
    font-size: 16px;
    font-weight: 500;
    transition: 0.25s;
}

.ts-row {
    display: flex;
    justify-content: space-between; /* FIX */
    gap: 20px; /* 50px se overflow hota tha */
    margin-bottom: 18px;
    width: 100%;
}

.ts-row div {
    flex: 1;             /* Equal space per box */
    min-width: 0;        /* Overflow stop */
}

.ts-row strong {
    font-size: 22px;
    font-weight: 700;
    margin-top: 15px !important;
}

.ts-row span {
    font-size: 14px;
    color: #555;
}
/* ==========================================
   PART 4 : PREMIUM SLIM AUTHOR BOX (CLEAN)
========================================== */

/* OUTER BOX */
.df-author-box {
    background:#fff;
    padding:10px 16px;
    margin:18px 0;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-radius:18px;
    box-shadow:0 4px 24px rgba(0,0,0,0.06);
    min-height:70px;          /* FINAL height (merged) */
    gap:12px;                 /* From CLS fix */
}

/* LEFT SIDE */
.df-author-left {
    display:flex;
    align-items:center;
    gap:10px;
}

/* AUTHOR PHOTO */
.df-author-photo {
    width:60px;               /* CLS stable size */
    height:60px;
    border-radius:50%;
    object-fit:cover;
}

/* AUTHOR NAME */
.df-author-name {
    font-size:15px;
    font-weight:600;
    margin:0;
    line-height:18px;
}

/* DATE TEXT */
.df-dates {
    font-size:12px;
    color:#666;
    margin-top:1px;
}

/* RIGHT SIDE */
.df-author-right {
    display:flex;
    align-items:center;
    gap:10px;
}

/* FOLLOW TEXT */
.df-follow {
    font-size:13px;
    color:#333;
}

/* SOCIAL ICONS */
.df-social-icon img {
    width:22px;
    height:22px;
    display:block;
    transition:0.2s ease;
    border-radius:50%;
}
.df-social-icon img:hover {
    transform:scale(1.15);
}

/* AUTHOR INFO (anti-CLS) */
.df-author-info {
    min-height:45px;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

/* ======================
   MOBILE VIEW (CLEAN)
====================== */
@media (max-width:600px) {

    .df-author-box {
        padding:8px 12px;
        border-radius:16px;
        min-height:60px;
    }

    .df-author-photo {
        width:40px;
        height:40px;
    }

    .df-author-name {
        font-size:14px;
    }

    .df-dates {
        font-size:11px;
    }

    .df-follow {
        font-size:12px;
    }

    .df-social-icon img {
        width:20px;
        height:20px;
    }
}


/* =====================================
   PART 6 : MODERN GLASS CARD LAYOUT
==================================== */

/* Container */
.site-wrap {
    max-width:1180px;
    margin:0 auto;
    padding:28px 18px;
    box-sizing:border-box;
}

/* Unified Section Heading (Merged) */
.section-title {
    font-family:'Anek Devanagari',sans-serif;
    font-weight:700;
    font-size:28px;
    margin:0 0 12px;
    text-align:center!important;
    color:#1a1a1a;
}

/* Unified Section Sub Text (Merged) */
.section-sub {
    text-align:center!important;
    color:#6b7280;
    margin:0 auto 30px auto!important;
    max-width:760px;
    font-size:15px;
    line-height:1.6;
}

/* Unified Section Padding (Merged) */
.page-section {
    padding:40px 0!important;
}

/* Responsive Default Grid + Desktop Override */
.glass-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr)!important;
    gap:28px!important;
    align-items:stretch;
}

/* Flexible auto-fit on wider screens (still works for >1180px) */
.glass-grid .item {
    min-height:120px;
}

/* Glass Card */
.glass-card {
    background:rgba(255,255,255,0.72);
    border:1px solid rgba(17,24,39,0.06);
    border-radius:14px;
    padding:28px 20px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    min-height:240px;
    box-shadow:0 8px 26px rgba(15,23,42,0.06);
    transition:transform .22s ease,box-shadow .22s ease;
    text-align:center;
    overflow:hidden;
}

/* Hover */
.glass-card:hover {
    transform:translateY(-6px);
    box-shadow:0 16px 38px rgba(15,23,42,0.09);
}

/* Avatar */
.glass-avatar {
    width:100px;
    height:100px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:16px;
    border:4px solid #ef4444;
    background:rgba(255,255,255,0.9);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.6);
}

.glass-avatar img {
    width:70px;
    height:70px;
    object-fit:contain;
    display:block;
    border-radius:50%;
}

/* Title */
.glass-title {
    font-size:18px;
    font-weight:700;
    color:#111;
    margin-top:6px;
}

/* Link Overlay */
.glass-link {
    display:block;
    width:100%;
    height:100%;
    color:inherit;
    text-decoration:none;
}

/* Background Helpers */
.section-light { background:#fbfbfd; }
.section-white { background:#fff; }

/* CTA Button */
.cta-btn {
    display:inline-block;
    padding:10px 20px;
    border-radius:28px;
    border:2px solid #0d6efd;
    color:#0d6efd;
    background:transparent;
    font-weight:600;
    margin-top:14px;
    transition:all .18s;
}
.cta-btn:hover {
    background:#eaf1ff;
    transform:translateY(-2px);
}

/* Utilities */
.text-muted { color:#6b7280; }
.center { text-align:center; }

/* Tablet */
@media(max-width:900px){
    .glass-grid { grid-template-columns:repeat(2,1fr)!important; }
}

/* Mobile */
@media(max-width:600px){
    .glass-grid { grid-template-columns:repeat(1,1fr)!important; }
    .glass-card { padding:22px!important; min-height:200px!important; }
    .glass-avatar { width:84px; height:84px; border-width:3px; }
    .glass-avatar img { width:60px; height:60px; }
}

/* Extra Responsive Tweaks */
@media(max-width:880px){
    .section-title { font-size:24px; }
    .glass-card { min-height:220px; padding:22px; }
}
@media(max-width:480px){
    .section-title { font-size:22px; }
    .glass-card { padding:18px; min-height:200px; }
}

/* =========================================================
   PART 7 : GLOBAL GRID SYSTEM (No Bootstrap)
========================================================= */
.grid {
    display: grid;
    gap: 25px;
}

/* Desktop 3 cards */
.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Tablet 2 cards */
@media (max-width:900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile 1 card */
@media (max-width:600px) {
    .grid-3 { grid-template-columns: repeat(1, 1fr); }
}

/* ------------------------------------------------------
   EQUAL HEIGHT SUPER-CLEAN CARD 
------------------------------------------------------ */
.equal-card {
    height: 300px;
    padding: 25px;
    border-radius: 18px;
    border: 1px solid #e5e5e5;
    background: #fff;
    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;

    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    transition: 0.25s ease-in-out;
}

.equal-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}

/* Icon circle */
.icon-box {
    width: 100px;
    height: 100px;
    min-width: 100px;
    min-height: 100px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
}

/* Text control */
.card-title {
    font-size: 18px;
    font-weight: 700;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-desc {
    font-size: 14px;
    color: #555;
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   GRID LAYOUT (equal rows)
============================================================ */
.card-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px){
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px){
    .card-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .equal-card {
        height: 260px !important;
    }
}

/* ============================================================
   PART 8 : GLOBAL 2-COLUMN LAYOUT + UNIVERSAL STICKY SIDEBAR
===============================================================*/

/* DESKTOP */
@media (min-width: 768px) {

   .post-main {
    display: flex;
    gap: 35px;
    width: 1200px;              /* 🔑 FIX */
    max-width: 100%;            /* safety */
    margin: 0 auto;
    padding: 0 10px;
    overflow: visible !important;
    align-items: flex-start;
}


    /* LEFT CONTENT */
   .post-container {
        flex: 0 0 70%;
        max-width: 70%;
        overflow: visible !important;
        min-height: auto;
        min-width: 70%;   
    }

    /* RIGHT SIDEBAR */
    .df-sidebar-box {
        flex: 0 0 30%;
        max-width: 30%;
        position: sticky !important;
        display: block !important;
        top: 90px !important;
        height: fit-content !important;
        overflow: visible !important;
        background: #fff;
        border-radius: 14px;
        box-shadow: 0 4px 18px rgba(0,0,0,0.08);
        padding: 0 0 10px 0;
    }
}


/* ============================================================
   MOBILE (Sidebar below content)
===============================================================*/

@media (max-width: 768px){

    .post-main {
        display: block;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

   .post-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

 .df-sidebar-box {
        position: static !important;
        display: block !important;
        max-width: 100%;
        width: 100%;
        margin-top: 25px;
        border-radius: 14px;
        padding-bottom: 10px;
    }
}
/* ============================================================
   SIDEBAR HEADING + DIVIDER
===============================================================*/

.df-sidebar-heading {
    width: 100%;
    text-align: center!important;
    font-size: 20px;
    font-weight: 700;
    padding: 15px 0 6px 0;
    color: #111;
    display: block;
}

.df-sidebar-divider {
    width: 60%;
    margin: 0 auto 12px auto;
    border-bottom: 2px solid #d4d4d4;
}


/* ==============================
   MCQ PAGE 2-COLUMN LAYOUT
================================ */
.mcq-main {
    display: flex;
    gap: 35px;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Left content width */
.mcq-main .post-container {
    flex: 0 0 65%;
    max-width: 65%;
}

/* Right sidebar */
.mcq-main .df-sidebar-box {
    flex: 0 0 35%;
    max-width: 35%;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    padding-bottom: 12px;
    height: fit-content;
    position: sticky;
    top: 90px;
}

/* Mobile (sidebar below content) */
@media(max-width:768px){
    .mcq-main {
        display: block;
        padding: 0 10px;
    }
    .mcq-main .post-container,
    .mcq-main .df-sidebar-box {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto;
        position: static !important;
    }
}

/* ============================================================
   PART 9 : SIDEBAR ITEMS (Thumbnail + Title + Hover)
===============================================================*/

.df-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    margin-bottom: 15px;
    text-decoration: none !important;
    border-bottom: 1px solid #f1f1f1;
    transition: 0.25s ease;
}

.df-sidebar-item:hover {
    background: #f8f9ff;
}

/* Thumbnail (Unified Final Version) */
.df-sidebar-thumb {
    width: 100px;        /* FINAL stable size */
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    display: block;
}

/* Title */
.df-sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    line-height: 1.35;
}

.df-sidebar-item:hover .df-sidebar-title {
    color: #0056b3;
}

/* ============================================================
   MOBILE OPTIMIZATION FOR SIDEBAR ITEMS
===============================================================*/

@media (max-width: 992px) {
    .df-sidebar-item {
        padding: 10px 10px;
    }

    .df-sidebar-thumb {
        width: 70px;
        height: 50px;
    }
}

/* ============================================================
   EXTRA POLISH (Cleaned)
===============================================================*/

.df-post-img {
    width: 100%;
    height: auto;
    display: block;
}

.df-sidebar-box {
    margin-top: 20px;
}

/* ===========================
   PART 10 : POST PAGE CLS FIX
=========================== */

/* 2. Sidebar thumbnails CLS fix (kept aspect-ratio only) */
.df-sidebar-thumb,
.related-post-thumb {
    aspect-ratio: 100/70;
}

/* FIX CLS of post-image (MOST IMPORTANT) */
.post-image {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 20px auto;
    aspect-ratio: 16 / 9;   /* ← यही चीज़ layout shift रोकती है */
    overflow: hidden;
}

/* Image inside should fill container */
.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* FIX POST MAIN WIDTH */
.category-section {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 10px;
}

/* FIX BUTTON BOX SHIFT */
.category-buttons,
.post-buttons {
    min-height: 110px;
}

/* FIX AUTHOR BOX */
.df-author-box {
    min-height: 90px;
}

/* FIX TITLE SHIFT */
.post-title {
    min-height: 45px;
}
/* 🚫 Block Auto Ads Under Title */
.post-title + .adsbygoogle,
.post-title + div > .adsbygoogle {
    display: none !important;
}
/* Mobile menu overlay */
.menu-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.35);
    z-index:999998;
    opacity:0;
    pointer-events:none;
    transition:opacity .25s ease;
}

.menu-overlay.active{
    opacity:1;
    pointer-events:auto;
}


/* ================================
   ✅ FIX: MOBILE SCROLL + PULL TO REFRESH
   (FINAL SAFE PATCH)
================================ */
html, body {
    overflow-y: auto !important;
    overscroll-behavior: auto !important;
    overscroll-behavior-y: auto !important;
}

