* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* CONTAINER */

main .container {
  max-width: min(1580px, calc(100% - 40px));
  margin: 0 auto;
}

/* SECTIONS */

.section {
  padding: 80px 0;
}

.section-alt {
  background-color: #f8fafc;
}

.section-blue {
  background-color: #1d79c3;
  color: #fff;
}
.section-blue h2 {
  color: #fff;
}

/* HERO */

.hero {
  padding: 100px 0 80px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1d79c3;
}

/* TYPOGRAPHY */

main h1,
main h2,
main h3 {
  line-height: 1.2;
  margin-top: 0;
  font-weight: bold;
  color: #1a2f5c;
}

main h1 {
  max-width: 800px;
  margin-bottom: 20px;
  font-size: clamp(36px, 5vw, 62px);
}

main h2 {
  margin-bottom: 20px;
  font-size: clamp(28px, 4vw, 52px);
}

main h3 {
  margin-bottom: 12px;
  font-size: clamp(22px, 3vw, 40px);
}
main .pathway-card h3 {
  font-size: clamp(28px, 4vw, 40px);
}

main h4 {
  font-size: clamp(18px, 3vw, 26px);
}

main p {
  margin-top: 0;
  margin-bottom: 16px;
}

/* HERO TEXT */

.hero-text {
  max-width: 720px;
  font-size: 18px;
}

/* SECTION LEAD */

.section-lead {
  max-width: 1300px;
  font-size: 18px;
}

/* BUTTONS */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 1.75rem;
  justify-content: start;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.75rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

main .btn:focus-visible {
  outline: 3px solid #1d79c3;
  outline-offset: 3px;
}

main .btn-primary {
  background-color: #1d79c3;
  color: #ffffff;
  border-color: #1d79c3;
}

main .btn-primary:hover {
  background-color: #1d79c3;
  border-color: #1d79c3;
  transform: translateY(-1px);
}

main .btn-secondary {
  background-color: #ffffff;
  color: #1d79c3;
  border-color: #1d79c3;
}

main .btn-secondary:hover {
  background-color: #1d79c3;
  border-color: #94a3b8;
  color: #ffffff;
  transform: translateY(-1px);
}

/* ICONS */

main .icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background-color: #eef4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

main .icon i {
  color: #1d79c3;
  font-size: 22px;
}

/* GRIDS */

.pathway-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pathway-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.pathway-card {
  position: relative;
  height: 100%;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  border: 1px solid #e5e7eb;
}
.pathway-card-link:hover .pathway-card {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  border-color: #dbe7ff;
}
.pathway-card-link:hover .pathway-card::after {
  transform: translateY(4px);
}

.pathway-card-link:focus-visible {
  outline: none;
}

.pathway-card-link:focus-visible .pathway-card {
  outline: 3px solid rgba(52, 84, 209, 0.25);
  outline-offset: 4px;
}
.card-body strong {
  font-weight: bold;
}
.card-body .age {
  font-size: 1.5rem;
}

.articles article {
  border: 1px solid #1d79c3;
  border-radius: 16px;
  height: 100%;
}

.articles article a {
  display: block;
  height: 100%;
  color: #1a2f5c;
}

.articles article h3 {
  color: #1d79c3;
}

/* CARDS */

.card {
  padding: 24px;
  background-color: #ffffff;
}
.igcse-structure-grid .card {
  padding: 0;
}
.card-head.card {
  color: #fff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}
.card-head.card h3 {
  margin: 0;
  color: #fff;
}
.text-white {
  color: #fff;
}
.bg-primary-dark {
  background-color: #1a2f5c !important;
}
.bg-primary {
  background-color: #1d79c3 !important;
}
.bg-green {
  background-color: #66bd59 !important;
}
.bg-orange {
  background-color: #f16c32 !important;
}
.bg-pink {
  background-color: #ee3164 !important;
}

.benefit-card .content strong p {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
}

/* TABLES */

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 6px;
  color: #fff;
}

th,
td {
  padding: 16px;
  text-align: left;
}

