/* ==========================================================================
   The Canadian Drone Institute — static rebuild of thecanadiandroneinstitute.com
   Palette + type sourced from the live BeTheme site (see build notes).
   ========================================================================== */

:root {
  --gold: #e1b123;
  --gold-dark: #b88e18;
  --blue: #0089f7;
  --heading: #161922;
  --text: #000000;
  --text-secondary: #444444;
  --bg: #ffffff;
  --bg-alt: #f2f5f9;
  --bg-dark: #000000;
  --footer-bg: #161922;
  --border: #e2e5ea;
  --container: 1220px;
  --header-h: 90px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 28px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
p, a { overflow-wrap: break-word; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4, h5 {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 500;
  color: var(--heading);
  margin: 0 0 16px;
  line-height: 1.25;
}
h1 { font-size: 50px; line-height: 60px; }
h2 { font-size: 40px; line-height: 50px; }
h3 { font-size: 30px; font-weight: 400; line-height: 40px; }
h4 { font-size: 20px; font-weight: 600; line-height: 30px; }
p { margin: 0 0 16px; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* NOTE: an IntersectionObserver-driven "fade up on scroll" for .reveal sections
   was tried here and removed. On longer pages (e.g. /courses/) the observer did
   not reliably fire for every section during fast/instant scrolling (flick
   scroll, anchor-jump navigation, or scripted scrollTo), which left real
   marketing copy sitting at opacity:0 — unacceptable for a page whose job is to
   be read. Content visibility must never depend on a scroll callback firing at
   the right time, so `.reveal` is intentionally a no-op marker class now. */

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 16.5px;
  letter-spacing: .02em;
  text-transform: none;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease-in-out, color .15s ease-in-out, border-color .15s ease-in-out;
}
.btn-gold {
  background-color: var(--gold);
  color: #000;
}
.btn-gold:hover, .btn-gold:focus-visible {
  background-color: var(--gold-dark);
  color: #000;
}
.btn-outline {
  background: transparent;
  border-color: #fff;
  color: #fff;
}
.btn-outline:hover { background: #fff; color: #000; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */

#site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: #fff;
  border-bottom: 1px solid transparent;
}
#site-header.is-scrolled {
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}
.logo img { height: 60px; width: auto; }
.logo { flex-shrink: 0; }

nav#primary-nav { flex: 1; display: flex; justify-content: flex-end; }
.menu-main {
  display: flex;
  align-items: center;
  gap: 4px;
}
.menu-main > li { position: relative; }
.menu-main > li > a {
  display: block;
  padding: 15px 16px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 16.5px;
  letter-spacing: .03em;
  text-decoration: none;
  color: var(--heading);
  transition: color .15s ease;
}
.menu-main > li > a:hover,
.menu-main > li.current > a,
.menu-main > li:hover > a {
  color: var(--gold);
}
.menu-main .subtext {
  color: #cc0000;
  font-size: .72em;
  display: block;
  margin-top: 2px;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-top: 3px solid var(--gold);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 50;
}
.menu-main > li.has-children:hover > .sub-menu,
.menu-main > li.has-children:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.sub-menu > li > a {
  display: block;
  padding: 10px 22px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .85rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--heading);
  white-space: nowrap;
}
.sub-menu > li > a:hover { color: var(--gold); background: var(--bg-alt); }

.top-bar-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.action-phone {
  display: inline-block;
  background: var(--gold);
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 15px;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 0;
  white-space: nowrap;
  transition: background-color .15s ease;
}
.action-phone:hover { background: var(--gold-dark); }

.search-toggle, .menu-toggle {
  background: none; border: none; cursor: pointer; padding: 8px;
  color: var(--heading); line-height: 0;
}
.search-toggle svg, .menu-toggle svg { width: 22px; height: 22px; }

.header-search {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 16px rgba(0,0,0,.08);
  padding: 16px 24px;
}
.header-search.is-open { display: block; }
.header-search form { max-width: var(--container); margin: 0 auto; display: flex; gap: 8px; }
.header-search input[type="search"] {
  flex: 1; padding: 12px 14px; border: 1px solid var(--border); border-radius: 0; font-size: 1rem;
  font-family: inherit;
}
.header-search button { white-space: nowrap; }

.menu-toggle { display: none; }

