/* ============================================================
   dkchild Header Styles — Floating Glass
   ============================================================ */

.dkchild-site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 32px);
  max-width: 1300px;
  transition:
    box-shadow 0.3s ease,
    background 0.3s ease;
}

/* WordPress admin bar offset */
.admin-bar .dkchild-site-header {
  top: calc(16px + 32px);
}

@media screen and (max-width: 782px) {
  .admin-bar .dkchild-site-header {
    top: calc(16px + 46px);
  }
}

.dkchild-header {
  height: 56px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(4px) saturate(180%);
  -webkit-backdrop-filter: blur(4px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.06),
    0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 0 20px;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.dkchild-site-header--scrolled .dkchild-header {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
}

.dkchild-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.dkchild-header__logo {
  flex-shrink: 0;
}

.dkchild-header__logo a {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.dkchild-header__logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.dkchild-header__brand {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: #111111;
}

.dkchild-header__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dkchild-header__desktop-nav {
  display: none;
}

@media (min-width: 992px) {
  .dkchild-header__desktop-nav {
    display: flex;
    align-items: center;
  }
}

.dkchild-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}

.dkchild-menu li {
  margin: 0;
}

.dkchild-menu a {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #4b5563;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition:
    color 0.15s ease,
    background 0.15s ease;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.dkchild-menu a:hover {
  color: #111111;
  background: #f5f5f5;
}

.dkchild-menu .current-menu-item > a,
.dkchild-menu .current-menu-ancestor > a {
  color: #111111;
  background: #f5f5f5;
}

/* Submenu / dropdown */
.dkchild-menu li.menu-item-has-children {
  position: relative;
}

.dkchild-menu .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px;
  list-style: none;
  margin: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.dkchild-menu li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  vertical-align: middle;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  transition: transform 0.2s ease;
}

.dkchild-menu li.menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
}

.dkchild-menu li.menu-item-has-children:hover > .sub-menu {
  display: block;
}

.dkchild-menu .sub-menu li {
  margin: 0;
}

.dkchild-menu .sub-menu a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
  border-radius: 8px;
}

.dkchild-menu .sub-menu a:hover {
  background: #f5f5f5;
  color: #111111;
}

/* Header CTA Button */
.dkchild-header__cta {
  display: none;
}

@media (min-width: 992px) {
  .dkchild-header__cta {
    display: inline-flex;
    margin-left: 20px;
  }
}

.dkchild-header__cta .btn {
  padding: 10px 18px;
  font-size: 13px;
  min-height: 38px;
  border-radius: 8px;
}

/* Mobile trigger */
.dkchild-header__mobile-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: #111111;
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
}

.dkchild-header__mobile-trigger:hover {
  background: #f5f5f5;
}

@media (min-width: 992px) {
  .dkchild-header__mobile-trigger {
    display: none;
  }
}

/* Mobile overlay — floating below header */
.dkchild-mobile-overlay {
  display: none;
}

@media (max-width: 991px) {
  .dkchild-mobile-overlay {
    display: block;
    position: fixed;
    top: 88px;
    left: 16px;
    right: 16px;
    z-index: 998;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.1),
      0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }

  .admin-bar .dkchild-mobile-overlay {
    top: calc(88px + 46px);
  }
}

body.dkchild-mobile-open {
  overflow: hidden;
}

.dkchild-mobile-overlay__header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.dkchild-mobile-overlay__close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #111111;
  cursor: pointer;
}

.dkchild-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dkchild-mobile-menu li {
  border-bottom: 1px solid #f3f4f6;
}

.dkchild-mobile-menu a {
  display: block;
  padding: 16px 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #111111;
  text-decoration: none;
}

.dkchild-mobile-menu a:hover {
  color: #6b7280;
}

/* ============================================================
   Mobile Bottom Nav — Android-style
   ============================================================ */
.dkchild-mobile-nav {
  display: none;
}

@media (max-width: 991px) {
  .dkchild-mobile-nav {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-top: 1px solid #e5e7eb;
    padding-bottom: env(safe-area-inset-bottom, 8px);
  }

  .dkchild-mobile-nav__inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 480px;
    margin: 0 auto;
    padding: 6px 0 2px;
  }

  .dkchild-mobile-nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    min-width: 56px;
    border-radius: 12px;
    text-decoration: none;
    color: #9ca3af;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .dkchild-mobile-nav__link.is-active {
    color: #000000;
  }

  .dkchild-mobile-nav__link.is-active .dkchild-mobile-nav__icon svg {
    stroke-width: 2.5;
  }

  .dkchild-mobile-nav__link:active {
    color: #000000;
  }

  .dkchild-mobile-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
  }

  .dkchild-mobile-nav__label {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
  }
}