/* LOCATIONS TABLE */
.locations-table thead th {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}
.locations-table {
  font-size: 1.25rem;
}
table.locations-table a {
  color: inherit;
  text-decoration: underline;
}
.locations-table th,
.locations-table td {
  padding: 25px;
}
.locations-table th {
  text-align: center;
  background-color: #1a2f5c;
}

.locations-table td {
  text-align: center;
  font-weight: 500;
  background-color: #1d79c3;
}

.locations-table td:first-child,
.locations-table th:first-child {
  text-align: left;
  font-weight: 600;
}

.location-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.location-header span {
  font-size: 13px;
  font-weight: 500;
}

.locations-table .mokotow-column {
  font-weight: 700;
}

/* SHARED STAGE SECTIONS */

.stage-intro {
  max-width: 1300px;
  font-size: 17px;
  line-height: 1.7;
}

.stage-accordion {
  display: grid;
  gap: 20px;
  margin-bottom: 40px;
}

.stage-item {
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

#primary .stage-item {
  border: 1px solid #1d79c3;
}

#lower-secondary .stage-item {
  border: 1px solid #66bd59;
}

#igcse .stage-item {
  border: 1px solid #f16c32;
}

#alevels .stage-item {
  border: 1px solid #ee3164;
}
#lower-secondary .accordion-icon {
  color: #66bd59;
}
#igcse .accordion-icon {
  color: #f16c32;
}

#alevels .accordion-icon {
  color: #ee3164;
}

#primary .subject-item h4,
#primary .extras-info h4,
#articles h2 {
  color: #1d79c3;
}

#lower-secondary .subject-item h4,
#lower-secondary .extras-info h4 {
  color: #66bd59;
}

#igcse .subject-item h4,
#igcse .extras-info h4 {
  color: #f16c32;
}

#alevels .subject-item h4,
#alevels .extras-info h4 {
  color: #ee3164;
}

.extras-info h4 {
  font-weight: 600;
}

.stage-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  cursor: pointer;
}

.stage-item summary::-webkit-details-marker {
  display: none;
}

.stage-item summary h3 {
  margin-bottom: 8px;
  font-weight: 400;
}

.stage-item summary p {
  margin-bottom: 0;
  color: #475569;
}

.accordion-icon {
  flex-shrink: 0;
  color: #1d79c3;
  font-size: 3rem;
  transition: transform 0.2s ease;
}

.news-icon {
  color: #1d79c3;
  font-size: 1.25rem;
  margin-right: 5px;
}

.stage-item[open] .accordion-icon {
  transform: rotate(180deg);
}

.stage-content {
  padding: 0 24px 24px;
  border-top: 1px solid #e5e7eb;
}

.stage-extras h3 {
  margin-bottom: 20px;
}

.subject-item {
  padding: 20px 0;
  border-bottom: 1px solid #e5e7eb;
}

.subject-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.subject-item h4 {
  margin: 0 0 8px;
  font-size: 1.75rem;
}

.subject-item p {
  margin-bottom: 0;
}

.igcse-structure {
  margin-bottom: 40px;
}

.igcse-structure h3 {
  margin-bottom: 20px;
}

.igcse-structure-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.igcse-structure-grid h4 {
  display: inline-block;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 1.25rem 1.5rem;
  background: #c2c3c3;
}

.igcse-structure-grid .card:has(.igcse-structure-list) h4 {
  margin-bottom: 2px;
}

.igcse-structure-list {
  display: block;
}

.igcse-structure-grid .igcse-structure-row span {
  background-color: #c2c3c3;
  padding: 1rem 1.125rem;
  height: 100%;
}

.igcse-structure-grid .igcse-structure-row strong {
  background-color: #f16c32;
  padding: 1rem 1.125rem;
  height: 100%;
  color: #fff;
}

.igcse-structure-grid .igcse-structure-row:nth-child(2n + 2) strong {
  background-color: #d95e29;
}

.igcse-structure-row {
  display: grid;
  grid-template-columns: 224px 1fr;
  align-items: start;
  padding: 2px 0px;
  font-size: 1.125rem;
  font-weight: 600;
}

