/* css/style.css */
/* Premium stylesheet for E-Learning Lead Magnet SaaS App Layout */

/* Core Variables & Reset */
:root {
  --bg-dark: #0f172a;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-dark: rgba(15, 23, 42, 0.6);
  --border-card: rgba(255, 255, 255, 0.25);
  --border-card-dark: rgba(255, 255, 255, 0.08);
  --text-dark: #0f172a;
  --text-light: #f8fafc;
  --text-muted: #64748b;
  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
  --premium-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
  --transition-bezier: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 320px;
}

body {
  background: radial-gradient(circle at 10% 20%, rgba(243, 244, 246, 1) 0%, rgba(229, 231, 235, 0.6) 90.1%);
  color: var(--text-dark);
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px) saturate(190%);
  -webkit-backdrop-filter: blur(12px) saturate(190%);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  transition: var(--transition-bezier);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--premium-shadow);
  border-color: rgba(255, 255, 255, 0.45);
}

/* Premium Typography & Titles */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Dynamic Buttons */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  color: var(--text-light);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition-bezier);
}

.btn-primary-custom:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  color: var(--text-light);
  filter: brightness(1.1);
}

.btn-primary-custom:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary-custom {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
  padding: 10px 26px;
  border-radius: 12px;
  transition: var(--transition-bezier);
}

.btn-secondary-custom:hover {
  background: var(--primary-color);
  color: var(--text-light) !important;
  transform: translateY(-2px);
}

/* Navigation bar styled natively */
.navbar-brand img {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.custom-nav {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-card);
}

/* Syllabus Teaser Items */
.syllabus-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.syllabus-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  background: rgba(255, 255, 255, 0.5);
  transition: var(--transition-bezier);
}

.syllabus-item:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateX(4px);
  border-color: var(--secondary-color);
}

.syllabus-item.locked {
  background: rgba(241, 245, 249, 0.6);
  opacity: 0.85;
}

.syllabus-item.locked:hover {
  transform: none;
  background: rgba(241, 245, 249, 0.8);
  border-color: var(--border-card);
}

/* LeadsLeap Form Native Styling Hook */
.leadsleap-container {
  padding: 30px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  border: 2px solid var(--secondary-color);
  box-shadow: var(--premium-shadow);
}

/* Dynamically styled LeadsLeap inputs & buttons */
.leadsleap-container form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.leadsleap-container input[type="text"], 
.leadsleap-container input[type="email"] {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-dark);
  font-size: 1rem;
  transition: var(--transition-bezier);
}

.leadsleap-container input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--secondary-color) 20%, transparent);
}

.leadsleap-container button[type="submit"] {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-light);
  border: none;
  font-weight: 700;
  padding: 14px;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition-bezier);
}

.leadsleap-container button[type="submit"]:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Dynamic Student Dashboard Layout */
.dashboard-layout {
  display: flex;
  flex: 1;
  position: relative;
  min-height: calc(100vh - 70px); /* Adjust based on nav height */
}

/* Responsive Sidebar Container */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.main-content {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

/* Sidebar toggle logic for mobile */
@media (max-width: 991.98px) {
  .sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
  }
  .sidebar.show {
    transform: translateX(0);
  }
}

/* Lesson Nav Rows in Sidebar */
.lesson-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
}

.lesson-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  cursor: pointer;
  transition: var(--transition-bezier);
}

.lesson-nav-item:hover {
  background: rgba(226, 232, 240, 0.4);
  padding-left: 24px;
}

.lesson-nav-item.active {
  background: linear-gradient(90deg, color-mix(in srgb, var(--secondary-color) 8%, transparent) 0%, color-mix(in srgb, var(--primary-color) 3%, transparent) 100%);
  border-left: 4px solid var(--secondary-color);
  font-weight: 600;
}

/* Custom Circle Checkbox for Course Dashboard */
.custom-checkbox-container {
  display: inline-block;
  position: relative;
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.custom-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: transparent;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  transition: var(--transition-bezier);
}

.custom-checkbox-container:hover input ~ .checkmark {
  border-color: var(--secondary-color);
}

.custom-checkbox-container input:checked ~ .checkmark {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

/* Video Player Aspect Ratio 16:9 Wrapper */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--premium-shadow);
  border: 1px solid var(--border-card);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Modern Progress Tracker Styling */
.progress-wrapper {
  background: var(--bg-card);
  padding: 16px 24px;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  box-shadow: var(--card-shadow);
}

.progress-bar-custom {
  height: 10px;
  border-radius: 5px;
  background-color: #cbd5e1;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Celebration Micro-Animation Toast */
.confetti-celebration {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.9);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
  transition: var(--transition-bezier);
  transition-behavior: allow-discrete;
}

.confetti-celebration.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@starting-style {
  .confetti-celebration.show {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
}

.confetti-celebration.hidden {
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
  display: none;
}

/* Admin Modal Lock Style */
.admin-lock-screen {
  background: var(--bg-dark);
  color: white;
}

.admin-lock-card {
  max-width: 400px;
  width: 100%;
  padding: 40px;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--premium-shadow);
}

/* Dynamic Brand-based inputs inside Admin Dashboard */
.form-control:focus, .form-select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--secondary-color) 25%, transparent);
}

/* Premium Footer */
.premium-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-card);
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(10px);
}

/* Sticky Footer */
.sticky-footer-wrap {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--border-card);
  padding: 12px 0;
}

/* --- Bootstrap Default Blue Overrides --- */

/* Nav Pills / Tab Links */
.nav-pills .nav-link {
  color: var(--text-dark) !important;
  border-radius: 12px;
  transition: var(--transition-bezier);
  font-weight: 600;
}

.nav-pills .nav-link:hover {
  background-color: color-mix(in srgb, var(--primary-color) 8%, transparent) !important;
  color: var(--primary-color) !important;
}

.nav-pills .nav-link.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
  color: var(--text-light) !important;
  box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 20%, transparent) !important;
}

.nav-pills .nav-link i {
  transition: var(--transition-bezier);
}

.nav-pills .nav-link.active i {
  transform: scale(1.1);
}

/* Checked Switches, Radios & Checkboxes */
.form-check-input:checked {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
}

.form-check-input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--secondary-color) 25%, transparent);
}

/* General Hyperlinks */
a {
  color: var(--secondary-color);
  transition: var(--transition-bezier);
}

a:hover {
  color: var(--primary-color);
}
