/*
Theme Name: Connect Srpska
Theme URI: https://rep-srpska.at
Author: Connect Srpska
Description: Business platform theme for Connect Srpska, the Representative Office of Republika Srpska in Austria. Trilingual (DE/SR/EN), Polylang/WPML-ready, with a company directory, business opportunities, investment projects, events, stories, lead capture (CRM) and consent-gated tracking.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: connect-srpska
*/

/* ---------------------------------------------------------------
   Tokens
--------------------------------------------------------------- */
:root {
  --navy: #1D3F7E;
  --navy-deep: #142C5A;
  --red: #C41F30;
  --red-deep: #9F1826;
  --white: #FFFFFF;
  --surface: #F3F6FB;
  --ink: #101A2E;
  --slate: #5B6472;
  --line: #E2E7F0;
  --green: #2F9E5B;

  --font-head: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1200px;
  --gut: clamp(1.25rem, 4vw, 2.5rem);
  --shadow: 0 8px 24px rgba(29, 63, 126, .08);
  --shadow-lift: 0 14px 32px rgba(29, 63, 126, .14);
  --r: 14px;
  --header-h: 76px;
}

/* ---------------------------------------------------------------
   Base
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: .18em; }
a:hover { color: var(--navy-deep); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 4px; }
.section--navy :focus-visible, .site-footer :focus-visible { outline-color: #fff; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.028em; line-height: 1.03; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 800; letter-spacing: -.022em; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.5rem); font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.25rem); color: var(--slate); max-width: 58ch; }
.muted { color: var(--slate); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 200; border-radius: 0 0 8px 8px; }
.skip:focus { top: 0; color: #fff; }
.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
ul, ol { padding: 0; margin: 0; list-style: none; }
button { font: inherit; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------
   Buttons & links
--------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.2 var(--font-head); text-decoration: none; cursor: pointer;
  background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 1.5rem calc(100% - .55rem); background-size: 0 2px;
  transition: background-color .2s, color .2s, border-color .2s, background-size .25s;
}
.btn--sm { padding: .6rem 1.1rem; font-size: .95rem; background-position: 1.1rem calc(100% - .4rem); }
.btn--primary { background-color: var(--red); color: #fff; }
.btn--primary:hover { background-color: var(--red-deep); color: #fff; background-size: calc(100% - 3rem) 2px; }
.btn--ghost { border-color: var(--navy); color: var(--navy); background-color: transparent; }
.btn--ghost:hover { background-color: var(--navy); color: #fff; }
.btn--light { border-color: #fff; color: #fff; background-color: transparent; }
.btn--light:hover { background-color: #fff; color: var(--navy); }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-family: var(--font-head); color: var(--navy); text-decoration: none; }
.link-arrow .i { transition: transform .2s; }
a:hover > .link-arrow .i, .link-arrow:hover .i { transform: translateX(4px); }
.linklike { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; text-underline-offset: .18em; }
.i { flex: none; vertical-align: -.15em; }

/* ---------------------------------------------------------------
   Header & mega menu
--------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); transition: box-shadow .2s; isolation: isolate; }
/* Blur lives on a pseudo-element, never on .site-header itself: backdrop-filter/filter/transform on an
   ancestor makes it the containing block for position:fixed children, which broke the mobile nav panel. */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px);
  }
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(29, 63, 126, .08); }
.site-header .wrap { width: min(100% - 2 * var(--gut), 1400px); }
.site-header__bar { display: flex; align-items: center; gap: 1rem; height: var(--header-h); transition: height .2s; }
.site-header.is-scrolled .site-header__bar { height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; flex: none; }
.brand img, .custom-logo { display: block; height: 48px; width: auto; transition: height .2s; }
.site-header.is-scrolled .brand img, .site-header.is-scrolled .custom-logo { height: 40px; }
.footer__logo { display: block; height: 64px; width: auto; margin-bottom: 1.25rem; }
@media (max-width: 480px) { .brand img, .custom-logo { height: 40px; } }

