/* ui.css — hand-authored UI styling layered over site.css (loaded after it).
   Sections: nav hover underline (Task 9), contact modal (Task 11), footer hover (Task 12). */

/* === nav: animated underline on the three text links (not the boxed Book Trial) === */
.nav-bar-link {
  position: relative;
  text-decoration: none;
}
.nav-bar-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 160ms ease;
}
.nav-bar-link:hover::after,
.nav-bar-link:focus-visible::after {
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  .nav-bar-link::after { transition: none; }
}

/* === mobile nav: text links in the dropdown menu === */
.mob-nav-link {
  display: block;
  padding: 10px 0;
  font-size: 18px;
  font-weight: 500;
}

/* === contact modal === */
.contact-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 14, 16, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
  z-index: 1000;
}
.contact-modal.is-open { opacity: 1; visibility: visible; }
.contact-modal__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  transform: translateY(12px) scale(0.98);
  transition: transform 180ms ease;
  font-family: Inter, system-ui, sans-serif;
}
.contact-modal.is-open .contact-modal__panel { transform: translateY(0) scale(1); }
.contact-modal__close {
  position: absolute; top: 12px; right: 14px;
  border: 0; background: transparent; cursor: pointer;
  font-size: 28px; line-height: 1; color: #6b6b6b;
}
.contact-modal__close:hover { color: #111; }
.contact-modal__title { margin: 0 0 6px; font-size: 24px; font-weight: 700; color: #111; }
.contact-modal__sub { margin: 0 0 20px; font-size: 14px; color: #5b5b5b; }
.contact-modal__rows { display: flex; flex-direction: column; gap: 12px; }
.contact-modal__row {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px; border: 1px solid #e4e4e4; border-radius: 12px;
  text-decoration: none; color: #111;
  transition: border-color 140ms ease, background 140ms ease;
}
.contact-modal__row:hover { border-color: #15b86a; background: rgba(21, 184, 106, 0.06); }
.contact-modal__label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #15b86a; }
.contact-modal__value { font-size: 17px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .contact-modal, .contact-modal__panel { transition: none; }
}

/* === footer: remove hover effects on everything except the phone number === */
/* The only active footer hover in site.css is .footer-link:hover { font-weight: 500 }
   (Privacy policy / Enrolment Terms links). The old JS-driven link-underline slide animation
   is already dead (no ix2 runtime). We also suppress transitions on all other footer links
   as a defensive measure against any browser default or future additions. */
.footer a:not(.footer-phone),
.footer a:not(.footer-phone) *,
.footer .footer-link,
.footer .link-block-7,
.footer .link-block-8,
.footer .link-block-10,
.footer .link-block-11,
.footer .link-block-2,
.footer .subj-link-text {
  transition: none !important;
}

.footer a:not(.footer-phone):hover,
.footer a:not(.footer-phone):hover *,
.footer .link-block-7:hover,
.footer .link-block-8:hover,
.footer .link-block-10:hover,
.footer .link-block-11:hover,
.footer .link-block-2:hover,
.footer .subj-link-text:hover {
  color: inherit !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Neutralise the font-weight bump on the privacy/terms links on hover.
   We do NOT set text-decoration here — those links have a permanent base underline
   from .footer-link.underline { text-decoration: underline } and we must not flicker it. */
.footer .footer-link:hover {
  font-weight: inherit !important;
}

/* Keep the phone number's hover lively.
   !important overrides the transition:none!important on the named link-block classes above
   (the phone anchor carries both .link-block-8/.link-block-2 AND .footer-phone). */
.footer .footer-phone {
  transition: opacity 140ms ease, color 140ms ease !important;
}
.footer .footer-phone:hover,
.footer .footer-phone:hover * {
  opacity: .7;
}
