/* =================================================================
   JM Coaching, shared site stylesheet
   Loaded on every page via /includes/header.php
   Contains: design tokens, reset, body defaults, shared buttons,
   header (sticky + nav + dropdown + burger + mobile menu), footer.
   Page-specific styles live in each page's own <style> block.
   ================================================================= */


/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }


/* ---------- Design tokens ---------- */
:root {
  --gold:         #ffc93d;
  --gold-dim:     #c99820;
  --black:        #0a0a0a;
  --surface:      #111111;
  --surface2:     #191919;
  --border:       rgba(255,201,61,0.15);
  --text:         #f0ede6;
  --muted:        #888880;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --header-h:     68px;
}


/* ---------- Body + base typography ---------- */
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
}


/* ---------- Shared buttons ---------- */
.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: #0a0a0a;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 36px;
  transition: background 0.2s;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--gold-dim); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 36px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  align-self: flex-start;
  cursor: pointer;
}
.btn-outline:hover { background: var(--gold); color: #0a0a0a; }


/* =================================================================
   HEADER
   ================================================================= */
.jm-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(10,10,10,0.5);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(255,201,61,0.18);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.jm-header.scrolled {
  background: rgba(10,10,10,0.96);
  border-bottom-color: rgba(255,201,61,0.3);
  box-shadow: 0 4px 40px rgba(0,0,0,0.65);
}
.jm-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 5vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}


/* Logo */
.jm-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  height: 36px;
}
.jm-logo img {
  height: 36px;
  width: auto;
  display: block;
}
/* Text fallback shown if the logo image fails to load */
.jm-logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
}
.jm-logo-text em { font-style: normal; color: var(--gold); }


/* Desktop nav */
.jm-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.jm-nav > li { position: relative; }
.jm-nav a {
  display: block;
  padding: 8px 13px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
}
.jm-nav a::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 13px; right: 13px;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.jm-nav a:hover { color: var(--gold); }
.jm-nav a:hover::after,
.jm-nav a.active::after { transform: scaleX(1); }
.jm-nav a.active { color: var(--gold); }


/* Services dropdown */
.nav-has-dropdown > a { padding-right: 20px; }
.nav-has-dropdown > a .nav-chevron {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  transition: transform 0.25s ease;
  vertical-align: middle;
}
.nav-has-dropdown:hover > a .nav-chevron { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.nav-dropdown li { border-bottom: 1px solid rgba(255,201,61,0.08); }
.nav-dropdown li:last-child { border-bottom: none; }
.nav-dropdown a {
  padding: 12px 16px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--text);
}
.nav-dropdown a::after { display: none; }
.nav-dropdown a:hover { color: var(--gold); background: rgba(255,201,61,0.05); }


/* Burger */
.jm-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1100;
  flex-shrink: 0;
}
.jm-burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.jm-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.jm-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.jm-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* Mobile menu */
.jm-mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: rgba(10,10,10,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 8px 0 28px;
  z-index: 999;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.jm-mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.jm-mobile-nav { list-style: none; }
.jm-mobile-nav > li { border-bottom: 1px solid rgba(255,201,61,0.08); }
.jm-mobile-nav > li:last-child { border-bottom: none; }
.jm-mobile-nav > li > a,
.jm-mobile-services-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 5vw;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s, padding-left 0.2s;
  text-align: left;
}
.jm-mobile-nav > li > a:hover,
.jm-mobile-services-btn:hover { color: var(--gold); padding-left: calc(5vw + 6px); }
.nav-arrow {
  font-size: 15px;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}
.jm-mobile-nav > li > a:hover .nav-arrow,
.jm-mobile-services-btn:hover .nav-arrow { color: var(--gold); transform: translateX(4px); }

/* Mobile sub-nav (Services accordion) */
.jm-mobile-sub-nav {
  list-style: none;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
  background: rgba(255,201,61,0.02);
}
.jm-mobile-sub-nav.open { max-height: 220px; }
.jm-mobile-sub-nav li { border-top: 1px solid rgba(255,201,61,0.06); }
.jm-mobile-sub-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 5vw 12px calc(5vw + 16px);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.jm-mobile-sub-nav a:hover { color: var(--gold); }
.mobile-services-chevron {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.3s ease;
}
.jm-mobile-services-btn.open .mobile-services-chevron { transform: rotate(180deg); }


/* =================================================================
   FOOTER
   ================================================================= */
.jm-footer {
  background: #0a0a0a;
  border-top: 1px solid var(--gold);
  padding: 72px 5vw 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border);
  max-width: 1280px;
  margin: 0 auto;
}
.footer-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 32px;
  margin-bottom: 20px;
}
.footer-logo img { height: 32px; width: auto; }
.footer-tagline {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 320px;
}
.footer-col-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.footer-nav-list { list-style: none; }
.footer-nav-list li { margin-bottom: 10px; }
.footer-nav-list a {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav-list a:hover { color: var(--gold); }
.footer-contact-item { margin-bottom: 14px; }
.footer-contact-item p, .footer-contact-item address {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  font-style: normal;
}
.footer-contact-item a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-contact-item a:hover { color: var(--gold); }
.footer-social-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  margin-top: 24px;
}
.footer-social-icons { display: flex; gap: 12px; }
.footer-social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.08);
  transition: color 0.2s, border-color 0.2s;
}
.footer-social-icons a:hover { color: var(--gold); border-color: rgba(255,201,61,0.4); }
.footer-social-icons svg { width: 18px; height: 18px; }
.footer-bottom {
  padding: 20px 0;
  text-align: center;
  max-width: 1280px;
  margin: 0 auto;
}
.footer-bottom p {
  font-size: 12px;
  color: rgba(136,136,128,0.6);
  letter-spacing: 0.04em;
}


/* =================================================================
   RESPONSIVE breakpoints for header + footer
   Pages can add their own breakpoints below their own styles.
   ================================================================= */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .jm-nav { display: none; }
  .jm-burger { display: flex; }
  .jm-mobile-menu { display: block; }
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid > :first-child { grid-column: auto; }
}