/* ======= CSS VARIABLES ======= */
:root {
  --tmj-dark: #0f2e2a;
  --tmj-green: #153b37;
  --tmj-teal: #1a4f48;
  --tmj-light-teal: #2a6b62;
  --tmj-accent: #e8734a;
  --tmj-accent-hover: #d4623b;
  --tmj-text-light: #ffffff;
  --tmj-text-muted: #a8c5c0;
  --tmj-border: rgba(255,255,255,0.08);
  --tmj-dropdown-bg: #ffffff;
  --tmj-dropdown-text: #1a1a1a;
  --tmj-dropdown-muted: #5a6b68;
  --tmj-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 8px 20px rgba(0,0,0,0.1);
  --tmj-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --tmj-header-height: 72px;

  /* ── Z-index layer stack (ordered low→high) ──
     Super-headers (promo bars etc.) sit in normal flow and scroll away.
     They only need z-index above page content, not above the nav chrome.
     The sticky header covers them on scroll.
     The mobile overlay+menu sit on top of absolutely everything.         */
  --z-superheader:     100;     /* promo bar — scrolls away, below sticky header */
  --z-header:          99999;   /* sticky main nav — covers super-header on scroll */
  --z-mobile-overlay:  100000;  /* dark backdrop — covers header + super-header */
  --z-mobile-menu:     100001;  /* slide-in drawer — top of everything */
}

/* ======= PROMO SUPER-HEADER (infinite newsreel) ======= */
.tmj-promo-bar {
  display: block;
  position: relative;
  overflow: hidden;
  background: #ff8b3d;
  color: #fff !important;
  text-decoration: none !important;
  padding: 0;
  z-index: var(--z-superheader);
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.tmj-promo-bar:hover {
  background: #e97a2e;
  color: #fff !important;
  text-decoration: none !important;
}

/* The track holds 8 copies: first 4 + duplicate 4.
   translateX(-50%) shifts exactly 4 copies, then resets = seamless. */
.tmj-promo-track {
  display: flex;
  width: max-content;
  animation: tmj-ticker 28s linear infinite;
  will-change: transform;
}

.tmj-promo-bar:hover .tmj-promo-track {
  animation-play-state: paused;
}

.tmj-promo-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.tmj-promo-sep {
  display: inline-flex;
  align-items: center;
  padding: 9px 24px;
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

.tmj-promo-text .fa-fire {
  color: #fff;
  font-size: 14px;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.4));
  animation: tmj-fire-pulse 1s ease-in-out infinite alternate;
}

.tmj-promo-cta {
  display: inline-block;
  background: rgba(0,0,0,0.15);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-left: 10px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.tmj-promo-bar:hover .tmj-promo-cta {
  background: rgba(0,0,0,0.25);
}

@keyframes tmj-ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes tmj-fire-pulse {
  0%   { opacity: 0.8; transform: scale(1); }
  100% { opacity: 1;   transform: scale(1.12); }
}

/* Mobile: smaller promo text */
@media (max-width: 600px) {
  .tmj-promo-text {
    font-size: 11px;
  }
  .tmj-promo-sep {
    padding: 9px 16px;
  }
  .tmj-promo-cta {
    font-size: 10px;
    padding: 2px 8px;
  }
}

/* ======= HEADER WRAPPER ======= */
.tmj-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  width: 100%;
  background: var(--tmj-dark);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.tmj-header * { margin: 0; padding: 0; box-sizing: border-box; }
.tmj-header a { text-decoration: none; color: inherit; }

/* ======= MAIN NAV BAR ======= */
.tmj-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1600px;
  margin: 0 auto;
  padding: 12px 24px;
  height: var(--tmj-header-height);
}

/* ======= LOGO ======= */
.tmj-logo { flex-shrink: 0; display: flex; align-items: center; }
.tmj-logo img { height: 46px; width: auto; display: block; transition: opacity var(--tmj-transition); }
.tmj-logo:hover img { opacity: 0.85; }

/* ======= DESKTOP NAV ======= */
.tmj-nav-links {
  display: flex;
  align-items: stretch;
  gap: 2px;
  list-style: none;
  height: 100%;
}