.igcse-structure-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.igcse-structure-row strong {
  line-height: 1.4;
}

.igcse-structure-row span {
  color: #475569;
  line-height: 1.5;
}

.igcse-note {
  margin-top: 20px;
  margin-bottom: 0;
  font-size: 14px;
}

table.igcse-hours-table {
  border-spacing: 0;
  -webkit-border-vertical-spacing: 4px;
}

.igcse-hours-table td strong {
  margin-bottom: 1rem;
  display: inline-block;
}

.igcse-hours-table th,
.igcse-hours-table td {
  vertical-align: top;
}

.igcse-hours-table th:first-child,
.igcse-hours-table td:first-child {
  width: 46%;
}

.igcse-hours-table th:nth-child(2),
.igcse-hours-table td:nth-child(2),
.igcse-hours-table th:nth-child(3),
.igcse-hours-table td:nth-child(3) {
  width: 27%;
}

.igcse-hours-table thead {
  background-color: #f16c32;
}
.igcse-hours-table tbody tr td {
  background-color: #c2c3c3;
  color: #1a2f5c;
}
.igcse-hours-table tbody tr td:first-of-type {
  background-color: #f16c32;
  color: #fff;
}

.future h3 {
  color: #fff;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

/* SHARED EXTRA INFO BLOCKS */

.extras-info-grid {
  display: grid;
  gap: 20px;
}

.info-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.info-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background-color: #eef4ff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-icon i {
  color: #1d79c3;
  font-size: 22px;
}

.info-card h4 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.info-card p {
  margin-bottom: 0;
}

/* CONTACT */

.contact {
  text-align: center;
}

.contact p {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .hero {
    padding: 80px 0 64px;
  }
}

@media (max-width: 640px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .container {
    max-width: min(1320px, calc(100% - 24px));
  }

  .stage-item summary {
    padding: 20px;
  }

  .stage-content {
    padding: 0 20px 20px;
  }

  .info-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .igcse-structure-grid {
    display: block;
  }
}

@media (max-width: 640px) {
  .igcse-structure-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (min-width: 992px) {
  .igcse-structure-grid .card {
    padding: 24px;
  }
  .card-head.card {
    min-height: 144px;
  }
  .igcse-structure-row {
    font-size: 1.5rem;
  }
  .igcse-structure-grid .igcse-structure-row strong,
  .igcse-structure-grid .igcse-structure-row span {
    padding: 1.25rem 1.5rem;
  }
  .igcse-structure-list {
    display: grid;
  }
  .card-body .age {
    font-size: 1.75rem;
  }
  table.locations-table {
    font-size: 1.75rem;
  }
  .pathway-grid {
    position: relative;
  }
  .pathway-grid::before {
    width: 77%;
    content: "";
    position: absolute;
    top: 17px;
    overflow: hidden;
    height: 2rem;
    left: 0;
    right: 0;
    margin: auto;
    background-image: radial-gradient(circle, #c2c3c3 5px, transparent 5px);
    background-size: 30px 10px;
    background-repeat: repeat-x;
  }
  .pathway-card::before {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 30px;
    top: -40px;
    margin: auto;
    left: 0;
    right: 0;
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease,
      border-color 0.2s ease;
  }
  .pathway-card-link:hover .pathway-card::before {
    transform: translateY(-8px);
  }
  .pathway-card-link:not(:last-of-type) .pathway-card::after {
    content: "\f054";
    font-weight: bolder;
    font-family: "Font Awesome 6 Free";
    position: absolute;
    top: -27px;
    font-size: 3.25rem;
    right: -30px;
    line-height: 0;
    color: #c2c3c3;
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease,
      border-color 0.2s ease;
  }

  .pathway-card:has(.bg-primary)::before {
    background-color: #1d79c3;
  }
  .pathway-card:has(.bg-green)::before {
    background-color: #66bd59;
  }
  .pathway-card:has(.bg-orange)::before {
    background-color: #f16c32;
  }
  .pathway-card:has(.bg-pink)::before {
    background-color: #ee3164;
  }
}
