/*
Theme Name: MGD Exam Portal
Theme URI: https://exam.mgdlab.com
Author: MGD LAB
Description: High-speed, SEO & Schema optimized WordPress theme for Aadhaar (13 Languages), IIBF, and RAP Mock Tests with WooCommerce, WP-Pro-Quiz, Live Leaderboard, and Real Exam Toppers support.
Version: 2.0.0
Text Domain: mgd-exam-portal
*/

/* Compact Professional EdTech Design System */
:root {
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --accent: #0ea5e9;
    --dark: #0f172a;
    --text: #1e293b;
    --muted: #64748b;
    --bg: #f1f5f9;
    --white: #ffffff;
    --border: #e2e8f0;
    --success: #059669;
    --warning: #d97706;
    --gold: #f59e0b;
    --silver: #94a3b8;
    --bronze: #b45309;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* Top Announcement Strip */
.top-strip {
    background: var(--dark);
    color: #e2e8f0;
    font-size: 12px;
    padding: 6px 15px;
    text-align: center;
}
.top-strip span { color: #38bdf8; font-weight: 700; }

/* Sticky Header */
header.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 16px;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 58px;
    gap: 16px;
}

.logo {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.3px;
}
.logo span { color: var(--primary); }

.nav-links,
.main-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text);
}
.nav-links a:hover,
.main-menu a:hover { color: var(--primary); }

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 10px 3px 4px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: var(--bg);
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
}
.user-chip img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.15s;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); color: var(--white); }
.btn-outline { background: var(--white); border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: #eff6ff; color: var(--primary); }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #047857; color: var(--white); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* Hero Section (2-Column Compact) */
.hero-wrap {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: var(--white);
    padding: 28px 0;
    margin-bottom: 24px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(56, 189, 248, 0.2);
    color: #7dd3fc;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hero-left h1 {
    font-size: 26px;
    line-height: 1.25;
    margin-bottom: 10px;
    color: var(--white);
}

.hero-left p {
    color: #cbd5e1;
    font-size: 13.5px;
    margin-bottom: 16px;
    max-width: 620px;
}

.hero-metrics {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.metric strong { display: block; font-size: 16px; color: #ffffff; }
.metric span { font-size: 11.5px; color: #94a3b8; }

/* Monetization Pass Card inside Hero */
.pass-card {
    background: var(--white);
    color: var(--text);
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.pass-card .tag {
    background: #fef3c7;
    color: #b45309;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
}
.pass-card h3 { font-size: 16px; margin: 8px 0 6px; color: var(--dark); }
.pass-card ul { list-style: none; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.pass-card li { margin-bottom: 4px; }
.pass-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.pass-price .now { font-size: 22px; font-weight: 800; color: var(--dark); }
.pass-price del { color: var(--muted); font-size: 13px; }
.pass-price .off { color: var(--success); font-weight: 700; font-size: 12px; }

/* Section Headings */
.sec-block { margin-bottom: 30px; }
.sec-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}
.sec-head h2 { font-size: 19px; color: var(--dark); font-weight: 800; }
.sec-head p { font-size: 12.5px; color: var(--muted); }

/* 13-Language Selector Pills */
.lang-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: var(--white);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}
.lang-pill {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: 0.15s;
}
.lang-pill:hover { border-color: var(--primary); color: var(--primary); }
.lang-pill.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Compact Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

/* Exam Cards */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.06); border-color: #cbd5e1; }

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.type-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.type-practice { background: #ecfdf5; color: var(--success); }
.type-mock { background: #eff6ff; color: var(--primary); }
.type-cert { background: #f3e8ff; color: #7e22ce; }

.card h3 { font-size: 15px; color: var(--dark); margin-bottom: 6px; }
.card-specs {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    gap: 8px;
}
.price { font-size: 15px; font-weight: 800; color: var(--dark); }
.price del { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-right: 4px; }

/* Study Material Row */
.material-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.mat-info h4 { font-size: 13.5px; color: var(--dark); }
.mat-info span { font-size: 11.5px; color: var(--muted); }

/* Real Exam Toppers (Hall of Fame) */
.topper-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--success);
    border-radius: 8px;
    padding: 16px 14px;
    text-align: center;
    transition: box-shadow 0.2s;
}
.topper-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.topper-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    margin-bottom: 8px;
}
.topper-card h4 { font-size: 14px; color: var(--dark); margin-bottom: 2px; }
.topper-card small { font-size: 11.5px; color: var(--muted); display: block; margin-bottom: 8px; }
.score-badge {
    display: inline-block;
    background: #ecfdf5;
    color: var(--success);
    font-weight: 700;
    font-size: 11.5px;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Compact Leaderboard + Profile Split */
.lb-split {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 18px;
}

.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.podium-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.podium-mini {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #f8fafc;
}
.podium-mini.top1 { border-color: var(--gold); background: #fffbeb; }
.podium-mini img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
    border: 2px solid var(--primary);
}
.podium-mini h5 { font-size: 13px; color: var(--dark); }
.podium-mini small { font-size: 11px; color: var(--muted); display: block; }
.podium-mini .pts { font-size: 12px; font-weight: 700; color: var(--primary); margin-top: 3px; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; color: var(--muted); font-weight: 700; }

/* SEO Section: Exam Pattern & FAQ */
.seo-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}
.seo-box h2 { font-size: 18px; margin-bottom: 10px; color: var(--dark); }
.seo-box p { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}
.faq-q {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}
.faq-a {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 6px;
    display: none;
}
.faq-item.open .faq-a { display: block; }

/* Footer with SEO Internal Links */
footer.site-footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 32px 0 20px;
    margin-top: 40px;
    font-size: 12.5px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
footer h4 { color: var(--white); font-size: 13.5px; margin-bottom: 10px; }
footer ul { list-style: none; }
footer li { margin-bottom: 5px; }
footer a:hover { color: #38bdf8; }

/* Profile Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal.active { display: flex; }
.modal-box {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    width: 92%;
    max-width: 400px;
}
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.form-row input { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }

/* Inner Pages, WooCommerce & WP-Pro-Quiz Wrapper */
.content-wrap {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    margin: 24px auto;
}

/* WP-Pro-Quiz Modern Styling Overrides */
.wpProQuiz_content { background: #ffffff; border: 1px solid var(--border); border-radius: 10px; padding: 20px !important; }
.wpProQuiz_questionList { list-style: none !important; margin: 15px 0 !important; }
.wpProQuiz_questionListItem { padding: 10px 14px !important; border: 1px solid var(--border) !important; border-radius: 6px !important; margin-bottom: 8px !important; background: #f8fafc !important; cursor: pointer; }
.wpProQuiz_questionListItem:hover { border-color: var(--primary) !important; background: #eff6ff !important; }
.wpProQuiz_button { background: var(--primary) !important; color: #fff !important; border: none !important; border-radius: 6px !important; padding: 8px 18px !important; font-weight: 600 !important; cursor: pointer; }
.wpProQuiz_time_limit { background: #fef2f2 !important; color: #dc2626 !important; padding: 8px 14px !important; border-radius: 6px !important; font-weight: 700 !important; }

/* WooCommerce Overrides */
.woocommerce ul.products li.product { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 14px !important; }
.woocommerce a.button, .woocommerce button.button.alt { background-color: var(--primary) !important; color: #fff !important; border-radius: 6px !important; }

@media (max-width: 850px) {
    .hero-grid, .lb-split, .footer-grid { grid-template-columns: 1fr; }
    .nav-links, .main-menu { display: none; }
}