@media (max-width: 1023px) {
  .menu-toggle { display: block; }
  nav#primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    display: block;
    justify-content: initial;
    transform: translateX(100%);
    transition: transform .25s ease;
    overflow-y: auto;
    padding: 12px 0 40px;
    z-index: 400;
  }
  .js nav#primary-nav { transform: translateX(100%); }
  .js nav#primary-nav.is-open { transform: translateX(0); }
  .no-js nav#primary-nav { position: static; transform: none; box-shadow: none; padding: 0; }
  .menu-main { flex-direction: column; align-items: stretch; gap: 0; }
  .menu-main > li { border-bottom: 1px solid var(--border); }
  .menu-main > li > a { padding: 16px 24px; }
  .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border-top: none; background: var(--bg-alt); display: none; padding: 0;
  }
  .menu-main > li.has-children.is-expanded > .sub-menu { display: block; }
  .sub-menu > li > a { padding: 12px 24px 12px 40px; }
  .submenu-toggle {
    position: absolute; right: 0; top: 0; height: 100%; width: 56px;
    background: none; border: none; cursor: pointer;
  }
  .top-bar-actions .action-phone { display: none; }
}

@media (min-width: 1024px) {
  .submenu-toggle { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  height: 48vw;
  max-height: 600px;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000 center/cover no-repeat;
  isolation: isolate;
}
.hero video, .hero .hero-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 1;
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  color: #fff;
  padding: 0 24px;
  max-width: 1040px;
}
/* Hero title/subtitle typography + sizing mirrors the live RevSlider layers
   exactly (layer data-text/data-dim attributes read post-init at 1440px):
   title Oswald 700 80px/80px white, divider = the title's own border-bottom
   (4px solid #fff) with 45px padding-bottom so it hugs the rendered title
   width (not the full hero width) - hence display:inline-block on a
   text-align:center parent. Subtitle Open Sans 300 40px/40px, 35px below.
   Fonts are loaded homepage-only (see index.html <head>) and scoped to
   these two classes only - the rest of the site stays Arial. */
.hero-title {
  display: inline-block;
  font-family: 'Oswald', Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 80px;
  line-height: 80px;
  color: #fff;
  margin: 0;
  border-bottom: 4px solid #fff;
  padding-bottom: 45px;
  opacity: 0;
  animation: heroFadeUp .9s ease .15s forwards;
}
.hero-title .accent { color: var(--gold); }
.hero-subtitle {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-weight: 300;
  letter-spacing: 0;
  font-size: 40px;
  line-height: 40px;
  color: #fff;
  margin: 35px 0 0;
  opacity: 0;
  animation: heroFadeUp .9s ease .5s forwards;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  display: block;
  width: 74px; height: 74px;
  background: transparent; border: none; cursor: pointer; padding: 0;
}
.hero-scroll img { width: 74px; height: 74px; animation: bounce 1.8s ease-in-out infinite; }
/* Mobile hero type scale - live RevSlider's 4th (mobile) responsive
   breakpoint value for each layer (data-text "s:80,80,80,52" etc.), not a
   flat "half size" guess. */
@media (max-width: 767px) {
  .hero-title { font-size: 52px; line-height: 60px; padding-bottom: 15px; }
  .hero-subtitle { font-size: 30px; line-height: 33px; letter-spacing: .02em; margin-top: 20px; }
  .hero-scroll, .hero-scroll img { width: 28px; height: 28px; }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}
