/*
 * Heart of Hope — Sanctuary‑Soft Header
 * Clean, stable, unclipped mobile slide‑down menu
 */

/* ---------------------------------------------------------
   HEADER WRAPPER
--------------------------------------------------------- */

.hoh-header {
  background: var(--hoh-white-bg);
  box-shadow: var(--hoh-shadow-soft);
  padding: var(--hoh-space-sm) 0;

  position: sticky;
  top: 0;
  z-index: 10000;
  width: 100%;
  overflow: hidden; /* ensures watermark stays contained */
}

/* WordPress admin bar offset */
.admin-bar .hoh-header {
  top: 32px !important;
}

@media (max-width: 782px) {
  .admin-bar .hoh-header {
    top: 46px !important;
  }
}

/* ---------------------------------------------------------
   DESKTOP LAYOUT (>900px)
   Two‑row crest layout
--------------------------------------------------------- */

.hoh-header-inner {
  max-width: var(--hoh-max-width-main);
  margin: 0 auto;
  padding: 12px var(--hoh-space-md);

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 20px; /* tighter vertical rhythm */
  height: auto;

  position: relative; /* for desktop watermark */
  z-index: 2;
}

/* Row 1: Logo centered */
.hoh-logo {
  flex-basis: 100%;
  display: flex;
  justify-content: center;

  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: relative;
}

/* Desktop scripture watermark behind logo */
@media (min-width: 900px) {
  .hoh-logo::before {
    content: "“The Lord is my light and my salvation.” — Psalm 27:1";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 120%;
    text-align: center;

    font-family: var(--hoh-font-serif);
    font-size: clamp(1.2rem, 2.6vw, 2.2rem);
    font-style: italic;
    color: rgba(128, 90, 160, 0.10);

    pointer-events: none;
    user-select: none;
    line-height: 1.4;
    z-index: 0;
  }
}

/* Logo image */
.hoh-logo img {
  height: 58px;
  width: auto;
  border-radius: var(--hoh-radius-sm);
  position: relative;
  z-index: 2;
}

/* Larger logo on desktop */
@media (min-width: 900px) {
  .hoh-logo img {
    height: 72px;
  }
}

/* Row 2: Desktop navigation */
.hoh-header-nav {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
}

.hoh-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: center;
}

.hoh-nav-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  color: var(--hoh-purple);

  font-family: var(--hoh-font-sans);
  font-weight: 500;
  font-size: 1rem;

  white-space: normal;
  padding: 8px 14px;
  border-radius: var(--hoh-radius-sm);

  transition: opacity 0.25s ease, background 0.25s ease;
}

.hoh-nav-list a:hover {
  background: var(--hoh-lavender-hover);
  opacity: 1;
}

/* ---------------------------------------------------------
   HAMBURGER (hidden on desktop)
--------------------------------------------------------- */

.hoh-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  z-index: 3;
}

.hoh-hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--hoh-purple);
  margin: 5px 0;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ---------------------------------------------------------
   MOBILE MODE (<900px)
   One-row layout + watermark behind entire row
--------------------------------------------------------- */

@media (max-width: 900px) {

  /* One-row layout */
  .hoh-header-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  /* Remove desktop divider */
  .hoh-logo {
    flex-basis: auto;
    padding-bottom: 0;
    border-bottom: none;
  }

  /* Mobile scripture watermark behind entire row */
  .hoh-header-inner::before {
    content: "“The Lord is my light and my salvation.” — Psalm 27:1";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 200%;
    text-align: center;

    font-family: var(--hoh-font-serif);
    font-size: 0.9rem;
    font-style: italic;
    color: rgba(128, 90, 160, 0.12);

    pointer-events: none;
    user-select: none;
    line-height: 1.2;
    z-index: 0;
  }

  /* Logo above watermark */
  .hoh-logo img {
    height: 48px;
    position: relative;
    z-index: 2;
  }

  /* Hamburger visible */
  .hoh-hamburger {
    display: block;
  }

  /* Hide desktop nav */
  .hoh-header-nav {
    display: none;
  }
}

/* ---------------------------------------------------------
   MOBILE MENU (unchanged)
--------------------------------------------------------- */

@media (max-width: 900px) {

  .hoh-mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    background: var(--hoh-glass-tint);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(10px);

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;

    z-index: 9999;

    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;

    padding-top: 12px;
  }

  .hoh-mobile-menu.open {
    max-height: 600px;
    opacity: 1;
  }

  .hoh-mobile-close {
    position: absolute;
    top: 14px;
    right: 14px;

    background: none;
    border: none;
    padding: 6px;

    font-size: 22px;
    line-height: 1;
    cursor: pointer;

    color: var(--hoh-purple);
    z-index: 10001;
  }

  .hoh-mobile-nav {
    padding-left: var(--hoh-space-md);
    padding-right: var(--hoh-space-md);
  }

  .hoh-mobile-nav-list {
    list-style: none;
    padding: var(--hoh-space-md) 0;
    margin: 0;

    display: flex;
    flex-direction: column;
    gap: var(--hoh-space-sm);
    align-items: center;
    text-align: center;
  }

  .hoh-mobile-nav-list a {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    padding: 14px 20px;

    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;

    color: #4b0082 !important;
    font-size: 1.2rem;
    font-weight: 600;

    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
  }

  .hoh-mobile-nav-list a:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  }
}
