/* ==========================================================
   Header — fixed, scroll-aware, with mobile drawer
   ========================================================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0);
  transition: background .3s, padding .3s;
}
.header.scrolled {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  padding: 12px 40px;
  box-shadow: 0 1px 20px rgba(13, 79, 110, .08);
}

/* Logo */
.logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  transition: color .3s;
}
.logo small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .35em;
  opacity: .85;
  margin-top: 2px;
}
.header.scrolled .logo { color: var(--c-primary); }

/* Desktop nav — supports both raw <a> and WP wp_nav_menu() <ul><li><a> markup */
.nav { display: flex; gap: 8px; align-items: center; }
.nav ul {
  display: flex;
  gap: 8px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav li { list-style: none; }
.nav a {
  display: inline-block;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, .92);
  transition: color .2s, background-color .2s;
  border-radius: 6px;
  white-space: nowrap;
}
.nav a:hover { background: rgba(255,255,255,.08); }
.header.scrolled .nav a:hover { background: rgba(13,79,110,.06); }
.nav a.active,
.nav .current-menu-item > a,
.nav .current_page_item > a,
.nav .current-menu-ancestor > a { color: var(--c-accent); }
.nav a:hover { color: var(--c-accent); }
.header.scrolled .nav a { color: var(--c-ink); }
.header.scrolled .nav a.active,
.header.scrolled .nav .current-menu-item > a,
.header.scrolled .nav .current_page_item > a,
.header.scrolled .nav .current-menu-ancestor > a { color: var(--c-cyan); }
.header.scrolled .nav a:hover { color: var(--c-cyan); }

/* Header actions (tel + CTA) */
.header-actions { display: flex; gap: 16px; align-items: center; }
.header-tel {
  color: #fff;
  text-align: right;
  line-height: 1.2;
  transition: color .3s;
}
.header.scrolled .header-tel { color: var(--c-primary); }
.header-tel small {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .25em;
  opacity: .8;
  display: block;
}
.header-tel strong {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
}

/* === HAMBURGER === */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  z-index: 210;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .2s, background .3s;
}
.header.scrolled .hamburger span { background: var(--c-primary); }
/* When drawer is open, hide the hamburger entirely — close lives inside the drawer */
.hamburger.open { visibility: hidden; }

/* === DRAWER === */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  z-index: 200;
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed; top: 0; right: 0;
  width: 340px;
  max-width: 86vw;
  height: 100vh; height: 100dvh;
  background: #fff;
  z-index: 201;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  padding: 24px 24px 32px;
  overflow-y: auto;
  box-shadow: -8px 0 32px rgba(13, 79, 110, .15);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-line);
  margin-bottom: 16px;
}
.drawer-head .logo { color: var(--c-primary); }
.drawer-close {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color .15s, color .15s;
  padding: 0;
  margin: -8px -8px -8px 0;
}
.drawer-close:hover { background: var(--c-bg-alt); }
.drawer-close:active { background: var(--c-line); }
.drawer-close:focus-visible { outline: 2px solid var(--c-cyan); outline-offset: 2px; }

.drawer-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.drawer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.drawer-nav li { list-style: none; }
.drawer-nav a {
  padding: 16px 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-ink);
  border-bottom: 1px solid var(--c-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color .15s;
}
.drawer-nav a:hover { color: var(--c-primary); }
.drawer-nav a.active,
.drawer-nav .current-menu-item > a,
.drawer-nav .current_page_item > a,
.drawer-nav .current-menu-ancestor > a {
  color: var(--c-primary);
  font-weight: 700;
}
.drawer-nav a::after {
  content: "→";
  font-family: var(--mono);
  color: var(--c-cyan);
  opacity: .6;
  font-size: 14px;
}

.drawer-tel {
  margin-top: 24px;
  padding: 18px;
  background: var(--c-bg);
  border-radius: 10px;
  text-align: center;
}
.drawer-tel small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .25em;
  color: var(--c-cyan);
  margin-bottom: 6px;
  display: block;
  font-weight: 600;
}
.drawer-tel strong {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--c-primary);
  display: block;
}

.drawer-cta {
  margin-top: 12px;
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* Body lock when drawer open */
body.no-scroll { overflow: hidden; }

/* === MOBILE === */
@media (max-width: 960px) {
  .header { padding: 14px 20px; }
  .header.scrolled { padding: 10px 20px; }
  .nav, .header-tel { display: none; }
  .header-actions .btn-primary { display: none; }
  .hamburger { display: flex; }
  .logo { font-size: 18px; }
  .logo small { font-size: 9px; letter-spacing: .25em; }
}

/* Hide drawer entirely on desktop */
@media (min-width: 961px) {
  .drawer, .drawer-backdrop, .hamburger { display: none !important; }
}