.nav { flex: 1; min-width: 0; display: flex; align-self: stretch; }
.nav__list { display: flex; gap: .25rem; justify-content: center; align-items: stretch; width: 100%; }
.nav__list > li { position: static; display: flex; align-items: center; }
.nav__list a { display: block; white-space: nowrap; padding: .6rem .6rem; color: var(--ink); text-decoration: none; font: 600 .93rem var(--font-head); border-radius: 8px; }
.nav__list > li > a:hover, .nav__list > li.is-current > a { color: var(--navy); box-shadow: inset 0 -2px 0 var(--navy); border-radius: 0; }
.nav__toggle { background: none; border: 0; padding: .4rem; margin-left: -.5rem; color: var(--slate); cursor: pointer; border-radius: 6px; }
.nav__toggle .i { transition: transform .2s; }
.nav li.is-open > .nav__toggle .i { transform: rotate(180deg); }

.mega { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 24px 40px rgba(29, 63, 126, .12); }
.nav__list > li:hover > .mega, .nav__list > li:focus-within > .mega, .nav__list > li.is-open > .mega { display: block; }
.mega__inner { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; padding: 2rem 0 2.25rem; }
.mega__list { columns: 2; column-gap: 2rem; align-content: start; }
.mega__list li { break-inside: avoid; }
.mega__list a { padding: .65rem 0; border-bottom: 1px solid var(--line); border-radius: 0; font-weight: 600; white-space: normal; }
.mega__list a:hover { color: var(--red); }
.nav .mega__tile { display: flex; flex-direction: column; gap: .4rem; justify-content: flex-end; min-height: 150px; padding: 1.25rem; border-radius: var(--r); background: var(--navy); color: #fff !important; text-decoration: none; white-space: normal; }
.nav .mega__tile span { font-size: .85rem; opacity: .8; }
.nav .mega__tile strong { font: 700 1.2rem/1.25 var(--font-head); }
.nav .mega__tile:hover { background: var(--navy-deep); }

.site-header__tools { flex: none; display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.lang ul { display: flex; gap: .15rem; }
.lang a { display: block; padding: .3rem .5rem; font: 700 .85rem var(--font-head); color: var(--slate); text-decoration: none; border-radius: 6px; }
.lang a[aria-current="true"] { color: var(--navy); background: var(--surface); }
.lang a:hover { color: var(--navy); }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; }
.burger__bars, .burger__bars::before, .burger__bars::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; margin: auto; position: relative; transition: transform .2s, background .2s; }
.burger__bars::before, .burger__bars::after { content: ""; position: absolute; left: 0; }
.burger__bars::before { top: -6px; } .burger__bars::after { top: 6px; }
.burger[aria-expanded="true"] .burger__bars { background: transparent; }
.burger[aria-expanded="true"] .burger__bars::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1320px) {
  .burger { display: block; }
  .site-header__tools .btn { display: none; }
  /* Closed state: the real menu stays hidden in the header. JS moves the whole
     #site-nav node into #nav-overlay (a fixed panel appended straight to <body>)
     when opened, so the panel's positioning can never be broken by a filter,
     backdrop-filter, transform or perspective on an ancestor such as .site-header:
     any of those would otherwise make that ancestor the containing block for a
     position:fixed descendant, trapping the panel inside the header bar. */
  .nav { display: none; }
  .nav-overlay__body .nav { display: block; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list > li { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav__list > li > a { flex: 1; font-size: 1.15rem; padding: .95rem 0; }
  .nav__list > li > a:hover { box-shadow: none; }
  .nav__toggle { padding: .9rem; }
  .mega { position: static; width: 100%; box-shadow: none; border: 0; }
  .nav__list > li:hover > .mega, .nav__list > li:focus-within > .mega { display: none; }
  .nav__list > li.is-open > .mega { display: block; }
  .mega__inner { display: block; width: 100%; padding: 0 0 1rem 1rem; }
  .mega__list { columns: 1; }
  .mega__tile { display: none; }
}

/* Mobile nav overlay: a top-level panel, not nested inside .site-header. */
.nav-overlay { position: fixed; inset: 0; z-index: 200; background: #fff; display: flex; flex-direction: column; opacity: 0; transition: opacity .18s ease; }
.nav-overlay[hidden] { display: none; }
.nav-overlay.is-open { opacity: 1; }
.nav-overlay__bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--header-h); padding: 0 var(--gut); border-bottom: 1px solid var(--line); }
.nav-overlay__body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: .5rem var(--gut) 3rem; }
.nav-overlay__close { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; color: var(--ink); }
body.nav-open { overflow: hidden; }

