/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Sinhala:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;700;800&display=swap");

:root {
  /* Bootstrap Overrides */
  --bs-primary: #ff6436;
  --bs-primary-rgb: 255, 100, 54;

  /* Brand Colors */
  --primary: #ff6436;           /* Main orange */
  --primary_dark: #1e2225;      /* Dark sidebar bg */
  --accent: #ffffff;            /* White accent (used on dark backgrounds) */
  --accent-yellow: #ffc107;     /* Gold/yellow highlight color */
  --accent-yellow-light: #fff0cf; /* Pale yellow bg tint */

  /* Text Colors */
  --text-dark: #111827;         /* Darker text for better contrast */
  --text-gray: #4b5563;         /* Slightly darker gray for better readability */
  --white: #ffffff;

  /* Background */
  --bg-main: #f8fafc;           /* Main background */
  --bg-gray: #f0f4f8;           /* Slightly softer gray for card backgrounds if needed */

  /* Borders & Shadows */
  --border-light: rgba(0, 0, 0, 0.08);
  --gradient-overlay: rgba(24, 29, 56, 0.7);
  --soft-shadow: rgba(149, 157, 165, 0.15) 0px 8px 24px; /* Premium floating shadow */
  --hover-shadow: rgba(149, 157, 165, 0.25) 0px 14px 28px; /* Hover floating shadow */

  /* Border Radius Tokens */
  --radius-card: 16px;
  --radius-lg: 20px;
  --radius-sm: 10px;
  --radius-pill: 50px;
}

/* Bootstrap Color Overrides */
.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

html,
body {
  overflow-x: hidden;
  /* Prevent horizontal scroll on mobile */
  font-family: "Outfit", "Noto Sans Sinhala", sans-serif;
  scroll-behavior: smooth;
}

/* =========================================
   2. PRELOADER (SMOOTH FADE)
   ========================================= */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--white);
  z-index: 99999;
  /* Highest priority */
  display: flex;
  justify-content: center;
  align-items: center;
  transition:
    opacity 0.6s ease-out,
    visibility 0.6s;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(41, 45, 48, 0.1);
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* =========================================
   3. NAVBAR & MOBILE MENU
   ========================================= */
.navbar {
  transition: all 0.4s ease;
  padding: 20px 0;
  background: transparent;
}

.navbar-brand {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--white) !important;
}

/* Nav Link Styling */
.nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  font-size: 0.95rem;
  margin: 0 5px;
  position: relative;
  transition: 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent) !important;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: var(--accent);
  transition: 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

/* Scrolled Navbar State */
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled .navbar-brand {
  color: var(--primary) !important;
}

.navbar.scrolled .nav-link {
  color: var(--text-dark) !important;
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: var(--primary) !important;
}

.navbar.scrolled .nav-link::after {
  background: var(--primary);
}

.navbar.scrolled .navbar-toggler i {
  color: var(--primary) !important;
}

/* Button Action (Navbar Login/Dashboard) */
.btn-action {
  background-color: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 600;
  border: 2px solid var(--primary) !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 10px rgba(255, 100, 54, 0.3);
}

.btn-action:hover {
  background-color: transparent !important;
  color: var(--primary) !important;
  box-shadow: 0 6px 15px rgba(255, 100, 54, 0.2);
  transform: translateY(-2px);
}

/* Mobile Toggler */
.navbar-toggler {
  border: none;
  font-size: 1.5rem;
  color: var(--white);
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* =========================================
   Mobile Sidebar (Offcanvas) Styling - PREMIUM UI/UX
   ========================================= */
.offcanvas {
  background: var(--primary_dark);
  color: var(--white);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);

  /* 1 වෙනස: තිරය සම්පූර්ණයෙන් වැසීම නැවැත්වීම */
  width: 300px !important;
  /* නිශ්චිත පළලක් ලබා දීම */
  max-width: 85vw !important;
  /* කුඩා ෆෝන් වලදී වුවත් පිටුපස තිරය පෙනීමට ඉඩක් ඉතිරි කිරීම */
}

.offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 1.5rem 1.2rem;
  background: rgba(0, 0, 0, 0.15);
  /* Header එකට වෙනම ගැඹුරක් (Depth) දීමට */
}

/* 2 වෙනස: Menu Title එකට Premium පෙනුමක් ලබා දීම */
.offcanvas-header .offcanvas-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--white);
  /* තැඹිලි වෙනුවට සුදු පැහැය යෙදීම */
  text-transform: uppercase;
  position: relative;
  padding-bottom: 8px;
}

/* Menu Title එක යටින් ලස්සන තැඹිලි පාට ඉරක් (Accent) එකතු කිරීම */
.offcanvas-header .offcanvas-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 35px;
  background: var(--primary);
  border-radius: 5px;
}

/* Close Button Animation & Sizing */
.offcanvas-header .btn-close {
  filter: invert(1);
  opacity: 0.6;
  transition: all 0.3s ease;
  background-size: 12px;
  /* Close icon එක මදක් කුඩා කර වඩාත් Professional කිරීම */
}

.offcanvas-header .btn-close:hover {
  opacity: 1;
  transform: rotate(90deg);
  /* Mouse එක ගෙන ගිය විට කැරකීම */
}

.offcanvas-body {
  padding: 1.5rem;
  text-align: left !important;
  align-items: flex-start !important;
}

/* Profile Section Styling */
.mobile-profile-section {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 25px !important;
  width: 100%;
  text-align: center;
}

/* Navigation Links (App-like Feel) */
.mobile-nav-link {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.75) !important;
  text-decoration: none;
  padding: 12px 15px;
  margin: 4px 0;
  font-weight: 500;
  transition: all 0.3s ease;
  display: block;
  width: 100%;
  border-radius: 8px;
  background: transparent;
  border-left: 3px solid transparent;
}

.mobile-nav-link:hover {
  color: var(--white) !important;
  background: rgba(255, 100, 54, 0.08);
  border-left: 3px solid var(--primary);
  transform: translateX(5px);
}

/* Login/Logout Button Positioning */
.offcanvas-body .btn {
  margin-top: auto !important;
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* =========================================
   4. HERO BANNER (PREMIUM ANIMATIONS)
   ========================================= */
.carousel-item {
  height: 100vh;
  min-height: 600px;
  position: relative;
  background-color: #000;
  overflow: hidden;
}

/* Ken Burns Zoom Effect */
.carousel-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  animation: zoomEffect 15s infinite alternate;
}

@keyframes zoomEffect {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.15);
  }
}

/* Dark Overlay for Readability */
.carousel-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-overlay);
  z-index: 1;
}

.carousel-caption {
  z-index: 2;
  bottom: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 50px;
}

/* ANIMATION LOGIC (FADE OUT & STAGGERED FADE IN) */

/* Base State (Hidden & Down) */
.animated-text {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
  /* Exiting transition */
  transition-delay: 0s;
  /* Immediate exit */
}

/* Active State (Visible & Reset) */
.carousel-item.active .animated-text {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delays (Entry Only) */
.carousel-item.active .animated-text:nth-child(1) {
  transition-delay: 0.3s;
}

.carousel-item.active .animated-text:nth-child(2) {
  transition-delay: 0.5s;
}

.carousel-item.active .animated-text:nth-child(3) {
  transition-delay: 0.7s;
}

.carousel-item.active .animated-text:nth-child(4) {
  transition-delay: 0.9s;
}

/* Typography */
.display-custom {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  white-space: pre-line;
  /* Allows line breaks from DB */
}

/* CUSTOM BUTTONS (Professional & Limited) */
.hero-btn {
  padding: 15px 40px;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: 0.3s;
  margin: 5px;
}

/* STYLE 1: PRIMARY ACTION (Gold) */
.btn-action {
  background-color: var(--accent);
  color: var(--primary);
  border: 2px solid var(--accent);
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-action:hover {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 100, 54, 0.3);
}

/* STYLE 2: SECONDARY ACTION (Navy) */
.btn-primary-custom {
  background-color: var(--primary);
  color: var(--white);
  border: 2px solid var(--primary);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-primary-custom:hover {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 100, 54, 0.2);
}

/* BANNER ONLY: Outline White */
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-white:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}

