/* =========================================================
   EUROTRON DEFAULT PAGE (page.php)
   Privacy, Terms, policies and any page using the Default template.
   Save as /wp-content/themes/YOUR-THEME/css/ei-page.css
   Loaded automatically by inc/ei-menu.php on default-template pages.
   Uses the colour variables from ei-header.css.
   ========================================================= */

/* ---------- Scoped resets ---------- */
.ei-page-hero, .ei-page { font-family: var(--ei-font); -webkit-font-smoothing: antialiased; }
.ei-page-hero *, .ei-page * { box-sizing: border-box; }
.ei-page-hero p, .ei-page-hero h1, .ei-page-hero ol { margin: 0; padding: 0; }

/* ---------- Buttons (square) ---------- */
.ei-page-hero .ei-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 0; font-weight: 600; font-size: 14.5px; line-height: 1; white-space: nowrap; text-decoration: none; transition: background .2s, color .2s, box-shadow .2s; }
.ei-page-hero .ei-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ei-page-hero .ei-btn--primary { background: var(--ei-green); color: #fff; }
.ei-page-hero .ei-btn--primary:hover { background: #fff; color: var(--ei-black); }
.ei-page-hero .ei-btn--outline { color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); }
.ei-page-hero .ei-btn--outline:hover { box-shadow: inset 0 0 0 2px #fff; }

/* ---------- Hero (dark) ---------- */
.ei-page-hero { background: var(--ei-black); color: #a9afac; border-bottom: 4px solid var(--ei-green); }
.ei-page-hero .ei-wrap { padding-top: 48px; padding-bottom: 48px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.ei-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: #8a918d; margin-bottom: 18px !important; list-style: none; }
.ei-crumbs li { display: flex; align-items: center; gap: 8px; margin: 0; }
.ei-crumbs li + li::before { content: "/"; opacity: .5; }
.ei-crumbs a { color: inherit; text-decoration: none; }
.ei-crumbs a:hover { color: #fff; }
.ei-crumbs [aria-current] { color: #fff; font-weight: 500; }
.ei-page-hero h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.12; letter-spacing: -.02em; color: #fff; font-weight: 700; margin-bottom: 12px !important; }
.ei-page-hero__intro { font-size: 16.5px; line-height: 1.6; color: #c9cecb; max-width: 720px; margin-bottom: 16px !important; }
.ei-page-meta { font-size: 13.5px; color: #8a918d; }
.ei-page-meta strong { color: #fff; font-weight: 600; }
.ei-page-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Layout ---------- */
.ei-page { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; padding-top: 56px; padding-bottom: 88px; align-items: start; }
.ei-page--no-toc { grid-template-columns: minmax(0, 1fr); }
.ei-page--wide { display: block; }

/* ---------- Contents (desktop sidebar) ---------- */
.ei-toc { position: sticky; top: 160px; font-size: 14px; }
.ei-toc__title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ei-ink); margin: 0 0 14px !important; }
.ei-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--ei-line); counter-reset: toc; }
.ei-toc li { counter-increment: toc; margin: 0; }
.ei-toc ol a { display: flex; gap: 10px; padding: 8px 0 8px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ei-text); line-height: 1.45; text-decoration: none; transition: color .15s, border-color .15s; }
.ei-toc ol a::before { content: counter(toc, decimal-leading-zero); font-variant-numeric: tabular-nums; color: var(--ei-muted); font-size: 12.5px; padding-top: 1px; }
.ei-toc ol a:hover { color: var(--ei-black); }
.ei-toc ol a.is-active { color: var(--ei-black); font-weight: 600; border-left-color: var(--ei-green); }
.ei-toc ol a.is-active::before { color: var(--ei-green-dark); }
.ei-toc__toggle { display: none; }

/* =========================================================
   .ei-prose — styles everything the WYSIWYG editor outputs
   ========================================================= */
.ei-prose { max-width: 760px; color: var(--ei-text); font-size: 16px; line-height: 1.75; }
.ei-page--wide .ei-prose { max-width: none; }
.ei-prose > *:first-child { margin-top: 0; }
.ei-prose > * { margin-bottom: 0; }
.ei-prose > * + * { margin-top: 1.1em; }

.ei-prose h2 { font-size: 24px; line-height: 1.3; letter-spacing: -.01em; color: var(--ei-black); font-weight: 700; margin-top: 2.4em; padding-top: 1.4em; border-top: 1px solid var(--ei-line); scroll-margin-top: 170px; }
.ei-prose > h2:first-child { padding-top: 0; border-top: 0; }
.ei-prose h3 { font-size: 18px; line-height: 1.4; color: var(--ei-black); font-weight: 600; margin-top: 1.8em; scroll-margin-top: 170px; }
.ei-prose h4 { font-size: 15.5px; color: var(--ei-black); font-weight: 600; margin-top: 1.5em; }
.ei-prose h2 + *, .ei-prose h3 + *, .ei-prose h4 + * { margin-top: .6em; }

.ei-prose strong, .ei-prose b { color: var(--ei-black); font-weight: 600; }
.ei-prose a { color: var(--ei-green-dark); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(66,143,29,.4); transition: text-decoration-color .15s, color .15s; }
.ei-prose a:hover { color: var(--ei-black); text-decoration-color: var(--ei-green); }

.ei-prose ul, .ei-prose ol { padding-left: 0; margin-left: 0; list-style: none; }
.ei-prose li { position: relative; padding-left: 28px; margin: 0; }
.ei-prose li + li { margin-top: .45em; }
.ei-prose ul > li::before { content: ""; position: absolute; left: 8px; top: .7em; width: 7px; height: 7px; background: var(--ei-green); }
.ei-prose ol { counter-reset: ei-ol; }
.ei-prose ol > li { counter-increment: ei-ol; }
.ei-prose ol > li::before { content: counter(ei-ol) "."; position: absolute; left: 0; top: 0; width: 22px; text-align: right; color: var(--ei-green-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.ei-prose li > ul, .ei-prose li > ol { margin-top: .45em; }

/* Callout (use the editor's "Quote" button) — brand green, black text */
.ei-prose blockquote { margin-left: 0; margin-right: 0; padding: 22px 26px; background: var(--ei-green); color: var(--ei-black); border: 0; border-radius: 0; font-size: 15.5px; font-style: normal; line-height: 1.65; quotes: none; }
.ei-prose blockquote::before, .ei-prose blockquote::after { content: none; }
.ei-prose blockquote p { margin: 0; }
.ei-prose blockquote p + p { margin-top: .6em; }
.ei-prose blockquote strong, .ei-prose blockquote b { color: var(--ei-black); font-weight: 700; }
.ei-prose blockquote a { color: var(--ei-black); text-decoration-color: rgba(13,15,14,.5); }
.ei-prose blockquote cite { display: block; margin-top: .6em; font-style: normal; font-size: 13.5px; font-weight: 600; }

.ei-prose hr { border: 0; height: 1px; background: var(--ei-line); margin: 2.4em 0; }

.ei-prose address { font-style: normal; padding: 20px 24px; background: var(--ei-surface); border-left: 4px solid var(--ei-black); border-radius: 0; line-height: 1.7; font-size: 15px; color: var(--ei-ink); }

/* Tables — black header, green rule, bold first column */
.ei-prose table { width: 100%; border-collapse: collapse; border-spacing: 0; font-size: 14.5px; line-height: 1.55; border: 1px solid var(--ei-line); border-radius: 0; margin-left: 0; margin-right: 0; }
.ei-prose thead th,
.ei-prose table > tbody:first-child > tr:first-child > th { background: var(--ei-black); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; text-align: left; white-space: nowrap; border-bottom: 3px solid var(--ei-green); }
.ei-prose th, .ei-prose td { padding: 14px 18px; vertical-align: top; text-align: left; border: 0; border-bottom: 1px solid var(--ei-line); }
.ei-prose tbody tr:nth-child(even) td { background: var(--ei-surface); }
.ei-prose tbody tr:hover td { background: var(--ei-green-tint); }
.ei-prose tbody tr:last-child td { border-bottom: 0; }
.ei-prose td:first-child { color: var(--ei-black); font-weight: 600; }

.ei-prose code { font-size: .9em; background: var(--ei-surface); padding: 2px 6px; }
.ei-prose img { max-width: 100%; height: auto; }
.ei-prose figure { margin-left: 0; margin-right: 0; }
.ei-prose figcaption { font-size: 13px; color: var(--ei-muted); margin-top: .5em; }
.ei-prose .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.ei-prose .alignright { float: right; margin: .3em 0 1em 1.5em; }
.ei-prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* Page links (<!--nextpage-->) */
.ei-page-links { margin-top: 2em; display: flex; gap: 6px; font-weight: 600; }

/* Back to top */
.ei-page-top { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ei-line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 14px; color: var(--ei-muted); }
.ei-page-top a { color: var(--ei-black); font-weight: 600; text-decoration: none; }
.ei-page-top a:hover { color: var(--ei-green-dark); }

/* ---------- Large screens: use the extra width ---------- */
@media (min-width: 1440px) {
  .ei-page { grid-template-columns: 300px minmax(0, 1fr); gap: 88px; }
  .ei-prose { max-width: 920px; font-size: 16.5px; }
  .ei-page-hero .ei-wrap { padding-top: 60px; padding-bottom: 60px; }
}
@media (min-width: 1800px) {
  .ei-page { grid-template-columns: 320px minmax(0, 1fr); gap: 120px; }
  .ei-prose { max-width: 1040px; font-size: 17px; }
}

/* ---------- Tablet & mobile: contents becomes a sticky dropdown ---------- */
@media (max-width: 1024px) {
  .ei-page { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 0; }
  .ei-page--no-toc, .ei-page--wide { padding-top: 40px; }

  .ei-toc { position: sticky; top: var(--ei-sticky-top, 0px); z-index: 50; margin: 0 -24px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--ei-line); }
  .ei-toc__title { display: none; }
  .ei-toc__toggle { display: flex; align-items: center; gap: 12px; width: 100%; height: 56px; padding: 0; border: 0; border-radius: 0; background: none; font: inherit; font-size: 14.5px; color: var(--ei-black); cursor: pointer; text-align: left; }
  .ei-toc__label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--ei-black); padding: 6px 10px; white-space: nowrap; }
  .ei-toc__current { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ei-toc__chev { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: square; transition: transform .2s; }
  .ei-toc.is-open .ei-toc__chev { transform: rotate(180deg); }

  .ei-toc ol { position: absolute; left: 0; right: 0; top: 100%; max-height: min(60vh, 440px); overflow-y: auto; background: #fff; border: 0; border-top: 3px solid var(--ei-green); box-shadow: 0 18px 40px rgba(13,15,14,.16); padding: 0; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; }
  .ei-toc.is-open ol { opacity: 1; visibility: visible; transform: none; }
  .ei-toc ol a { padding: 14px 24px; margin: 0; border-left: 0; border-bottom: 1px solid var(--ei-line); }
  .ei-toc li:last-child a { border-bottom: 0; }
  .ei-toc ol a:hover { background: var(--ei-surface); }
  .ei-toc ol a.is-active { background: var(--ei-black); color: #fff; }
  .ei-toc ol a.is-active::before { color: var(--ei-green); }

  .ei-prose h2, .ei-prose h3 { scroll-margin-top: calc(var(--ei-sticky-top, 0px) + 80px); }
}
@media (max-width: 620px) {
  .ei-page-hero .ei-wrap { padding-top: 32px; padding-bottom: 32px; }
  .ei-page-hero__cta, .ei-page-hero__cta .ei-btn { width: 100%; }
  .ei-toc { margin: 0 -16px; padding: 0 16px; }
  .ei-toc ol a { padding-left: 16px; padding-right: 16px; }
  .ei-prose { font-size: 15.5px; }
  .ei-prose h2 { font-size: 21px; }
  .ei-prose table { display: block; overflow-x: auto; max-width: 100%; }
  .ei-prose .alignleft, .ei-prose .alignright { float: none; margin: 1em 0; }
}

/* ---------- Print ---------- */
@media print {
  .ei-topbar, .ei-header, .ei-cta, .ei-footer, .ei-toc, .ei-page-top, .ei-page-hero__cta, .ei-crumbs { display: none !important; }
  .ei-page-hero { background: none; color: #000; border: 0; }
  .ei-page-hero h1, .ei-page-meta strong { color: #000; }
  .ei-page { display: block; padding: 0; }
  .ei-prose { max-width: none; font-size: 11pt; }
  .ei-prose thead th { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}