/* index.css — page-specific styles for index.html
   Relies on tokens from css/styles.css:
   --primary, --primary-hover, --accent, --white, --gutter
*/

/* ======================================
   Divider
====================================== */
.section-divider {
  height: 1px;
  border: 0;
  margin: 16px 0;
  background: linear-gradient(90deg, transparent, rgba(0,63,99,.18), transparent);
}

/* ======================================
   Schools selector (no-JS <details>)
====================================== */
.schools-strip { padding: 8px 0 0; }

.schools-nav { position: relative; display: inline-block; }
.schools-trigger {
  list-style: none;
  display: inline-block;
  cursor: pointer;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  user-select: none;
  border: 1px solid rgba(255,255,255,.35);
  color: var(--white);
  background: transparent;
}
.schools-trigger:hover { background: rgba(255,255,255,.12); }
.schools-trigger:focus { outline: 2px solid rgba(0,63,99,.35); outline-offset: 2px; }
.schools-trigger::-webkit-details-marker { display: none; }

.schools-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, 92vw);
  background: #fff;
  color: #0b1f2e;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  border: 1px solid rgba(0,63,99,.12);
  padding: 12px;
  z-index: 2000;
  display: none;
}
.schools-nav[open] .schools-panel { display: block; }

.schools-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow: auto;
}
.schools-list li { border-radius: 6px; }
.schools-list a {
  display: block;
  padding: 8px 10px;
  text-decoration: none;
  color: #123;
}
.schools-list a:hover { background: #f1f6fa; color: var(--primary); }
.schools-list .all-schools a {
  font-weight: 700;
  border-top: 1px solid #e6edf3;
  margin-top: 6px;
}

/* Light variant (when used on light bg) */
.schools-light .schools-trigger {
  color: var(--accent);
  border: 1px solid rgba(0,63,99,.35);
  background: #fff;
}
.schools-light .schools-trigger:hover { background: #f1f6fa; }
.schools-light .schools-panel { right: auto; left: 0; }

@media (max-width: 768px) {
  .schools-panel {
    right: auto;
    left: 0;
    width: calc(100vw - 2 * var(--gutter));
  }
}

/* ======================================
   Media Split (copy + video launcher)
====================================== */
.media-split { padding: 16px 0 8px; }
.media-split .container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.split-card {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  background: var(--white);
  border: 1px solid rgba(0,63,99,.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
@media (min-width: 920px) {
  .split-card { grid-template-columns: 1fr 1fr; }
  .media-split.reverse .media { order: 2; }
  .media-split.reverse .copy  { order: 1; }
}

/* Video launcher */
.video-launcher {
  width: 100%;
  min-height: 220px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  border-radius: 14px;
  border: 2px dashed rgba(0,91,143,.25);
  background: linear-gradient(180deg, #f1f7fb, #e7f1f8);
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.video-launcher:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.07);
  border-color: rgba(0,91,143,.45);
}
.video-launcher:active { transform: translateY(0); }
.video-launcher .play-icon {
  font-size: 28px;
  line-height: 1;
  background: var(--primary);
  color: #fff;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0,91,143,.3);
}
.video-launcher .label { font-size: 1.05rem; }

/* Copy column */
.copy h2 { margin: .2rem 0 .4rem; color: var(--accent); }
.copy p  { margin: .4rem 0; color: #223245; }
.copy ul { margin: .4rem 0 .6rem 1rem; color: #223245; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(0,91,143,.2);
  color: var(--primary);
  background: #fff;
}
.btn-inline.primary {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}
.btn-inline:hover { filter: brightness(1.06); }

/* ======================================
   Video Modal (lightbox)
====================================== */
.video-modal { position: fixed; inset: 0; display: none; z-index: 9999; }
.video-modal[aria-hidden="false"] { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.modal-content {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(920px, 92vw);
  background: #fff; border-radius: 16px; padding: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.modal-video { width: 100%; height: auto; border-radius: 12px; background: #000; display: block; }
.modal-close {
  position: absolute; top: 6px; right: 10px;
  font-size: 22px; line-height: 1;
  border: 0; background: transparent; cursor: pointer; color: #1b3a4f;
}
.modal-caption { margin: .5rem 0 0; color: #5c7fa3; font-size: .92rem; }

/* ======================================
   Services Section
====================================== */
.services { background: var(--white); padding: .25rem 0; }
.services h2 {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.75rem;
  text-align: center;
}

.service-card {
  background: var(--white);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}
.service-card-content {
  display: flex;
  align-items: flex-start;
  gap: var(--gutter);
  flex-wrap: wrap;
}
.service-image-wrapper {
  width: 200px; height: 160px;
  border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.service-image-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; }

.service-card-content h3 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.25rem;
}
.service-card-content p  { margin-bottom: 0.5rem; }
.service-card-content ul {
  margin: 0.5rem 0 1rem 1.25rem;
  list-style: disc;
}

/* CTA buttons (cards) */
.cta-button,
.more-info-button {
  background-color: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  margin-right: 0.5rem;
  margin-top: 0.5rem;
  transition: background-color 0.2s;
}
.cta-button:hover,
.more-info-button:hover { background-color: var(--primary-hover); }

/* ======================================
   Testimonials (above footer)
====================================== */
.testimonials {
  background: #f6f9fb;
  border-top: 1px solid rgba(0,63,99,.08);
  padding: 2.5rem 0;
}
.testimonials-title {
  color: var(--accent);
  font-size: 1.75rem;
  line-height: 1.2;
  text-align: center;
  margin: 0 0 1.25rem;
}

.testimonial-carousel {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  min-height: 150px; /* avoids layout jump during fade */
}
.testimonial {
  opacity: 0;
  transform: translateY(6px);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  margin: 0;
  transition: opacity .5s ease, transform .5s ease;
  text-align: center;
  padding: .25rem 0;
}
.testimonial.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}
.t-quote {
  margin: 0 0 .5rem;
  color: #243a4b;
  font-size: 1.12rem;
  line-height: 1.6;
  font-weight: 500;
}
.t-meta { color: var(--primary); font-weight: 600; font-size: .95rem; }

.t-dots {
  display: flex; gap: 8px; justify-content: center; margin-top: 12px;
}
.t-dot {
  width: 8px; height: 8px; border-radius: 999px; border: 0;
  background: rgba(0,63,99,.25);
  cursor: pointer;
}
.t-dot.is-active { background: var(--primary); }

/* --- FIX: keep service card content side-by-side on desktop --- */
.service-card-content {
  flex-wrap: nowrap;                 /* stop wrapping on wide screens */
  align-items: center;               /* nicer vertical alignment */
}

/* Lock the image column size */
.service-card-content .service-image-wrapper {
  flex: 0 0 200px;                   /* fixed column width = image width */
  width: 200px;                      /* (keeps layout consistent) */
  height: 160px;
}

/* Make the text column fill the remaining space */
.service-card-content > div:nth-child(2) {
  flex: 1 1 520px;                   /* take the rest of the row */
  min-width: 320px;                  /* prevents awkward squish */
}

/* Keep your mobile/tablet stacking exactly as before */
@media (max-width: 1024px) {
  .service-card-content { flex-direction: column; flex-wrap: wrap; }
  .service-card-content .service-image-wrapper { width: 200px; margin: 0 auto 1rem; }
  .service-card-content > div:nth-child(2) { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial { transition: none; }
}

/* ======================================
   Responsive Tweaks
====================================== */
@media (max-width: 1024px) {
  .service-card-content { flex-direction: column; }
  .service-image-wrapper { margin: 0 auto 1rem; }
}
@media (max-width: 920px) {
  .video-launcher { min-height: 180px; }
}
@media (max-width: 768px) {
  .services { padding: 1rem 0; }
  .services h2 { font-size: 1.5rem; }
  .service-card { background: var(--white) !important; }
  .service-card-content { flex-direction: column; }
  .service-image-wrapper { margin: 0 auto 1rem; }
  .cta-button, .more-info-button {
    display: block !important;
    margin: 0.75rem auto 0;
    text-align: center;
  }
}