/* =========================================
   5. UNIFIED STATS PANEL (SINGLE BAR DESIGN)
   ========================================= */
.stats-container {
  margin-top: -100px;
  /* Pull it up over the banner */
  padding-bottom: 50px;
  position: relative;
  z-index: 20;
}

/* The Main Single Card */
.unified-stats-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
  padding: 40px;
  position: relative;
}

/* Items inside are seamless */
.stat-item {
  background: transparent;
  padding: 10px;
  text-align: left;
  transition: transform 0.3s ease;
  border: none;
  box-shadow: none;
}

.stat-item:hover {
  transform: translateY(-3px);
}

/* Divider Lines (Desktop Only) */
@media (min-width: 992px) {
  .border-right-custom {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
  }
}

/* Icon Design */
.icon-box-simple {
  width: 65px;
  height: 65px;
  background: rgba(41, 45, 48, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary);
  transition: all 0.3s ease;
}

.stat-item:hover .icon-box-simple {
  background: var(--accent);
  color: var(--primary);
}

.counter {
  font-weight: 800;
  color: var(--primary);
}

/* =========================================
   6. CARDS & GENERAL SECTIONS
   ========================================= */
/* NEW ABOUT SECTION STYLES */
.about-img-wrapper {
  position: relative;
  padding-bottom: 30px;
  /* Space for floating elements */
}

.main-img {
  width: 90%;
  margin-left: 0;
  transition: transform 0.3s ease;
}

.small-img {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50%;
  border-radius: 15px;
  transition: transform 0.3s ease;
}

.experience-badge {
  position: absolute;
  top: 30px;
  right: 20px;
  background: var(--white);
  color: var(--primary);
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  border-bottom: 5px solid var(--accent);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.about-img-wrapper:hover .main-img {
  transform: scale(0.98);
}

/* Course Cards */
.course-card {
  border: none;
  border-radius: 15px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.course-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--hover-shadow) !important;
}

.course-card img {
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.course-card:hover img {
  transform: scale(1.05);
}

/* --- MERGED: Beautiful Hover Schedule Overlay Styles --- */
.course-card .position-relative {
  overflow: hidden;
  border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;
}

.course-card .card-img-top {
  transition: transform 0.6s ease;
}

.course-card:hover .card-img-top {
  transform: scale(1.1);
}

.schedule-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(41, 45, 48, 0.88);
  backdrop-filter: blur(5px);
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.course-card:hover .schedule-overlay,
.course-card:active .schedule-overlay {
  opacity: 1;
  transform: translateY(0);
}

.schedule-list-item {
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.schedule-list-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.session-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 100, 54, 0.2);
  color: #ff6436;
  margin-left: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.mobile-tap-hint {
  display: none;
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 5;
  pointer-events: none;
}

/* Custom SweetAlert popup background to look cleaner */
.swal-custom-popup {
  border-radius: 1.5rem !important;
  padding: 2rem !important;
}

/* ----------------------------------------------------- */

/* Student Results Cards */
.student-card {
  background: var(--white);
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  border: 1px solid #eee;
  transition: 0.3s;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.student-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
}

.student-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin-bottom: 15px;
}

.rank-badge {
  background: var(--primary);
  color: var(--white);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  position: absolute;
  top: 15px;
  right: 15px;
}

/* =========================================
   7. MODERN TEACHER CARD STYLE (NEW)
   ========================================= */
.team-card {
  background-color: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
  border: 1px solid #f1f1f1;
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(41, 45, 48, 0.15);
}

.team-img-box {
  position: relative;
  overflow: hidden;
  height: 280px;
  /* Fixed height for uniformity */
}

.team-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.team-card:hover .team-img-box img {
  transform: scale(1.1);
}

