/* ==========================================================================
   Calendar/Course Page Styles
   ========================================================================== */

/* ----- Tests Section ----- */
.cal-tests .home-tests-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cal-tests .home-tests-list-item > div {
  text-align: left;
}

.cal-tests .home-tests-list-item a {
  background: transparent !important;
  color: inherit;
  font-size: 24px;
}

.cal-tests .exam-type-usmle h4,
.cal-tests .exam-type-usmle a {
  color: #0d4f8b !important;
}

.cal-tests .exam-type-comlex h4,
.cal-tests .exam-type-comlex a {
  color: #54894a !important;
}

/* ----- Start Dates Intro ----- */
.cal-start-dates-intro {
  padding: 60px 0;
  background: #fff;
}

.cal-start-dates-intro h2 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
}

.cal-start-dates-intro-text p {
  font-size: 16px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 15px;
}

@media (min-width: 769px) {
  .cal-start-dates-intro .half:first-child {
    margin-right: 50px;
  }
}

/* ----- Start Dates Green Grid ----- */
.cal-start-dates {
  background-color: #54894a;
  padding: 60px 0;
  color: #fff;
  text-align: center;
}

.cal-start-dates-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 30px;
  letter-spacing: 1px;
}

.cal-start-dates-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  max-width: 1000px;
  margin: 0 auto 30px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 20px 0;
}

.cal-start-dates-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 25px 5px;
}

.cal-start-dates-item:not(:nth-child(5n)) {
  border-right: 1px solid #fff;
}

.cal-start-dates-item i {
  font-size: 20px;
  color: #84d674;
}

.cal-start-dates-item span {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}

.cal-start-dates-footnote {
  font-size: 13px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 10px;
}

/* ----- Weekly Schedule Framework ----- */
.cal-weekly-schedule {
  padding: 60px 0;
  background: #fff;
}

.cal-weekly-schedule-heading {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  color: #0d4f8b;
  margin-bottom: 10px;
}

.cal-weekly-schedule-subtitle {
  text-align: center;
  font-size: 14px;
  color: #666;
  font-style: italic;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cal-schedule-table-wrapper {
  margin-bottom: 50px;
}

.cal-schedule-table-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 5px;
}

.cal-schedule-table-subtitle {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #0d4f8b;
  margin-bottom: 25px;
}

.cal-schedule-tables {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 40px;
}

.cal-schedule-week-wrapper {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #d3d3d3;
}

.cal-schedule-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0;
}

.cal-schedule-table th,
.cal-schedule-table td {
  border: 1px solid #d3d3d3;
  text-align: center;
  padding: 15px 10px;
  vertical-align: middle;
  line-height: 1.5;
  font-size: 13px;
}

.cal-schedule-table th:first-child,
.cal-schedule-table td:first-child {
  border-left: none;
}
.cal-schedule-table th:last-child,
.cal-schedule-table td:last-child {
  border-right: none;
}
.cal-schedule-header-row th {
  border-top: none;
}
.cal-schedule-data-row td {
  border-bottom: none;
}

.cal-schedule-header-row th {
  background-color: #e0e0e0;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 14px;
}

.cal-schedule-data-row td {
  background-color: #fff;
  color: #333;
}

.cal-schedule-week-col {
  width: 14%; 
}

.cal-schedule-divider {
  border: 0;
  border-top: 1px solid #d3d3d3;
  margin: 15px auto;
  width: 85%;
}

.cal-weekly-schedule-footnote {
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: #666;
  margin-top: 10px;
}

/* ----- Instruction Formats ----- */
.cal-instruction-formats {
  background-color: #0d4f8b;
  padding: 70px 0;
  color: #fff;
}

.cal-instruction-formats-heading {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 40px;
}

.cal-instruction-formats-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.cal-instruction-formats-card {
  background: #fff;
  border-radius: 10px;
  padding: 35px 30px;
  color: #1a1a1a;
}

.cal-instruction-formats-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #01508d;
  margin-bottom: 12px;
}

.cal-instruction-formats-card hr {
  border: none;
  border-top: 2px solid #0d4f8b;
  margin-bottom: 20px;
}

.cal-instruction-formats-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cal-instruction-formats-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.4;
  color: #333;
}

.cal-instruction-formats-card li svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.cal-instruction-formats-footnote {
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 30px;
  font-weight: 500;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .cal-start-dates-intro h2 {
    font-size: 26px;
  }
  
  .img-text-rep h2 {
    font-size: 26px;
  }

  .cal-start-dates-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px 0;
  }

  .cal-start-dates-item:not(:nth-child(5n)) {
    border-right: none;
  }

  .cal-start-dates-item:not(:nth-child(2n)) {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
  }

  .cal-start-dates-title {
    font-size: 22px;
  }

  .cal-instruction-formats-cards {
    grid-template-columns: 1fr;
  }

  .cal-schedule-week-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .cal-schedule-table {
    min-width: 650px;
  }

  .cal-schedule-table th,
  .cal-schedule-table td {
    padding: 10px 5px;
  }

  .cal-weekly-schedule-heading {
    font-size: 26px;
  }
  
  .cal-schedule-table-title {
    font-size: 22px;
  }

  .cal-instruction-formats-heading {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .cal-start-dates-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cal-start-dates-item span {
    font-size: 12px;
  }
}
