/* =========================================================
   Technoknowledge: layout.css
   Containers, sections, grids, header (nav + mega menu +
   mobile menu) and footer.
   ========================================================= */

/* ---- container & sections ---- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(860px + var(--gutter) * 2); }

.section { padding-block: var(--section-space); }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--navy); color: #DCE3EE; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--tight { padding-block: calc(var(--section-space) * 0.6); }

.section-head { max-width: 720px; margin-bottom: var(--space-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: var(--space-3); }
.section-head p { margin-top: var(--space-4); color: var(--text-muted); font-size: var(--fs-lg); }
.section--navy .section-head p { color: #B9C4D6; }

/* ---- grids ---- */
.grid { display: grid; gap: var(--space-5); }
@media (min-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid { gap: var(--space-6); }
}
.split { display: grid; gap: var(--space-7); align-items: center; }
@media (min-width: 1100px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .split--reverse > :first-child { order: 2; }
}
.stack > * + * { margin-top: var(--space-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* =========================================================
   HEADER
   ========================================================= */

/* ---- main header bar (navy) ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy); /* no backdrop-filter: it would break the fixed mobile menu */
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med), box-shadow var(--t-med), background var(--t-med);
}
.site-header.is-scrolled { background: var(--navy-dark); border-bottom-color: rgba(255, 255, 255, 0.08); box-shadow: 0 8px 24px rgba(8, 18, 36, 0.35); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.brand { display: inline-flex; flex: none; align-items: center; }
.brand img { height: 32px; width: auto; }
@media (min-width: 1100px) { .brand img { height: 40px; } }

/* ---- desktop nav ---- */
.nav { display: none; margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 2px; list-style: none; padding: 0; }
.nav__item { position: relative; }
.nav__link, .nav__toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-family: var(--font-heading); font-size: 0.9375rem; font-weight: 600;
  color: #fff; text-decoration: none; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav__link:hover, .nav__toggle:hover, .nav__item.is-open > .nav__toggle { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav__toggle svg { width: 14px; height: 14px; transition: transform var(--t-med) var(--ease); }
.nav__item.is-open > .nav__toggle svg { transform: rotate(180deg); }
.nav__link[aria-current="page"], .nav__item.is-current > .nav__toggle { color: var(--yellow); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-actions .btn--primary { display: none; }
.header-chat {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1.5px solid rgba(255, 255, 255, 0.35); color: #fff; transition: all var(--t-fast);
}
.header-chat:hover { border-color: var(--yellow); color: var(--yellow); }
.header-chat svg { width: 20px; height: 20px; }
@media (max-width: 639px) { .header-chat { display: none; } } /* phones use the floating WhatsApp button */

@media (min-width: 1100px) {
  .nav { display: block; }
  .header-actions { margin-left: 16px; }
  .header-actions .btn--primary { display: inline-flex; }
}

/* ---- dropdown panels ---- */
.dropdown {
  position: absolute; top: calc(100% + 10px); left: 50%;
  translate: -50% 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 10px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med);
  z-index: 10;
}
.dropdown::before { content: ""; position: absolute; inset: -12px 0 auto 0; height: 12px; } /* hover bridge */
.nav__item.is-open > .dropdown,
.no-js .nav__item:hover > .dropdown,
.no-js .nav__item:focus-within > .dropdown {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s;
}
.dropdown--simple { min-width: 240px; }
.dropdown--mega { width: min(860px, calc(100vw - 48px)); display: grid; grid-template-columns: 1fr 268px; gap: 10px; }
.dropdown--mega.dropdown--students { width: min(640px, calc(100vw - 48px)); grid-template-columns: 1fr 250px; }
.dropdown--schools { left: 0; translate: -18% 0; }

.dropdown__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 6px; align-content: start; }
.dropdown--students .dropdown__grid { grid-template-columns: 1fr; }
.dropdown__label { grid-column: 1 / -1; padding: 8px 12px 6px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-soft); }

