/* ═══════════════════════════════════════════════
   shared.css — Shared header + footer styles
   Loaded by legal pages after legal-theme.css
   ═══════════════════════════════════════════════ */

/* ─ Skip link (accessibility) ─ */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  z-index: 9999;
  background: #152018;
  color: #52f000;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
}
.skip-link:focus {
  position: fixed;
  top: 0;
  left: 16px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 20px;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #52f000;
  outline-offset: 3px;
}

/* ─ Scroll progress bar ─ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #20b300, #52f000, #20b300);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ─ Back-to-top button ─ */
#back-to-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #20b300, #113a18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s, transform 0.22s;
  box-shadow: 0 4px 18px rgba(32, 179, 0, 0.38);
  border: none;
  pointer-events: none;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#back-to-top:hover {
  background: linear-gradient(135deg, #52f000, #20b300);
  transform: translateY(-2px);
}

/* ─ Site shell ─ */
.site-shell {
  min-height: 100vh;
}

.page-main > section:not(:first-child) {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

/* ─ Topbar ─ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(245, 247, 242, 0.9);
  border-bottom: 1px solid rgba(183, 192, 178, 0.75);
  transition: box-shadow 0.2s;
}

.topbar.is-scrolled {
  box-shadow: 0 4px 24px rgba(16, 30, 18, 0.12);
}

.topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  font-family: "Oswald", sans-serif;
  font-size: 2rem;
  letter-spacing: -0.04em;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark::before {
  content: none;
}

.brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
}

.footer-logo-text {
  display: flex;
  align-items: center;
}

.brand-mark strong {
  color: #20b300;
}

.brand-copy {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #627164;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid #cfd6cc;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(239,242,237,0.96));
  font-size: 0.88rem;
  font-weight: 800;
  color: #17341d;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  border-color: #8dcb7a;
  color: #0a180f;
  background: linear-gradient(180deg, #ffffff, #eef5e8);
}

/* ─ Burger button ─ */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  gap: 5px;
  background: none;
  border: 1px solid #cfd6cc;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #17341d;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.18s ease;
  transform-origin: center;
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─ Mobile nav drawer ─ */
.nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
}

.nav-drawer.is-open {
  display: block;
  pointer-events: auto;
}

.nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 11, 0.5);
  backdrop-filter: blur(3px);
}

.nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 84vw);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-shadow: -8px 0 40px rgba(8, 18, 11, 0.18);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-drawer.is-open .nav-panel {
  transform: translateX(0);
}

.nav-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e8eee5;
  min-height: 62px;
}

.nav-panel-brand {
  font-family: "Oswald", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  color: #172019;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-panel-brand strong { color: #20b300; }

.nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d8ddd5;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #4a5c4e;
  padding: 0;
}

.nav-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.nav-links a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #1a2c1e;
  border-bottom: 1px solid #f0f4ed;
  gap: 10px;
  text-decoration: none;
}

.nav-links a:hover { background: rgba(32, 179, 0, 0.06); }
.nav-links a[data-primary] { color: #20b300; font-size: 1rem; }

.nav-footer {
  padding: 14px 18px;
  font-size: 0.76rem;
  color: #8a958a;
  border-top: 1px solid #e8eee5;
}

/* ─ Policy strip ─ */
.policy-strip {
  background: rgba(10, 17, 12, 0.98);
  border-bottom: 1px solid rgba(82, 240, 0, 0.14);
}

.policy-strip-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  flex-wrap: wrap;
  padding-top: 5px;
  padding-bottom: 5px;
}

.policy-strip-label {
  font-size: 0.69rem;
  color: rgba(212, 226, 215, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.policy-strip-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.policy-strip-nav a {
  font-size: 0.72rem;
  color: rgba(212, 226, 215, 0.62);
  text-decoration: none;
  padding: 3px 9px;
  border-radius: 3px;
  transition: all 0.15s;
  position: relative;
}

.policy-strip-nav a + a::before {
  content: "|";
  position: absolute;
  left: 0;
  color: rgba(82, 240, 0, 0.2);
  pointer-events: none;
}

.policy-strip-nav a:hover {
  background: rgba(82, 240, 0, 0.1);
  color: #52f000;
}

/* ═══════════════════════ SHARED FOOTER ═══════════════════════ */
.footer {
  margin-top: 10px;
  padding: 52px 0 0;
  background: linear-gradient(180deg, #131d16 0%, #0d1410 100%);
  border-top: 2px solid #2a3d2f;
  color: #d4e2d7;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 36px;
}

.footer-logo-text {
  font-family: "Oswald", sans-serif;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  color: #f0f6ef;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.footer-logo-text strong { color: #52f000; }

.footer-brand p {
  font-size: 0.88rem;
  color: rgba(212, 226, 215, 0.72);
  line-height: 1.55;
  margin: 0 0 18px;
}

.footer-responsible {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid #52f000;
  border-radius: 4px;
}

.footer-responsible img.footer-18plus {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.footer-responsible span {
  font-size: 0.78rem;
  color: rgba(212, 226, 215, 0.65);
  line-height: 1.45;
}

.footer-col-label {
  font-family: "Oswald", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #52f000;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(82, 240, 0, 0.2);
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-list a {
  color: rgba(212, 226, 215, 0.75);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.18s;
}

.footer-list a:hover { color: #52f000; }

.footer-list--legal a {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-list--legal a::before {
  content: "›";
  color: #52f000;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.footer-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(82, 240, 0, 0.18) 30%, rgba(82, 240, 0, 0.18) 70%, transparent 100%);
}

.footer-trust {
  padding: 28px 0;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-trust-label {
  font-family: "Oswald", sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(212, 226, 215, 0.4);
  white-space: nowrap;
}

.footer-trust-logos {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-trust-logos img {
  height: 32px;
  width: auto;
  opacity: 0.68;
  filter: grayscale(20%) brightness(1.1);
  transition: opacity 0.2s;
}

.footer-trust-logos img:hover { opacity: 1; filter: none; }

.footer-logos-row {
  display: flex;
  gap: 52px;
  align-items: flex-start;
  padding: 28px 0;
  flex-wrap: wrap;
}

.footer-logos-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-pay-logos {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-pay-logos img {
  height: 28px;
  width: auto;
  opacity: 0.68;
  filter: grayscale(15%) brightness(1.05);
  transition: opacity 0.2s;
}

.footer-pay-logos img:hover { opacity: 1; }

.footer-providers img {
  max-height: 44px;
  width: auto;
  max-width: 280px;
  opacity: 0.62;
  filter: grayscale(20%) brightness(1.2);
}

.footer-copy {
  border-top: 1px solid rgba(82, 240, 0, 0.1);
  padding: 16px 0 22px;
  font-size: 0.79rem;
  color: rgba(212, 226, 215, 0.4);
  text-align: center;
}

.footer-copy a {
  color: rgba(212, 226, 215, 0.55);
  text-decoration: none;
}

.footer-copy a:hover { color: #52f000; }

/* ─ Mobile overrides ─ */
@media (max-width: 760px) {
  .topbar-inner {
    flex-direction: row;
    min-height: 56px;
    padding: 0;
    align-items: center;
  }

  .brand {
    flex-direction: row;
    gap: 8px;
    align-items: center;
  }

  .brand-copy { display: none; }
  .main-nav { display: none; }
  .burger { display: flex; }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-logos-row {
    flex-direction: column;
    gap: 20px;
  }
}
