/* ==========================================
   SCHEDULE & CLASSES SECTION
   ========================================== */
.schedule-section {
  position: relative; /* Crucial for positioning the page divider */
  min-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 5%;
  background-color: var(--bg-offwhite); /* The continuous canvas */
}

/* --- THE PREMIUM PAGE DIVIDER --- */
.schedule-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  /* An elegant gold line that fades out smoothly at the edges */
  background: linear-gradient(
    to right,
    transparent,
    var(--secondary-gold),
    transparent
  );
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px auto;
}

.section-header p {
  font-size: 1.1rem;
  color: #555555;
}

/* --- THE GRID UPDATE --- */
.schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1300px; /* Perfect width for two cards */
  margin: 0 auto;
}

/* --- PREMIUM CARD STYLING --- */
.schedule-card {
  background-color: #ffffff; /* Pure white floating on the off-white canvas! */
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04); /* Deeper, softer shadow */
  padding: 40px 50px;
  border-top: 4px solid var(--primary-navy);

  width: 550px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

/* Very subtle 3D lift when hovering over the card itself */
.schedule-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(18, 41, 57, 0.08); /* Shadow deepens with a hint of navy */
}

.card-title {
  margin-bottom: 24px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(18, 41, 57, 0.1);
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary-navy);
}

/* --- STANDARDIZED DIVIDERS --- */
.day-group {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(18, 41, 57, 0.06);
}

.last-group {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.day-name {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  color: var(--primary-navy);
  font-size: 1.15rem;
  margin-bottom: 12px;
}

/* --- INTERACTIVE CLASS ROWS --- */
.class-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin: 0 -16px 8px -16px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.class-row:last-child {
  margin-bottom: 0;
}

/* The Micro-Interaction: Slides right and highlights on hover */
.class-row:hover {
  background-color: var(
    --bg-offwhite
  ); /* Uses the canvas color for the highlight! */
  transform: translateX(6px);
}

.time-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.class-time {
  font-size: 1rem;
  color: #444444;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* The Gold Bullet */
.class-time::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--secondary-gold);
  border-radius: 50%;
}

/* --- THE SCARCITY ALERT --- */
.slot-alert {
  font-size: 0.8rem;
  color: #c75b5b;
  font-weight: 600;
  margin-left: 18px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- SUBJECT BADGES --- */
.class-badge {
  background-color: rgba(18, 41, 57, 0.05);
  color: var(--primary-navy);
  padding: 8px 16px;
  border-radius: 50px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.highlight-badge {
  background-color: rgba(168, 141, 62, 0.1);
  color: #8c732b;
}

.highlight-badge2 {
  background-color: rgba(62, 103, 168, 0.1);
  color: #2b558c;
}

/* --- Card Integrated CTA --- */
.card-cta {
  margin-top: auto;
  padding-top: 30px;
}

.card-cta .btn {
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  font-size: 1rem;
}

/* ==========================================
   MOBILE RESPONSIVENESS
   ========================================== */
@media (max-width: 900px) {
  .schedule-section {
    padding: 60px 5%;
    min-height: auto;
    /* Prevents any accidental horizontal scrolling from bleeding out */
    overflow: hidden;
  }

  .section-header h2 {
    font-size: 2.2rem;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%; /* Ensures the grid container doesn't overflow */
  }

  /* --- THE CRITICAL FIX --- */
  .schedule-card {
    width: 100% !important; /* Overrides your desktop 550px rule */
    max-width: 100%; /* Guarantees it will never be wider than the phone screen */
    box-sizing: border-box; /* Forces padding to sit inside the width, not add to it */
    margin: 0 auto;
    padding: 30px 20px; /* Slightly tighter padding for small phone screens */
  }

  .day-name {
    font-size: 1.1rem;
  }

  .class-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 20px 0;
    padding: 0;
  }

  .class-row:hover {
    transform: none;
    background-color: transparent;
  }

  .class-time {
    font-size: 0.95rem;
  }

  .slot-alert {
    font-size: 0.75rem;
    margin-left: 14px;
  }

  .class-badge {
    margin-left: 14px;
    padding: 6px 14px;
    font-size: 0.8rem;
    display: inline-block;
  }

  .card-cta {
    padding-top: 20px;
  }
}
