/* ============================================================
   SKY JIU JITSU - Shared Components (Light Theme - V2.1)
   Nav, Footer, Buttons, Cards, Page Hero, CTA, Accordion
   ============================================================ */

/* ====================
   NAVIGATION
   ==================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 var(--space-lg);
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.25s ease,
              box-shadow 0.25s ease;
}

.nav.is-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav__logo {
  display: flex;
  align-items: center;
  z-index: 10000;
  position: relative;
}

.nav__logo img {
  height: 48px;
  width: auto;
  transition: opacity var(--duration-fast);
}

.nav__logo:hover img {
  opacity: 0.8;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav__link {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--ls-tag);
  color: var(--text-muted);
  transition: color var(--duration-fast);
  position: relative;
  padding: var(--space-2xs) 0;
}

/* Nav is always dark text on light bg (hero is inset, nav sits on white) */

.nav__link:hover,
.nav__link.is-active {
  color: var(--text-primary);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-blue);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  width: 100%;
}

/* ---- Classes Dropdown ---- */

.nav__dropdown {
  position: relative;
}

.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + var(--space-xs));
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-xs) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              visibility var(--duration-fast);
  box-shadow: var(--shadow-lg);
}

.nav__dropdown:hover .nav__dropdown-menu,
.nav__dropdown.is-open .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown-link {
  display: block;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--fs-small);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-secondary);
  transition: background-color var(--duration-fast), color var(--duration-fast);
}

.nav__dropdown-link:hover {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

/* ---- Dropdown Chevron ---- */

.nav__link--has-dropdown::after {
  display: none;
}

.nav__chevron {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
  margin-bottom: 2px;
  transition: transform var(--duration-fast);
}

.nav__dropdown:hover .nav__chevron {
  transform: rotate(-135deg);
}

/* ---- Nav CTA ---- */

.nav__cta {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-tag);
  color: #FFFFFF;
  background: var(--accent-cta);
  padding: var(--space-xs) var(--space-md);
  border-radius: 16px;
  transition: background-color var(--duration-fast), transform var(--duration-fast),
              box-shadow var(--duration-fast);
}

.nav__cta:hover {
  background: var(--accent-cta-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta);
}

/* ---- Mobile Nav CTA (glassy, centred) ---- */

.nav__mobile-cta {
  display: none;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  background: rgba(58, 110, 165, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(58, 110, 165, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
  z-index: 10000;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav__mobile-cta:active {
  background: rgba(58, 110, 165, 0.15);
  border-color: rgba(58, 110, 165, 0.35);
}

/* ---- Mobile Hamburger ---- */

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 32px;
  height: 32px;
  gap: 6px;
  z-index: 10000;
  cursor: pointer;
  position: relative;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.4s var(--ease-spring),
              opacity 0.2s ease;
  transform-origin: center;
}

/* Hamburger always uses dark color (nav sits on white bg) */

.nav__hamburger.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav__hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ---- Mobile Menu Overlay ---- */

/* ====================
   MOBILE MENU (dead simple - no animations)
   ==================== */

.nav__mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: #FFFFFF;
  padding: calc(var(--nav-height) + 2rem) 1.5rem 2rem;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.nav__mobile-menu.is-open {
  display: flex;
}

body.menu-open {
  overflow: hidden;
}

/* Menu links */
.nav__mobile-link {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  padding: 0.5rem 0;
  text-decoration: none;
}

/* Classes toggle button */
.nav__mobile-link--toggle {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  cursor: pointer;
  background: none;
  border: none;
}

.nav__mobile-chevron {
  width: 12px;
  height: 12px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.nav__mobile-link--toggle.is-expanded .nav__mobile-chevron {
  transform: rotate(-135deg);
}

/* Classes sub-menu */
.nav__mobile-sub {
  display: none;
  padding-left: 1.5rem;
  flex-direction: column;
}

.nav__mobile-sub.is-open {
  display: flex;
}

.nav__mobile-sub .nav__mobile-link {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-secondary);
  padding: 0.5rem 0;
}

/* ====================
   BUTTONS
   ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-tag);
  padding: var(--space-sm) var(--space-xl);
  border-radius: 16px;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}

.btn--cta {
  background: var(--accent-cta);
  color: #FFFFFF;
}

.btn--cta:hover {
  background: var(--accent-cta-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-cta);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn--outline:hover {
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

/* Outline button on dark hero backgrounds */
.hero .btn--outline {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

.hero .btn--outline:hover {
  border-color: #FFFFFF;
}

.btn--blue {
  background: var(--accent-blue);
  color: #FFFFFF;
}

.btn--blue:hover {
  background: var(--accent-blue-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn--large {
  font-size: var(--fs-body);
  padding: var(--space-md) var(--space-2xl);
}

.btn--warm {
  background: var(--accent-warm);
  color: #1A1A1A;
}

.btn--warm:hover {
  background: var(--accent-warm-dark);
  transform: translateY(-2px);
}

/* ====================
   PAGE HERO
   ==================== */

.page-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  padding: var(--space-4xl) var(--space-md) var(--space-3xl);
  background-color: var(--bg-primary);
  overflow: hidden;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-primary) 0%, transparent 60%);
  z-index: 1;
}

.page-hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.page-hero__tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-tag);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-tag);
  color: var(--accent-warm);
  margin-bottom: var(--space-sm);
}

