/* ===================================================
   style.css — Budhigyan Education Main Styles
   =================================================== */

:root {
  --primary:    #E8730A;
  --primary-dk: #C55E00;
  --primary-lt: #FFF3E8;
  --dark:       #1A1009;
  --bark:       #3D2B1F;
  --muted:      #7A6055;
  --cream:      #FDF8F3;
  --green:      #2D7A4F;
  --green-lt:   #E6F4EC;
  --red:        #C0392B;
  --red-lt:     #FDECEA;
  --blue:       #1A5276;
  --blue-lt:    #EAF2FB;
  --purple:     #6C3483;
  --gold:       #D4AC0D;
  --shadow:     0 4px 24px rgba(26,16,9,.10);
  --shadow-sm:  0 2px 10px rgba(26,16,9,.07);
  --radius:     14px;
  --radius-sm:  8px;
}

* { box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background: var(--cream); color: var(--dark); }
a    { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dk); }

/* ── Navbar ─────────────────────────────────────── */
.bg-navbar   { background: linear-gradient(135deg, var(--bark) 0%, #5C3420 100%); }
.navbar-brand{ font-weight: 800; font-size: 1.3rem; color: #fff !important; }
.brand-icon  { font-size: 1.4rem; }
.navbar .nav-link { color: rgba(255,255,255,.8) !important; font-weight: 500; border-radius: var(--radius-sm); padding: 6px 14px !important; transition: all .2s; }
.navbar .nav-link:hover,
.navbar .nav-link.active { background: rgba(255,255,255,.15); color: #fff !important; }

/* ── Hero ───────────────────────────────────────── */
.hero-section { background: linear-gradient(135deg, var(--bark) 0%, var(--primary) 100%); color: #fff; padding: 80px 0 60px; position: relative; overflow: hidden; }
.hero-section::before { content:''; position:absolute; right:-100px; top:-100px; width:400px; height:400px; background: rgba(255,255,255,.04); border-radius:50%; }
.hero-section::after  { content:''; position:absolute; right:100px; bottom:-120px; width:250px; height:250px; background: rgba(255,255,255,.03); border-radius:50%; }
.hero-badge  { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); border-radius: 50px; padding: 5px 16px; font-size: .8rem; font-weight: 600; display: inline-block; margin-bottom: 16px; }
.hero-title  { font-size: 3rem; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero-sub    { font-size: 1.05rem; opacity: .85; line-height: 1.7; max-width: 540px; }
.hero-card   { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); backdrop-filter: blur(6px); padding: 24px; }

/* ── Cards ──────────────────────────────────────── */
.card        { border: none; border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.card:hover  { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-header { border-radius: var(--radius) var(--radius) 0 0 !important; border-bottom: none; font-weight: 600; }

/* ── Course Card ────────────────────────────────── */
.course-card .thumb { height: 140px; display:flex; align-items:center; justify-content:center; font-size: 3.5rem; border-radius: var(--radius) var(--radius) 0 0; }
.course-card .badge-type { font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.price-tag   { font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.price-old   { font-size: .8rem; color: #aaa; text-decoration: line-through; }

/* ── Exam Card ──────────────────────────────────── */
.exam-card   { border-top: 4px solid var(--primary); }
.exam-card.free-exam { border-top-color: var(--green); }
.exam-stat   { background: var(--cream); border-radius: var(--radius-sm); padding: 10px 8px; text-align: center; }
.exam-stat .val { font-size: 1.1rem; font-weight: 700; color: var(--primary); display: block; }
.exam-stat .lbl { font-size: .68rem; color: var(--muted); }

/* ── Stat Cards ─────────────────────────────────── */
.stat-card   { border-radius: var(--radius); padding: 24px; color: #fff; position: relative; overflow: hidden; }
.stat-card::after { content:''; position:absolute; right:-20px; bottom:-20px; width:80px; height:80px; background: rgba(255,255,255,.1); border-radius:50%; }
.stat-card .stat-icon { font-size: 2.2rem; opacity: .85; }
.stat-card .stat-num  { font-size: 2rem; font-weight: 800; line-height: 1; margin-top: 6px; }
.stat-card .stat-lbl  { font-size: .82rem; opacity: .85; margin-top: 4px; }

/* ── Buttons ────────────────────────────────────── */
.btn-primary   { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dk); border-color: var(--primary-dk); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

/* ── Subject Pills ──────────────────────────────── */
.subject-pill { display:inline-block; padding: 6px 16px; border-radius: 50px; font-size:.8rem; font-weight:600; margin:4px; cursor:pointer; border: 2px solid transparent; transition: all .2s; }
.subject-pill:hover, .subject-pill.active { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }

/* ── Auth ───────────────────────────────────────── */
.auth-page   { min-height: 90vh; display:flex; align-items:center; background: linear-gradient(135deg, var(--cream) 60%, var(--primary-lt) 100%); }
.auth-card   { border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; background: #fff; }
.auth-tabs   { display:flex; background: var(--cream); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 24px; }
.auth-tab    { flex:1; padding: 9px; border:none; background:transparent; border-radius: 6px; font-weight:600; font-size:.9rem; color: var(--muted); cursor:pointer; transition: all .2s; }
.auth-tab.active { background: var(--primary); color: #fff; }
.role-picker { display:grid; grid-template-columns: 1fr 1fr; gap:10px; margin-bottom:20px; }
.role-card   { border: 2px solid #e0d4c8; border-radius: var(--radius-sm); padding: 14px; text-align:center; cursor:pointer; transition: all .2s; }
.role-card:hover, .role-card.selected { border-color: var(--primary); background: var(--primary-lt); }
.role-card .role-icon { font-size: 1.8rem; }
.role-card .role-label { font-size: .85rem; font-weight: 600; margin-top: 4px; }

/* ── Dashboard ──────────────────────────────────── */
.welcome-bar { background: linear-gradient(135deg, var(--bark), #5C3420); border-radius: var(--radius); color:#fff; padding:28px 32px; }
.welcome-avatar { width:60px; height:60px; border-radius:50%; background: var(--primary); display:flex; align-items:center; justify-content:center; font-size:1.5rem; font-weight:800; color:#fff; border:3px solid rgba(255,255,255,.3); }
.progress-bar-thin { height: 6px; border-radius: 3px; background: #f0e8df; overflow:hidden; }
.progress-fill { background: var(--primary); height:100%; border-radius:3px; }

/* ── Exam Take ──────────────────────────────────── */
.timer-display { background: var(--bark); color:#fff; font-size:1.6rem; font-weight:800; padding:10px 22px; border-radius:var(--radius-sm); letter-spacing:3px; font-family: monospace; }
.timer-display.urgent { background: var(--red); animation: pulse .8s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.7;} }

.question-palette { display:grid; grid-template-columns: repeat(5,1fr); gap:6px; }
.q-btn { width:36px; height:36px; border:none; border-radius:6px; font-size:.8rem; font-weight:700; cursor:pointer; transition: all .15s; }
.q-btn.unanswered { background:#f0e8df; color:var(--muted); }
.q-btn.answered   { background: var(--green); color:#fff; }
.q-btn.marked     { background: var(--purple); color:#fff; }
.q-btn.current    { outline: 3px solid var(--primary); outline-offset:2px; }

.option-btn { background: var(--cream); border: 2px solid transparent; border-radius:var(--radius-sm); padding:14px 18px; cursor:pointer; width:100%; text-align:left; font-family:'Poppins',sans-serif; font-size:.95rem; transition:all .2s; display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.option-btn:hover { border-color: var(--primary); background: var(--primary-lt); }
.option-btn.selected { border-color: var(--primary); background: var(--primary-lt); font-weight:600; }
.option-letter { width:30px; height:30px; border-radius:50%; background:#fff; border:2px solid #ccc; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.82rem; flex-shrink:0; }
.option-btn.selected .option-letter { background: var(--primary); border-color: var(--primary); color:#fff; }

/* ── Result ─────────────────────────────────────── */
.result-hero { border-radius: var(--radius); color:#fff; padding:40px; text-align:center; }
.result-pass { background: linear-gradient(135deg, var(--green), #1B8A5A); }
.result-fail { background: linear-gradient(135deg, var(--bark), #5C3420); }
.result-pending { background: linear-gradient(135deg, var(--blue), #154360); }
.big-pct { font-size: 5rem; font-weight:900; line-height:1; }
.answer-correct { border-left:4px solid var(--green); background: var(--green-lt); }
.answer-wrong   { border-left:4px solid var(--red);   background: var(--red-lt); }
.answer-pending { border-left:4px solid var(--blue);  background: var(--blue-lt); }

/* ── Tags / Badges ──────────────────────────────── */
.badge-pass    { background: var(--green-lt);  color: var(--green);  font-weight:700; }
.badge-fail    { background: var(--red-lt);    color: var(--red);    font-weight:700; }
.badge-pending { background: #FFF9C4;           color: #7D6608;       font-weight:700; }
.badge-graded  { background: var(--blue-lt);   color: var(--blue);   font-weight:700; }

/* ── Payment ────────────────────────────────────── */
.payment-card { max-width:500px; margin:0 auto; }
.upi-app-btn  { border:2px solid #e0d4c8; border-radius:var(--radius-sm); padding:12px 8px; text-align:center; cursor:pointer; transition:all .2s; background:#fff; }
.upi-app-btn:hover, .upi-app-btn.selected { border-color: var(--primary); background: var(--primary-lt); }
.qr-box { background: var(--cream); border:2px dashed var(--primary); border-radius:var(--radius); padding:24px; text-align:center; }
.qr-code-placeholder { font-size:5rem; line-height:1; display:block; margin-bottom:8px; }

/* ── Forms ──────────────────────────────────────── */
.form-control, .form-select { border:1.5px solid #e0d4c8; border-radius:var(--radius-sm); padding:10px 14px; font-family:'Poppins',sans-serif; }
.form-control:focus, .form-select:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(232,115,10,.15); outline:none; }
.form-label { font-weight:600; font-size:.88rem; color:var(--bark); }

/* ── Footer ─────────────────────────────────────── */
.site-footer { background: var(--bark); color: rgba(255,255,255,.75); }
.footer-link { color: rgba(255,255,255,.6); font-size:.85rem; display:block; padding:2px 0; transition: color .2s; }
.footer-link:hover { color: var(--primary); }

/* ── Misc ───────────────────────────────────────── */
.section-title { font-size:1.7rem; font-weight:800; color:var(--bark); }
.section-title span { color: var(--primary); }
.empty-state { text-align:center; padding:60px 20px; color: var(--muted); }
.empty-state .empty-icon { font-size:3.5rem; margin-bottom:12px; }
.page-header-bar { background:#fff; border-bottom:2px solid var(--primary-lt); padding:20px 0; margin-bottom:32px; }
.breadcrumb-item.active { color: var(--muted); }

/* ── Responsive ─────────────────────────────────── */
@media(max-width:768px) {
  .hero-title { font-size:2rem; }
  .question-palette { grid-template-columns:repeat(6,1fr); }
  .welcome-bar { padding:20px; }
}
