/*
Theme Name: DocMCQs Study
Theme URI: https://white-falcon-692007.hostingersite.com/
Author: DocMCQs
Description: A standalone study theme for subject MCQs, solved past papers, and mock tests.
Tags: education,blog,custom-logo,custom-menu,featured-images,one-column,two-columns,rtl-language-support
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: docmcqs

*/

/* Ensure the media query styles are applied specifically to the radio buttons */
/* Mobile-first sticky banner */
.docmcqs-whatsapp-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #25D366;
    color: #fff;
    text-align: center;
    padding: 14px 10px;
    font-size: 16px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
    transform: translateY(100%);
}

.docmcqs-whatsapp-banner a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
}

.docmcqs-whatsapp-banner .close-banner {
    cursor: pointer;
    font-size: 20px;
}

/* Optional: show banner only on mobile */
@media (min-width: 768px){
    .docmcqs-whatsapp-banner { display: none; }
}

/* ============================================
   MOCK TEST ARCHIVE GRID & CARDS
   ============================================ */

.mock-test-container {
    margin: 30px 0;
}

.mock-test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.mock-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.mock-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.mock-card-inner {
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
}

.mock-title {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    line-height: 1.4;
    font-weight: 600;
}

.mock-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s;
}

.mock-title a:hover {
    color: #1a73e8;
    text-decoration: underline;
}

.mock-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background: #1a73e8;
    color: #ffffff !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none !important;
    transition: background 0.25s ease, transform 0.15s ease;
    margin-top: auto;
    align-self: flex-start;
    border: none;
    cursor: pointer;
}

