/* header.css — navigație globală site public adventistpnt.ro */

/* ─── Reset local ─────────────────────────────────────────── */
.site-header *,
.site-header *::before,
.site-header *::after { box-sizing: border-box; }

/* ─── Wrapper principal ───────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  width: 100%;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
}

/* ─── Logo ────────────────────────────────────────────────── */
.site-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header__logo img {
  display: block;
  width: auto;
  height: 36px;
  object-fit: contain;
}

/* ─── Nav desktop ─────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__link {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333333;
  text-decoration: none;
  border-radius: 6px;
  border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
  white-space: nowrap;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: #2e7d4f;
  background: rgba(46, 125, 79, 0.06);
  outline: none;
}

.site-nav__link--active {
  color: #2e7d4f;
  border-bottom-color: #2e7d4f;
  font-weight: 600;
}

/* ─── Hamburger button ────────────────────────────────────── */
.site-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.site-nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #333333;
  border-radius: 2px;
  transition: transform 250ms ease, opacity 250ms ease;
}

.site-nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.site-nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Mobile nav ──────────────────────────────────────────── */
.site-nav-mobile {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-top: 1px solid #eeeeee;
  padding: 8px 16px 16px;
  overflow: hidden;
  /* slide-down animation via max-height */
  max-height: 0;
  transition: max-height 280ms ease, padding 280ms ease;
}

.site-nav-mobile:not([hidden]) {
  max-height: 400px;
  padding: 8px 16px 16px;
}

/* override [hidden] to let CSS transition work */
.site-nav-mobile[hidden] {
  display: flex !important;
  visibility: hidden;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.site-nav-mobile .site-nav__link {
  padding: 12px 8px;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 0;
  font-size: 1rem;
}

.site-nav-mobile .site-nav__link:last-child {
  border-bottom: none;
}

.site-nav-mobile .site-nav__link--active {
  color: #2e7d4f;
  border-bottom-color: #f0f0f0; /* keep row divider, not green */
  font-weight: 600;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 767px) {
  .site-nav { display: none; }
  .site-nav__toggle { display: flex; }
}

@media (min-width: 768px) {
  .site-nav-mobile { display: none !important; }
  .site-nav__toggle { display: none; }
}

/* ─── Hero header on homepage — override sticky nav styles ── */
/* index.php wraps logo+hero in <header class="site-header site-header--hero">
   which is a sibling to the nav partial; this ensures it keeps its original
   non-sticky layout and doesn't clash with nav styles. */
.site-header--hero {
  position: static;
  box-shadow: none;
  background: transparent;
  height: auto;
}
.site-header--hero .site-header__inner { display: none; }
.site-header--hero .site-nav { display: none; }
.site-header--hero .site-nav-mobile { display: none !important; }
.site-header--hero .site-nav__toggle { display: none; }