.menu-card {
  display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: start;
  padding: 12px; border-radius: var(--radius-md); text-decoration: none; color: var(--text);
  transition: background var(--t-fast);
}
.menu-card:hover { background: var(--bg-soft); color: var(--text); }
.menu-card:hover .menu-card__icon { transform: translateY(-2px); }
.menu-card[aria-current="page"] { background: var(--yellow-soft); }
.menu-card__icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy-soft); color: var(--navy); transition: transform var(--t-med) var(--ease);
}
.menu-card__icon svg { width: 22px; height: 22px; }
.menu-card__icon--yellow { background: var(--yellow-soft); color: #8A6A00; }
.menu-card__icon--sky { background: var(--sky-soft); color: #00709F; }
.menu-card__icon--green { background: var(--green-soft); color: var(--green); }
.menu-card__icon--orange { background: var(--orange-soft); color: #B33A00; }
.menu-card__title { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 0.9375rem; color: var(--navy); line-height: 1.3; }
.menu-card__desc { display: block; margin-top: 3px; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-muted); }

.dropdown__promo {
  border-radius: var(--radius-md); padding: 22px; background: var(--navy); color: #C9D3E3;
  display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden;
}
.dropdown__promo::after {
  content: ""; position: absolute; right: -56px; top: -56px; width: 150px; height: 150px;
  border-radius: 50%; border: 22px solid rgba(255, 212, 0, 0.16);
}
.dropdown__promo h3 { color: #fff; font-size: 1.0625rem; line-height: 1.35; }
.dropdown__promo p { font-size: var(--fs-xs); line-height: 1.55; }
.dropdown__promo .btn { margin-top: auto; align-self: flex-start; position: relative; z-index: 1; }
.dropdown__promo-tag { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--yellow); }

.dropdown__links { list-style: none; padding: 0; }
.dropdown__links a {
  display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--navy); text-decoration: none; font-weight: 600; font-size: var(--fs-sm);
}
.dropdown__links a:hover { background: var(--bg-soft); }
.dropdown__links a::after { content: "→"; opacity: 0; transform: translateX(-4px); transition: all var(--t-fast); color: var(--blue); }
.dropdown__links a:hover::after { opacity: 1; transform: none; }
/* the page you are on: highlighted with a small "You're here" tag */
.dropdown__links a[aria-current="page"] { background: var(--yellow-soft); }
.dropdown__links a[aria-current="page"]::after { content: "You\2019re here"; opacity: 1; transform: none; font-size: 0.75rem; font-weight: 700; color: #6E5500; }
.mobile-nav__sub a.simple[aria-current="page"] { background: var(--yellow-soft); }

/* ---- mobile menu button ---- */
.menu-button {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.35); background: transparent; color: #fff;
}
.menu-button svg { width: 22px; height: 22px; }
.menu-button .icon-close { display: none; }
.menu-button[aria-expanded="true"] .icon-open { display: none; }
.menu-button[aria-expanded="true"] .icon-close { display: block; }
@media (min-width: 1100px) { .menu-button { display: none; } }

/* ---- mobile drawer ---- */
.mobile-nav {
  position: fixed; inset: var(--menu-top, var(--header-h)) 0 0 0; z-index: 99;
  background: #fff; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px var(--gutter) 32px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med);
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s; }
body.menu-open { overflow: hidden; }
@media (min-width: 1100px) { .mobile-nav { display: none; } }

.mobile-nav__group { border-bottom: 1px solid var(--border); }
.mobile-nav__group > summary, .mobile-nav__link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 4px; list-style: none; cursor: pointer;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.0625rem; color: var(--navy); text-decoration: none;
}
.mobile-nav__group > summary::-webkit-details-marker { display: none; }
.mobile-nav__group > summary svg { width: 18px; height: 18px; transition: transform var(--t-med) var(--ease); }
.mobile-nav__group[open] > summary svg { transform: rotate(180deg); }
.mobile-nav__link { border-bottom: 1px solid var(--border); }
.mobile-nav__sub { list-style: none; padding: 0 0 14px; display: grid; gap: 2px; }
.mobile-nav__sub .menu-card { padding: 10px 8px; }
.mobile-nav__sub a.simple { display: block; padding: 10px 8px; color: var(--text); text-decoration: none; font-weight: 600; border-radius: var(--radius-sm); }
.mobile-nav__sub a.simple:hover { background: var(--bg-soft); }
.mobile-nav__actions { display: grid; gap: 10px; margin-top: 24px; }
.mobile-nav__contact { margin-top: 24px; padding: 18px; border-radius: var(--radius-md); background: var(--bg-soft); font-size: var(--fs-sm); display: grid; gap: 10px; }
.mobile-nav__contact a { color: var(--navy); font-weight: 700; text-decoration: none; display: flex; gap: 10px; align-items: center; }
.mobile-nav__contact svg { width: 18px; height: 18px; color: var(--blue); }

/* Without JavaScript, the mobile drawer shows as a plain list under the header */
.no-js .mobile-nav { position: static; opacity: 1; visibility: visible; transform: none; display: block; }
.no-js .menu-button { display: none; }
@media (min-width: 1100px) { .no-js .mobile-nav { display: none; } }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--navy); color: #B9C4D6; font-size: var(--fs-sm); position: relative; overflow: hidden; }
.site-footer::before { content: ""; display: block; height: 5px; background: linear-gradient(90deg, var(--yellow) 0 34%, var(--sky) 34% 67%, var(--orange) 67% 100%); }
.site-footer a { color: #DCE3EE; text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }

.footer-main { display: grid; gap: 40px; padding-block: 64px 48px; }
@media (min-width: 640px) { .footer-main { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .footer-main { grid-template-columns: 1.35fr 1fr 1fr 1.25fr; gap: 48px; } }

.footer-brand img { height: 40px; width: auto; }
.footer-brand p { margin-top: 18px; max-width: 320px; line-height: 1.7; }
.footer-tagline { font-family: var(--font-heading); font-weight: 700; color: #fff; font-size: 1.0625rem; margin-top: 20px; }
.footer-tagline span { color: var(--yellow); }

.footer-col h2 { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 10px; }

.footer-contact { display: grid; gap: 14px; }
.footer-contact li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; }
.footer-contact svg { width: 18px; height: 18px; color: var(--yellow); margin-top: 3px; }

.social { display: flex; gap: 10px; margin-top: 24px; list-style: none; padding: 0; }
.social a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); color: #fff; transition: background var(--t-fast), color var(--t-fast);
}
.social a:hover { background: var(--yellow); color: var(--navy); }
.social svg { width: 18px; height: 18px; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-block: 22px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: var(--fs-xs); color: #8E9BB2; }
.footer-bottom ul { display: flex; gap: 20px; list-style: none; padding: 0; }
.footer-bottom a { color: #B9C4D6; }
