:root {
  --primary: #d93025;
  --primary-dark: #10254d;
  --accent: #870c04;
  --light-bg: #f5f8ff;
}
body { font-family: 'Poppins', sans-serif; color: #333; }
a { text-decoration: none; }
.top-bar { background: var(--primary-dark); color: #fff; }
.navbar-brand img { max-height: 50px; }
.nav-link { font-weight: 500; color: #222 !important; }
.nav-link:hover { color: var(--primary) !important; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.text-primary { color: var(--primary) !important; }
.bg-primary-soft { background: var(--light-bg); }

/* Hero / banner */
.fa-solid{padding-right: 6px;}
.hero-slide { position: relative; }
.hero-slide img { width: 100%; height: 480px; object-fit: cover; }
.hero-caption { position: absolute; bottom: 40px; left: 0; right: 0; text-align: center; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6); }

/* Section titles */
.section-title { position: relative; font-weight: 800; margin-bottom: .5rem; }
.section-title::after { content: ''; display: block; width: 60px; height: 4px; background: var(--primary); margin-top: 10px; border-radius: 4px; }
.section-title.text-center::after { margin-left: auto; margin-right: auto; }

/* Course cards */
.course-card { border: none; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.07); transition: transform .25s, box-shadow .25s; height: 100%; }
.course-card:hover { transform: translateY(-6px); box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.course-card .card-img-top { height: 170px; object-fit: cover; }
.course-card .fee-tag { background: var(--primary); color: #fff; font-weight: 700; padding: 2px 12px; border-radius: 20px; font-size: .85rem; }

.btn-outline-primary {
    --bs-btn-color: #000000 !important;
    --bs-btn-border-color: #870c04;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #870c04;
    --bs-btn-hover-border-color: #870c04;
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg:#870c04 !important;
    --bs-btn-active-border-color: #870c04;
    --bs-btn-disabled-color: #870c04;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #870c04;
    --bs-gradient: none;
}
.info-box.auto-scroll-box {
    overflow-y: auto;
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none;   /* IE / Edge */
}

.info-box.auto-scroll-box::-webkit-scrollbar {
    display: none;              /* Chrome / Edge / Safari */
    width: 0;
    height: 0;
}

/* Stats */
.stat-box { text-align: center; padding: 20px; }
.stat-box h2 { font-weight: 800; color: var(--primary); }

/* Testimonials */
.testimonial-card { border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.08); padding: 24px; height: 100%; }
.testimonial-card img { width: 60px; height: 60px; object-fit: cover; border-radius: 50%; }

/* Footer */
.footer-section { background: var(--primary-dark); }
.footer-link { color: #cfd9ee; }
.footer-link:hover { color: var(--primary); }
.text-light-50 { color: rgba(255,255,255,.65); }

/* Floating whatsapp */
.whatsapp-float { position: fixed; bottom: 24px; right: 24px; background: #25D366; color: #fff; width: 55px; height: 55px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 4px 14px rgba(0,0,0,.25); z-index: 999; }

/* Forms */
.form-card { background: #fff; border-radius: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.08); padding: 32px; }
.page-banner { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; padding: 60px 0; }

/* Dashboard (admin/staff/franchise/student panels) */
/* ================= Professional dashboard sidebar (v2) ================= */
:root {
  --side-bg: #0b1220;
  --side-bg-2: #0f1a2e;
  --side-card: #131f36;
  --side-text: #c7d2e6;
  --side-text-muted: #5c6a86;
  --side-accent: #2f6bff;
  --side-accent-2: #1d4ed8;
  --side-border: rgba(255,255,255,.07);
}
.img, video, iframe { width: 45px; height:45px; }
.sidebar { min-height: 100vh; background: var(--side-bg); display: flex; flex-direction: column; padding: 0; }
.sidebar .brand { display: none; } /* replaced by .side-profile-card */

.side-profile-card { display: flex; gap: 12px; align-items: center; padding: 20px 16px 14px; border-bottom: 1px solid var(--side-border); }
.side-profile-avatar { position: relative; width: 50px; height: 50px; border-radius: 12px; background: #fff; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--side-accent); }
.side-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.side-profile-info { min-width: 0; }
.side-profile-name { font-weight: 700; font-size: .95rem; color: #fff; line-height: 1.3; }
.side-profile-role { font-size: .68rem; font-weight: 700; letter-spacing: .6px; color: #5b9bff; }
.side-profile-org { font-size: .66rem; color: var(--side-text-muted); letter-spacing: .3px; margin-top: 1px; }

.side-search { margin: 14px 16px; background: var(--side-card); border-radius: 10px; padding: 9px 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--side-border); }
.side-search i { color: var(--side-text-muted); font-size: .78rem; }
.side-search input { background: transparent; border: none; outline: none; color: #e4eaf7; font-size: .82rem; width: 100%; }
.side-search input::placeholder { color: #52607d; }

.side-scroll { flex: 1 1 auto; overflow-y: auto; padding-bottom: 14px; }
.side-section-label { font-size: .64rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--side-text-muted); font-weight: 700; padding: 14px 22px 6px; }
.side-nav { padding: 0 10px; list-style: none; }
.side-item { margin-bottom: 2px; }

.sidebar .nav-link { color: var(--side-text) !important; padding: 9px 12px; border-radius: 10px; margin: 0; font-size: .83rem; font-weight: 600; display: flex; align-items: center; gap: 10px; transition: background .15s, color .15s; }
.sidebar .nav-link i:first-child { width: 16px; text-align: center; font-size: .82rem; }
.sidebar .nav-link span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .nav-link:hover { background: var(--side-card); color: #fff !important; }
.sidebar .nav-link.active { background: linear-gradient(135deg, var(--side-accent), var(--side-accent-2)); color: #fff !important; box-shadow: 0 4px 14px rgba(47,107,255,.35); }

.side-group-toggle .side-chevron { font-size: .65rem; flex: 0 0 auto; transition: transform .2s ease; opacity: .7; }
.side-group-toggle.open .side-chevron, .side-group-toggle[aria-expanded="true"] .side-chevron { transform: rotate(180deg); }
/* Safety net: hide collapsed submenus even if the Bootstrap CSS collapse rule fails to load for any reason */
.side-item .collapse:not(.show) { display: none; }
.side-item .collapse.show { display: block; }
.side-subnav { list-style: none; padding-left: 14px; margin: 4px 0 4px 22px; border-left: 1px solid var(--side-border); }
.side-subnav .nav-link { padding: 7px 10px; font-size: .78rem; font-weight: 500; }
.side-subnav .nav-link.active { background: rgba(47,107,255,.18); color: #8ab4ff !important; box-shadow: none; }

.topbar-dash { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.06); }

/* Bottom mobile nav bar */
.mobile-bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 60px; background: var(--side-bg); display: flex; align-items: stretch; justify-content: space-around; z-index: 1060; box-shadow: 0 -2px 14px rgba(0,0,0,.3); border-top: 1px solid var(--side-border); }
.mobile-bottom-nav a { color: var(--side-text-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .64rem; font-weight: 600; text-decoration: none; flex: 1; }
.mobile-bottom-nav a i { font-size: 1.15rem; }
.mobile-bottom-nav a.active { color: #5b9bff; }
@media (min-width: 992px) { .mobile-bottom-nav { display: none; } }
@media (max-width: 991.98px) { body.has-mobile-navbar { padding-bottom: 60px; } }
.stat-card { border-radius: 14px; border: none; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.stat-card .icon-box { width: 54px; height: 54px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; }

/* Verification / Certificate preview */
.certificate-preview, .marksheet-preview { border: 10px solid var(--primary); padding: 40px; background: #fff; position: relative; }
.doc-qr { width: 90px; height: 90px; }

/* Recently Joined / News info boxes */
.info-box-title { color: var(--primary); font-weight: 800; font-size: 1.2rem; margin-bottom: 10px; position: relative; padding-bottom: 8px; }
.info-box-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--primary); }
.info-box { border: 2px solid var(--primary); border-radius: 6px; background: #fff; padding: 18px; height: 100%; max-height: 480px; overflow-y: auto; }
.info-box-item { border-bottom: 1px dashed #ccc; padding-bottom: 12px; margin-bottom: 12px; text-align: center; }
.info-box-item:last-child { border-bottom: none; margin-bottom: 0; }
.info-box-item img { width: 90px; height: 90px; object-fit: cover; border: 2px solid #eee; border-radius: 6px; margin-bottom: 8px; }
.info-box-item h6 { font-weight: 700; margin-bottom: 2px; font-size: .9rem; }
.info-box-item p { font-size: .8rem; color: #555; margin-bottom: 2px; }
.info-box-empty { color: #999; text-align: center; padding: 30px 0; font-size: .85rem; }

/* Dashboard mobile sidebar */
.sidebar-toggle-btn { display: none; }
@media (max-width: 991px) {
  .sidebar { position: fixed; top: 0; left: 0; height: 100vh; z-index: 1050; transform: translateX(-100%); transition: transform .3s ease; width: 280px !important; }
  .sidebar.show { transform: translateX(0); }
  .sidebar-toggle-btn { display: inline-block; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1040; }
  .sidebar-overlay.show { display: block; }
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}

/* ---- Extra polish & mobile responsiveness for public site ---- */
.navbar { z-index: 1060; }
.btn { border-radius: 8px; }
.btn.rounded-pill { border-radius: 50rem !important; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 0.2rem rgba(26,61,124,.15); }
.badge { font-weight: 600; }
.card { border-radius: 14px; }
.table-responsive { border-radius: 10px; }

@media (max-width: 768px) {
  .hero-slide img { height: 260px; }
  .hero-caption { bottom: 15px; }
  .hero-caption h2 { font-size: 1.3rem; }
  .page-banner { padding: 36px 0; }
  .page-banner h1 { font-size: 1.6rem; }
  .form-card { padding: 20px; }
  .stat-box { padding: 14px; }
  .stat-box h2 { font-size: 1.4rem; }
  .section-title { font-size: 1.4rem; }
  .whatsapp-float { width: 46px; height: 46px; font-size: 22px; bottom: 16px; right: 16px; }
  .info-box { max-height: none; }
  .course-card .card-img-top { height: 150px; }
  .topbar-dash h5 { font-size: 1rem; }
}

@media (max-width: 480px) {
  .display-5 { font-size: 1.6rem; }
  .lead { font-size: .95rem; }
}

/* ================= Mobile responsiveness (v3) ================= */
html, body { overflow-x: hidden; }
img, video, iframe { max-width: 100%; }
.sidebar { overflow-y: auto; }
.topbar-dash { z-index: 1030; }
.table td, .table th { vertical-align: middle; }

@media (max-width: 991px) {
  .sidebar { height: 100dvh; }
  .table-responsive { -webkit-overflow-scrolling: touch; }
  .table-responsive .table { min-width: 560px; }
  .table-responsive .btn-sm { margin-bottom: 2px; }
}

@media (max-width: 768px) {
  /* header rows with title + buttons wrap instead of overflowing */
  .d-flex.justify-content-between { flex-wrap: wrap; gap: .5rem; }
  .card.stat-card, .card.stat-card.p-4 { padding: 1rem !important; }
  .stat-card .icon-box { width: 44px; height: 44px; font-size: 18px; }
  .btn-group, .d-flex.gap-2.flex-wrap { flex-wrap: wrap; }
  .form-card { padding: 18px; }
  .form-control, .form-select { font-size: 16px; } /* stops iOS zoom on focus */
  .certificate-preview, .marksheet-preview { border-width: 5px; padding: 16px; }
  .info-box { padding: 12px; max-height: 420px; } /* keep auto-scroll working on phones */
  .info-box-item img { width: 72px; height: 72px; }
  iframe[src*="pdf-"] { height: 70vh !important; }
  .ratio-16x9 { --bs-aspect-ratio: 65%; }
  h1 { font-size: 1.6rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.2rem; }
  .navbar-brand img { max-height: 36px; width: auto; }
  .footer-section { text-align: center; }
  .stat-card h2 { font-size: 1.4rem; }
  .modal-dialog { margin: .5rem; }
}

@media (max-width: 480px) {
  .p-md-4, .p-4 { padding: .75rem !important; }
  .table-responsive .table { min-width: 480px; font-size: .85rem; }
  .btn-lg { padding: .5rem 1rem; font-size: 1rem; }
  .hero-slide img { height: 200px; }
  .receipt-page { padding: 0 6px; }
}

/* Receipts: keep the 2-per-A4 layout when printing, stack on phones */
@media print {
  .receipt-page { flex-wrap: nowrap !important; }
  .topbar-dash, .sidebar { display: none !important; }
}
