/**
 * GLPbase Shared Header / Navigation / Footer Styles
 * Mobile-first, no jQuery, production-ready.
 *
 * Does NOT reset or override page body content styles.
 * All selectors scoped to .glpb- prefix.
 */

/* ============================
   HEADER
   ============================ */
.glpb-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #1B2838;
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

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

/* Logo — "GLP" in gold, "base" in white (matches homepage) */
.glpb-logo {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 22px;
  color: #C4A265;
  text-decoration: none;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.glpb-logo span { color: #fff; }
.glpb-logo:hover { color: #C4A265; }

/* ============================
   HAMBURGER (mobile)
   ============================ */
.glpb-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  z-index: 1010;
}
.glpb-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 4px 0;
  transition: transform 0.25s, opacity 0.2s;
  border-radius: 1px;
}
.glpb-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.glpb-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.glpb-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ============================
   NAV (desktop)
   ============================ */
.glpb-nav__list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.glpb-nav__item {
  position: relative;
}

.glpb-nav__link {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 16px 14px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 0.2s;
}
.glpb-nav__link:hover,
.glpb-nav__link:focus-visible,
.glpb-nav__item--active > .glpb-nav__link {
  color: #C4A265;
}

.glpb-nav__chevron {
  width: 9px;
  height: 5px;
  opacity: 0.5;
  transition: transform 0.2s;
}
.glpb-nav__item.is-open > .glpb-nav__link .glpb-nav__chevron {
  transform: rotate(180deg);
}

/* ============================
   SIMPLE DROPDOWN
   ============================ */
.glpb-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #1B2838;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 8px 0;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 1010;
}
.glpb-nav__item.is-open > .glpb-dropdown {
  display: block;
}

.glpb-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.glpb-dropdown__link {
  display: block;
  padding: 8px 20px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  transition: background 0.12s, color 0.12s;
}
.glpb-dropdown__link:hover,
.glpb-dropdown__link:focus-visible {
  background: rgba(196,162,101,0.12);
  color: #C4A265;
}
.glpb-dropdown__link--active {
  color: #C4A265;
}

/* ============================
   MEGA MENU (Peptides)
   ============================ */
.glpb-mega {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1B2838;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 24px 28px;
  width: max-content;
  max-width: 820px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  z-index: 1010;
}
.glpb-nav__item.is-open > .glpb-mega {
  display: block;
}

.glpb-mega__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 28px;
}

.glpb-mega__heading {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #C4A265;
  text-decoration: none;
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
}
.glpb-mega__heading:hover { text-decoration: underline; }

.glpb-mega__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.glpb-mega__col ul a {
  display: block;
  padding: 3px 0;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  transition: color 0.12s;
}
.glpb-mega__col ul a:hover,
.glpb-mega__col ul a:focus-visible {
  color: #fff;
}

/* ============================
   ACCOUNT ICON (in nav)
   ============================ */
.glpb-nav__account {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.55);
  padding: 0 !important;
  margin: 0 10px;
}
.glpb-nav__account:hover {
  border-color: #C4A265;
  color: #C4A265;
}

/* ============================
   FOOTER (matches homepage exactly)
   ============================ */
.glpb-footer {
  background: #1B2838;
  color: rgba(255,255,255,0.5);
  padding: 48px 0 0;
}

.glpb-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.glpb-footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 40px;
  margin-bottom: 32px;
}

.glpb-footer__col h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #C4A265;
  font-weight: 500;
  margin-bottom: 16px;
}

.glpb-footer__col a {
  display: block;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 14px;
  line-height: 2;
  transition: color 0.2s;
}
.glpb-footer__col a:hover { color: #C4A265; }

.glpb-footer__col p {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.4);
}

.glpb-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* ============================
   MOBILE (≤ 768px)
   ============================ */