.mock-btn:hover {
    background: #1557b0;
    transform: scale(1.02);
    color: #ffffff !important;
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */

@media (max-width: 640px) {
    .mock-test-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mock-card-inner {
        padding: 18px 16px 16px;
    }

    .mock-title {
        font-size: 1.05rem;
    }

    .mock-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Optional: “No posts” message styling */
.mock-test-container p {
    padding: 30px 20px;
    background: #f9fafb;
    border-radius: 8px;
    text-align: center;
    color: #6b7280;
}

/* DocMCQs study theme: calm paper, deep teal and clear study cards. */
:root {
    --doc-ink: #172b3a;
    --doc-muted: #647482;
    --doc-brand: #087e76;
    --doc-brand-dark: #08665f;
    --doc-brand-soft: #e8f5f2;
    --doc-accent: #f2b84b;
    --doc-paper: #f6f8f7;
    --doc-line: #dfe8e5;
    --doc-card: #ffffff;
    --doc-radius: 16px;
    --doc-shadow: 0 10px 30px rgba(23, 43, 58, .07);
}
html { scroll-behavior: smooth; }
body { color: var(--doc-ink); background: var(--doc-paper); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.7; }
h1, h2, h3, h4, h5, h6 { color: var(--doc-ink); font-weight: 750; letter-spacing: -.025em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 2.4vw, 2.15rem); }
a { color: var(--doc-brand); text-underline-offset: 3px; }
a:hover, a:focus { color: var(--doc-brand-dark); }
:focus-visible { outline: 3px solid var(--doc-accent); outline-offset: 3px; }

/* Header and navigation */
.ast-primary-header-bar, .ast-desktop .ast-primary-header-bar { background: #fff; border-bottom: 1px solid var(--doc-line); box-shadow: 0 3px 14px rgba(23, 43, 58, .035); }
.site-title a, .ast-site-identity .site-title a { color: var(--doc-ink); font-weight: 800; }
.main-header-menu .menu-link, .ast-header-break-point .main-header-menu .menu-link { color: var(--doc-ink); font-weight: 650; transition: color .18s ease, background .18s ease; }
.main-header-menu .menu-link:hover, .main-header-menu .current-menu-item > .menu-link { color: var(--doc-brand); }
.ast-button, button, input[type="button"], input[type="submit"], .wp-block-button__link, .ast-header-button-1 .ast-custom-button { background: var(--doc-brand); border: 0; border-radius: 10px; color: #fff; font-weight: 700; box-shadow: 0 5px 14px rgba(8, 126, 118, .16); transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.ast-button:hover, button:hover, input[type="button"]:hover, input[type="submit"]:hover, .wp-block-button__link:hover, .ast-header-button-1 .ast-custom-button:hover { background: var(--doc-brand-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(8, 126, 118, .22); }

/* Page canvas and content */
.site-content { background: var(--doc-paper); }
.ast-container { max-width: 1200px; }
.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-single, .ast-separate-container .comments-area, .ast-separate-container .ast-archive-description, .ast-separate-container .ast-author-box { background: var(--doc-card); border: 1px solid var(--doc-line); border-radius: var(--doc-radius); box-shadow: var(--doc-shadow); }
.ast-separate-container .ast-article-post { margin-bottom: 22px; }
.ast-archive-description { padding: clamp(22px, 4vw, 42px); }
.entry-title a { color: var(--doc-ink); text-decoration: none; }
.entry-title a:hover { color: var(--doc-brand); }
.entry-meta, .entry-meta a, .ast-post-meta { color: var(--doc-muted); }
.entry-content p, .entry-content li { color: #344a58; }
.entry-content img { border-radius: 12px; }

/* Homepage subject lists and study cards */
.home .entry-content > * { max-width: 100%; }
.home .entry-content h1, .home .entry-content h2 { margin-top: 0; }
.home .entry-content h2 { margin-bottom: 18px; }
.home .entry-content > p:first-of-type { color: var(--doc-muted); font-size: 1.1rem; }
.home .entry-content .wp-block-columns { gap: 18px; }
.home .entry-content .wp-block-column, .home .entry-content .wp-block-group.has-background { border: 1px solid var(--doc-line); border-radius: var(--doc-radius); background-color: #fff; box-shadow: var(--doc-shadow); padding: 22px; }
.home .entry-content ul:not(.wp-block-social-links) { list-style: none; margin: 0; padding: 0; }
.home .entry-content ul:not(.wp-block-social-links) li { margin: 0; }
.home .entry-content ul:not(.wp-block-social-links) li a { display: block; padding: 11px 14px; border-bottom: 1px solid var(--doc-line); color: var(--doc-ink); font-weight: 600; text-decoration: none; transition: color .18s ease, background .18s ease, padding .18s ease; }
.home .entry-content ul:not(.wp-block-social-links) li:first-child a { border-radius: 10px 10px 0 0; }
.home .entry-content ul:not(.wp-block-social-links) li:last-child a { border-bottom: 0; border-radius: 0 0 10px 10px; }
.home .entry-content ul:not(.wp-block-social-links) li a:hover { padding-left: 19px; background: var(--doc-brand-soft); color: var(--doc-brand-dark); }

/* MCQ cards and archive cards */
.mock-card, .ast-article-post, .wp-block-post, .docmcqs-related-posts .related-item { border: 1px solid var(--doc-line); border-radius: var(--doc-radius); background: var(--doc-card); box-shadow: var(--doc-shadow); }
.mock-card { border-top: 4px solid var(--doc-brand); }
.mock-card-inner { min-height: 185px; padding: 24px; }
.mock-title a { color: var(--doc-ink); }
.mock-title a:hover { color: var(--doc-brand); }
.mock-meta { color: var(--doc-muted); }
.mock-btn { background: var(--doc-brand); border-radius: 9px; }
.mock-btn:hover { background: var(--doc-brand-dark); }
.ast-pagination .page-numbers { border: 1px solid var(--doc-line); border-radius: 8px; background: #fff; color: var(--doc-ink); }
.ast-pagination .page-numbers.current, .ast-pagination .page-numbers:hover { background: var(--doc-brand); color: #fff; }

/* Existing quiz template */
.quiz-container { padding: clamp(20px, 4vw, 36px); border: 1px solid var(--doc-line); border-radius: 18px; background: #fff; box-shadow: var(--doc-shadow); }
.quiz-container h1 { margin: 0 0 20px; }
#quiz-instructions { padding: 18px 20px; border: 1px solid #cde7e1; border-left: 4px solid var(--doc-brand); border-radius: 10px; background: var(--doc-brand-soft); }
#quiz-instructions h2 { font-size: 1.1rem; margin: 0 0 8px; }
#quiz-instructions p:last-child { margin-bottom: 0; }
.question-block { margin: 18px 0; padding: 20px; border: 1px solid var(--doc-line); border-radius: 12px; background: #fff; }
.question-block h3 { margin-top: 0; font-size: 1.12rem; }
.option-group { margin: 8px 0; padding: 11px 14px; border: 1px solid var(--doc-line); border-radius: 9px; background: #fbfcfc; }
.option-group:hover { border-color: #9ccdc4; background: #f1faf8; }
.option-group input[type="radio"] { accent-color: var(--doc-brand); }
.option-group label { cursor: pointer; }
.question-block p.correct, #result-card { color: #18734d; }
.question-block p.incorrect { color: #b33d42; }
#result-card { margin-top: 20px; padding: 20px; border: 1px solid #bfe4d1; border-radius: 12px; background: #effaf4; }
.quiz-container input[type="text"], .search-field, input[type="email"], input[type="password"], textarea, select { max-width: 100%; border: 1px solid #cbd8d5; border-radius: 8px; background: #fff; }

/* Sidebar, table of contents, FAQ, footer */
.widget { padding: 20px; border: 1px solid var(--doc-line); border-radius: 14px; background: #fff; box-shadow: var(--doc-shadow); }
.widget-title { color: var(--doc-ink); font-size: 1.1rem; }
.toc-box { border-color: var(--doc-line); border-radius: 12px; background: #fff; box-shadow: var(--doc-shadow); }
.toc-header { background: var(--doc-brand-soft); color: var(--doc-ink); }
.toc-toggle-btn { background: var(--doc-brand); border-radius: 7px; }
.toc-list li a { color: var(--doc-ink); text-decoration: none; }
.toc-list li a:hover { color: var(--doc-brand); }
.category-faq-box { margin: 28px 0; padding: 24px; border: 1px solid var(--doc-line); border-radius: 14px; background: #fff; }
.site-footer, .site-above-footer-wrap { background: #132f36; color: #eaf3f1; }
.site-footer a, .site-above-footer-wrap a { color: #b9e9dd; }
.site-footer h2, .site-footer h3, .site-footer h4 { color: #fff; }

@media (max-width: 768px) {
    .ast-container { padding-left: 18px; padding-right: 18px; }
    .home .entry-content .wp-block-column, .home .entry-content .wp-block-group.has-background { padding: 18px; }
    .question-block { padding: 15px; }
    .quiz-container { padding: 18px; }
    .mock-card-inner { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Standalone theme layout and template components */
.site-header { position: relative; z-index: 20; background: #fff; border-bottom: 1px solid var(--doc-line); box-shadow: 0 3px 14px rgba(23,43,58,.035); }
.doc-header-inner, .doc-footer-inner, .site-main { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }
.doc-header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-branding { display: flex; flex-direction: column; gap: 2px; }
.site-branding .custom-logo { max-height: 58px; width: auto; }
.site-title { color: var(--doc-ink); text-decoration: none; font-size: 1.55rem; font-weight: 850; line-height: 1.15; }
.site-tagline { color: var(--doc-muted); font-size: .82rem; }
.primary-menu, .primary-menu ul, .footer-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.primary-menu a, .footer-menu a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--doc-ink); font-weight: 650; text-decoration: none; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { background: var(--doc-brand-soft); color: var(--doc-brand-dark); }
.site-main { min-height: 60vh; padding-block: clamp(28px, 5vw, 58px); }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 30px; align-items: start; }
.content-column { min-width: 0; }
.content-card, .article-card, .page-card, .archive-header { overflow: hidden; border: 1px solid var(--doc-line); border-radius: var(--doc-radius); background: #fff; box-shadow: var(--doc-shadow); }
.content-card { display: grid; grid-template-columns: minmax(180px, 32%) minmax(0, 1fr); margin-bottom: 22px; }
.content-card .card-image { display: block; min-height: 180px; }
.content-card .card-image img { display: block; width: 100%; height: 100%; min-height: 180px; object-fit: cover; }
.card-body { padding: 22px; }
.entry-meta { color: var(--doc-muted); font-size: .9rem; }
.entry-title { margin: 7px 0 10px; font-size: 1.35rem; }
.entry-title a { color: var(--doc-ink); text-decoration: none; }
.entry-excerpt p:last-child { margin-bottom: 0; }
.text-link { display: inline-block; margin-top: 12px; font-weight: 750; text-decoration: none; }
.article-card, .page-card { padding: clamp(22px, 5vw, 52px); }
.article-header h1, .page-header h1, .archive-header h1 { margin: 8px 0 20px; }
.article-featured-image img { display: block; width: 100%; height: auto; margin: 24px 0; border-radius: 12px; }
.article-content { font-size: 1.04rem; }
.article-content > * { max-width: 100%; }
.article-content h2, .article-content h3 { margin-top: 1.7em; }
.page-content { overflow-wrap: anywhere; }
.archive-header { margin-bottom: 22px; padding: clamp(20px, 4vw, 36px); }
.archive-header .archive-description > :last-child { margin-bottom: 0; }
.archive-heading { margin-bottom: 22px; }
.site-footer { margin-top: 32px; padding: 36px 0; background: #132f36; color: #eaf3f1; }
.doc-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer-brand p { margin: 4px 0 0; color: #c3d5d2; }
.footer-menu a { color: #b9e9dd; }
.footer-menu a:hover { background: rgba(255,255,255,.1); color: #fff; }
.doc-footer-inner small { flex-basis: 100%; color: #c3d5d2; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; padding: 10px 14px; background: #fff; }
.skip-link:focus { left: 8px; }
.content-layout .custom-sidebar { position: sticky; top: 18px; }
.content-area .container { width: min(1200px, calc(100% - 40px)); margin: auto; }
.content-area .row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 28px; }
.content-area .col-md-8, .content-area .col-md-4 { min-width: 0; width: auto; }
.content-area .quiz-container { margin-bottom: 24px; }
.mock-test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.mock-card { margin: 0; }
.docmcqs-related-posts { margin-top: 32px; }
.docmcqs-related-posts .related-item { margin-block: 12px; padding: 16px; }
.category-faq-box h2 { font-size: 1.35rem; }
.comment-respond, .comments-area { margin-top: 26px; }
.navigation.pagination { margin-top: 24px; }

@media (max-width: 860px) {
    .doc-header-inner { align-items: flex-start; flex-direction: column; gap: 8px; padding-block: 16px; }
    .content-layout { grid-template-columns: minmax(0, 1fr); }
    .content-layout .custom-sidebar { position: static; }
}
@media (max-width: 620px) {
    .doc-header-inner, .doc-footer-inner, .site-main { width: min(100% - 28px, 1200px); }
    .content-card { grid-template-columns: 1fr; }
    .content-card .card-image, .content-card .card-image img { max-height: 220px; }
    .primary-menu a { padding: 8px 9px; font-size: .94rem; }
    .content-area .container { width: min(100% - 28px, 1200px); }
    .content-area .row { grid-template-columns: 1fr; }
}

/* Archive MCQ cards have no image column, so let their content use the full card width. */
.mcq-archive-card {
    grid-template-columns: minmax(0, 1fr);
}
.mcq-archive-card .card-body {
    grid-column: 1 / -1;
    min-width: 0;
}
.mcq-archive-content {
    width: 100%;
    max-width: 100%;
    font-size: 1.04rem;
    line-height: 1.7;
}
.mcq-archive-content > * {
    max-width: 100%;
}

/* Compact topic navigation and independently scrollable category sidebar */
.primary-navigation { display:flex; align-items:center; justify-content:flex-end; }
.primary-menu-wrap { display:block; }
.primary-menu { gap:6px; }
.primary-menu > li > a { white-space:nowrap; padding:9px 11px; font-size:.94rem; }
.primary-menu-toggle {
    display:none; align-items:center; justify-content:center; gap:8px;
    min-height:42px; padding:9px 14px; border:1px solid var(--doc-line);
    border-radius:9px; background:#fff; color:var(--doc-ink);
    font:inherit; font-weight:700; cursor:pointer;
}
.menu-toggle-icon { font-size:1.15rem; line-height:1; }
.content-layout .custom-sidebar {
    max-height:calc(100vh - 36px);
    overflow-y:auto;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-gutter:stable;
}
.content-layout .custom-sidebar::-webkit-scrollbar { width:8px; }
.content-layout .custom-sidebar::-webkit-scrollbar-thumb { background:#aebdc1; border-radius:8px; }
.content-layout .custom-sidebar::-webkit-scrollbar-track { background:transparent; }
@media (max-width: 860px) {
    .doc-header-inner { flex-direction:row; align-items:center; justify-content:space-between; gap:12px; }
    .primary-navigation { position:relative; }
    .primary-menu-toggle { display:inline-flex; }
    .primary-menu-wrap { display:none; position:absolute; z-index:50; top:calc(100% + 10px); right:0; width:min(88vw, 340px); max-height:70vh; overflow-y:auto; padding:10px; border:1px solid var(--doc-line); border-radius:12px; background:#fff; box-shadow:0 12px 30px rgba(23,43,58,.16); }
    .primary-navigation.is-open .primary-menu-wrap { display:block; }
    .primary-menu { display:flex; flex-direction:column; align-items:stretch; gap:4px; }
    .primary-menu > li > a { display:block; padding:11px 12px; white-space:normal; }
    .content-layout .custom-sidebar { position:static; max-height:70vh; max-height:70svh; overscroll-behavior-y:auto; }
}
@media (max-width: 620px) {
    .doc-header-inner { width:min(100% - 28px, 1200px); }
    .site-tagline { font-size:.72rem; }
    .site-branding .custom-logo { max-width:190px; max-height:48px; }
    .primary-menu-toggle { min-height:40px; padding:8px 11px; }
}

/* Keep the hamburger limited to phone-sized screens; use the full topic bar on laptops and tablets. */
@media (min-width: 621px) {
    .doc-header-inner { flex-direction: column; align-items: flex-start; gap: 8px; padding-block: 16px; }
    .primary-navigation { position: static; width: 100%; justify-content: flex-start; }
    .primary-menu-toggle { display: none; }
    .primary-menu-wrap { display: block; position: static; width: 100%; max-height: none; overflow: visible; padding: 0; border: 0; background: transparent; box-shadow: none; }
    .primary-menu { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
    .primary-menu > li > a { display: block; padding: 8px 10px; white-space: nowrap; }
}
/* Highlight titles that link from short-preview archive cards. */
.archive-excerpt-card .entry-title a { color: var(--doc-brand); }
.archive-excerpt-card .entry-title a:hover,
.archive-excerpt-card .entry-title a:focus-visible { color: var(--doc-brand-dark); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
