:root {
  --primary: #2563eb;
  --brown: #e28f19;
  --green: #0ec351;
  --soft-green: #7bc79727;
  --red: #dc2626;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --border: #e2e8f0;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.divider {
  border: 1px solid var(--border);
}

/* --- NAVIGATION (Mobile Optimized & Sticky) --- */
nav {
  width: 100%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
  display: flex;

  /* CRITICAL FIXES FOR MOBILE SCROLLING: */
  flex-wrap: nowrap; /* Forces all items onto a single line */
  overflow-x: auto; /* Allows horizontal scrolling */
  justify-content: flex-start; /* Aligns left so scrolling feels natural */
  padding: 0 1rem;

  /* Hides the horizontal scrollbar for a cleaner look */
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */

  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Hides the horizontal scrollbar in Chrome/Safari/Opera */
nav::-webkit-scrollbar {
  display: none;
}

nav button {
  background: transparent;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 1rem 1.25rem;

  border: none;
  /* An invisible default border ensures the button size doesn't jump when clicked */
  border-bottom: 3px solid transparent;
  border-radius: 0;

  flex-shrink: 0; /* Prevents buttons from squishing together on small screens */
  transition: all 0.2s ease;
}

nav button:hover {
  color: var(--primary);
}

/* Active State: Replaces the blue background with a bottom border */
nav button.active {
  background: transparent;
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
}

/* --- DYNAMIC SECTIONS --- */
section {
  display: none;
  width: 100%;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

section.active-section {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- HERO BANNER --- */
.main-hero {
  max-width: 1000px;
  width: calc(100% - 2rem);
  margin: 2rem auto;
  box-sizing: border-box;
}

/* Mobile Layout Base */
.hero {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;

  /* CRITICAL FIX: Forces the desktop image to hide on mobile screens */
  background-image: none !important;
  background-color: var(--surface) !important;

  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* NEW: Styles the real HTML div for mobile */
.mobile-banner-img {
  width: 100%;
  aspect-ratio: 16 / 9;

  /* Set your FIRST mobile image here */
  background-image: url("../assets/images/hero-bg-mobile.jpg");

  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-content {
  padding: 2rem 1.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero h1 {
  margin-top: 0;
  color: rgb(219, 115, 4);
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.hero p {
  font-size: 1rem;
  color: black;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 600px;
}
.hero-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--brown);
  color: white;
  border: none;
  padding: 0.875rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
}

/* --- CARDS & GRIDS --- */
.card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  /* box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05); */
}

h2 {
  margin-top: 0;
  text-align: center;
  color: var(--text);
}

/* Stat Container */
.stat-container {
  text-align: center;
  border: 1px solid var(--border);
}
.stat-description {
  text-align: left;
}
.stat-box {
  background: #b7c7dd47;
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 1rem;
}
.stat-box h3 {
  margin: 0;
  font-size: 2.5rem;
  color: var(--primary);
}
.stat-box p {
  margin: 0.5rem 0 0 0;
  color: #1e3a8a;
  font-weight: 500;
}
/* --- LIVE BOX UPGRADES --- */

/* 1. Pulsing Green Dot */
.live-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: #22c55e; /* Bright Green */
  border-radius: 50%;
  margin-right: 8px;
  /* Adds a radar pulse animation */
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* 2. Progress Bar */
.progress-track {
  width: 100%;
  height: 8px;
  background-color: #e2e8f0;
  border-radius: 4px;
  margin: 1.5rem 0 0.5rem 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary);
  width: 0%; /* JS will control this */
  transition: width 1s ease-in-out;
}

.spots-left {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0 !important;
}

/* Turns text red when spots are almost gone */
.spots-left.urgent {
  color: #ef4444 !important;
  font-weight: 600;
}

/* 3. Trust Badges */
.trust-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 500;
}

/* Colors the Font Awesome icons and adds spacing */
.trust-badges span i {
  color: #22c55e; /* Bright green for the checkmarks */
  margin-right: 6px;
  font-size: 1rem;
  vertical-align: middle;
}

/* Make the lock icon match your primary blue instead of green */
.trust-badges span i.fa-lock {
  color: var(--primary);
}

/* --- DUAL STATS (ENROLL & CHECK-IN) --- */
.dual-stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 1.5rem;
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-item h3 {
  margin: 0;
  font-size: 2.5rem;
  color: var(--primary);
}

.stat-item p {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Creates a vertical line between the two numbers */
.stat-item:first-child {
  border-right: 1px solid var(--primary);
}

/* --- WHAT YOU'LL LEARN (FEATURES GRID) --- */
.section-title {
  margin: 3rem 0 1.5rem 0;
  font-size: 1.75rem;
  color: var(--text);
  text-align: left;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.feature-card {
  background: var(--surface);
  padding: 2rem 1.5rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--brown);
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.feature-card .fa-laptop-file {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}
.feature-card .fa-shield-halved {
  font-size: 2.5rem;
  color: var(--green);
  margin-bottom: 1rem;
}
.feature-card .fa-user-tie {
  font-size: 2.5rem;
  color: var(--red);
  margin-bottom: 1rem;
}

.feature-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  text-align: left;
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.5;
}

/* --- ABOUT THE INSTRUCTOR --- */
.instructor-card {
  margin-bottom: 2rem;
  background: linear-gradient(to right bottom, #ffffff, #f8fafc);
  border: 1px solid var(--border);
}

.instructor-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.instructor-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
}

.instructor-info .tag {
  display: inline-block;
  background: #e0e7ff;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.instructor-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
}

.instructor-info p {
  margin: 0;
  text-align: left;
  color: #475569;
  line-height: 1.6;
  font-size: 0.9rem;
}

/* --- EXPECTED BENEFITS (DARK BLOCK) --- */
.benefits-wrapper {
  color: white;
  border-radius: 16px;
  margin-bottom: 3rem;
  margin-top: 2rem;
}

.benefits-header h2 {
  color: var(--brown);
  text-align: left;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.benefits-header p {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--soft-green);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--green);
}

.benefit-icon {
  background: var(--primary); /* Blue accent */
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  margin-top: 2px;
}

.benefit-text h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  color: var(--primary);
}

.benefit-text p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Resources */

.resource-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.resource-card {
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 10px;
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
}
.resource-card:hover {
  border: 1px solid var(--brown);
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.resource-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.15rem;
}
.resource-card p {
  margin: 0 0 1rem 0;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
}
.resource-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

/* --- LESSON DETAILS & PDF VIEWER --- */
.join-instructions {
  background: var(--surface);
  border-left: 4px solid var(--primary); /* Creates a professional colored accent line */
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0 2.5rem 0;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.05);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.join-instructions h3,
.pdf-container h3 {
  margin-top: 0;
  color: var(--text);
  font-size: 1.25rem;
}

.join-instructions ol {
  margin: 0;
  padding-left: 1.25rem;
  color: #475569;
  line-height: 1.7;
}

.join-instructions ol li {
  margin-bottom: 0.75rem;
}

.pdf-container p {
  margin-bottom: 1rem;
  color: #64748b;
  font-size: 0.95rem;
}

/* Forces the PDF to stretch perfectly across mobile and desktop */
.pdf-container iframe {
  width: 100%;
  height: 60vh; /* Takes up 60% of the screen height */
  min-height: 400px;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  background-color: #f1f5f9; /* Soft background while the PDF loads */
}

.back-btn {
  display: block;
  /* margin: 0 auto 1.25rem; */
  width: 100%;
  /* max-width: 200px; */
  text-align: center;
  background: none;
  color: var(--primary);

  border: 1px solid var(--primary);
  padding: 0.875rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

/* --- FORMS --- */
#enroll .card,
#feedback .card {
  max-width: 1000px;
  margin: 0 auto;
  /* padding: 2rem; */
}

.form-group {
  margin: 0 auto 1.25rem;
  max-width: 600px;
}
label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
input,
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

button.primary-btn {
  display: block;
  margin: 0 auto 1.25rem;
  width: 100%;
  max-width: 600px;
  text-align: center;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.875rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
button.primary-btn:hover {
  background: #1d4ed8;
}
button.primary-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  display: none;
  font-size: 0.9rem;
  text-align: center;
}
.success {
  background: #dcfce7;
  color: #166534;
  display: block;
}
.error {
  background: #fee2e2;
  color: #991b1b;
  display: block;
}

/* --- PROFESSIONAL FOOTER --- */
.site-footer {
  background-color: var(--text);
  color: #f8fafc;
  padding: 4rem 1.5rem 1.5rem 1.5rem;
  margin-top: auto;
  border-top: 1px solid var(--brown);
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: var(--brown);
  margin: 0 0 1rem 0;
  font-size: 1.4rem;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 320px;
  margin-bottom: 1.5rem;
}

.brand i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-contact a p {
  font-size: 0.85rem;
  text-align: left;
  margin-left: -1.5px;
}

/* Footer Lists & Text */
.footer-links h4,
.footer-contact h4 {
  color: var(--brown);
  font-size: 1.1rem;
  margin: 0 0 1.25rem 0;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-links button {
  background: none;
  border: none;
  color: #94a3b8;
  padding: 0;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
  font-family: inherit;
}

.footer-links button:hover {
  color: var(--primary);
}

.footer-contact p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fa-envelope {
  color: var(--surface);
  font-size: 1.1rem;
}
.fa-location-dot {
  color: var(--red);
  font-size: 1.1rem;
}

.footer-contact a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: var(--primary);
}

.footer-contact img {
  width: 100px;
  height: auto;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
}

/* Bottom Bar */
.footer-bottom {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}

/* --- FLOATING CHECK-IN BUTTON --- */
.floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 10px 20px -5px rgb(0 0 0 / 0.3);
  cursor: pointer;
  z-index: 9999; /* Ensures it stays on top of everything else */
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.floating-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 25px -5px rgb(0 0 0 / 0.4);
}