.tmj-nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.tmj-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff !important;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border-radius: 6px;
  transition: background var(--tmj-transition), color var(--tmj-transition);
  cursor: pointer;
  text-decoration: none !important;
  height: 100%;
  border: none;
  background: none;
  font-family: inherit;
}

.tmj-nav-link:hover,
.tmj-nav-item.active .tmj-nav-link {
  background: rgba(255,255,255,0.07);
  color: #fff !important;
}

.tmj-nav-link .fa-chevron-down {
  font-size: 9px;
  opacity: 0.5;
  transition: transform var(--tmj-transition), opacity var(--tmj-transition);
}

.tmj-nav-item.active .tmj-nav-link .fa-chevron-down {
  transform: rotate(180deg);
  opacity: 0.8;
}

 /* Take a Course */
  .tmj-nav-tab--course .tmj-nav-link {
    background: var(--tmj-teal);
    color: #fff !important;
    border-radius: 0px 15px;
  }
  .tmj-nav-tab--course .tmj-nav-link:hover,
  .tmj-nav-tab--course.active .tmj-nav-link {
    background: var(--tmj-light-teal);
  }

  /* Contact — opposite diagonal corners */
  .tmj-nav-tab--contact .tmj-nav-link {
    background: var(--tmj-accent);
    color: #fff !important;
    border-radius: 15px 0px;
  }
  .tmj-nav-tab--contact .tmj-nav-link:hover {
    background: var(--tmj-accent-hover);
  }

  /* Remove gap between the two tabs */
  .tmj-nav-tab--course { margin-left: 10px; }
  .tmj-nav-tab--contact { margin-left: 0; gap: 0; }
  .tmj-nav-tab + .tmj-nav-tab { margin-left: 0; }

/* ======= FORCE WHITE on top-level nav links (override Divi/theme) ======= */
.tmj-header .tmj-nav-bar .tmj-nav-links > .tmj-nav-item > a.tmj-nav-link,
.tmj-header .tmj-nav-bar .tmj-nav-links > .tmj-nav-item > a.tmj-nav-link:link,
.tmj-header .tmj-nav-bar .tmj-nav-links > .tmj-nav-item > a.tmj-nav-link:visited,
.tmj-header .tmj-nav-bar .tmj-nav-links > .tmj-nav-item > a.tmj-nav-link:active,
.tmj-header .tmj-nav-bar .tmj-nav-links > .tmj-nav-item > button.tmj-nav-link {
  color: #ffffff !important;
  text-decoration: none !important;
}

.tmj-header .tmj-nav-bar .tmj-nav-links > .tmj-nav-item > a.tmj-nav-link:hover,
.tmj-header .tmj-nav-bar .tmj-nav-links > .tmj-nav-item.active > a.tmj-nav-link {
  color: #ffffff !important;
}

/* ======= DROPDOWN PANELS ======= */
.tmj-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--tmj-dropdown-bg);
  border-radius: 14px;
  box-shadow: var(--tmj-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  padding: 8px;
  min-width: 260px;
  border: 1px solid rgba(0,0,0,0.06);
}

.tmj-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 12px;
}

.tmj-nav-item.active .tmj-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.tmj-dropdown--wide { min-width: 580px; padding: 12px; }
.tmj-dropdown--courses { min-width: 340px; }

/* ======= DROPDOWN ITEMS ======= */
.tmj-dropdown-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--tmj-dropdown-text);
  transition: background var(--tmj-transition);
}

.tmj-dropdown-item:hover { background: #f0f7f6; }

.tmj-dropdown-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eef5f4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  color: var(--tmj-green);
  transition: background var(--tmj-transition);
}

.tmj-dropdown-item:hover .tmj-dropdown-icon { background: #dcecea; }

.tmj-dropdown-icon img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.tmj-dropdown-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--tmj-dropdown-text);
  line-height: 1.2;
}

