/**
 * DigitalCoache — mobile header (vanilla, no build step)
 * Shown ≤900px when body has .dc-site--mobile-nav-ready
 */

@media (min-width: 901px) {
  .dc-mh {
    display: none !important;
  }
}

.dc-mh {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.dc-mh *,
.dc-mh *::before,
.dc-mh *::after {
  box-sizing: border-box;
}

/* —— Fixed bar —— */
.dc-mh__bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 64px;
  max-width: 100%;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top, 0px);
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dc-mh__bar.is-scrolled {
  box-shadow: 0 4px 24px -8px rgba(15, 23, 42, 0.12);
}

.dc-mh__bar.is-hidden {
  transform: translateY(-100%);
}

.dc-mh__logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 0;
  max-width: 58%;
  text-decoration: none;
}

.dc-mh__logo img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.dc-mh__actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
}

.dc-mh__icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #1f2937;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.dc-mh__icon-btn:hover {
  background: #f9fafb;
}

.dc-mh__icon-btn:active {
  transform: scale(0.95);
}

.dc-mh__icon-btn svg,
.dc-mh__icon-btn i {
  width: 22px;
  height: 22px;
  font-size: 22px;
  line-height: 1;
}

.dc-mh__icon-btn--link {
  text-decoration: none;
}

.dc-mh__ripple {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.1);
  transform: translate(-50%, -50%) scale(0);
  animation: dc-mh-ripple 0.45s ease-out forwards;
  pointer-events: none;
}

@keyframes dc-mh-ripple {
  to {
    transform: translate(-50%, -50%) scale(2.8);
    opacity: 0;
  }
}

/* —— Search panel —— */
.dc-mh__search {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 490;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dc-mh__search.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dc-mh__search-form {
  display: flex;
  gap: 8px;
  max-width: 100%;
}

.dc-mh__search-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
  font: 600 15px/1 Inter, system-ui, sans-serif;
  color: #111827;
  outline: none;
}

.dc-mh__search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.dc-mh__search-submit {
  flex-shrink: 0;
  height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 16px;
  background: #2563eb;
  color: #fff;
  font: 600 14px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.dc-mh__search-submit:hover {
  background: #1d4ed8;
}

.dc-mh__search-submit:active {
  transform: scale(0.98);
}

/* —— Drawer —— */
.dc-mh__backdrop {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.dc-mh__backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.dc-mh__drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 610;
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 100%;
  background: #fff;
  border-radius: 24px 0 0 24px;
  box-shadow: -8px 0 40px rgba(15, 23, 42, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.dc-mh__drawer.is-open {
  transform: translateX(0);
}

.dc-mh__drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid #e5e7eb;
}

.dc-mh__drawer-head img {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.dc-mh__nav {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 8px;
  -webkit-overflow-scrolling: touch;
}

.dc-mh__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 16px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  transition: background 0.2s ease;
}

.dc-mh__link:hover,
.dc-mh__link:focus-visible {
  background: #f9fafb;
}

.dc-mh__link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.dc-mh__acc {
  padding: 0 8px;
}

.dc-mh__acc-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 12px;
  border: none;
  border-radius: 16px;
  background: transparent;
  text-align: left;
  font: 600 16px/1.3 Inter, system-ui, sans-serif;
  color: #111827;
  cursor: pointer;
  transition: background 0.2s ease;
}

.dc-mh__acc-trigger:hover {
  background: #f9fafb;
}

.dc-mh__acc-chev {
  margin-left: auto;
  width: 20px;
  height: 20px;
  color: #9ca3af;
  transition: transform 0.3s ease;
}

.dc-mh__acc-trigger[aria-expanded="true"] .dc-mh__acc-chev {
  transform: rotate(180deg);
}

.dc-mh__acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.dc-mh__acc-panel.is-open {
  grid-template-rows: 1fr;
}

.dc-mh__acc-panel-inner {
  overflow: hidden;
}

.dc-mh__acc-list {
  list-style: none;
  margin: 0;
  padding: 4px 8px 8px;
}

.dc-mh__acc-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  transition: background 0.2s ease, color 0.2s ease;
}

.dc-mh__acc-list a:hover {
  background: #f3f4f6;
  color: #2563eb;
}

/* —— CTA footer —— */
.dc-mh__cta {
  flex-shrink: 0;
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

.dc-mh__cta-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dc-mh__cta-primary,
.dc-mh__cta-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dc-mh__cta-primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.dc-mh__cta-primary:hover {
  background: #1d4ed8;
}

.dc-mh__cta-secondary {
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
}

.dc-mh__cta-secondary:hover {
  border-color: rgba(37, 99, 235, 0.3);
  background: #eff6ff;
  color: #2563eb;
}

.dc-mh__cta-primary:active,
.dc-mh__cta-secondary:active {
  transform: scale(0.98);
}

.dc-mh__cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dc-mh__cta-wa,
.dc-mh__cta-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.dc-mh__cta-wa {
  background: #25d366;
  color: #fff;
}

.dc-mh__cta-call {
  background: #fff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
}

.dc-mh__cta-wa:active,
.dc-mh__cta-call:active {
  transform: scale(0.98);
}

.dc-mh__spacer {
  height: 64px;
  width: 100%;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .dc-mh__bar,
  .dc-mh__drawer,
  .dc-mh__backdrop,
  .dc-mh__search,
  .dc-mh__acc-panel,
  .dc-mh__acc-chev {
    transition: none !important;
  }
}