/* Make it slightly smaller and reposition for mobile phones */
@media (max-width: 768px) {
  .floating-btn {
    bottom: 20px;
    right: 20px;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }
}

/* =========================================
   DESKTOP MEDIA QUERIES (Screens > 768px)
   ========================================= */
@media (min-width: 768px) {
  nav {
    justify-content: center; /* Centers the menu perfectly on laptops */
    padding: 0 2rem;
    gap: 1.5rem; /* Adds a bit more space between items on big screens */
  }

  /* Hide the separate mobile image block on laptops */
  .mobile-banner-img {
    display: none;
  }

  .hero {
    /* Set your FIRST desktop image here */
    background-image: linear-gradient(
        rgba(196, 203, 218, 0.197),
        rgba(172, 180, 200, 0.363)
      ),
      url("../assets/images/hero-bg.jpg") !important;

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    background-color: transparent !important;
    aspect-ratio: 16 / 6.5;
    justify-content: center;
    /* box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.2); */
  }

  .hero-content {
    padding: 0 4rem;
  }

  .hero h1 {
    font-size: 3rem;
  }
  .hero p {
    font-size: 1.2rem;
  }

  .hero-btn {
    width: auto !important; /* Returns to auto width on desktop */
    display: inline-block !important; /* Returns to inline-block on desktop */
    background: var(
      --brown
    ) !important; /* Returns to white button on desktop */
    color: white !important;
    padding: 0.875rem 2.5rem !important;
    font-size: 1.1rem;
  }

  .resource-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  section {
    margin: 3rem auto;
    padding: 0;
  }

  /* WHAT YOU'LL LEARN (FEATURES GRID) */
  .features-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
  }

  .instructor-content {
    flex-direction: row; /* Image on left, text on right */
    text-align: left;
    padding: 1rem;
  }

  .instructor-img {
    width: 150px;
    height: 150px;
  }

  /* --- EXPECTED BENEFITS (DARK BLOCK) --- */
  .benefits-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Left side gets less space, right side gets more */
    gap: 3rem;
    align-items: center; /* Vertically centers the text with the list */
    /* padding: 4rem; */
  }

  .benefits-header h2 {
    font-size: 2rem;
  }

  .benefits-header p {
    margin-bottom: 0; /* Removes extra spacing since it sits next to the list now */
  }

  /* Add inside your @media (min-width: 768px) block */

  .footer-container {
    grid-template-columns: 2fr 1fr 1fr; /* Brand gets double space, links & contact share the rest */
    gap: 4rem;
  }

  .footer-bottom {
    text-align: left; /* Aligns copyright to the left on big screens */
  }

  .footer-contact a p {
    font-size: 0.91rem;
  }
}