/* Sliding Social Overlay - MERGED */
.team-socials {
  position: absolute;
  bottom: -60px;
  /* Hidden initially */
  left: 0;
  width: 100%;
  padding: 10px;
  /* Merged: Updated to 10px */
  background: rgba(41, 45, 48, 0.85);
  /* Dark blue transparency */
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  gap: 8px;
  /* Merged: Updated from 15px to 8px */
  flex-wrap: wrap;
  /* Merged: Added flex-wrap */
  transition: bottom 0.4s ease;
}

.team-card:hover .team-socials {
  bottom: 0;
  /* Slide up on hover */
}

.team-socials a {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: 0.3s;
}

.team-socials a:hover {
  background: var(--accent);
  color: var(--primary);
}

.team-content {
  padding: 20px;
  text-align: center;
  border-top: 3px solid var(--accent);
  /* Accent line */
}

.ls-1 {
  letter-spacing: 1px;
}

/* =========================================
   8. FOOTER & BACK TO TOP
   ========================================= */
footer {
  background-color: var(--primary_dark);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 80px;
}

footer h3,
footer h5 {
  color: var(--white);
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: 0.3s;
}

footer a:hover {
  color: var(--accent);
  padding-left: 5px;
}

/* Developer link hover fix */
footer a.dev-link:hover {
  padding-left: 0;
  color: #ffffff !important;
}

/* Footer Newsletter Input — pill shape (scoped, not global) */
footer .input-group .form-control {
  padding: 12px 16px;
  border-radius: 50px 0 0 50px !important;
}

footer .input-group .btn {
  border-radius: 0 50px 50px 0 !important;
  padding: 0 20px;
}

#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 99;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

/* Profile Pic in Navbar */
.nav-profile-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.mobile-profile-section {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 20px;
  width: 100%;
}

/* =========================================
   9. MOBILE RESPONSIVENESS (UPDATED)
   ========================================= */

