/* ============================================================
   navbar.css - Shared navbar used across all pages
   ============================================================ */

:root {
  --nav-height: 78px;
  --nav-frame: 1920px;
  --nav-side-padding: clamp(36px, 6.25vw, 120px);
  --nav-text: #353839;
  --nav-muted: #565656;
  --nav-accent: #ff405f;
  --nav-line: #ececec;
}
//
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--nav-text);
  background: #fff;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: #fff;
  border-bottom: 1px solid var(--nav-line);
  z-index: 1000;
}

.nav-inner {
  max-width: var(--nav-frame);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--nav-side-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left,
.nav-right {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-left {
  gap: clamp(22px, 2.34vw, 45px);
}

.nav-right {
  justify-content: flex-end;
  gap: clamp(22px, 2.08vw, 40px);
}

.nav-left a,
.nav-left span,
.nav-right a,
.nav-right span {
  display: inline-flex;
  align-items: center;
  height: 100%;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: var(--nav-muted);
  position: relative;
  padding-bottom: 0;
}

.nav-left a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--nav-text);
  transition: width 0.2s ease;
}

.nav-left a.active {
  color: var(--nav-text);
}

.nav-left a.active::after {
  width: 54px;
}

.nav-left a:hover,
.nav-right a:hover {
  color: var(--nav-text);
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  flex-shrink: 0;
  text-align: center;
}

.nav-logo a {
  font-family: 'DM Serif Text', serif;
  font-size: clamp(30px, 2.08vw, 40px);
  font-weight: 400;
  line-height: 1;
  color: var(--nav-text);
  letter-spacing: 0;
}

.nav-logo a span {
  color: var(--nav-accent);
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  margin-left: 4px;
}

.nav-icons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--nav-muted);
  font-size: 14px;
  line-height: 1;
}

.nav-icons button:hover {
  color: var(--nav-text);
}

.nav-toggle,
.mobile-nav {
  display: none;
}

@media (max-width: 1400px) {
  .nav-inner {
    padding: 0 clamp(28px, 4vw, 56px);
  }

  .nav-left {
    gap: 24px;
  }

  .nav-right {
    gap: 20px;
  }

  .nav-logo a {
    font-size: 32px;
  }
}

@media (max-width: 860px) {
  :root {
    --nav-height: 72px;
  }

  .nav-left,
  .nav-right {
    display: none;
  }

  .nav-inner {
    justify-content: space-between;
    padding: 0 18px;
  }

  .nav-logo a {
    font-size: clamp(24px, 7vw, 30px);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: var(--nav-text);
    background: #f5f5f4;
    font-size: 18px;
  }

  .mobile-nav {
    display: block;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--nav-line);
    padding: 10px 18px 14px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.24s ease;
  }

  .mobile-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-nav-links {
    display: grid;
    gap: 2px;
    margin-bottom: 10px;
  }

  .mobile-nav-links a,
  .mobile-nav-links span {
    display: block;
    padding: 12px 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--nav-muted);
    border-bottom: 1px solid #f1f1f1;
  }

  .mobile-nav-links a.active {
    color: var(--nav-text);
  }

  .mobile-nav-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 6px;
  }

  .mobile-nav-icons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: var(--nav-text);
    background: #f7f7f6;
    font-size: 14px;
  }
}
