/**
 * Joakims Mynt & Guld — Client CSS Overrides
 *
 * Overrides AInsteinWP Theme Supreme defaults to match JMG design.
 * Loaded AFTER main.css via functions.php auto-detection.
 */

/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS — Override theme defaults
   ═══════════════════════════════════════════════════════════════ */
:root {
  --navy: #18405d;
  --navy-light: #1a4a6b;
  --navy-muted: #2c5a7a;
  --gold: #cb8732;
  --gold-light: #e7bd33;
  --gold-hover: #b5761e;
  --white: #ffffff;
  --off-white: #faf9f6;
  --bg: #ffffff;
  --bg-warm: #faf9f6;
  --text: #2c2c2c;
  --text-muted: #6b6360;
  --text-dim: #6b6360;
  --border: rgba(24,64,93,0.12);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --container: min(1280px, 92vw);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(24,64,93,0.06);
  --shadow-md: 0 4px 20px rgba(24,64,93,0.08);
  --shadow-lg: 0 8px 40px rgba(24,64,93,0.12);
  --transition: 0.25s ease;
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY — Inter body, Playfair Display headings
   ═══════════════════════════════════════════════════════════════ */
body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
}

.section-eyebrow,
.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-eyebrow::before {
  background: var(--gold);
}

/* ═══════════════════════════════════════════════════════════════
   TOP STRIPE — Hidden for JMG (no topbar menu needed)
   ═══════════════════════════════════════════════════════════════ */
.top-stripe {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION — White background, dark text, gold accents
   ═══════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 2px 20px rgba(24,64,93,0.08);
}

.nav-inner {
  height: 70px;
  max-width: 1280px;
  padding: 0 40px;
}

.nav-logo img {
  height: 38px;
}

/* Nav links — uppercase Inter, dark text */
.nav-links {
  flex: 1;
  justify-content: center;
  gap: 4px;
}

.nav-item > a {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 8px 10px;
  border-radius: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-item > a:hover,
.nav-item > a.active {
  color: var(--navy);
  background: rgba(24,64,93,0.04);
}

.nav-item > a.active {
  border-bottom-color: var(--gold);
}

/* Nav chevron — match JMG arrow style */
.nav-chevron {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Dropdown — white bg, gold left border */
.nav-dropdown {
  background: #fff;
  border: none;
  border-left: 2px solid var(--gold);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 32px rgba(24,64,93,0.13);
  padding: 8px 0;
  /* Hover bridge — invisible zone between link and dropdown */
  margin-top: 0;
  padding-top: 8px;
}

/* Invisible hover bridge above dropdown */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown a {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
  padding: 10px 20px;
  text-transform: none;
  letter-spacing: 0;
}

.nav-dropdown a:hover {
  background: var(--bg-warm);
  color: var(--gold);
  padding-left: 20px;
}

/* ── Level-3 submenu (desktop, e.g. Göteborg cities) ── */
@media (min-width: 961px) {
  .has-submenu {
    position: relative;
  }
  .has-submenu > a .nav-arrow {
    display: inline-block;
    margin-left: 4px;
    transition: transform 0.2s ease;
  }
  .nav-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: #fff;
    border-left: 2px solid var(--gold);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 8px 32px rgba(24,64,93,0.13);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .has-submenu:hover > .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }
  /* Hover bridge to the right for submenu */
  .nav-submenu::before {
    content: '';
    position: absolute;
    top: 0;
    left: -12px;
    width: 12px;
    height: 100%;
  }
  .nav-submenu a {
    display: block;
    padding: 9px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-dim);
    white-space: nowrap;
  }
  .nav-submenu a:hover {
    background: var(--bg-warm);
    color: var(--gold);
  }
}

