/* ============================================
   BUDHIGYAN — Mobile & Tablet Fixes v2.1
   Fixes: layout, colors, nav, backgrounds
   ============================================ */

/* ── GLOBAL RESETS FOR MOBILE ───────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0; overflow-x: hidden; background: #f5f7fb; }
img { max-width: 100%; height: auto; }

/* ── NAVBAR ──────────────────────────────────── */
.navbar { padding: 8px 16px !important; }
.navbar-brand span { font-size: 1.1rem !important; }
.navbar-toggler { padding: 4px 8px; }

/* ── HERO SECTION ────────────────────────────── */
.hero-section {
  min-height: auto !important;
  padding: 48px 0 40px !important;
  background: linear-gradient(160deg, #1a56db 0%, #0e3f9e 100%) !important;
}
.hero-headline { font-size: clamp(1.6rem, 6vw, 3rem) !important; }
.hero-float-card { padding: 14px !important; }
.hero-float-card .fw-bold { font-size: 1.3rem !important; }

/* ── SECTION PADDING ─────────────────────────── */
section { padding: 36px 0 !important; }
.container, .container-fluid { padding-left: 14px !important; padding-right: 14px !important; }

/* ── CARDS ────────────────────────────────────── */
.card { border-radius: 12px !important; box-shadow: 0 2px 12px rgba(0,0,0,0.07) !important; }
.card-body { padding: 16px !important; }
.card-header { padding: 12px 16px !important; }

/* ── MCQ CARDS ───────────────────────────────── */
.mcq-card .card-body { padding: 14px !important; }
.chapter-odia { font-size: 0.95rem !important; }
.option-btn { padding: 10px 12px !important; font-size: 0.9rem !important; }

/* ── SELECTOR SECTION ────────────────────────── */
.selector-section { padding: 20px 16px !important; border-radius: 14px !important; }

/* ── STATS STRIP ─────────────────────────────── */
.stat-number { font-size: 1.6rem !important; }
.stat-item { padding: 16px 4px !important; }

/* ── PRICING CARDS ───────────────────────────── */
.pricing-card.popular { transform: none !important; }
.pricing-price { font-size: 2rem !important; }

/* ── SIDEBAR ─────────────────────────────────── */
.sidebar { display: none !important; }
.main-content { margin-left: 0 !important; padding: 14px !important; }

/* ── FIXED BOTTOM NAV ────────────────────────── */
.bg-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1050 !important;
  background: #fff !important;
  border-top: 1px solid #e5e7eb !important;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.10) !important;
  padding: 6px 0 !important;
  display: flex !important;
  justify-content: space-around !important;
  align-items: center !important;
}
.bg-nav .nav-item-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  color: #6b7280 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  gap: 2px !important;
  padding: 4px 10px !important;
  border-radius: 10px !important;
  transition: all 0.15s ease !important;
  min-width: 52px !important;
}
.bg-nav .nav-item-btn i { font-size: 1.3rem !important; line-height: 1 !important; }
.bg-nav .nav-item-btn.active, .bg-nav .nav-item-btn:hover {
  color: #1a56db !important;
  background: #eff6ff !important;
}
.bg-nav .nav-item-btn.active i { color: #1a56db !important; }
.nav-spacer { height: 68px !important; } /* push content above nav */

/* ── WIDGET CARDS ────────────────────────────── */
.widget-card { padding: 14px !important; border-radius: 12px !important; }
.widget-icon { width: 40px !important; height: 40px !important; font-size: 1.1rem !important; border-radius: 10px !important; }

/* ── EXAM TIMER ──────────────────────────────── */
.exam-timer { font-size: 1.1rem !important; padding: 8px 14px !important; }

/* ── MCQ PALETTE ─────────────────────────────── */
.mcq-palette button { width: 34px !important; height: 34px !important; font-size: 0.8rem !important; }

/* ── TABLES ──────────────────────────────────── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-clean thead th { font-size: 0.78rem !important; padding: 10px 10px !important; }
.table-clean tbody td { font-size: 0.82rem !important; padding: 10px 10px !important; }

/* ── FORMS ────────────────────────────────────── */
.form-control, .form-select { font-size: 0.92rem !important; padding: 9px 12px !important; }
.btn { font-size: 0.9rem !important; }
.btn-lg { font-size: 1rem !important; padding: 10px 20px !important; }

/* ── UPLOAD ZONE ──────────────────────────────── */
.upload-zone { padding: 24px 16px !important; }

/* ── CHALLENGE CARD ───────────────────────────── */
.challenge-card { padding: 18px !important; border-radius: 14px !important; }

/* ── COURSE CARD ─────────────────────────────── */
.course-card .course-thumb { height: 140px !important; }

/* ── TOPPER CARD ─────────────────────────────── */
.topper-card { padding: 16px !important; }

/* ── ADMIN GROUP CARD ────────────────────────── */
.admin-group-header { padding: 10px 14px !important; font-size: 0.9rem !important; }
.admin-action-btn { padding: 10px 6px !important; font-size: 0.72rem !important; }
.admin-action-btn i { font-size: 1.2rem !important; }

/* ── FOOTER ──────────────────────────────────── */
footer { padding-bottom: 80px !important; } /* prevent nav overlap */
footer .row > div { margin-bottom: 16px; }

/* ── UPI CARD ────────────────────────────────── */
.upi-card { padding: 16px !important; }
.upi-app-btn { padding: 8px 4px !important; font-size: 0.72rem !important; }

/* ── BREADCRUMB ──────────────────────────────── */
.breadcrumb { font-size: 0.8rem !important; }

/* ── PAGINATION ──────────────────────────────── */
.pagination .page-link { padding: 5px 10px !important; font-size: 0.85rem !important; }

/* ────────────────────────────────────────────── */
/* TABLET (768px – 1024px) */
/* ────────────────────────────────────────────── */
@media (min-width: 768px) {
  html { font-size: 15.5px; }
  .hero-section { min-height: 70vh !important; padding: 60px 0 !important; }
  .hero-headline { font-size: clamp(1.8rem, 3.5vw, 3rem) !important; }
  .stat-number { font-size: 2rem !important; }
  .sidebar { display: block !important; }
  .main-content { margin-left: 250px !important; padding: 20px !important; }
  .bg-nav { display: none !important; }
  footer { padding-bottom: 0 !important; }
  .nav-spacer { display: none !important; }
}

/* ────────────────────────────────────────────── */
/* DESKTOP (1024px+) */
/* ────────────────────────────────────────────── */
@media (min-width: 1024px) {
  html { font-size: 16px; }
  .hero-section { min-height: 88vh !important; }
  section { padding: 60px 0 !important; }
}

/* ── DARK MODE SAFE ──────────────────────────── */
@media (prefers-color-scheme: dark) {
  /* Keep light theme — educational platforms stay light */
}

/* ── FIX BOOTSTRAP OVERFLOW ──────────────────── */
.row { margin-left: 0 !important; margin-right: 0 !important; }
@media (max-width: 576px) {
  .row > * { padding-left: 8px !important; padding-right: 8px !important; }
  h2 { font-size: 1.5rem !important; }
  h4 { font-size: 1.15rem !important; }
  .section-header h2 { font-size: 1.4rem !important; }
  .display-6 { font-size: 1.8rem !important; }
  .hero-float-card { backdrop-filter: none; }
  .btn-lg { font-size: 0.92rem !important; padding: 10px 16px !important; }
  .gap-3 { gap: 8px !important; }
  .pricing-card.popular { transform: none !important; margin-top: 0 !important; }
  .topper-card { padding: 12px !important; }
  .challenge-card .fs-1 { font-size: 2.5rem !important; }
  .mcq-palette { gap: 4px !important; }
  /* Table: hide less important columns on xs */
  .table-xs-hide { display: none !important; }
}


/* Premium polish responsive add-ons */
@media (max-width: 768px) {
  .dashboard-hero { padding: 18px !important; border-radius: 20px !important; }
  .dashboard-kpi { padding: 14px 16px !important; }
  .hero-role-chip, .hero-chip { width: 100%; justify-content: center; }
  .public-nav .navbar-collapse {
    margin-top: 12px;
    background: rgba(255,255,255,0.98);
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 18px 40px rgba(15,23,42,0.09);
  }
  .course-card .course-thumb { height: 140px !important; }
}