/* ---------------------------------------------------------------
   Sections
--------------------------------------------------------------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tint { background: var(--surface); }
.section--flush { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.section--compact { padding-block: 2.5rem; border-top: 1px solid var(--line); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2 { color: #fff; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2.25rem; }
.section__head h2 { margin: 0; }
.section__head p { margin: .5rem 0 0; }
.section__head--stack { display: block; }
.section__head--stack .lead { margin-top: .75rem; }
.h-small { font-size: 1rem; font-weight: 700; color: var(--slate); letter-spacing: 0; }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split--even { grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 860px) { .split, .split--even { grid-template-columns: 1fr; } .section__head { flex-direction: column; align-items: flex-start; gap: 1rem; } }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2rem; align-items: center; min-height: min(85vh, 780px); padding-block: 3rem; }
.hero__copy h1 { max-width: 18ch; margin-bottom: .5em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.hero__map { color: var(--navy); }
.netmap { width: 100%; max-height: 640px; overflow: visible; }
.netmap__lines { opacity: .38; }
.netmap text { fill: var(--slate); font-family: var(--font-body); paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }
.netmap text.hub { fill: var(--navy); font-family: var(--font-head); font-weight: 800; }
.netmap__arc { stroke-dasharray: 520; stroke-dashoffset: 520; animation: cs-draw 2.4s .3s cubic-bezier(.6, 0, .2, 1) forwards; }
.netmap__pulse { opacity: 0; animation: cs-show .1s 2.7s forwards; }
@keyframes cs-draw { to { stroke-dashoffset: 0; } }
@keyframes cs-show { to { opacity: 1; } }
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; min-height: 0; } .hero__map { order: -1; max-width: 420px; margin-inline: auto; } }

/* What is: stats + pillars */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.stat dt { font: 800 clamp(1.8rem, 3.4vw, 2.6rem)/1 var(--font-head); color: var(--navy); letter-spacing: -.03em; }
.stat dd { margin: .4rem 0 0; font-size: .85rem; line-height: 1.35; color: var(--slate); }
.pillars li { border-top: 1px solid var(--line); }
.pillars li:last-child { border-bottom: 1px solid var(--line); }
.pillars a { display: grid; grid-template-columns: 11rem 1fr auto; gap: 1rem; align-items: center; padding: 1.25rem .5rem; color: var(--ink); text-decoration: none; transition: background .2s, padding .2s; }
.pillars a:hover { background: #fff; padding-inline: 1rem; }
.pillars strong { font: 800 1.35rem var(--font-head); color: var(--navy); letter-spacing: -.015em; }
.pillars span { color: var(--slate); }
.pillars .i { color: var(--red); }
@media (max-width: 560px) { .pillars a { grid-template-columns: 1fr auto; } .pillars span { grid-column: 1; } .pillars .i { grid-row: 1; grid-column: 2; } .stats { grid-template-columns: 1fr; } }

/* Programs (a true sequence, so numbered) */
.programs li { border-top: 1px solid var(--line); }
.programs li:last-child { border-bottom: 1px solid var(--line); }
.programs a { position: relative; display: grid; grid-template-columns: 4.5rem 1fr 1.3fr auto; gap: 1.5rem; align-items: center; padding: 1.75rem .5rem; color: var(--ink); text-decoration: none; }
.programs a::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--navy); transition: width .3s; }
.programs a:hover::before { width: 100%; }
.programs a:hover { background: var(--surface); }
.programs__no { font: 800 1.1rem var(--font-head); color: var(--slate); }
.programs strong { font: 800 clamp(1.3rem, 2.4vw, 1.9rem) var(--font-head); letter-spacing: -.02em; color: var(--navy); }
.programs__d { color: var(--slate); }
@media (max-width: 860px) { .programs a { grid-template-columns: 3rem 1fr; } .programs__d, .programs .link-arrow { grid-column: 2; } }

