/* www.cmapaa.ca — the site's own header and footer, for the pages that are not
 * part of the React app (/register, /costing, /team, the area pages).
 *
 * The values are lifted from the compiled bundle's Tailwind classes, so these
 * pages read as the same site rather than as something bolted on:
 *   header  bg-white, sticky top-0, shadow-2xl, links text-blue-500,
 *           hover:bg-lime-500
 *   footer  bg-gradient-to-b from-[#1d4ed8] via-[#1e40af] to-[#1d4ed8],
 *           white text, brand + COURSES + LINKS columns with underlined heads
 *
 * Lives in /area-assets/ and NOT /assets/, because a Vite rebuild wipes /assets.
 */

:root {
  --site-blue: #3b82f6;   /* tailwind blue-500  — nav text            */
  --site-blue-600: #1d4ed8;
  --site-blue-700: #1e40af;
  --site-lime: #84cc16;   /* tailwind lime-500  — hover               */
  --site-ink: #0f172a;
}

/* ------------------------------------------------------------- header -- */

.site-head {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}

.site-head-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.site-brand img {
  height: 4rem;
  width: 4rem;
  object-fit: contain;
}

.site-brand span {
  font-family: Montserrat, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: var(--site-blue);
  line-height: 1.15;
}

@media (min-width: 768px) {
  .site-brand img { height: 7rem; width: 7rem; }
  .site-brand span { font-size: 1.5rem; }
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .1rem;
}

.site-nav a,
.site-nav .site-drop > button {
  font: inherit;
  font-size: .8rem;
  font-weight: 500;
  color: var(--site-blue);
  background: none;
  border: 0;
  padding: .5rem .8rem;
  border-radius: .375rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav .site-drop > button:hover,
.site-nav .site-drop:hover > button {
  background: var(--site-lime);
  color: #fff;
}

.site-nav a.site-current {
  background: #eff6ff;
}

/* dropdowns — CSS only, opened on hover and on keyboard focus */

.site-drop { position: relative; }

.site-menu {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 13rem;
  background: #fff;
  border-radius: .5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .18);
  padding: .5rem 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
}

.site-drop:hover .site-menu,
.site-drop:focus-within .site-menu {
  opacity: 1;
  visibility: visible;
}

.site-menu a {
  display: block;
  border-radius: 0;
  padding: .5rem 1rem;
  font-size: .85rem;
}

.site-nav a.site-cta {
  margin-left: .5rem;
  padding: .5rem 1.2rem;
  font-weight: 700;
  border: 1px solid #dbeafe;
}

/* On a phone the dropdowns would be unusable, so the menu becomes a plain
   wrapped row of every link — the same colours, no hidden state. */
@media (max-width: 900px) {
  .site-head-wrap { flex-wrap: wrap; padding-bottom: .5rem; }
  .site-nav { width: 100%; justify-content: flex-start; }
  .site-drop { position: static; }
  .site-drop > button { display: none; }
  .site-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
  }
  .site-menu a { padding: .5rem .8rem; border-radius: .375rem; }
}

/* ------------------------------------------------------------- footer -- */

.site-foot {
  background: linear-gradient(to bottom, var(--site-blue-600), var(--site-blue-700), var(--site-blue-600));
  color: #fff;
  margin-top: 3rem;
  padding: 2.5rem 0 1rem;
  font-family: Montserrat, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { color: #d1d5db; }

.site-foot-wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .site-foot-wrap { grid-template-columns: 1fr 2fr; }
}

.site-foot-brand h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.site-foot-brand p {
  font-size: .875rem;
  line-height: 1.7;
  margin: 0 0 .75rem;
}

.site-foot-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .site-foot-cols { grid-template-columns: 1fr 1fr; }
}

.site-foot-cols h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid #fff;
}

.site-foot-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem 1rem;
  font-size: .875rem;
}

.site-foot-areas,
.site-foot-legal {
  max-width: 72rem;
  margin: 1.5rem auto 0;
  padding: 0 1rem;
  font-size: .8rem;
}

.site-foot-legal {
  border-top: 1px solid rgba(255, 255, 255, .35);
  padding-top: .9rem;
  margin-top: 1.25rem;
}

/* ------------------------------------------------- defensive overrides --
 * Both pages carry their own stylesheet with bare-element rules written when
 * they had their own chrome — `footer { text-align:center; font-size:.78rem }`
 * on /register, `footer { background: var(--navy) }` on /costing. An element
 * selector loses to a class only for properties the class actually declares,
 * so the ones that would otherwise leak through are pinned here.
 */

.site-head,
.site-foot {
  text-align: left;
  font-size: 1rem;
  line-height: 1.5;
}

.site-foot { padding: 2.5rem 0 1rem; }

.site-foot ul { list-style: none; }

.site-head a,
.site-foot a { text-decoration: none; }