/* Tablets & Small Laptops */
@media (max-width: 991px) {
  .display-custom {
    font-size: 3rem;
  }

  .stats-container {
    margin-top: 30px;
  }

  .navbar-collapse {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .nav-link {
    color: var(--text-dark) !important;
  }

  /* MERGED: Mobile Tap Hint Display */
  .mobile-tap-hint {
    display: block;
  }
}

/* =========================================
   10. CONTACT & MAP SECTION
   ========================================= */
.contact-info {
  border: 1px solid rgba(41, 45, 48, 0.05);
}

.contact-icon {
  background: rgba(41, 45, 48, 0.05);
  /* Matches primary color lightly */
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.contact-info:hover .contact-icon {
  background: var(--accent);
  color: var(--primary) !important;
  transform: translateY(-3px);
}

.map-wrapper {
  position: relative;
  width: 100%;
  height: 420px;
  /* Default desktop height */
  border: 4px solid var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.map-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Map Mobile Responsiveness */
@media (max-width: 991px) {
  .map-wrapper {
    height: 350px;
  }
}

@media (max-width: 768px) {
  .map-wrapper {
    height: 300px;
  }
}

/* Course Card Enhancements */
.course-badge-type {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
  /* Keeps badge above the image */
  transition: all 0.4s ease;
}

.course-badge-batch {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--accent);
  color: var(--primary);
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
  /* Keeps badge above the image */
  transition: all 0.4s ease;
}

/* Awesome Hover Effects for Badges */
.course-card:hover .course-badge-batch {
  transform: translateY(-5px);
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 8px 15px rgba(41, 45, 48, 0.2);
}

.course-card:hover .course-badge-type {
  transform: translateY(-5px);
  background: var(--accent);
  color: var(--primary);
  box-shadow: 0 8px 15px rgba(255, 100, 54, 0.3);
}

.teacher-mini-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

/* Mobile Phones (Portrait) */
@media (max-width: 768px) {

  /* 1. Banner Height Adjustment (75vh for better view) */
  .carousel-item {
    height: 75vh;
    min-height: 500px;
  }

  /* 2. Image Positioning */
  .carousel-img {
    object-position: center center;
  }

  /* 3. Text Adjustments for Mobile */
  .display-custom {
    font-size: 2.2rem;
    margin-bottom: 1rem !important;
    line-height: 1.2;
    white-space: normal;
    /* Auto wrap on mobile if needed */
  }

  .lead {
    font-size: 0.95rem;
    margin-bottom: 1.5rem !important;
  }

  .carousel-caption {
    padding-bottom: 80px;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 4. Stats & Other Sections */
  /* Remove borders on mobile for better stacking */
  .border-right-custom {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Horizontal lines instead */
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .col-6:last-child .border-right-custom,
  .col-6:nth-last-child(2) .border-right-custom {
    border-bottom: none;
    /* Last row no border */
  }

  .unified-stats-card {
    padding: 30px 15px;
    /* Tighter padding on mobile */
  }

  .icon-box-simple {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }

  .stat-item h2 {
    font-size: 2rem;
  }

  .experience-badge {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: -30px;
    display: inline-block;
    transform: none;
  }

  .about-main-img {
    margin-bottom: 20px;
  }
}

/* =========================================
   NEW: INNER PAGE HEADER (Static Pages)
   ========================================= */
.inner-page-header {
  background: linear-gradient(rgba(0, 33, 71, 0.85), rgba(0, 33, 71, 0.85)), url('https://images.unsplash.com/photo-1434030216411-0b793f4b4173?q=80&w=2000&auto=format&fit=crop') center/cover;
  padding: 160px 0 80px 0;
  color: white;
  text-align: center;
  border-bottom: 5px solid var(--primary);
}

.inner-page-header h1 {
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 0;
}



/* Sidebar and Premium Shadow Overrides for Dark Mode */
[data-bs-theme="dark"] .sidebar {
    background-color: var(--bs-secondary-bg) !important;
    border-right: 1px solid var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .shadow-sm,
[data-bs-theme="dark"] .shadow,
[data-bs-theme="dark"] .section-card,
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .top-navbar {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Definitive Dark Theme Global Variable Overrides */
[data-bs-theme="dark"] {
    /* 1. Perfect Background Match */
    --bs-body-bg: #121212;
    --bs-body-bg-rgb: 18, 18, 18;
    --bs-secondary-bg: #1e1e1e;
    --bs-secondary-bg-rgb: 30, 30, 30;

    /* 2. Sidebar Fix: Re-map the legacy variable directly to the new dark color */
    --primary_dark: #1e1e1e;

    /* 3. Shadow Fix: Re-map legacy shadows and Bootstrap shadows to pure black for a deep, non-glowing drop shadow */
    --soft-shadow: rgba(0, 0, 0, 0.6) 0px 8px 24px;
    --hover-shadow: rgba(0, 0, 0, 0.8) 0px 14px 28px;
    --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.6);
    --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5);
    --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.8);
}

/* --- Global Theme Toggle Button --- */
.theme-toggle {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    border: 1px solid var(--border-light) !important;
    background: var(--bg-body) !important;
    color: var(--text-muted) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    padding: 0;
}
.theme-toggle:hover {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
@media (max-width: 768px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}
/* --- SweetAlert2 Theme Optimization --- */
.swal2-popup {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2) !important;
    border: 1px solid var(--border-light) !important;
}
.swal2-title { color: var(--text-main) !important; }
.swal2-html-container { color: var(--text-muted) !important; }
.swal2-icon.swal2-warning { border-color: #f59e0b !important; color: #f59e0b !important; }
.swal2-icon.swal2-error { border-color: #ef4444 !important; color: #ef4444 !important; }
.swal2-icon.swal2-success { border-color: #10b981 !important; color: #10b981 !important; }
.swal2-icon.swal2-success [class^=swal2-success-line] { background-color: #10b981 !important; }
.swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(16, 185, 129, 0.3) !important; }
.swal2-icon.swal2-info { border-color: #0dcaf0 !important; color: #0dcaf0 !important; }

.swal2-styled.swal2-confirm {
    background: linear-gradient(135deg, var(--color-primary-main), #ff8c6b) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    padding: 10px 25px !important;
    box-shadow: 0 4px 15px rgba(255,100,54,0.3) !important;
}
.swal2-styled.swal2-cancel {
    background-color: transparent !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    padding: 10px 25px !important;
}