/* Nav CTA — hide (JMG doesn't use nav CTA) */
.nav-cta { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════════════════════════ */
.breadcrumb-bar {
  margin-top: 70px;
  background: var(--bg-warm, #faf9f6);
  border-bottom: 1px solid var(--border, #e8e3dd);
  padding: 10px 0;
}
.breadcrumb-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 60px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text-dim, #6b6360);
}
.breadcrumb-inner a { color: var(--text-dim, #6b6360); text-decoration: none; }
.breadcrumb-inner a:hover { color: var(--gold, #cb8732); }
.bc-sep { color: rgba(24,64,93,0.3); }
.bc-current { color: var(--navy, #18405d); font-weight: 500; }

@media (max-width: 960px) {
  .breadcrumb-bar { margin-top: 60px; }
  .breadcrumb-inner { padding: 0 20px; font-size: 11px; }
}

/* Hamburger — navy lines on white bg */
.nav-toggle span {
  background: var(--navy);
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE MENU — 3-level slide-from-left accordion
   ═══════════════════════════════════════════════════════════════ */

/* Hidden on desktop */
.mob-header { display: none; }
.nav-backdrop { display: none; }

@media (max-width: 960px) {
  .nav-inner {
    padding: 0 20px;
    position: relative;
    z-index: 102;
  }

  /* Backdrop */
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(24,64,93,0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s;
  }
  .nav-backdrop.active {
    opacity: 1;
    visibility: visible;
  }

  /* Panel — slide from left */
  .nav .nav-links {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: calc(100vw - 40px) !important;
    height: 100vh !important;
    height: 100dvh !important;
    flex-direction: column !important;
    background: #fff !important;
    padding: 0 !important;
    gap: 0 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow-y: auto !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    z-index: 100 !important;
    box-shadow: 4px 0 30px rgba(0,0,0,0.12) !important;
    border: none !important;
  }
  .nav .nav-links.open {
    transform: translateX(0) !important;
  }

  /* ── Mobile header: logo + breadcrumbs + close ── */
  .mob-header {
    display: block;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    padding: 20px 24px 14px;
    border-bottom: 1px solid rgba(24,64,93,0.1);
  }
  .mob-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .mob-logo img {
    height: 32px;
    width: auto;
  }
  .mob-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--navy);
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
  }
  .mob-close svg {
    stroke: #fff;
  }
  .mob-crumbs {
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-dim);
    line-height: 1.4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .mob-crumbs:empty {
    display: none;
    margin: 0;
  }
  .mob-crumbs a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s ease;
  }
  .mob-crumbs a:hover {
    color: var(--navy);
  }
  .mob-crumbs strong {
    color: var(--navy);
    font-weight: 600;
  }
  .mob-crumb-sep {
    margin: 0 6px;
    opacity: 0.4;
    font-size: 10px;
  }

  /* ── Menu items ── */
  .nav .nav-item {
    height: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    border-bottom: 1px solid rgba(24,64,93,0.08);
  }
  .nav .nav-item > a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: auto !important;
    padding: 16px 24px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--navy) !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    background: none !important;
    transition: background 0.2s ease !important;
    white-space: normal !important;
  }
  .nav .nav-item > a:hover {
    background: rgba(24,64,93,0.03) !important;
  }
  .nav .nav-item.mob-open > a {
    background: rgba(24,64,93,0.05) !important;
  }

  /* Chevron — points RIGHT (›) by default, rotates DOWN (˅) when open */
  .nav .nav-chevron {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
    transform: rotate(-90deg) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    stroke: var(--navy) !important;
    opacity: 0.4;
  }
  .nav .nav-item.mob-open > a .nav-chevron {
    transform: rotate(0deg) !important;
    opacity: 1;
  }

  /* ── Level-2 dropdown (accordion) ── */
  .nav .nav-dropdown {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background: #f4f3f0 !important;
    border: none !important;
    border-left: none !important;
    border-radius: 0 !important;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.04) !important;
    padding: 0 !important;
    margin: 0 !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: block !important;
  }
  .nav .nav-item.mob-open > .nav-dropdown {
    max-height: 800px;
  }

  /* Dropdown links — dash prefix */
  .nav .nav-dropdown a {
    display: block !important;
    padding: 13px 24px 13px 28px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: var(--navy) !important;
    border-bottom: 1px solid rgba(24,64,93,0.05) !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    white-space: normal !important;
  }
  .nav .nav-dropdown a::before {
    content: '-\00a0\00a0';
    opacity: 0.35;
    font-weight: 400;
  }
  .nav .nav-dropdown a:last-child {
    border-bottom: none !important;
  }
  .nav .nav-dropdown a:hover,
  .nav .nav-dropdown a:active {
    background: var(--navy) !important;
    color: #fff !important;
  }
  .nav .nav-dropdown a:hover::before,
  .nav .nav-dropdown a:active::before {
    color: rgba(255,255,255,0.5);
    opacity: 0.6;
  }

  /* Active page highlight */
  .nav .nav-dropdown a.mob-active,
  .nav .nav-submenu a.mob-active {
    background: rgba(24,64,93,0.08) !important;
    color: var(--navy) !important;
    font-weight: 600 !important;
    border-left: 3px solid var(--navy) !important;
  }
  .nav .nav-dropdown a.mob-active {
    padding-left: 25px !important;
  }

  /* ── Level-3 submenu (Göteborg cities etc) ── */
  .nav .has-submenu > a .nav-arrow {
    font-size: 14px;
    opacity: 0.4;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: inline-block;
  }
  .nav .has-submenu.mob-open-sub > a .nav-arrow {
    transform: rotate(90deg);
    opacity: 1;
  }

  .nav .nav-submenu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background: rgba(24,64,93,0.05) !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: block !important;
  }
  .nav .has-submenu.mob-open-sub > .nav-submenu {
    max-height: 400px;
  }
  .nav .nav-submenu a {
    padding-left: 44px !important;
    font-size: 11px !important;
    background: transparent !important;
  }
  .nav .nav-submenu a.mob-active {
    padding-left: 41px !important;
  }

  /* Hamburger — hide when menu is open (‹ close button takes over) */
  .nav .nav-toggle {
    z-index: 103 !important;
    position: relative;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  .nav .nav-toggle.open {
    opacity: 0 !important;
    pointer-events: none;
  }

  /* Nav CTA — keep hidden */
  .nav-cta { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER — JMG navy footer
   ═══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  padding: 64px 0 40px;
}

.footer .container {
  max-width: 1320px;
  padding: 0 60px;
}

.footer-grid {
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}

.footer-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: #fff;
}

.footer-brand-info {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
}

.footer-brand-info a {
  color: rgba(255,255,255,0.75);
}

.footer-brand-info a:hover {
  color: var(--gold-light);
}

.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}

.footer-col a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  padding: 5px 0;
}

.footer-col a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

.footer-bottom a {
  color: rgba(255,255,255,0.4);
}

.footer-bottom a:hover {
  color: var(--gold-light);
}

.footer-social a {
  color: rgba(255,255,255,0.5);
}

.footer-social a:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .footer .container { padding: 0 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer { padding: 48px 0 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════════════
   REVEAL ANIMATION — Bridge theme's .visible to JMG's .in-view
   ═══════════════════════════════════════════════════════════════ */
.reveal.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS — JMG gold style overrides
   ═══════════════════════════════════════════════════════════════ */
.btn-primary,
.btn {
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--gold);
  color: #fff;
  border: 2px solid var(--gold);
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  box-shadow: 0 4px 14px rgba(203,135,50,0.28);
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL PADDING — Account for fixed nav
   ═══════════════════════════════════════════════════════════════ */
html {
  scroll-padding-top: 80px;
}

/* ═══════════════════════════════════════════════════════════════
   HERO EDGE-TO-EDGE FIX (mobile)
   Removes section-level padding so navy bg on .hero-subpage-inner
   / .hero-content goes edge-to-edge. Inner elements keep their
   own padding for text spacing.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  #subpage-hero {
    padding: 0 !important;
  }
}