@media (max-width: 768px) {
  .glpb-hamburger {
    display: block;
  }

  .glpb-nav {
    display: none;
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1B2838;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1005;
    padding: 16px 0;
  }
  .glpb-nav.is-open {
    display: block;
  }

  .glpb-nav__list {
    flex-direction: column;
    align-items: stretch;
  }

  .glpb-nav__link {
    padding: 12px 24px;
    font-size: 15px;
    justify-content: space-between;
  }

  .glpb-nav__chevron {
    width: 12px;
    height: 7px;
  }

  /* Dropdowns in mobile: inline, not absolute */
  .glpb-dropdown,
  .glpb-mega {
    position: static;
    transform: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    max-width: 100%;
    width: 100%;
    background: rgba(0,0,0,0.15);
  }

  .glpb-dropdown__link {
    padding: 10px 40px;
    font-size: 14px;
  }

  .glpb-mega {
    padding: 8px 0;
  }
  .glpb-mega__inner {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 24px;
  }
  .glpb-mega__heading {
    padding: 8px 16px 4px;
    margin-bottom: 0;
  }
  .glpb-mega__col ul a {
    padding: 6px 32px;
    font-size: 14px;
  }

  /* Footer stacks */
  .glpb-footer__cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .glpb-footer {
    padding: 24px 0 16px;
  }
}

/* ============================
   CONTENT — MOBILE TABLE OVERFLOW FIX
   ============================ */
@media (max-width: 768px) {
  .glpb-main table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .glpb-main .article-card {
    overflow-x: hidden;
  }
}

/* ============================
   FOCUS / A11Y
   ============================ */
.glpb-nav__link:focus-visible,
.glpb-dropdown__link:focus-visible,
.glpb-mega__col ul a:focus-visible,
.glpb-mega__heading:focus-visible,
.glpb-hamburger:focus-visible {
  outline: 2px solid #C4A265;
  outline-offset: 2px;
}

/* ============================
   FORUM DISCUSSION BOX
   ============================ */
.glpb-forum-box {
  background: #1B2838;
  border-top: 3px solid #C4A265;
  padding: 40px 32px;
  text-align: center;
}
.glpb-forum-box h2 {
  color: #C4A265;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  margin-bottom: 8px;
}
.glpb-forum-box > p {
  color: rgba(255,255,255,0.65);
  margin-bottom: 20px;
}
.glpb-forum-threads {
  max-width: 520px;
  margin: 0 auto 24px;
  text-align: left;
}
.glpb-forum-threads a {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  color: #C4A265;
  font-size: 14px;
  font-weight: 500;
}
.glpb-forum-threads a:last-child {
  border-bottom: none;
}
.glpb-forum-threads a:hover {
  color: #fff;
}
.glpb-forum-btn {
  display: inline-block;
  background: #C4A265;
  color: #1B2838;
  padding: 14px 32px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.glpb-forum-btn:hover {
  background: #d4b275;
}

/* ============================
   AFFILIATE PROVIDERS BOX
   ============================ */
.glpb-aff-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 20px;
}
.glpb-aff-box {
  background: #e2eef9;
  border-radius: 12px;
  padding: 36px 40px 32px;
  text-align: center;
  border: 1px solid #d0dde8;
}
.glpb-aff-box h2 {
  color: #1B2838;
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 18px;
}
.glpb-aff-disclosure {
  margin: 0 auto 24px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: #5a6a78;
  text-align: left;
}
.glpb-aff-disclosure strong {
  color: #1B2838;
}
.glpb-aff-disclosure a {
  color: #2B6CB0;
  text-decoration: underline;
}
.glpb-aff-disclosure a:hover {
  color: #1B2838;
}
.glpb-aff-cards {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.glpb-aff-card {
  display: flex;
  align-items: center;
  gap: 4px 16px;
  padding: 18px 24px;
  background: #fff;
  border: 1px solid #d0dde8;
  border-radius: 8px;
  text-decoration: none;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.glpb-aff-card:hover {
  border-color: #2B6CB0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.glpb-aff-badge {
  display: none;
}
.glpb-aff-logo {
  flex-shrink: 0;
  height: 36px;
  width: 140px;
  object-fit: contain;
  object-position: left center;
}
.glpb-aff-name {
  flex-shrink: 0;
  color: #1B2838;
  font-size: 16px;
  font-weight: 700;
  min-width: 140px;
}
.glpb-aff-desc {
  flex: 1 1 auto;
  color: #4A5568;
  font-size: 13.5px;
  line-height: 1.5;
}
.glpb-aff-cta {
  display: none;
}
/* Mobile */
@media (max-width: 768px) {
  .glpb-aff-box {
    padding: 28px 16px;
  }
  .glpb-aff-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 4px;
  }
  .glpb-aff-name {
    min-width: auto;
  }
}