.tmj-dropdown-desc {
  font-size: 12px;
  color: var(--tmj-dropdown-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.tmj-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.tmj-dropdown-divider {
  height: 1px;
  background: #eee;
  margin: 4px 8px;
}

/* Social in dropdown */
.tmj-dropdown-social {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  align-items: center;
}

.tmj-dropdown-social span {
  font-size: 12px;
  font-style: italic;
  color: var(--tmj-dropdown-muted);
}

.tmj-dropdown-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f0f0f0;
  font-size: 16px;
  transition: background var(--tmj-transition), transform var(--tmj-transition);
}

.tmj-dropdown-social a:hover { transform: translateY(-2px); }
.tmj-dropdown-social a.fb { color: #4460A0; }
.tmj-dropdown-social a.fb:hover { background: #e7ecf5; }
.tmj-dropdown-social a.ig { color: #E4405F; }
.tmj-dropdown-social a.ig:hover { background: #fce4ec; }
.tmj-dropdown-social a.yt { color: #FF0000; }
.tmj-dropdown-social a.yt:hover { background: #fce4e4; }

/* ======= HAMBURGER ======= */
.tmj-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background var(--tmj-transition);
}

.tmj-hamburger:hover { background: rgba(255,255,255,0.1); }

.tmj-hamburger-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.tmj-hamburger-lines span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

.tmj-hamburger-lines span:nth-child(2) { width: 18px; }
.tmj-hamburger-lines span:nth-child(3) { width: 14px; }

.tmj-hamburger.is-open .tmj-hamburger-lines span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tmj-hamburger.is-open .tmj-hamburger-lines span:nth-child(2) { opacity: 0; width: 24px; }
.tmj-hamburger.is-open .tmj-hamburger-lines span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 24px; }

/* ======= MOBILE OVERLAY ======= */
.tmj-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: var(--z-mobile-overlay);
  opacity: 0;
  pointer-events: none;          /* invisible = non-interactive */
  transition: opacity 0.3s ease;
}

.tmj-mobile-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;          /* visible = clickable to dismiss */
}

/* ======= MOBILE MENU ======= */
.tmj-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  background: var(--tmj-dark);
  z-index: var(--z-mobile-menu);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-overflow-scrolling: touch;
}

.tmj-mobile-menu.is-open { transform: translateX(0); }

.tmj-mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--tmj-border);
}

.tmj-mobile-menu-header img { height: 38px; }

.tmj-mobile-close {
  background: rgba(255,255,255,0.08);
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  transition: background var(--tmj-transition);
}

.tmj-mobile-close:hover { background: rgba(255,255,255,0.15); }

.tmj-mobile-nav {
  list-style: none;
  padding: 12px 12px 20px;
}

.tmj-mobile-nav-item { border-bottom: 1px solid var(--tmj-border); }
.tmj-mobile-nav-item:last-child { border-bottom: none; }

.tmj-mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--tmj-text-light);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
  border-radius: 8px;
  transition: background var(--tmj-transition);
}

.tmj-mobile-nav-link:hover { background: rgba(255,255,255,0.05); }

.tmj-mobile-nav-link .fa-chevron-down {
  font-size: 11px;
  opacity: 0.4;
  transition: transform 0.3s ease;
}

.tmj-mobile-nav-item.is-expanded .tmj-mobile-nav-link .fa-chevron-down {
  transform: rotate(180deg);
  opacity: 0.7;
}

.tmj-mobile-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.tmj-mobile-nav-item.is-expanded .tmj-mobile-sub { max-height: 800px; }

.tmj-mobile-sub-list {
  list-style: none;
  padding: 0 8px 12px 8px;
}

.tmj-mobile-sub-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--tmj-text-muted);
  border-radius: 8px;
  transition: background var(--tmj-transition), color var(--tmj-transition);
}

.tmj-mobile-sub-link:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.tmj-mobile-sub-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

/* Mobile CTA */
.tmj-mobile-cta {
  padding: 8px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tmj-mobile-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: background var(--tmj-transition);
}