/* Grids and cards */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.card:hover, .card:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__body { display: flex; flex-direction: column; gap: .5rem; padding: 1.35rem; flex: 1; }
.card__body h3 { margin: 0; font-size: 1.2rem; }
.card__body h3 a { color: var(--ink); text-decoration: none; }
.card__meta { margin: 0; color: var(--slate); font-weight: 600; }
.card__text { margin: 0; color: var(--slate); font-size: .95rem; }
.card .link-arrow { margin-top: auto; padding-top: .5rem; }
.stretch::after { content: ""; position: absolute; inset: 0; }
.chip { align-self: flex-start; padding: .2rem .65rem; border-radius: 999px; background: var(--surface); color: var(--navy); font: 700 .8rem var(--font-head); }
.facts { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .88rem; color: var(--slate); }
.facts li { display: inline-flex; align-items: center; gap: .3rem; }
.card--opp { border-left: 4px solid var(--navy); }
.card--company .card__logo { display: grid; place-items: center; height: 120px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 1rem; }
.card--company .card__logo img { max-height: 80px; width: auto; object-fit: contain; }
.card__initial { font: 800 2.4rem var(--font-head); color: var(--navy); }

/* Invest reasons */
.reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2rem 1.75rem; margin: 2.5rem 0; }
.reasons li { padding-top: 1rem; border-top: 3px solid var(--navy); }
.reasons strong { display: block; font: 800 1.15rem/1.25 var(--font-head); margin-bottom: .5rem; }
.reasons span { color: var(--slate); font-size: .95rem; }

/* Two markets */
.duo { display: grid; grid-template-columns: 1fr 3rem 1fr; gap: 1rem; align-items: stretch; margin-bottom: 2.5rem; }
.duo__col { padding: 2rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.duo__col h3 { color: var(--navy); margin-bottom: 1rem; }
.duo__col li { padding: .6rem 0; border-top: 1px solid var(--line); font-weight: 600; }
.duo__link { position: relative; }
.duo__link i { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--navy); opacity: .35; }
.duo__link::before, .duo__link::after { content: ""; position: absolute; left: 50%; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: var(--navy); }
.duo__link::before { top: 0; } .duo__link::after { bottom: 0; background: var(--red); }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } .duo__link { display: none; } }