.page-hero__title {
  font-size: var(--fs-h1);
  margin-bottom: var(--space-md);
  animation: heroFadeUp 0.8s var(--ease-out) forwards;
}

.page-hero__subtitle {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  max-width: 50ch;
  animation: heroFadeUp 0.8s var(--ease-out) 0.15s forwards;
  opacity: 0;
}

.page-hero__badge {
  position: absolute;
  right: clamp(var(--space-xl), 14vw, 240px);
  bottom: var(--space-3xl);
  width: clamp(200px, 30vw, 360px);
  aspect-ratio: 1;
  z-index: 2;
  pointer-events: none;
}

.page-hero__badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 768px) {
  .page-hero__badge { display: none; }
}

/* ====================
   CTA BANNER
   ==================== */

.cta-banner {
  text-align: center;
  padding: var(--section-pad) var(--space-md);
  background-color: var(--bg-elevated);
  position: relative;
}

.cta-banner__title {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-md);
}

.cta-banner__text {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 45ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-banner .btn {
  display: inline-flex;
}

/* ====================
   FAQ ACCORDION
   ==================== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item {
  background: var(--bg-primary);
}

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--duration-fast);
}

.faq-item__question:hover {
  background: var(--bg-elevated);
}

.faq-item__icon {
  width: 24px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
  margin-left: var(--space-md);
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: '';
  position: absolute;
  background: var(--text-muted);
  transition: transform var(--duration-normal) var(--ease-out);
}

.faq-item__icon::before {
  width: 16px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-item__icon::after {
  width: 2px;
  height: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-item.is-open .faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out);
}

.faq-item__answer-inner {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-secondary);
  line-height: var(--lh-body);
}

/* ====================
   FOOTER (stays dark)
   ==================== */

.footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding: var(--space-3xl) var(--space-md) var(--space-xl);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer__logo img {
  height: 56px;
  width: auto;
}

.footer__tagline {
  color: var(--footer-muted);
  font-size: var(--fs-small);
  max-width: 30ch;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-tag);
  color: var(--footer-heading);
  margin-bottom: var(--space-md);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer__link {
  font-size: var(--fs-small);
  color: var(--footer-muted);
  transition: color var(--duration-fast);
}

.footer__link:hover {
  color: var(--accent-blue);
}

.footer__contact-item {
  font-size: var(--fs-small);
  color: var(--footer-muted);
  margin-bottom: var(--space-xs);
}

.footer__contact-item a {
  color: var(--footer-text);
  transition: color var(--duration-fast);
}

.footer__contact-item a:hover {
  color: var(--accent-blue);
}

.footer__contact-item address {
  color: var(--footer-text);
}

.footer__location-note {
  display: block;
  color: var(--footer-muted);
  font-size: var(--fs-tag);
  font-style: italic;
  margin-top: var(--space-3xs);
  opacity: 0.7;
}

.footer__bottom {
  max-width: var(--max-width);
  margin: var(--space-2xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--footer-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copyright {
  font-size: var(--fs-small);
  color: var(--footer-muted);
}

.footer__social {
  display: flex;
  gap: var(--space-md);
}

.footer__social-link {
  color: var(--footer-muted);
  transition: color var(--duration-fast);
}

.footer__social-link:hover {
  color: var(--accent-blue);
}

/* ====================
   RESPONSIVE - NAV & FOOTER
   ==================== */

@media (max-width: 1024px) {
  .nav__links {
    gap: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 0 var(--space-md);
    left: var(--space-xs);
    right: var(--space-xs);
    top: var(--space-xs);
    border-radius: var(--radius-lg);
  }

  .nav.is-scrolled {
    background-color: rgba(255, 255, 255, 0.98);
  }

  .nav__links {
    display: none;
  }

  .nav__mobile-cta {
    display: inline-flex;
  }

  .nav__hamburger {
    display: flex;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer__inner {
    grid-template-columns: 1fr;
  }

  .page-hero {
    min-height: 40vh;
    padding: var(--space-3xl) var(--space-md) var(--space-2xl);
  }
}

/* ====================
   LOGO-ON-BLACK HERO TREATMENT
   Used on index, about, and kids hero backgrounds
   in place of photographic imagery.
   ==================== */

.hero__bg--logo,
.page-hero__bg--logo {
  background-color: #0B0B0B;
  background-image: url('../images/skyjiujitsu_logo.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 38% auto;
}

@media (max-width: 768px) {
  .hero__bg--logo,
  .page-hero__bg--logo {
    background-size: 60% auto;
  }
}

/* On dark logo bgs, soften the page-hero opacity-on-img rule by removing the img element */
.page-hero__bg--logo {
  opacity: 1;
}

/* When the hero bg is the logo treatment, override the default white-fade overlay
   that's designed to blend a photo into the off-white page below. */
.page-hero--logo .page-hero__overlay {
  background: linear-gradient(to top, rgba(11, 11, 11, 0.85) 0%, rgba(11, 11, 11, 0.2) 60%, transparent 100%);
}

/* Text on the dark logo bg needs to be light. */
.page-hero--logo .page-hero__title,
.page-hero--logo .page-hero__subtitle,
.page-hero--logo .page-hero__tag,
.page-hero--logo .page-hero__micro {
  color: #FAFAFA;
}

.page-hero--logo .page-hero__subtitle {
  color: rgba(250, 250, 250, 0.85);
}

/* ====================
   PLAIN WHITE HERO
   Used on about, classes index, and kids programme.
   Removes background imagery for a clean, content-first look.
   ==================== */

.page-hero--plain {
  background-color: #FFFFFF;
}

.page-hero--plain .page-hero__bg,
.page-hero--plain .page-hero__overlay {
  display: none;
}

.page-hero--plain .page-hero__tag {
  color: var(--accent-warm-dark);
}

.page-hero--plain .page-hero__title {
  color: var(--text-primary);
}

.page-hero--plain .page-hero__subtitle {
  color: var(--text-secondary);
}

.page-hero--plain .page-hero__micro {
  color: var(--text-muted) !important;
}

/* Inline content image variant — used on kids page in-flow.
   Specificity is doubled (.prog-about__image.prog-about__image--logo)
   so this overrides the cover-fit rule in programme.css that loads later. */
.prog-about__image.prog-about__image--logo {
  background-color: #0B0B0B;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prog-about__image.prog-about__image--logo img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}
