/* Extras for the static SAP pages. Everything else comes from the site's
   compiled Tailwind file (/_next/static/css/3be280e2f7e5feba.css). */

/* Utilities not present in the compiled Tailwind file */
.mb-6 { margin-bottom: calc(var(--spacing) * 6); }
.pb-20 { padding-bottom: calc(var(--spacing) * 20); }
.max-w-5xl { max-width: var(--container-5xl, 64rem); }
.h-\[140px\] { height: 140px; }
.w-\[140px\] { width: 140px; }
@media (min-width: 48rem) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:text-\[17px\] { font-size: 17px; }
}

/* Header dropdown (vanilla replacement for the Headless UI menu) */
.sap-dropdown-btn { opacity: .5; }
.sap-dropdown-primary .sap-dropdown-btn,
.sap-dropdown-btn:hover, .sap-dropdown.open .sap-dropdown-btn { opacity: 1; }
.sap-dropdown-panel { display: none; }
.sap-dropdown.open > .sap-dropdown-panel { display: block; }
@media (hover: hover) and (min-width: 64rem) {
  .sap-dropdown.sap-hover:hover > .sap-dropdown-panel { display: block; }
}
.sap-subpanel { display: none; }
.sap-panel {
  -webkit-backdrop-filter: blur(80px);
  backdrop-filter: blur(80px);
  /* near-opaque: nested backdrop-filter doesn't blur, so the site's
     rgba(255,255,255,.1) submenu is unreadable over the hero heading */
  background-color: rgba(8, 34, 81, .97);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}
.sap-dropdown.open > .sap-dropdown-panel { display: block; }
.sap-sub-btn { background: none; border: 0; font: inherit; text-align: left; white-space: nowrap; }
.sap-sub-btn:hover, .sap-sub.open > .sap-sub-btn { background-color: rgba(255, 255, 255, .1); }
.sap-sub.open > .sap-subpanel { display: block; }
@media (hover: hover) {
  .sap-sub:hover > .sap-subpanel { display: block; }
}
.sap-dropdown a:focus-visible, .sap-dropdown button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

/* Secondary (outline) hero button */
.sap-btn-outline { transition: background-color .2s; }
.sap-btn-outline:hover { background-color: rgba(255, 255, 255, .12); }

/* Course cards on /sap/ */
.sap-card { transition: transform .25s ease, box-shadow .25s ease; }
.sap-card:hover { transform: translateY(-4px); }
.sap-card:hover .sap-card-link { text-decoration: underline; }

/* Numbered project markers */
.sap-num {
  flex: 0 0 42px; height: 42px; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  background: #e5bd30; color: #082251; font-weight: 700; font-size: 18px;
}

/* FAQ accordion (<details>) */
.sap-faq > summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 56px 22px 24px;
}
.sap-faq > summary::-webkit-details-marker { display: none; }
.sap-faq > summary::after {
  content: "+"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  font-size: 28px; font-weight: 400; color: #082251; line-height: 1;
}
.sap-faq[open] > summary::after { content: "\2212"; }
.sap-faq > p { padding: 0 24px 22px; margin-top: -6px; }

/* Enquiry modal */
.sap-modal[hidden], .sap-form-success[hidden], .sap-form-wrap[hidden], .sap-form-error[hidden] { display: none; }
.sap-form input:focus { outline: 2px solid #082251; outline-offset: 1px; }
.sap-form-error { color: #b91c1c; }
body.sap-modal-open { overflow: hidden; }

/* Scroll-in animation; only hides content when JS is running */
.sap-js .sap-reveal { opacity: 0; transform: translateY(40px); transition: opacity .7s ease-out, transform .7s ease-out; }
.sap-js .sap-reveal.is-in { opacity: 1; transform: none; }
.sap-js .sap-header { opacity: 0; transform: translateY(-40px); transition: opacity .5s ease-out, transform .5s ease-out; }
.sap-js .sap-header.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .sap-js .sap-reveal, .sap-js .sap-header { opacity: 1; transform: none; transition: none; }
  .sap-card, .sap-card:hover { transition: none; transform: none; }
}

/* Submenus open to the left: "Other Courses" sits near the right edge */
.sap-subpanel { left: auto; right: 100%; }

/* Spam trap field: hidden from people, visible to bots */
.sap-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Contact page */
.w-\[40px\] { width: 40px; }
@media (min-width: 64rem) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sap-form textarea { resize: vertical; font: inherit; }
.sap-form textarea:focus, .sap-form select:focus { outline: 2px solid #082251; outline-offset: 1px; }

/* 768-1279px: six-item nav doesn't fit, use the hamburger menu (same rule as the Next.js pages) */
@media (min-width: 768px) and (max-width: 1279px) {
  .upw-navgroup { display: none !important; }
  .upw-burger { display: block !important; }
}