/* Events */
.stack { display: flex; flex-direction: column; gap: 1rem; }
.event { position: relative; display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 1.5rem; align-items: center; padding: 1.25rem 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); transition: box-shadow .2s, transform .2s; }
.event:hover, .event:focus-within { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.event__date { display: flex; flex-direction: column; align-items: center; padding: .55rem 0; border-radius: 10px; background: var(--navy); color: #fff; line-height: 1; }
.event__date b { font: 800 1.7rem var(--font-head); }
.event__date span { font-size: .8rem; margin-top: .2rem; }
.event h3 { margin: 0 0 .3rem; font-size: 1.2rem; }
.event h3 a { color: var(--ink); text-decoration: none; }
@media (max-width: 640px) { .event { grid-template-columns: 4rem 1fr; } .event .link-arrow { grid-column: 2; } }

/* Insights */
.posts li { display: grid; grid-template-columns: 9rem 1fr auto; gap: 1.5rem; align-items: baseline; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.posts li:last-child { border-bottom: 1px solid var(--line); }
.posts time { color: var(--slate); font-size: .9rem; }
.posts a { text-decoration: none; color: var(--ink); }
.posts a strong { display: block; font: 700 1.25rem var(--font-head); }
.posts a span { color: var(--slate); }
@media (max-width: 720px) { .posts li { grid-template-columns: 1fr; gap: .4rem; } }

/* Partners */
.partners { display: flex; flex-wrap: wrap; gap: 2rem 3rem; align-items: center; }
.partner img { max-height: 48px; width: auto; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.partner a:hover img { filter: none; opacity: 1; }
.partner span { font: 700 1rem var(--font-head); color: var(--slate); }

/* Final CTA */
.cta { text-align: left; }
.cta h2 { max-width: 20ch; font-size: clamp(2rem, 4.6vw, 3.4rem); }

/* Empty state */
.empty { padding: 2rem; border: 1px dashed #b9c4d6; border-radius: var(--r); color: var(--slate); background: #fff; margin: 0; }

/* ---------------------------------------------------------------
   Inner pages
--------------------------------------------------------------- */
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: .3em; max-width: 24ch; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .88rem; color: var(--slate); margin-bottom: 1rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }
.crumbs a { color: var(--slate); }
.entry > p, .entry > ul, .entry > ol, .entry > h2, .entry > h3, .entry > blockquote { max-width: 68ch; }
.entry > ul { list-style: disc; padding-left: 1.25rem; } .entry > ol { list-style: decimal; padding-left: 1.25rem; }
.entry .alignwide, .entry .alignfull { max-width: none; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 3rem; align-items: start; }
.detail__img { width: 100%; border-radius: var(--r); margin-bottom: 1.5rem; }
.detail__side { position: sticky; top: calc(var(--header-h) + 1rem); display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.detail__logo { display: grid; place-items: center; min-height: 96px; padding: 1rem; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.detail__logo .card__initial { font-size: 2.8rem; }
.member-since { margin: .6rem 0 0; font-size: .82rem; font-weight: 700; color: var(--slate); text-align: center; }
.share-row { display: flex; flex-direction: column; gap: .6rem; padding-top: 1rem; margin-top: .25rem; border-top: 1px solid var(--line); }
.share-row .btn { gap: .5rem; white-space: nowrap; }
.dl { display: grid; gap: .2rem; margin: 0; }
.dl dt { font: 700 .82rem var(--font-head); color: var(--slate); margin-top: .7rem; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } .detail__side { position: static; } }

/* Editorial content blocks */
.entry h2 { margin-top: 2.5rem; font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.entry h3 { margin-top: 1.5rem; font-size: 1.2rem; }
.entry .callout { max-width: 68ch; margin: 0 0 1.75rem; padding: 1rem 1.25rem; border-left: 4px solid var(--navy); background: var(--surface); border-radius: 0 10px 10px 0; font-size: .96rem; }
.entry .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2.25rem 0 .5rem; }
.entry table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .96rem; }
.entry th, .entry td { text-align: left; vertical-align: top; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.entry th { background: var(--surface); font: 700 .9rem var(--font-head); }
.entry td:first-child { font-weight: 600; width: 32%; }
@media (max-width: 640px) { .entry table, .entry thead, .entry tbody, .entry tr, .entry th, .entry td { display: block; width: 100%; } .entry thead { display: none; } .entry td:first-child { width: 100%; padding-bottom: 0; border-bottom: 0; } }

/* Gallery and quote inside content */
.entry .gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 2rem 0; max-width: none; }
.entry .gallery-item { margin: 0; }
.entry .gallery-icon a, .entry .gallery-icon img { display: block; width: 100%; }
.entry .gallery-icon img { height: auto; border-radius: 12px; }
@media (max-width: 560px) { .entry .gallery { grid-template-columns: 1fr; } }
.entry blockquote { margin: 2rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 4px solid var(--navy); }
.entry blockquote p { font: 700 1.2rem/1.5 var(--font-head); color: var(--navy); margin: 0; }

/* Hub pages */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.hub a { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; align-items: center; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); background: #fff; transition: border-color .2s, transform .2s; }
.hub a:hover { border-color: var(--navy); transform: translateY(-2px); }
.hub strong { font: 700 1.1rem var(--font-head); color: var(--navy); }
.hub span { grid-column: 1; color: var(--slate); font-size: .9rem; }
.hub .i { grid-row: 1 / span 2; grid-column: 2; color: var(--red); }
.chooser h2 { margin-bottom: 1.5rem; }
.choice { display: grid; gap: .5rem; padding: 1.75rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.choice:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.choice strong { font: 800 1.3rem var(--font-head); color: var(--navy); }
.choice span { color: var(--slate); }
.choice .i { color: var(--red); margin-top: .5rem; }

/* Filters & pagination */
.filters { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }
.filters input, .filters select { min-height: 44px; padding: .55rem .9rem; border: 1px solid #c8d1df; border-radius: 10px; background: #fff; font: inherit; color: var(--ink); }
.filters input { min-width: 220px; }
.pager { margin-top: 2.5rem; }
.pager .page-numbers, .pager .nav-links { display: inline-flex; gap: .35rem; flex-wrap: wrap; }
.pager .page-numbers { min-width: 40px; height: 40px; padding: 0 .7rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 700; }
.pager .page-numbers.current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------------------------------------------------------------
   Forms
--------------------------------------------------------------- */
.form-wrap { max-width: 720px; }
.form-wrap--inline { max-width: none; }
.form { display: grid; gap: 1.1rem; }
.form-wrap--inline .form { grid-template-columns: 1fr auto; align-items: end; gap: .75rem; }
.form-wrap--inline .check, .form-wrap--inline .hp { grid-column: 1 / -1; }
.field { display: grid; gap: .35rem; }
.field label { font: 700 .92rem var(--font-head); }
.field input, .field textarea { width: 100%; min-height: 48px; padding: .7rem .95rem; border: 1px solid #b9c4d6; border-radius: 10px; background: #fff; font: inherit; color: var(--ink); }
.field input[type="file"] { padding: .55rem .7rem; cursor: pointer; }
.field input[type="file"]::file-selector-button { margin-right: .75rem; padding: .5rem 1rem; border: 0; border-radius: 8px; background: var(--surface); color: var(--navy); font: 700 .9rem var(--font-head); cursor: pointer; }
.field input[type="file"]::file-selector-button:hover { background: var(--line); }
.field input:focus, .field textarea:focus { border-color: var(--navy); outline: 3px solid rgba(29, 63, 126, .2); outline-offset: 0; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; color: var(--slate); }
.check input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--navy); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 1rem 1.25rem; border-radius: 10px; margin: 0 0 1.25rem; font-weight: 600; }
.notice--ok { background: #e8f6ee; color: #1d6b3d; border: 1px solid #b7e0c5; }
.notice--err { background: #fdecec; color: #9b1319; border: 1px solid #f3b9bc; }
@media (max-width: 560px) { .form-wrap--inline .form { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------
   Footer & consent
--------------------------------------------------------------- */
.site-footer { background: var(--navy-deep); color: #d6e0f2; padding-top: 4rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; }
.footer__brand p { max-width: 40ch; }
.footer__h { font: 700 .95rem var(--font-head); color: #fff; }
.footer__col li { margin-bottom: .55rem; }
.footer__col a { text-decoration: none; font-weight: 600; }
.site-footer address { font-style: normal; margin-bottom: 1rem; }
.site-footer .link-arrow { color: #fff; }
.social { display: flex; gap: .75rem; margin-top: 1rem; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; }
.social a:hover { background: #fff; color: var(--navy); }
.footer__bar { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; padding-block: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .9rem; }
.footer__bar p { margin: 0; }
.footer__bar p:first-child { margin-right: auto; }
.footer__bar .credit a { font-weight: 700; }
.footer__bar ul { display: flex; gap: 1.25rem; }
.footer__bar a { text-decoration: none; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr; gap: 2rem; } }

.consent { position: fixed; z-index: 300; left: 1rem; right: 1rem; bottom: 1rem; max-width: 560px; padding: 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 20px 50px rgba(16, 24, 38, .25); }
.consent h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.consent p { font-size: .92rem; color: var(--slate); }
.consent__opts { display: grid; gap: .5rem; margin-bottom: 1.1rem; }
.consent__opts .check { color: var(--ink); }
.consent__actions { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }

/* ---------------------------------------------------------------
   Motion preferences
--------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .netmap__arc { stroke-dashoffset: 0; animation: none; }
  .netmap__pulse { display: none; }
}
