:root {
  --nav-height: 72px;
  --bg: #fff;
  --text: #222;
  --muted: #6b7280;
  --accent: #0b5fff;
  --shadow: 0 6px 20px rgba(15,23,42,0.06);
  --transition: 0.3s ease;
}

/* Header */
.gp-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--bg);
  box-shadow: var(--shadow);
}

/* Inner */
.gp-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--nav-height);
}

/* Logo */
.gp-logo img {
  max-height: 48px;
  display: block;
}

/* Hamburger */
.gp-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.gp-hamburger__icon rect {
  fill: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

/* Desktop nav */
.gp-nav__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 12px;
}
.gp-nav__list > li {
  position: relative;
}
.gp-nav__list a {
  display: inline-block;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
}
.gp-nav__list li:hover > .sub-menu,
.gp-nav__list li:focus-within > .sub-menu {
  display: block;
}
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--bg);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  z-index: 50;
}
.sub-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
}

/* Mobile panel */
.gp-mobile-panel {
  position: fixed;
  top: var(--nav-height);
  right: -100%;
  width: 70vw;
  max-width: 400px;
  height: calc(100% - var(--nav-height));
  background: var(--bg);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transition: right 0.3s ease;
  overflow: auto;
  padding: 20px;
}
.gp-mobile-panel[aria-hidden="false"] {
  right: 0;
}

/* Close button */
.gp-mobile-panel__close {
  position: absolute;
  top: 10px;
  left: 10px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
}

/* Mobile menu */
.gp-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gp-mobile-menu__item {
  margin-bottom: 6px;
}
.gp-mobile-menu__toggle {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  padding: 12px 10px;
  font-weight: 600;
  border-radius: 6px;
}
.gp-mobile-menu__chev {
  transition: transform 0.3s;
}
.gp-mobile-menu__sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-left: 0;
  border-left: 0;
  padding-left: 0;
}
.gp-mobile-menu__sub.open {
  max-height: 1000px; /* ارتفاع کافی برای زیرمنوها */
}
.gp-mobile-menu__sub a {
  display: block;
  padding: 10px 16px;
  color: var(--muted);
  font-weight: 500;
}

/* Hamburger open state */
.gp-hamburger.is-open .gp-hamburger__icon rect:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.gp-hamburger.is-open .gp-hamburger__icon rect:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.1);
}
.gp-hamburger.is-open .gp-hamburger__icon rect:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 1024px) {
  .gp-nav {
    display: none;
  }
  .gp-hamburger {
    display: block;
  }
}