@media (max-width: 767px) {
  .hero { height: 94vw; max-height: 450px; min-height: 380px; }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section, .section-tight { padding: 80px 0 40px; }
.section-tight { padding: 60px 0 40px; }
.bg-alt { background: var(--bg-alt); }
.bg-white { background: var(--bg); }
.bg-dark { background: var(--bg-dark); color: #fff; }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: #fff; }

.section-divider {
  height: 3px; width: 50px; background: var(--gold); border: none; margin: 0 0 20px;
}
.section-divider.center { margin: 0 auto 20px; }

.two-col {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 48px;
  align-items: center;
}
/* .reverse only changes the column-width ratio (40:60 instead of 60:40) — it does NOT
   reorder the DOM. Every "reverse" section's markup already puts col-media first, so
   natural source order plus this ratio renders image (narrow, left) / text (wide, right).
   An earlier `order: 2` override here used to force col-media visually AFTER col-text,
   which put text on the left and the image on the right — backwards vs. the live site. */
.two-col.reverse { grid-template-columns: 2fr 3fr; }
.two-col .col-media img { border-radius: 0; }
/* BeTheme's page-builder columns each carry their own 40px trailing margin
   (".column{margin:0 1% 40px}" in the source theme) that our flatter
   two-col grid doesn't reproduce structurally - approximate it so section
   heights land close to the live page instead of running short. */
.container.two-col { padding-bottom: 40px; }
/* A plain text block that follows a two-col row (or stands alone as its own
   "column") in the source page-builder markup - same trailing-margin logic. */
.container.text-block { padding-bottom: 40px; }
/* Home "Our Courses" intro: the source page splits this into TWO stacked
   page-builder columns (heading+divider, then the paragraphs), so it
   carries two of BeTheme's 40px column margins instead of one. */
.col-text.text-center { padding-bottom: 50px; }

/* Page-specific supplements: the generic 40px "column trailing margin"
   approximation above isn't enough for every one of these unique
   page-builder blocks (longer copy, extra nested columns, etc.) - bump
   the ones the diff harness still flags past 5% individually rather than
   inflating the shared rule (which would push already-passing pages, like
   the homepage's "why different" section, back out of tolerance). */
#sfoc .container.two-col { padding-bottom: 80px; }
#transport .container.two-col { padding-bottom: 90px; }
#basic .container.two-col { padding-bottom: 100px; }
#non-canadian .container.text-block { padding-bottom: 110px; }
/* Contact page's embedded form: live's CF7 markup carries more generous
   row/input spacing than our compact defaults. */
#contact .form-row { margin-bottom: 50px; }
#contact .cf7-form { margin-top: 40px; }
.container.sfoc-hero { padding-bottom: 100px; }
.container.contact-details-hero { padding-bottom: 100px; }
.container.cert-hero { padding-bottom: 90px; }

@media (max-width: 900px) {
  .two-col, .two-col.reverse { grid-template-columns: 1fr; }
}

.text-center { text-align: center; }
.lede { font-size: 1.05rem; }

.hero-gold-tag { width: 50px; margin-bottom: 8px; }

/* "Why Is CDI Different?" section: live's "Our Courses" button lives in the
   SAME right-hand column as the circular photo (BeTheme two-fifth wrap),
   centered below it - not left-aligned under the text column. Verified
   directly against the live DOM (button rect sits in the right half of the
   1440px viewport, centered under the photo). */
.col-media-cta { text-align: center; margin-top: 70px; }

/* ==========================================================================
   Course grid ("zoom box" cards)
   ========================================================================== */

.course-intro { text-align: center; padding: 16px 0 60px; }

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 24px;
}
.course-grid.two-col-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
.course-grid.two-col-grid .course-card { padding-bottom: 110px; }
.course-card { text-align: center; padding-bottom: 42px; }
.zoom-box {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  margin: 0 0 40px;
  display: block;
  text-decoration: none;
}
.zoom-box img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.zoom-box .zoom-desc {
  position: absolute; inset: 0;
  background: rgba(204,204,204,.86);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px;
  opacity: 0; transition: opacity .25s ease;
}
.zoom-box:hover img { transform: scale(1.08); }
.zoom-box:hover .zoom-desc { opacity: 1; }
.zoom-box .zoom-desc img { width: 40%; height: auto; object-fit: contain; }
.zoom-box .zoom-desc span { color: #000; font-family: Arial, Helvetica, sans-serif; font-weight: 700; }
.course-card h4 { margin-bottom: 15px; }
.course-card h3 { margin-bottom: 0; }
.course-card h3 a, .course-card h4 a { color: inherit; text-decoration: underline; }

/* ==========================================================================
   Topic lists (course pages)
   ========================================================================== */

.topic-list { margin: 0 0 30px; }
.topic-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.topic-list li:last-child { border-bottom: none; }
.topic-list b { color: var(--heading); margin-right: 6px; }
.feature-list { margin: 0 0 20px; }
.feature-list li { padding: 5px 0; color: var(--text-secondary); position: relative; padding-left: 22px; }
.feature-list li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.ordered-steps { counter-reset: step; margin: 0 0 60px; }
.ordered-steps li {
  counter-increment: step;
  padding: 28px 0 28px 40px;
  position: relative;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.ordered-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 26px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: #000;
  display: flex; align-items: center; justify-content: center;
  font-family: Arial, Helvetica, sans-serif; font-weight: 700; font-size: .85rem;
}

/* ==========================================================================
   About page — bio blocks
   ========================================================================== */

.bio-block {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 36px;
  align-items: flex-start;
  padding-bottom: 120px;
}
.bio-block .bio-photo img {
  border-radius: 0;
  aspect-ratio: 1/1;
  object-fit: cover;
}
.bio-block h2, .bio-block h1 { margin-bottom: 4px; }
.bio-block h3 { margin-bottom: 18px; }
@media (max-width: 700px) {
  .bio-block { grid-template-columns: 110px 1fr; gap: 20px; }
}

/* ==========================================================================
   Client logos carousel
   ========================================================================== */

/* Live's carousel is a slick-driven set of square gold (#e1b123) prev/next
   controls (~45x40px, dark chevrons) right-aligned above a full-width strip
   of client logo tiles on a light-gray background (verified via live DOM
   measurement: nav rect x=1217-1317 i.e. flush with the container's right
   edge, y sits above the logo row). We step with native scrollBy() instead
   of reimplementing slick - real controls, no fake pagination state. */
.clients-carousel-head {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 16px;
}
.clients-nav {
  width: 48px;
  height: 48px;
  border: none;
  background: var(--gold);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background-color .15s ease;
}
.clients-nav:hover, .clients-nav:focus-visible { background: var(--gold-dark); }
.clients-nav svg { width: 20px; height: 20px; }
/* No JS: hide the (inert) step controls but keep the row itself reachable -
   .clients-viewport already has overflow-x:auto below, so the logos stay
   visible and scrollable by touch/trackpad/scrollbar without any script. */
.no-js .clients-carousel-head { display: none; }

.clients-viewport {
  overflow-x: auto;
  scroll-behavior: smooth;
  background: rgba(0, 0, 0, .03);
  padding: 28px 20px;
}
.clients-track {
  display: flex;
  align-items: center;
  gap: 16px;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}
.client-tile {
  flex-shrink: 0;
  width: 220px;
  height: 110px;
  background: #fff;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.client-tile img { width: auto; height: auto; max-width: 150px; max-height: 75px; object-fit: contain; }
@media (max-width: 640px) {
  .client-tile { width: 160px; height: 90px; }
  .client-tile img { max-width: 110px; max-height: 55px; }
}

/* ==========================================================================
   Contact / info blocks
   ========================================================================== */

.contact-detail { margin-bottom: 8px; }
.contact-detail a { text-decoration: underline; }
.social-inline { display: flex; gap: 16px; justify-content: center; margin-top: 12px; }
.social-inline a { color: var(--heading); }
.social-inline svg { width: 26px; height: 26px; }

/* Home page "Contact Us" / "Our Clients" stacked blocks. */
#contact { padding-bottom: 0; }
.contact-stack { text-align: center; max-width: 640px; margin: 0 auto 40px; }
/* The gold divider tag is a block-level <img> (global img rule sets
   display:block) sitting inside a text-align:center parent - text-align
   alone does not center a block element, it needs its own auto margins.
   This was the actual cause of the "left-aligned divider" bug. */
.contact-stack .hero-gold-tag { margin-left: auto; margin-right: auto; }
/* Phone/Email rows: live renders these as an <h3> (30px/#161922, matching
   this site's global h3 rule) with the "Phone"/"Email" label in <strong>
   and a small inline icon ahead of it - noticeably bigger/bolder than this
   replica's previous plain 20px paragraph. */
/* Live stacks the icon+label on its own line, then the phone/email VALUE
   centered on the line below (verified via live screenshot) - not a single
   inline row - with a generous gap between the Phone block and the Email
   block below it. */
.contact-stack .contact-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 30px;
  line-height: 40px;
  font-weight: 400;
  color: var(--heading);
  margin: 0 0 40px;
}
.contact-stack .contact-line:last-child { margin-bottom: 0; }
.contact-stack .contact-line-label { display: inline-flex; align-items: center; gap: 10px; }
.contact-stack .contact-line strong { font-weight: 700; }
.contact-icon { width: 26px; height: 26px; flex-shrink: 0; color: var(--heading); }
@media (max-width: 480px) {
  .contact-stack .contact-line { font-size: 22px; line-height: 30px; }
  .contact-icon { width: 20px; height: 20px; }
}
/* The second, smaller "Contact Us" repeat (h3/h4 on live vs h2/h3 for the
   first one) right before the client logos - this one IS a single inline
   row per live (icon + "Phone: value" all on one line). */
.contact-stack-compact { margin-top: -8px; }
.contact-stack .contact-line.compact {
  flex-direction: row;
  gap: 10px;
  font-size: 20px;
  line-height: 30px;
  font-weight: 600;
  margin: 0 0 6px;
}
.contact-stack .contact-line.compact .contact-icon { width: 20px; height: 20px; }

/* ==========================================================================
   Forms
   ========================================================================== */

.cf7-form { max-width: 640px; }
.cf7-form.full-width { max-width: none; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.two-col { grid-template-columns: 1fr 1fr; }
.cf7-form input[type="text"],
.cf7-form input[type="email"],
.cf7-form input[type="tel"],
.cf7-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 0;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  transition: border-color .15s ease;
}
.cf7-form input:focus, .cf7-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.cf7-form textarea { resize: vertical; min-height: 130px; }
.form-msg {
  margin-top: 14px; padding: 12px 16px; border-radius: 3px; font-size: .95rem; display: none;
}
.form-msg.is-visible { display: block; }
.form-msg.success { background: #e9f8ee; color: #1c6b34; border: 1px solid #bfe8cd; }
.form-msg.error { background: #fdecec; color: #a3221f; border: 1px solid #f5c2c0; }
.form-msg a { color: inherit; font-weight: 700; }
@media (max-width: 640px) {
  .form-row.two-col { grid-template-columns: 1fr; }
}

/* Popup / modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,12,16,.65);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-overlay.is-open { display: flex; }
.modal-box {
  background: #fff; border-radius: 6px; max-width: 520px; width: 100%;
  padding: 40px 32px 32px; position: relative; max-height: 90vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; background: none; border: none;
  cursor: pointer; width: 32px; height: 32px; color: var(--heading);
}
.modal-close svg { width: 20px; height: 20px; }
.modal-box h3 { margin-bottom: 8px; }
.modal-box .lede { margin-bottom: 20px; color: var(--text-secondary); }

/* ==========================================================================
   Footer
   ========================================================================== */

#site-footer { background: var(--footer-bg); color: #fff; padding: 56px 0 32px; text-align: center; }
.back-to-top {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  color: #fff; text-decoration: none; margin-bottom: 24px;
}
.back-to-top svg { width: 20px; height: 20px; }
.footer-contact p { color: #fff; margin-bottom: 6px; }
.footer-contact a { color: #fff; text-decoration: underline; }
.footer-copyright { color: rgba(255,255,255,.6); font-size: .85rem; margin-top: 18px; }
.footer-powered { color: rgba(255,255,255,.45); font-size: .8rem; margin-top: 8px; }
.footer-powered a { color: var(--gold); text-decoration: none; }
.footer-powered a:hover { text-decoration: underline; }
.footer-social { display: flex; justify-content: center; gap: 18px; margin-top: 20px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: #000; }
.footer-social svg { width: 18px; height: 18px; }

/* ==========================================================================
   Blog
   ========================================================================== */

.blog-card { background: #fff; }
.blog-card .card-img { display: block; border-radius: 4px; overflow: hidden; margin-bottom: 14px; aspect-ratio: 3/2; }
.blog-card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.blog-card:hover .card-img img { transform: scale(1.05); }
.blog-card .card-date { font-size: .8rem; color: var(--gold); font-family: Arial, Helvetica, sans-serif; letter-spacing: .04em; margin-bottom: 8px; text-transform: uppercase; }
.blog-card h4 { margin-bottom: 10px; }
.blog-card h4 a { text-decoration: none; }
.blog-card h4 a:hover { color: var(--gold); }
.blog-card .card-excerpt { font-size: .95rem; margin-bottom: 12px; }
.blog-card .read-more {
  font-family: Arial, Helvetica, sans-serif; font-weight: 600; font-size: .85rem;
  color: var(--heading); text-decoration: none; border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}

@media (max-width: 900px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .course-grid { grid-template-columns: 1fr; }
}

/* -- Blog / category index: full-width post list (matches live's BeTheme
   ".posts_group" template exactly - NOT a card grid). Verified against the
   live DOM (Playwright getBoundingClientRect on /blog/, 1440 viewport):
   image column ~37% / body column ~63% (be.css .post-photo-wrapper 37% /
   .post-desc-wrapper 63%), image keeps its own intrinsic aspect ratio (not
   cropped), row height = the taller of the two columns, title is a 20px/600
   h4 (already this site's global h4 rule), and the "Read more" footer bar is
   a light rgba(0,0,0,.02) strip spanning the body column's width. */
.blog-filter-section { padding: 24px 0 0; }
.blog-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 18px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.blog-filter-label {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-right: 4px;
}
.blog-filter-triggers { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.blog-filter-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font-family: Arial, Helvetica, sans-serif; font-size: .95rem; color: var(--heading);
  text-decoration: none;
}
.blog-filter-trigger:hover { color: var(--gold); }
.blog-filter-trigger svg { width: 16px; height: 16px; flex-shrink: 0; }
.blog-filter-trigger .caret { width: 10px; height: 10px; margin-left: 2px; }
.blog-filter-reset {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: Arial, Helvetica, sans-serif; font-size: .95rem; color: var(--text-secondary);
  text-decoration: none;
}
.blog-filter-reset:hover { color: var(--gold); }
.blog-filter-reset svg { width: 14px; height: 14px; }
.blog-filter-dropdown {
  position: relative;
  display: inline-block;
}
.blog-filter-menu {
  display: none;
  position: absolute; left: 0; top: calc(100% + 10px);
  min-width: 220px; background: #fff; border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 8px 0; z-index: 40;
}
.blog-filter-dropdown.is-open .blog-filter-menu { display: block; }
.blog-filter-menu a, .blog-filter-menu span {
  display: block; padding: 8px 18px; font-size: .9rem; color: var(--heading);
  text-decoration: none;
}
.blog-filter-menu a:hover { background: var(--bg-alt); color: var(--gold); }
.blog-filter-menu span { color: var(--text-secondary); cursor: default; }
.no-js .blog-filter-menu { display: none !important; }

.post-list { display: flex; flex-direction: column; gap: 40px; }
.post-row {
  display: grid;
  grid-template-columns: 37% 1fr;
  gap: 0 30px;
  /* Live's row height is float-based: MAX(intrinsic image height, desc
     content height) - no cropping/stretching either way. Grid's default
     "stretch" on the body column (below) reproduces the second half of
     that (its own footer bar can then pin to the row's bottom edge via
     margin-top:auto); the image column opts out of stretch so it keeps its
     own natural aspect ratio instead of being pulled taller. */
}
.post-row-image { display: block; align-self: start; }
.post-row-image img { width: 100%; height: auto; display: block; }
.post-row-body { display: flex; flex-direction: column; min-height: 100%; }
.post-meta-row {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 8px 16px;
  font-size: .85rem; color: var(--text-secondary); margin-bottom: 10px;
}
.post-meta-row .author-date { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-meta-row svg { width: 14px; height: 14px; vertical-align: -2px; }
.post-meta-row .post-cat { display: inline-flex; align-items: center; gap: 4px; color: var(--text-secondary); }
.post-row-title { margin-bottom: 12px; }
.post-row-title a { text-decoration: none; }
.post-row-title a:hover { color: var(--gold); }
.post-row-excerpt { font-size: .95rem; margin-bottom: 16px; }
.post-row-footer {
  background: rgba(0, 0, 0, .02);
  padding: 10px 16px;
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}
.post-row-more {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: Arial, Helvetica, sans-serif; font-weight: 600; font-size: .85rem;
  color: var(--heading); text-decoration: none;
}
.post-row-more:hover { color: var(--gold); }
.post-row-more svg { width: 16px; height: 16px; }
.blog-pagination {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
}
.blog-pagination a {
  font-family: Arial, Helvetica, sans-serif; font-weight: 600; font-size: .9rem;
  color: var(--heading); text-decoration: none;
}
.blog-pagination a:hover { color: var(--gold); }

@media (max-width: 767px) {
  .post-row { grid-template-columns: 1fr; }
  .post-row-image { margin-bottom: 16px; }
  .blog-filter-bar { gap: 14px 20px; }
  .blog-filter-reset { margin-left: 0; }
}

/* Single post */
.post-header { padding-top: 30px; padding-bottom: 16px; text-align: center; }
.post-header h1 { margin-bottom: 0; }
.post-meta { font-size: .85rem; color: var(--text-secondary); margin-bottom: 14px; }
.post-meta .sep { margin: 0 8px; }
/* Live's post-header/content/featured-image columns are BeTheme
   ".column.one" elements: 98% width inside a 1220px section wrapper (~12px
   side margin each), not our site-wide .container's 24px side padding. Match
   it just for the post template so long-form body copy wraps the same way
   live does (a 24px-narrower column pushes several paragraphs onto an extra
   line each, inflating post-page height well past live's measurement). */
article .container { padding-left: 12px; padding-right: 12px; }
/* Verified against live (Playwright getBoundingClientRect + screenshots on
   both an image-post and a no-image-post, 2026-07-16): the featured image is
   NOT side-by-side with the title - BeTheme stacks it full-width below the
   title/meta column (both are ".column.one", i.e. both 98%-wide, so the
   second one always wraps to its own row). The image itself renders at its
   natural intrinsic size (never upscaled), centered, capped to the column
   width - not cropped/stretched to a fixed banner height. And on ~9 of the
   15 posts BeTheme's "no-img" post option hides the featured image from the
   header entirely (image markup is omitted for those posts' index.html). */
.post-featured-img { margin: 0 0 40px; text-align: center; }
.post-featured-img img { max-width: 100%; height: auto; display: inline-block; }
/* Live's post content column runs the full ~1196px container width (no
   narrow "readable column" treatment) - matching it, rather than the 760px
   we originally set, avoids extra text-wrapping that inflated post height
   well past the live page's actual measurement. */
.post-body { max-width: 100%; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4 { margin-top: 32px; }
.post-body p, .post-body li { color: var(--text-secondary); overflow-wrap: anywhere; }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 24px; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body a { color: var(--blue); text-decoration: underline; overflow-wrap: anywhere; }
.post-body figure { margin: 24px 0; }

.related-posts { padding: 60px 0 80px; background: var(--bg-alt); }
.related-posts h4.section-label {
  font-family: Arial, Helvetica, sans-serif; text-transform: uppercase; letter-spacing: .05em;
  text-align: center; margin-bottom: 36px; color: var(--heading);
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: var(--container); margin: 0 auto; }
@media (max-width: 900px) { .related-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Entrance animations (mined from live BeTheme page-builder blocks)
   ==========================================================================
   Live marks specific circular course/section photos with a page-builder
   "animate" module (data-anim-type) that flies them in on scroll -
   verified per-page against the harvested mirror (mirror/*.html), NOT
   guessed: the desktop layer always flies the RIGHT-hand photo in from the
   right (fadeInRight) and the LEFT-hand photo (the ".reverse" layout) in
   from the left (fadeInLeft); live's separate mobile-only markup for the
   same photos always uses fadeInDown instead (a stacked single column has
   no "side" to fly in from). Three "hero" blocks (sfoc-hero/cert-hero/
   contact-details-hero) are NOT marked as animated on live at all (their
   photo is already above the fold) - contact's hero is the one exception,
   animating ONLY in live's mobile markup, never on desktop.
   main.js (initEntranceAnimations) tags the qualifying elements with
   .anim-fly-right/-left/-down(-mobile-only) and only an IntersectionObserver
   adding .in-view triggers the animation below - elements are fully visible
   in every other state (no JS, reduced motion, observer never firing). */
.js .anim-fly-right.in-view { animation: flyInRight .8s ease both; }
.js .anim-fly-left.in-view { animation: flyInLeft .8s ease both; }
.js .anim-fly-down.in-view { animation: flyInDown .8s ease both; }
@keyframes flyInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes flyInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes flyInDown { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: translateY(0); } }
/* Mobile: live's stacked single-column markup always drops straight down,
   regardless of the desktop left/right direction. */
@media (max-width: 900px) {
  .js .anim-fly-right.in-view, .js .anim-fly-left.in-view { animation: flyInDown .8s ease both; }
  .js .anim-fly-down-mobile-only.in-view { animation: flyInDown .8s ease both; }
}
@media (prefers-reduced-motion: reduce) {
  .anim-fly-right, .anim-fly-left, .anim-fly-down, .anim-fly-down-mobile-only { animation: none !important; }
}

/* ==========================================================================
   Utility spacing
   ========================================================================== */

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