.tmj-mobile-cta-primary { background: var(--tmj-accent) !important; color: #fff !important; }
.tmj-mobile-cta-primary:hover { background: var(--tmj-accent-hover) !important; }
.tmj-mobile-cta-secondary { background: rgba(255,255,255,0.08) !important; color: #fff !important; }
.tmj-mobile-cta-secondary:hover { background: rgba(255,255,255,0.14) !important; }

.tmj-mobile-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px 0 4px;
}

.tmj-mobile-social a {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  transition: background var(--tmj-transition);
}

.tmj-mobile-social a:hover { background: rgba(255,255,255,0.15); }

/* ======= RESPONSIVE ======= */
@media (max-width: 1100px) {
  .tmj-nav-links { display: none; }
  .tmj-hamburger { display: flex; }
  .tmj-mobile-menu, .tmj-mobile-overlay { display: block; }
}

@media (max-width: 480px) {
  .tmj-mobile-menu { max-width: 100%; }
  .tmj-logo img { height: 38px; }
  .tmj-nav-bar { padding: 0 16px; height: 64px; }
}

/* ======= HIDE DIVI DEFAULT HEADER ======= */
.et-l--header,
#main-header,
#top-header,
.et-fixed-header {
  display: none !important;
}

/* --- Mobile nav: split link + chevron toggle --- */
.tmj-mobile-nav-item[data-mobile-dropdown] > .tmj-mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0;
}

.tmj-mobile-nav-text {
  flex: 1;
  padding: 16px 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--tmj-text-light) !important;
  text-decoration: none !important;
  border-radius: 8px 0 0 8px;
  transition: background var(--tmj-transition);
}

.tmj-mobile-nav-text:hover {
  background: rgba(255,255,255,0.05);
  color: #fff !important;
}

.tmj-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  padding: 16px 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 0 8px 8px 0;
  transition: background var(--tmj-transition);
}

.tmj-mobile-toggle:hover {
  background: rgba(255,255,255,0.08);
}

.tmj-mobile-toggle .fa-chevron-down {
  font-size: 11px;
  color: var(--tmj-text-light);
  opacity: 0.4;
  transition: transform 0.3s ease;
}

.tmj-mobile-nav-item.is-expanded .tmj-mobile-toggle .fa-chevron-down {
  transform: rotate(180deg);
  opacity: 0.7;
}

/* --- Force white text on <a> nav links (override browser/theme defaults) --- */
a.tmj-nav-link,
a.tmj-nav-link:link,
a.tmj-nav-link:visited {
  color: #ffffff !important;
  text-decoration: none !important;
}

a.tmj-nav-link:hover,
.tmj-nav-item.active a.tmj-nav-link {
  color: #fff !important;
}

a.tmj-mobile-nav-text,
a.tmj-mobile-nav-text:link,
a.tmj-mobile-nav-text:visited {
  color: var(--tmj-text-light) !important;
  text-decoration: none !important;
}

a.tmj-mobile-nav-text:hover {
  color: #fff !important;
}

/* Fix mobile wrapper: remove padding/button resets when .tmj-mobile-nav-link is a div */
.tmj-mobile-nav-item[data-mobile-dropdown] > .tmj-mobile-nav-link {
  padding: 0;
  border: none;
  background: none;
}

/* ======= FIX: Carousel scroll trap ======= */
/* The Divi inline styles set overflow:auto + overscroll-behavior:contain
   on .ac-content and .ac-webinar-cards, trapping wheel/touch scroll
   events. On mobile, .ac-carousel itself gets overflow-y:auto which
   also traps touch scrolling. These !important overrides let scroll
   events pass through to the page. */

/* Desktop: remove overscroll containment so wheel events chain to body */
.ac-carousel .ac-content,
.ac-carousel .ac-webinar-scrollbox,
.ac-carousel .ac-webinar-cards {
  overscroll-behavior: auto !important;
}

/* Mobile: the carousel container itself has overflow-y:auto which
   creates a full-height scroll trap on touch devices. Since the
   carousel is height:auto on mobile, it doesn't need internal
   scrolling — the page scroll should pass through. */
@media (max-width: 820px) {
  .ac-carousel {
    overflow-y: hidden !important;
    overflow-x: hidden !important;
  }
  .ac-carousel .ac-content {
    overflow: visible !important;
    overscroll-behavior: auto !important;
  }
}
