/* =============================================
   PakTestPro - Main Stylesheet
   ============================================= */

:root {
    --ptp-primary: #198754;
    --ptp-primary-dark: #146c43;
    --ptp-primary-light: #d1e7dd;
    --ptp-accent: #ffc107;
    --ptp-dark: #0d1b2a;
    --ptp-dark-2: #1a2e3b;
    --ptp-text: #212529;
    --ptp-text-muted: #6c757d;
    --ptp-border: #e9ecef;
    --ptp-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --ptp-shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
    --ptp-radius: 12px;
    --ptp-radius-sm: 8px;
    --ptp-transition: all 0.25s ease;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Noto Nastaliq Urdu', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ptp-text);
    background: #f8f9fa;
    padding-bottom: 70px; /* space for mobile nav */
}

/* ---- Urdu / Nastaleeq Font ----
   'Noto Nastaliq Urdu' has no Latin glyphs, so browsers automatically
   fall back to it per-character for Urdu/Arabic script text while
   English text keeps using Inter. No lang attribute is required. */
.question-text,
.option-btn,
.option-btn span:last-child {
    font-family: 'Inter', 'Noto Nastaliq Urdu', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.no-mobile-nav { padding-bottom: 0; }

/* ---- Navbar ---- */
.ptp-navbar {
    background: linear-gradient(135deg, var(--ptp-primary-dark) 0%, var(--ptp-primary) 100%);
    box-shadow: 0 2px 15px rgba(25, 135, 84, 0.3);
    padding: 10px 0;
}
.ptp-navbar .navbar-brand { font-size: 1.4rem; letter-spacing: -0.5px; }
.ptp-navbar .nav-link { color: rgba(255,255,255,0.85) !important; font-weight: 500; transition: var(--ptp-transition); padding: 6px 12px !important; border-radius: 8px; }
.ptp-navbar .nav-link:hover { color: #fff !important; background: rgba(255,255,255,0.12); }

/* ---- Banners ---- */
.trial-banner { background: linear-gradient(90deg, #198754, #20c997); color: #fff; font-size: .875rem; }
.expiry-banner { background: #dc3545; color: #fff; font-size: .875rem; }
.expired-banner { background: #6c757d; color: #fff; font-size: .875rem; }

/* ---- Hero ---- */
.hero-section {
    background: linear-gradient(135deg, var(--ptp-dark) 0%, var(--ptp-dark-2) 50%, #1c3a2a 100%);
    color: #fff;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(25,135,84,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.hero-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; }
.hero-subtitle { font-size: 1.1rem; opacity: 0.85; max-width: 560px; line-height: 1.7; }
.hero-badge { background: rgba(25,135,84,0.25); border: 1px solid rgba(25,135,84,0.4); color: #6ee7b7; font-size: .8rem; padding: 4px 12px; border-radius: 20px; display: inline-block; margin-bottom: 16px; }

/* ---- Stats Strip ---- */
.stats-strip { background: #fff; border-bottom: 1px solid var(--ptp-border); }
.stat-item { text-align: center; padding: 20px 10px; }
.stat-number { font-size: 1.8rem; font-weight: 800; color: var(--ptp-primary); }
.stat-label { font-size: .8rem; color: var(--ptp-text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }

/* ---- Section Titles ---- */
.section-title { font-size: 1.8rem; font-weight: 800; color: var(--ptp-text); }
.section-subtitle { color: var(--ptp-text-muted); font-size: 1rem; }
.section-badge { background: var(--ptp-primary-light); color: var(--ptp-primary); font-size: .75rem; font-weight: 600; padding: 4px 12px; border-radius: 20px; }

/* ---- Cards ---- */
.ptp-card {
    background: #fff;
    border: 1px solid var(--ptp-border);
    border-radius: var(--ptp-radius);
    box-shadow: var(--ptp-shadow);
    transition: var(--ptp-transition);
    overflow: hidden;
}
.ptp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ptp-shadow-hover);
    border-color: #c3e6cb;
}

/* ---- Exam Cards ---- */
.exam-card { cursor: pointer; text-decoration: none !important; color: inherit !important; display: block; }
.exam-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

/* ---- Exam Card Action Buttons ---- */
.btn-exam-papers, .btn-exam-mcqs, .btn-exam-mock {
    border: none;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 12px;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    color: #fff !important;
}
.btn-exam-papers { background: linear-gradient(135deg, #16a34a, #15803d); box-shadow: 0 2px 8px rgba(22,163,74,0.35); }
.btn-exam-mcqs { background: linear-gradient(135deg, #2563eb, #1d4ed8); box-shadow: 0 2px 8px rgba(37,99,235,0.35); }
.btn-exam-mock { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 2px 8px rgba(245,158,11,0.35); }
.btn-exam-papers:hover, .btn-exam-mcqs:hover, .btn-exam-mock:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    color: #fff !important;
}

/* ---- Paper Cards ---- */
.paper-card .badge-free { background: #d1fae5; color: #065f46; font-size: .7rem; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
.paper-card .badge-premium { background: #fef3c7; color: #92400e; font-size: .7rem; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
.paper-meta { font-size: .82rem; color: var(--ptp-text-muted); }
.paper-meta i { font-size: .9rem; }

/* ---- Subject Pills ---- */
.subject-pill {
    background: #fff;
    border: 1.5px solid var(--ptp-border);
    border-radius: 50px;
    padding: 10px 20px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--ptp-text);
    transition: var(--ptp-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.subject-pill:hover { background: var(--ptp-primary); color: #fff; border-color: var(--ptp-primary); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(25,135,84,0.25); }

/* ---- Pricing Cards ---- */
.pricing-card { border-radius: var(--ptp-radius); border: 2px solid var(--ptp-border); background: #fff; transition: var(--ptp-transition); }
.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--ptp-shadow-hover); }
.pricing-card.featured { border-color: var(--ptp-primary); background: linear-gradient(135deg, #f0fdf4, #dcfce7); position: relative; }
.pricing-card.featured::before { content: 'MOST POPULAR'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--ptp-primary); color: #fff; font-size: .7rem; font-weight: 700; padding: 4px 16px; border-radius: 20px; letter-spacing: .5px; }
.price-amount { font-size: 2.5rem; font-weight: 800; color: var(--ptp-primary); }
.price-period { font-size: .9rem; color: var(--ptp-text-muted); }
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { padding: 6px 0; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.feature-list li i { color: var(--ptp-primary); font-size: 1rem; }

/* ---- How It Works ---- */
.step-circle { width: 56px; height: 56px; border-radius: 50%; background: var(--ptp-primary); color: #fff; font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; box-shadow: 0 6px 20px rgba(25,135,84,0.3); }
.step-connector { display: none; }

/* ---- Attempt Page ---- */
.attempt-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 991px) { .attempt-layout { grid-template-columns: 1fr; } }

.question-card { background: #fff; border-radius: var(--ptp-radius); box-shadow: var(--ptp-shadow); padding: 28px; }
.question-number { font-size: .85rem; color: var(--ptp-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.question-text { font-size: 1.05rem; font-weight: 500; line-height: 1.7; margin: 12px 0 24px; }

.option-btn {
    width: 100%;
    text-align: left;
    background: #fff;
    border: 2px solid var(--ptp-border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--ptp-transition);
    display: flex;
    align-items: center;
    gap: 12px;
}
.option-btn:hover { border-color: var(--ptp-primary); background: #f0fdf4; color: var(--ptp-primary); }
.option-btn.selected { border-color: var(--ptp-primary); background: var(--ptp-primary); color: #fff; }
.option-btn.correct { border-color: #198754; background: #d1e7dd; color: #0a3622; }
.option-btn.incorrect { border-color: #dc3545; background: #f8d7da; color: #58151c; }
.option-label { min-width: 30px; height: 30px; border-radius: 8px; background: var(--ptp-border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.option-btn.selected .option-label { background: rgba(255,255,255,0.25); }

/* ---- Subject MCQ practice options (Browse / TopicDetails) ---- */
.option-item { cursor: pointer; transition: var(--ptp-transition); }
.option-item:not(.option-answered):hover { border-color: var(--ptp-primary); background: #f0fdf4; }
.option-item.option-answered { cursor: default; }

/* ---- Timer ---- */
.timer-card { background: #fff; border-radius: var(--ptp-radius); box-shadow: var(--ptp-shadow); padding: 20px; text-align: center; position: sticky; top: 80px; }
.timer-display { font-size: 2.2rem; font-weight: 800; color: var(--ptp-primary); font-variant-numeric: tabular-nums; }
.timer-display.warning { color: #dc3545; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ---- Question Navigator ---- */
.q-navigator { display: flex; flex-wrap: wrap; gap: 6px; }
.q-btn { width: 36px; height: 36px; border-radius: 8px; border: 2px solid var(--ptp-border); background: #fff; font-size: .8rem; font-weight: 600; cursor: pointer; transition: var(--ptp-transition); display: flex; align-items: center; justify-content: center; }
.q-btn.answered { background: var(--ptp-primary); border-color: var(--ptp-primary); color: #fff; }
.q-btn.marked { background: #ffc107; border-color: #ffc107; color: #000; }
.q-btn.current { border-color: var(--ptp-primary); box-shadow: 0 0 0 3px rgba(25,135,84,0.2); }
.q-btn:hover { border-color: var(--ptp-primary); }

/* ---- Result Page ---- */
.score-circle { width: 180px; height: 180px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto; border: 10px solid var(--ptp-primary-light); background: #fff; box-shadow: var(--ptp-shadow); }
.score-number { font-size: 2.8rem; font-weight: 900; color: var(--ptp-primary); line-height: 1; }
.score-total { font-size: .9rem; color: var(--ptp-text-muted); }
.result-stat-card { background: #fff; border-radius: var(--ptp-radius-sm); border: 1px solid var(--ptp-border); padding: 16px 20px; text-align: center; }
.result-stat-value { font-size: 1.6rem; font-weight: 800; }
.result-stat-label { font-size: .78rem; color: var(--ptp-text-muted); text-transform: uppercase; letter-spacing: .5px; }
.passed-badge { background: #d1e7dd; color: #0a3622; font-size: 1rem; font-weight: 700; padding: 6px 20px; border-radius: 20px; }
.failed-badge { background: #f8d7da; color: #58151c; font-size: 1rem; font-weight: 700; padding: 6px 20px; border-radius: 20px; }

/* ---- Review Page ---- */
.review-item { background: #fff; border-radius: var(--ptp-radius-sm); border-left: 4px solid var(--ptp-border); padding: 20px; margin-bottom: 16px; }
.review-item.correct { border-left-color: #198754; }
.review-item.incorrect { border-left-color: #dc3545; }
.review-item.unanswered { border-left-color: #6c757d; }
.review-status-badge { font-size: .75rem; padding: 3px 10px; border-radius: 20px; font-weight: 600; }

/* ---- Profile / Dashboard ---- */
.profile-header { background: linear-gradient(135deg, var(--ptp-dark) 0%, var(--ptp-dark-2) 100%); color: #fff; padding: 40px 0 20px; }
.avatar-circle { width: 80px; height: 80px; border-radius: 50%; background: var(--ptp-primary); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: #fff; border: 3px solid rgba(255,255,255,0.3); }
.plan-badge { font-size: .75rem; padding: 4px 12px; border-radius: 20px; font-weight: 600; background: var(--ptp-accent); color: #000; }
.stat-card { background: #fff; border-radius: var(--ptp-radius-sm); border: 1px solid var(--ptp-border); padding: 20px; box-shadow: var(--ptp-shadow); transition: var(--ptp-transition); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--ptp-shadow-hover); }
.stat-icon-wrap { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }

/* ---- Admin Layout ---- */
.admin-sidebar { width: 260px; height: 100vh; background: var(--ptp-dark); position: fixed; top: 0; left: 0; z-index: 100; overflow-y: auto; transition: var(--ptp-transition); }
.admin-content { margin-left: 260px; min-height: 100vh; }
.admin-sidebar-brand { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: rgba(255,255,255,0.7) !important; font-size: .9rem; font-weight: 500; transition: var(--ptp-transition); border-left: 3px solid transparent; text-decoration: none !important; }
.admin-nav-link:hover, .admin-nav-link.active { color: #fff !important; background: rgba(255,255,255,0.08); border-left-color: var(--ptp-primary); }
.admin-nav-section { padding: 12px 20px 4px; font-size: .7rem; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,0.35); font-weight: 600; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--ptp-border); padding: 12px 24px; display: flex; align-items: center; justify-content: between; box-shadow: 0 1px 4px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 50; }
.admin-stat-card { background: #fff; border-radius: var(--ptp-radius-sm); padding: 20px; border: 1px solid var(--ptp-border); box-shadow: var(--ptp-shadow); }
.admin-stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }

@media (max-width: 991px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-content { margin-left: 0; }
}

/* ---- Mobile Bottom Nav ---- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--ptp-border);
    display: flex;
    z-index: 999;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    font-size: .65rem;
    color: var(--ptp-text-muted);
    text-decoration: none;
    transition: var(--ptp-transition);
    gap: 3px;
}
.mobile-nav-item i { font-size: 1.35rem; }
.mobile-nav-item.active { color: var(--ptp-primary); }
.mobile-nav-item:hover { color: var(--ptp-primary); }

/* ---- Footer ---- */
.ptp-footer { background: var(--ptp-dark); }
.footer-link { color: rgba(255,255,255,0.55); font-size: .875rem; text-decoration: none; display: block; padding: 3px 0; transition: var(--ptp-transition); }
.footer-link:hover { color: #fff; padding-left: 4px; }

/* ---- Premium Lock ---- */
.premium-lock-card { background: linear-gradient(135deg, #fff9db, #fffbf0); border: 2px dashed var(--ptp-accent); border-radius: var(--ptp-radius); padding: 40px; text-align: center; }
.lock-icon { font-size: 3rem; color: var(--ptp-accent); }

/* ---- Buttons ---- */
.btn-ptp { background: var(--ptp-primary); color: #fff; border: none; padding: 10px 24px; border-radius: 8px; font-weight: 600; transition: var(--ptp-transition); }
.btn-ptp:hover { background: var(--ptp-primary-dark); color: #fff; transform: translateY(-1px); }
.btn-ptp-outline { background: transparent; color: var(--ptp-primary); border: 2px solid var(--ptp-primary); padding: 10px 24px; border-radius: 8px; font-weight: 600; transition: var(--ptp-transition); }
.btn-ptp-outline:hover { background: var(--ptp-primary); color: #fff; }

/* ---- Misc ---- */
.page-header { background: linear-gradient(135deg, var(--ptp-dark) 0%, var(--ptp-dark-2) 100%); color: #fff; padding: 40px 0; }
.breadcrumb-item a { color: rgba(255,255,255,0.7); }
.breadcrumb-item.active { color: rgba(255,255,255,0.95); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }
.badge-difficulty-easy { background: #d1e7dd; color: #0a3622; }
.badge-difficulty-medium { background: #fff3cd; color: #664d03; }
.badge-difficulty-hard { background: #f8d7da; color: #58151c; }
.table-ptp thead th { background: #f8f9fa; font-size: .82rem; text-transform: uppercase; letter-spacing: .5px; color: var(--ptp-text-muted); font-weight: 600; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

/* ---- Utilities ---- */
.bg-ptp-primary { background: var(--ptp-primary) !important; }
.text-ptp-primary { color: var(--ptp-primary) !important; }
.border-ptp { border-color: var(--ptp-primary) !important; }
.rounded-ptp { border-radius: var(--ptp-radius) !important; }
.shadow-ptp { box-shadow: var(--ptp-shadow) !important; }

/* ---- Auto-save indicator ---- */
.autosave-indicator { position: fixed; bottom: 80px; right: 16px; background: #198754; color: #fff; padding: 6px 14px; border-radius: 20px; font-size: .78rem; font-weight: 600; opacity: 0; transition: opacity .4s; z-index: 900; }
.autosave-indicator.show { opacity: 1; }

/* ---- Offline indicator ---- */
.offline-banner { position: fixed; top: 0; left: 0; right: 0; background: #dc3545; color: #fff; text-align: center; padding: 8px; font-size: .85rem; z-index: 9999; display: none; }
.offline-banner.show { display: block; }

@media (max-width: 576px) {
    .hero-title { font-size: 1.8rem; }
    .question-card { padding: 16px; }
    .timer-display { font-size: 1.8rem; }
    .score-number { font-size: 2.2rem; }
}

/* ---- Jobs nav item (subtle pulse, not continuous blinking) ---- */
.nav-link-jobs { position: relative; }
.jobs-new-badge {
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    animation: jobsBadgePulse 2.4s ease-in-out 3;
}
@keyframes jobsBadgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,193,7,0.5); }
    50% { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(255,193,7,0); }
}

/* ---- Jobs page ---- */
.jobs-hero {
    background: linear-gradient(135deg, var(--ptp-primary-dark) 0%, var(--ptp-primary) 100%);
    padding: 48px 0;
}
.job-card { border-radius: var(--ptp-radius); transition: var(--ptp-transition); }
.job-card:hover { transform: translateY(-4px); box-shadow: var(--ptp-shadow-hover); }
.job-title { color: #000; font-weight: 700; }
.job-meta { color: #000; font-weight: 600; }
.job-meta li { margin-bottom: 6px; color: #000; font-weight: 600; }
.job-meta strong { color: #000; font-weight: 700; }
.job-last-date { color: #000 !important; font-weight: 700; }
.ptp-cta-card { background: linear-gradient(135deg, #fff8e1 0%, #fffdf5 100%); border: 1px solid var(--ptp-accent); }

.notification-dropdown { min-width: 320px; max-width: 360px; }
.notification-badge { font-size: .65rem; }
.admin-nav-link .badge { font-size: .65rem; }

