/* ============================================================
CMS FRONTEND THEME — WORLDCLASS DARK
------------------------------------------------------------
A coherent dark interface system for the existing CMS markup.
No patch layers, no markdown fences, no cascade roulette.
============================================================ */

/* ============================================================
01. DESIGN TOKENS
============================================================ */
:root {
color-scheme: dark;

/* Canvas */
--color-bg: #060a0f;
--color-bg-soft: #080d14;

/* Surfaces */
--color-bg-alt: #0b121a;
--color-bg-elevated: #0f1823;
--color-bg-strong: #13202d;
--color-bg-hover: #172635;

/* Typography */
--color-text: #f4f7fb;
--color-text-soft: #c8d1dc;
--color-text-muted: #98a5b5;
--color-text-faint: #697789;

/* Brand / interaction */
--color-primary: #79a9ff;
--color-primary-hover: #9fc4ff;
--color-primary-active: #5e94f5;
--color-primary-soft: rgba(121, 169, 255, 0.11);
--color-primary-softer: rgba(121, 169, 255, 0.06);
--color-accent: #8d89ff;
--color-accent-cyan: #74d4eb;

/* Lines */
--color-border: #1a2735;
--color-border-strong: #26384b;
--color-border-hover: #3a5878;
--color-hairline: rgba(165, 192, 221, 0.11);

/* Semantic */
--color-success: #62d7ae;
--color-success-soft: rgba(98, 215, 174, 0.10);
--color-danger: #ff7d91;
--color-danger-soft: rgba(255, 125, 145, 0.10);
--color-warning: #f4c66d;

/* Type */
--font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
--font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "Roboto Mono",
Consolas, "Liberation Mono", monospace;

/* Spacing — 4px base */
--space-1: 0.25rem;
--space-2: 0.5rem;
--space-3: 0.75rem;
--space-4: 1rem;
--space-5: 1.25rem;
--space-6: 1.5rem;
--space-7: 1.75rem;
--space-8: 2rem;
--space-10: 2.5rem;
--space-12: 3rem;
--space-14: 3.5rem;
--space-16: 4rem;
--space-20: 5rem;
--space-24: 6rem;

/* Layout */
--container-max: 1160px;
--container-narrow: 760px;
--container-reading: 68ch;

/* Shape */
--radius-xs: 6px;
--radius-sm: 9px;
--radius-md: 12px;
--radius-lg: 16px;
--radius-xl: 22px;
--radius-2xl: 28px;
--radius-full: 9999px;

/* Elevation */
--shadow-xs:
0 1px 2px rgba(0, 0, 0, 0.34),
inset 0 1px 0 rgba(255, 255, 255, 0.018);
--shadow-sm:
0 8px 24px -14px rgba(0, 0, 0, 0.72),
inset 0 1px 0 rgba(255, 255, 255, 0.022);
--shadow-md:
0 18px 44px -20px rgba(0, 0, 0, 0.82),
0 4px 14px -10px rgba(0, 0, 0, 0.55),
inset 0 1px 0 rgba(255, 255, 255, 0.026);
--shadow-lg:
0 30px 80px -28px rgba(0, 0, 0, 0.88),
0 10px 30px -20px rgba(0, 0, 0, 0.70),
inset 0 1px 0 rgba(255, 255, 255, 0.03);
--shadow-primary:
0 10px 32px -15px rgba(78, 135, 240, 0.72);

/* Interaction */
--ease-standard: cubic-bezier(0.2, 0.75, 0.25, 1);
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
--transition-fast: 140ms ease;
--transition-normal: 220ms var(--ease-standard);
--transition-slow: 380ms var(--ease-out);

/* Focus */
--focus-ring: 0 0 0 4px rgba(121, 169, 255, 0.17);
}

/* ============================================================
02. RESET / DOCUMENT
============================================================ */
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}

html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
scroll-behavior: smooth;
background: var(--color-bg);
scrollbar-color: #34475c #090f16;
scrollbar-width: thin;
}

body {
min-height: 100vh;
display: flex;
flex-direction: column;
overflow-x: hidden;
font-family: var(--font-sans);
font-size: 1rem;
line-height: 1.65;
color: var(--color-text);
background:
radial-gradient(900px 500px at 12% -160px, rgba(77, 126, 211, 0.11), transparent 66%),
radial-gradient(760px 520px at 88% 12%, rgba(101, 83, 190, 0.045), transparent 70%),
linear-gradient(180deg, #070c12 0%, var(--color-bg) 32%, #060a0f 100%);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}

body::before {
content: "";
position: fixed;
inset: 0;
z-index: -1;
pointer-events: none;
background-image:
linear-gradient(rgba(255,255,255,0.011) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,0.009) 1px, transparent 1px);
background-size: 72px 72px;
mask-image: linear-gradient(to bottom, rgba(0,0,0,.28), transparent 48%);
-webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.28), transparent 48%);
}

img,
picture,
video,
canvas,
svg {
display: block;
max-width: 100%;
height: auto;
}

input,
button,
textarea,
select {
font: inherit;
}

button,
a {
-webkit-tap-highlight-color: transparent;
}

button {
color: inherit;
}

::selection {
color: #fff;
background: rgba(121, 169, 255, 0.31);
}

:where(a, button, input, textarea, select, summary):focus-visible {
outline: 2px solid var(--color-primary);
outline-offset: 3px;
box-shadow: var(--focus-ring);
}

::-webkit-scrollbar {
width: 11px;
height: 11px;
}

::-webkit-scrollbar-track {
background: #080d13;
}

::-webkit-scrollbar-thumb {
min-height: 44px;
border: 3px solid #080d13;
border-radius: var(--radius-full);
background: #33475c;
}

::-webkit-scrollbar-thumb:hover {
background: #425b74;
}

/* ============================================================
03. HEADER / PRIMARY NAVIGATION
============================================================ */
header {
position: sticky;
top: 0;
z-index: 100;
border-bottom: 1px solid rgba(151, 181, 214, 0.13);
background: rgba(6, 10, 15, 0.78);
box-shadow: 0 10px 35px rgba(0, 0, 0, 0.16);
backdrop-filter: saturate(145%) blur(20px);
-webkit-backdrop-filter: saturate(145%) blur(20px);
}

header::after {
content: "";
position: absolute;
inset: auto 0 -1px;
height: 1px;
pointer-events: none;
background: linear-gradient(
90deg,
transparent 0%,
rgba(121, 169, 255, 0.16) 28%,
rgba(141, 137, 255, 0.10) 62%,
transparent 100%
);
}

header nav {
width: min(100% - 2rem, var(--container-max));
min-height: 64px;
margin: 0 auto;
display: flex;
align-items: center;
gap: var(--space-5);
}

header nav > a:first-child {
position: relative;
display: inline-flex;
align-items: center;
gap: 0.62rem;
flex: 0 0 auto;
color: var(--color-text);
text-decoration: none;
font-size: 0.98rem;
font-weight: 760;
line-height: 1;
letter-spacing: -0.025em;
transition: color var(--transition-fast), transform var(--transition-normal);
}

header nav > a:first-child::before {
content: "";
width: 10px;
height: 10px;
flex: 0 0 auto;
border-radius: 50%;
background: linear-gradient(135deg, #86b6ff 0%, #6f9cff 52%, #9a8cff 100%);
box-shadow:
0 0 0 4px rgba(121, 169, 255, 0.08),
0 0 20px rgba(121, 169, 255, 0.36);
}

header nav > a:first-child:hover {
color: #ffffff;
transform: translateY(-1px);
}

header nav > a:not(:first-child) {
display: inline-flex;
align-items: center;
min-height: 36px;
padding: 0.45rem 0.6rem;
border-radius: var(--radius-sm);
color: var(--color-text-muted);
text-decoration: none;
font-size: 0.835rem;
font-weight: 560;
line-height: 1;
transition:
color var(--transition-fast),
background-color var(--transition-fast);
}

header nav > a:not(:first-child):hover {
color: #e7eef8;
background: rgba(255, 255, 255, 0.045);
}

/* ============================================================
04. PAGE SHELL
============================================================ */
main {
width: min(100%, var(--container-max));
flex: 1;
margin: 0 auto;
padding: clamp(2.8rem, 5vw, 4.8rem) var(--space-6) clamp(5rem, 8vw, 7rem);
}

article.page {
width: 100%;
min-width: 0;
}

/* Deliberate rhythm between top-level CMS blocks. */
article.page > :where(.cms-container, .text-block, .html-block, .card-grid-section, .video-block, .quote-block, .file-block, .children-block, .osm-map-block, .youtube-block, .image-gallery-block) +
:where(.cms-container, .text-block, .html-block, .card-grid-section, .video-block, .quote-block, .file-block, .children-block, .osm-map-block, .youtube-block, .image-gallery-block) {
margin-top: clamp(2rem, 4.5vw, 3.75rem);
}

/* Custom-background widgets become intentional visual islands. */
article.page > .cms-container[style*="background"] {
overflow: clip;
border-radius: var(--radius-xl);
box-shadow:
0 28px 70px -34px rgba(0, 0, 0, 0.72),
0 0 0 1px rgba(255, 255, 255, 0.025);
}

/* ============================================================
05. PAGE TYPOGRAPHY
============================================================ */
.admin-edit-link {
display: inline-flex;
align-items: center;
gap: 0.38rem;
width: fit-content;
margin-bottom: 0.85rem;
color: #7e94ad;
text-decoration: none;
font-size: 0.73rem;
font-weight: 580;
line-height: 1;
letter-spacing: 0.005em;
opacity: 0.86;
transition: color var(--transition-fast), opacity var(--transition-fast);
}

.admin-edit-link::before {
content: "✎";
color: #6486ad;
font-size: 0.72rem;
}

.admin-edit-link:hover {
color: var(--color-primary-hover);
opacity: 1;
}

article.page :where(h1, h2, h3, h4, h5, h6) {
color: var(--color-text);
text-wrap: balance;
}

article.page h1 {
max-width: 17ch;
margin: 0 0 clamp(1.65rem, 3vw, 2.2rem);
font-size: clamp(2.15rem, 5vw, 3.45rem);
font-weight: 790;
line-height: 1.02;
letter-spacing: -0.048em;
}

article.page h2 {
max-width: 24ch;
margin: clamp(3.5rem, 6vw, 5rem) 0 1.15rem;
font-size: clamp(1.55rem, 3vw, 2.15rem);
font-weight: 730;
line-height: 1.13;
letter-spacing: -0.034em;
}

article.page h3 {
margin: 2.8rem 0 0.9rem;
font-size: clamp(1.2rem, 2.2vw, 1.48rem);
font-weight: 690;
line-height: 1.25;
letter-spacing: -0.022em;
}

article.page h4,
article.page h5,
article.page h6 {
margin: 2.2rem 0 0.72rem;
font-weight: 650;
line-height: 1.3;
letter-spacing: -0.015em;
}

article.page p {
max-width: var(--container-reading);
margin-bottom: 1.15rem;
color: var(--color-text-soft);
font-size: 1rem;
line-height: 1.76;
text-wrap: pretty;
}

article.page p:last-child {
margin-bottom: 0;
}

article.page ul,
article.page ol {
max-width: var(--container-reading);
margin: 1.15rem 0 1.5rem;
padding-left: 1.35rem;
color: var(--color-text-soft);
}

article.page li {
margin-bottom: 0.56rem;
padding-left: 0.18rem;
line-height: 1.68;
}

article.page li::marker {
color: #718fb3;
}

article.page a,
.text-block a,
.html-block a {
color: var(--color-primary);
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-decoration-color: rgba(121, 169, 255, 0.34);
text-underline-offset: 3px;
transition:
color var(--transition-fast),
text-decoration-color var(--transition-fast);
}

article.page a:hover,
.text-block a:hover,
.html-block a:hover {
color: var(--color-primary-hover);
text-decoration-color: currentColor;
}

article.page strong {
color: #f8faff;
font-weight: 680;
}

article.page small {
color: var(--color-text-muted);
}

article.page hr {
height: 1px;
margin: 2.75rem 0;
border: 0;
background: linear-gradient(90deg, transparent, var(--color-border-strong) 12%, var(--color-border-strong) 88%, transparent);
}

article.page blockquote {
position: relative;
max-width: var(--container-reading);
margin: 2rem 0;
padding: 1.3rem 1.5rem 1.3rem 1.65rem;
overflow: hidden;
border: 1px solid rgba(121, 169, 255, 0.11);
border-left: 3px solid #628fd0;
border-radius: 0 var(--radius-md) var(--radius-md) 0;
color: #b7c3d1;
background:
linear-gradient(90deg, rgba(121, 169, 255, 0.075), rgba(121, 169, 255, 0.018) 74%),
#0a1119;
font-style: italic;
box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
}

article.page pre {
max-width: 100%;
margin: 1.75rem 0;
padding: 1.2rem 1.35rem;
overflow-x: auto;
border: 1px solid #1c2a39;
border-radius: var(--radius-md);
color: #d9e7f7;
background:
linear-gradient(180deg, rgba(255,255,255,.015), transparent 24%),
#080f16;
box-shadow: var(--shadow-xs);
font-family: var(--font-mono);
font-size: 0.86rem;
line-height: 1.68;
tab-size: 2;
}

article.page code {
border: 1px solid rgba(124, 160, 202, 0.12);
border-radius: 6px;
padding: 0.16em 0.38em;
color: #d9eaff;
background: #101b27;
font-family: var(--font-mono);
font-size: 0.875em;
}

article.page pre code {
border: 0;
padding: 0;
background: transparent;
font-size: inherit;
}

article.page img {
border-radius: var(--radius-md);
}

/* ============================================================
06. GENERIC CONTENT BLOCKS
============================================================ */
.text-block,
.html-block {
margin: 1.3rem 0;
}

article.page figure {
margin: 2rem 0;
}

article.page figure img {
width: 100%;
box-shadow: var(--shadow-sm);
}

article.page figure figcaption {
max-width: 68ch;
margin: 0.75rem auto 0;
color: var(--color-text-muted);
font-size: 0.78rem;
line-height: 1.55;
text-align: center;
}

/* ============================================================
07. BUTTONS
============================================================ */
.button-block {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.75rem;
margin: 1.75rem 0;
}

.button-block.button-alignment-center {
justify-content: center;
}

.button-block.button-alignment-right {
justify-content: flex-end;
}

.button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
min-height: 43px;
padding: 0.72rem 1.15rem;
border: 1px solid transparent;
border-radius: 11px;
cursor: pointer;
text-decoration: none !important;
font-size: 0.875rem;
font-weight: 670;
line-height: 1;
letter-spacing: -0.008em;
user-select: none;
transition:
transform var(--transition-normal),
border-color var(--transition-fast),
background-color var(--transition-fast),
box-shadow var(--transition-normal),
color var(--transition-fast);
}

.button:hover {
transform: translateY(-2px);
}

.button:active {
transform: translateY(0) scale(0.985);
}

.button-primary {
color: #07111d !important;
border-color: rgba(255,255,255,.12);
background:
linear-gradient(135deg, #91b9ff 0%, #72a4ff 58%, #7e8fff 125%);
box-shadow:
0 10px 28px -12px rgba(83, 139, 239, 0.72),
inset 0 1px 0 rgba(255,255,255,.35);
}

.button-primary:hover {
color: #050b12 !important;
background:
linear-gradient(135deg, #a4c7ff 0%, #84b0ff 58%, #918fff 125%);
box-shadow:
0 15px 34px -13px rgba(83, 139, 239, 0.82),
inset 0 1px 0 rgba(255,255,255,.42);
}

.button-secondary {
color: #a7caff !important;
border-color: #315072;
background: linear-gradient(180deg, rgba(121,169,255,.065), rgba(121,169,255,.025));
box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.button-secondary:hover {
color: #edf5ff !important;
border-color: #557ba5;
background: rgba(121,169,255,.12);
box-shadow: 0 10px 26px -16px rgba(63,118,188,.65);
}

/* ============================================================
08. VIDEO
============================================================ */
.video-block {
margin: 2rem 0;
}

.video-container {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%;
overflow: hidden;
border: 1px solid var(--color-border);
border-radius: var(--radius-lg);
background: #030507;
box-shadow: var(--shadow-md);
}

.video-container iframe,
.video-container video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border: 0;
}

.video-caption {
margin-top: 0.75rem;
color: var(--color-text-muted);
font-size: 0.78rem;
line-height: 1.5;
text-align: center;
}

/* ============================================================
09. DIVIDERS
============================================================ */
.divider {
border: 0;
margin: 2.4rem 0;
}

.divider-style-solid {
border-top: 1px solid var(--color-border);
}

.divider-style-dotted {
border-top: 1px dotted var(--color-border-strong);
}

.divider-style-dashed {
border-top: 1px dashed var(--color-border-strong);
}

.divider-style-double {
border-top: 3px double var(--color-border-strong);
}

.divider-size-small {
margin: 1.4rem 0;
}

.divider-size-medium {
margin: 2.5rem 0;
}

.divider-size-large {
margin: 4.5rem 0;
}

/* ============================================================
10. QUOTE BLOCK
============================================================ */
.quote-block {
position: relative;
max-width: var(--container-reading);
margin: 2rem 0;
padding: 1.45rem 1.65rem 1.5rem;
overflow: hidden;
border: 1px solid rgba(121,169,255,.12);
border-left: 4px solid #668fd0;
border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
color: #c0cad7;
background:
radial-gradient(420px 180px at 0% 0%, rgba(121,169,255,.09), transparent 72%),
#0a121b;
box-shadow: var(--shadow-sm);
font-style: italic;
}

.quote-block p {
margin: 0 0 0.85rem;
color: inherit;
font-size: 1.02rem;
line-height: 1.7;
}

.quote-block p:last-child {
margin-bottom: 0;
}

.quote-block footer {
margin: 0;
border: 0;
background: transparent;
color: var(--color-text-muted);
font-size: 0.78rem;
font-style: normal;
}

/* ============================================================
11. FILE BLOCK
============================================================ */
.file-block {
margin: 1.6rem 0;
}

.file-block-link {
display: inline-flex;
align-items: center;
gap: 0.9rem;
max-width: min(100%, 560px);
min-height: 64px;
padding: 0.9rem 1rem;
border: 1px solid #1d2c3b;
border-radius: var(--radius-md);
color: var(--color-text) !important;
background:
linear-gradient(180deg, rgba(255,255,255,.018), transparent),
#0c151e;
box-shadow: var(--shadow-xs);
text-decoration: none !important;
transition:
transform var(--transition-normal),
border-color var(--transition-fast),
background-color var(--transition-fast),
box-shadow var(--transition-normal);
}

.file-block-link:hover {
transform: translateY(-2px);
border-color: #385879;
background: #101c28;
box-shadow: var(--shadow-md);
}

.file-block-icon {
display: grid;
place-items: center;
width: 40px;
height: 40px;
flex: 0 0 auto;
border: 1px solid rgba(121,169,255,.14);
border-radius: 10px;
color: #b8d4ff;
background: rgba(121,169,255,.07);
font-size: 1.15rem;
line-height: 1;
}

.file-block-info {
display: flex;
flex: 1;
flex-direction: column;
min-width: 0;
}

.file-block-name {
overflow: hidden;
color: #edf3fa;
font-size: 0.875rem;
font-weight: 650;
line-height: 1.3;
text-overflow: ellipsis;
white-space: nowrap;
}

.file-block-ext,
.file-block-size {
color: var(--color-text-faint);
font-size: 0.68rem;
line-height: 1.4;
}

.file-block-ext {
margin-top: 0.2rem;
text-transform: uppercase;
letter-spacing: 0.065em;
}

.file-block-download {
flex: 0 0 auto;
color: #7dafff;
font-size: 1rem;
}

/* ============================================================
12. INLINE TEXT STATES
============================================================ */
del,
s,
strike {
color: var(--color-text-muted);
text-decoration: line-through;
text-decoration-color: #637082;
}

/* ============================================================
13. FLASH MESSAGES
============================================================ */
.flash-message {
width: min(calc(100% - 2rem), var(--container-max));
margin: 1rem auto;
padding: 0.8rem 1rem;
border: 1px solid transparent;
border-radius: var(--radius-md);
font-size: 0.82rem;
font-weight: 590;
line-height: 1.45;
text-align: center;
box-shadow: var(--shadow-sm);
}

.flash-success {
color: #a4ebd1;
border-color: rgba(98,215,174,.24);
background: var(--color-success-soft);
}

.flash-error {
color: #ffacb8;
border-color: rgba(255,125,145,.25);
background: var(--color-danger-soft);
}

/* ============================================================
14. BREADCRUMBS
============================================================ */
nav.breadcrumb {
width: min(100% - 2rem, var(--container-max));
margin: 0 auto;
padding: 1rem 0 0;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.45rem;
color: var(--color-text-faint);
font-size: 0.76rem;
}

nav.breadcrumb a {
color: #8baad0;
text-decoration: none;
transition: color var(--transition-fast);
}

nav.breadcrumb a:hover {
color: var(--color-primary-hover);
}

nav.breadcrumb .separator {
color: #4d5c6d;
font-size: 0.68rem;
user-select: none;
}

nav.breadcrumb .current {
color: #b7c2d0;
font-weight: 580;
}

/* ============================================================
15. LOGOUT
============================================================ */
.logout-form {
display: inline-flex;
margin-left: auto;
}

.btn-logout {
min-height: 34px;
padding: 0.46rem 0.72rem;
border: 1px solid rgba(255,125,145,.34);
border-radius: 9px;
cursor: pointer;
color: #ff96a6;
background: rgba(255,125,145,.035);
font-size: 0.75rem;
font-weight: 650;
line-height: 1;
transition:
color var(--transition-fast),
border-color var(--transition-fast),
background-color var(--transition-fast),
transform var(--transition-fast);
}

.btn-logout:hover {
transform: translateY(-1px);
color: #ffc0c9;
border-color: rgba(255,125,145,.64);
background: rgba(255,125,145,.11);
}

.btn-logout:active {
transform: translateY(0);
}

/* ============================================================
16. TOP MENU
============================================================ */
.top-menu {
display: flex;
align-items: center;
gap: 0.18rem;
list-style: none;
margin: 0;
padding: 0;
}

.top-menu a {
display: inline-flex;
align-items: center;
min-height: 36px;
padding: 0.46rem 0.62rem;
border-radius: 9px;
color: var(--color-text-muted);
text-decoration: none;
font-size: 0.82rem;
font-weight: 560;
line-height: 1;
transition:
color var(--transition-fast),
background-color var(--transition-fast);
}

.top-menu a:hover {
color: #e8eef7;
background: rgba(255,255,255,.045);
text-decoration: none;
}

/* ============================================================
17. FOOTER
============================================================ */
footer {
position: relative;
margin-top: auto;
border-top: 1px solid rgba(148, 177, 209, 0.11);
background: rgba(5, 9, 14, 0.56);
}

footer::before {
content: "";
position: absolute;
top: -1px;
left: 50%;
width: min(680px, 60vw);
height: 1px;
transform: translateX(-50%);
background: linear-gradient(90deg, transparent, rgba(121,169,255,.11), transparent);
}

footer > p {
width: min(100% - 2rem, var(--container-max));
margin: 0 auto;
padding: 1.6rem 0 0.9rem;
color: #718092;
font-size: 0.72rem;
line-height: 1.5;
text-align: center;
}

.footer-menu {
margin: 0;
padding: 0 1rem 1.55rem;
text-align: center;
}

.footer-menu ul {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 0.4rem 1.15rem;
list-style: none;
margin: 0;
padding: 0;
}

.footer-menu a {
color: #7d8b9b;
text-decoration: none;
font-size: 0.72rem;
transition: color var(--transition-fast);
}

.footer-menu a:hover {
color: #bcc8d7;
}

/* ============================================================
18. CHILDREN / SUBPAGE LISTINGS
============================================================ */
.children-block {
margin: 2rem 0;
}

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

.children-item {
margin: 0;
padding: 0;
}

.children-link {
color: #e6edf6;
text-decoration: none;
}

.children-content {
min-width: 0;
}

.children-date {
display: block;
margin-bottom: .35rem;
color: #7f98b5;
font-size: .72rem;
font-weight: 650;
letter-spacing: .035em;
text-transform: uppercase;
}

.children-title {
display: block;
font-size: .95rem;
font-weight: 650;
line-height: 1.35;
}

.children-description {
display: block;
margin-top: .45rem;
color: #9caabd;
font-size: .82rem;
font-weight: 400;
line-height: 1.55;
}

.children-arrow {
flex: 0 0 auto;
margin-left: auto;
padding-left: 1rem;
color: #668dbd;
transition: transform var(--transition-normal), color var(--transition-fast);
}

.children-link:hover .children-arrow {
transform: translateX(3px);
color: var(--color-primary-hover);
}

/* Kartenraster */
.children-layout-grid .children-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
gap: .85rem;
}

.children-layout-grid .children-link {
position: relative;
display: flex;
align-items: center;
min-height: 82px;
padding: 1rem 1.05rem;
overflow: hidden;
border: 1px solid #1d2c3b;
border-radius: var(--radius-md);
background:
linear-gradient(180deg, rgba(255,255,255,.016), transparent),
#0c151e;
box-shadow: var(--shadow-xs);
transition:
transform var(--transition-normal),
color var(--transition-fast),
border-color var(--transition-fast),
background-color var(--transition-fast),
box-shadow var(--transition-normal);
}

.children-layout-grid .children-link:hover {
transform: translateY(-2px);
color: #fff;
border-color: #365879;
background: #101c28;
box-shadow: var(--shadow-md);
}

/* Kompakte Liste */
.children-layout-list .children-list {
display: flex;
flex-direction: column;
border-top: 1px solid #1d2c3b;
}

.children-layout-list .children-link {
display: flex;
align-items: center;
gap: 1rem;
padding: .85rem .15rem;
border-bottom: 1px solid #1d2c3b;
transition: color var(--transition-fast), padding-left var(--transition-normal);
}

.children-layout-list .children-link:hover {
color: #fff;
padding-left: .35rem;
}

.children-layout-list .children-content {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: baseline;
gap: .6rem 1.25rem;
width: 100%;
}

.children-layout-list .children-title {
grid-column: 1;
grid-row: 1;
}

.children-layout-list .children-date {
grid-column: 2;
grid-row: 1;
margin: 0;
white-space: nowrap;
}

.children-layout-list .children-description {
grid-column: 1 / -1;
margin-top: -.15rem;
}

/* Editoriale Artikelliste */
.children-layout-editorial .children-list {
display: flex;
flex-direction: column;
gap: .75rem;
}

.children-layout-editorial .children-link {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: 1.25rem;
padding: 1.15rem 1.25rem;
border: 1px solid #1d2c3b;
border-radius: var(--radius-md);
background: #0c151e;
transition: border-color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-normal);
}

.children-layout-editorial .children-link:hover {
transform: translateY(-1px);
border-color: #365879;
background: #101c28;
color: #fff;
}

.children-layout-editorial .children-title {
font-size: 1.05rem;
}

.children-layout-editorial .children-description {
max-width: 75ch;
}

/* Pagination */
.children-pagination {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
margin-top: 1.25rem;
padding-top: 1rem;
border-top: 1px solid #1d2c3b;
}

.children-pagination-pages {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: .4rem;
}

.children-pagination-link {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 2.25rem;
min-height: 2.25rem;
padding: .45rem .7rem;
border: 1px solid #26394d;
border-radius: var(--radius-sm);
background: #0c151e;
color: #b9c8d9;
font-size: .78rem;
font-weight: 650;
line-height: 1;
text-decoration: none;
transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

a.children-pagination-link:hover {
color: #fff;
border-color: #41698f;
background: #132131;
}

.children-pagination-link.is-current {
color: #fff;
border-color: #4e7caa;
background: #1a2d41;
}

.children-pagination-prev,
.children-pagination-next {
min-width: auto;
}

.children-pagination-ellipsis {
padding: 0 .15rem;
color: #657b92;
}

.children-pagination-status {
flex: 0 0 auto;
color: #7f98b5;
font-size: .75rem;
white-space: nowrap;
}

@media (max-width: 620px) {
.children-pagination {
align-items: flex-start;
flex-direction: column;
}

.children-pagination-status {
white-space: normal;
}
}

@media (max-width: 620px) {
.children-layout-list .children-content {
grid-template-columns: 1fr;
}

.children-layout-list .children-title,
.children-layout-list .children-date,
.children-layout-list .children-description {
grid-column: 1;
}

.children-layout-list .children-date {
grid-row: 1;
}

.children-layout-list .children-title {
grid-row: 2;
}

.children-layout-list .children-description {
grid-row: 3;
}

.children-layout-editorial .children-link {
grid-template-columns: minmax(0, 1fr) auto;
padding: 1rem;
}
}

/* ============================================================
19. CONTAINERS / SECTIONS / COLUMNS
============================================================ */
.cms-container {
width: 100%;
margin: 0;
padding: 0;
}

.section-inner {
width: 100%;
padding-inline: 0;
box-sizing: border-box;
}

.section-full-width {
width: 100%;
}

.column-grid {
display: grid;
grid-template-columns: 1fr;
gap: 1.25rem;
align-items: stretch;
}

@media (min-width: 768px) {
.column-grid-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.column-grid-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}

/* ============================================================
20. HERO / BANNER
============================================================ */
.hero-block {
position: relative;
isolation: isolate;
width: 100%;
min-height: clamp(330px, 43vw, 510px);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
border: 1px solid rgba(157, 186, 217, 0.12);
border-radius: var(--radius-xl);
background: #070b10;
box-shadow: var(--shadow-lg);
}

.cms-container[style*="background"] .hero-block {
border: 0;
border-radius: 0;
box-shadow: none;
}

.hero-bg {
position: absolute;
inset: 0;
z-index: 0;
width: 100%;
height: 100%;
}

.hero-bg img,
.hero-bg video {
width: 100%;
height: 100%;
object-fit: cover;
}

.hero-overlay {
position: absolute;
inset: 0;
z-index: 1;
width: 100%;
height: 100%;
}

.hero-block::after {
content: "";
position: absolute;
inset: 0;
z-index: 1;
pointer-events: none;
background:
radial-gradient(90% 95% at 50% 42%, transparent 32%, rgba(3, 7, 11, 0.10) 72%, rgba(3, 7, 11, 0.24) 100%),
linear-gradient(180deg, rgba(2,5,8,.06) 0%, transparent 35%, rgba(2,5,8,.17) 100%);
}

.hero-content {
position: relative;
z-index: 2;
width: min(100%, 800px);
padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.5rem, 6vw, 4.5rem);
color: #fff;
text-align: center;
}

.hero-title {
max-width: 20ch;
margin: 0 auto 0.85rem;
color: #fff;
font-size: clamp(2rem, 4.5vw, 3.25rem);
font-weight: 790;
line-height: 1.04;
letter-spacing: -0.045em;
text-wrap: balance;
text-shadow: 0 4px 28px rgba(0,0,0,.42);
}

.hero-subtitle {
max-width: 62ch;
margin: 0 auto 1.6rem;
color: rgba(255,255,255,.86);
font-size: clamp(0.98rem, 1.9vw, 1.15rem);
line-height: 1.65;
text-wrap: pretty;
text-shadow: 0 2px 16px rgba(0,0,0,.42);
}

.hero-button {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 44px;
padding: 0.72rem 1.1rem;
border: 1px solid rgba(255,255,255,.58);
border-radius: 11px;
color: #0a1119 !important;
background: rgba(250, 252, 255, 0.94);
box-shadow:
0 12px 32px -14px rgba(0,0,0,.72),
inset 0 1px 0 #fff;
text-decoration: none !important;
font-size: 0.86rem;
font-weight: 690;
line-height: 1;
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
transition:
transform var(--transition-normal),
background-color var(--transition-fast),
box-shadow var(--transition-normal);
}

.hero-button:hover {
transform: translateY(-2px);
background: #fff;
box-shadow:
0 18px 38px -14px rgba(0,0,0,.78),
inset 0 1px 0 #fff;
}

.hero-button:active {
transform: translateY(0) scale(.985);
}

.hero-alignment-center .hero-content {
text-align: center;
}

.hero-alignment-left {
justify-content: flex-start;
}

.hero-alignment-left .hero-content {
margin-left: clamp(0rem, 3vw, 2rem);
text-align: left;
}

.hero-alignment-left .hero-title,
.hero-alignment-left .hero-subtitle {
margin-left: 0;
}

/* ============================================================
21. CARD GRID — PRIMARY SHOWPIECE COMPONENT
============================================================ */
.card-grid-section {
width: 100%;
padding: 0;
}

.card-grid-inner {
width: 100%;
max-width: var(--container-max);
margin: 0 auto;
}

.card-grid-title {
max-width: 20ch;
margin: 0 auto 0.7rem;
color: var(--color-text);
font-size: clamp(1.85rem, 3.4vw, 2.65rem);
font-weight: 770;
line-height: 1.08;
letter-spacing: -0.043em;
text-align: center;
text-wrap: balance;
}

.card-grid-subtitle {
max-width: 640px;
margin: 0 auto 2.1rem;
color: var(--color-text-muted);
font-size: 0.96rem;
line-height: 1.68;
text-align: center;
text-wrap: pretty;
}

.card-grid {
display: grid;
gap: 1.15rem;
align-items: stretch;
}

.card-grid-columns-1 {
grid-template-columns: 1fr;
}

.card-grid-columns-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid-columns-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid-columns-4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-item {
position: relative;
isolation: isolate;
min-width: 0;
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
border: 1px solid #1c2a39;
border-radius: var(--radius-lg);
background:
linear-gradient(180deg, rgba(255,255,255,.020), transparent 30%),
linear-gradient(145deg, #0e1721 0%, #0a1119 100%);
box-shadow: var(--shadow-md);
transform: translateZ(0);
transition:
transform var(--transition-slow),
border-color var(--transition-normal),
box-shadow var(--transition-slow),
background-color var(--transition-normal);
}

.card-item::before {
content: "";
position: absolute;
inset: -1px;
z-index: 3;
pointer-events: none;
border-radius: inherit;
opacity: 0;
background:
radial-gradient(420px 180px at 20% 0%, rgba(121,169,255,.11), transparent 65%),
radial-gradient(340px 180px at 100% 0%, rgba(141,137,255,.07), transparent 68%);
transition: opacity var(--transition-slow);
}

.card-item::after {
content: "";
position: absolute;
inset: 0;
z-index: 4;
pointer-events: none;
border-radius: inherit;
box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.card-grid-style-shadow .card-item,
.card-grid-style-border .card-item,
.card-grid-style-flat .card-item {
border: 1px solid #1c2a39;
background:
linear-gradient(180deg, rgba(255,255,255,.020), transparent 30%),
linear-gradient(145deg, #0e1721 0%, #0a1119 100%);
box-shadow: var(--shadow-md);
}

.card-grid-hover-lift .card-item:hover,
.card-grid-hover-scale .card-item:hover {
transform: translateY(-7px);
border-color: #365574;
box-shadow:
0 34px 72px -32px rgba(0, 0, 0, 0.92),
0 18px 34px -24px rgba(52, 94, 150, 0.55),
inset 0 1px 0 rgba(255,255,255,.04);
}

.card-grid-hover-lift .card-item:hover::before,
.card-grid-hover-scale .card-item:hover::before,
.card-item:focus-within::before {
opacity: 1;
}

.card-grid-hover-none .card-item:hover {
transform: none;
}

.card-item:focus-within {
border-color: #41658a;
}

a.card-link-wrapper,
article.page a.card-link-wrapper {
position: relative;
z-index: 2;
display: flex;
flex: 1;
flex-direction: column;
height: 100%;
color: inherit;
text-decoration: none !important;
}

a.card-link-wrapper:hover,
article.page a.card-link-wrapper:hover {
color: inherit;
text-decoration: none !important;
}

.card-image {
position: relative;
z-index: 1;
width: 100%;
aspect-ratio: 16 / 10;
overflow: hidden;
border-bottom: 1px solid rgba(139, 168, 199, 0.10);
background: #070d13;
}

.card-image::after {
content: "";
position: absolute;
inset: 0;
pointer-events: none;
background:
linear-gradient(180deg, transparent 58%, rgba(4,8,12,.17) 100%),
radial-gradient(80% 70% at 50% 0%, transparent 60%, rgba(4,8,12,.08) 100%);
}

.card-image img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
transform: scale(1.001);
transition:
transform 700ms var(--ease-out),
filter 400ms ease;
}

.card-item:hover .card-image img {
transform: scale(1.045);
filter: saturate(1.06) contrast(1.025);
}

.card-icon {
position: relative;
z-index: 2;
width: 56px;
height: 56px;
display: grid;
place-items: center;
flex: 0 0 auto;
margin: 1.35rem 1.35rem 0.1rem;
padding: 0;
border: 1px solid rgba(121,169,255,.18);
border-radius: 15px;
color: #d8e7ff;
background:
linear-gradient(145deg, rgba(121,169,255,.13), rgba(141,137,255,.065));
box-shadow:
inset 0 1px 0 rgba(255,255,255,.05),
0 10px 28px -16px rgba(73,118,191,.66);
font-size: 1.75rem;
line-height: 1;
text-align: center;
}

.card-body {
position: relative;
z-index: 2;
display: flex;
flex: 1;
flex-direction: column;
min-width: 0;
padding: 1.15rem 1.25rem 1.25rem;
}

.card-icon + .card-body {
padding-top: 1.05rem;
}

.card-eyebrow {
align-self: flex-start;
width: fit-content;
margin: 0 0 1rem;
padding: 0.26rem 0.48rem;
border: 1px solid rgba(121,169,255,.14);
border-radius: var(--radius-full);
color: #8bb9ff;
background: rgba(121,169,255,.065);
font-size: 0.625rem;
font-weight: 760;
line-height: 1.1;
letter-spacing: 0.09em;
text-transform: uppercase;
text-decoration: none !important;
}

.card-title {
margin: 0 0 0.62rem;
color: #f0f4f9;
font-size: 1.08rem;
font-weight: 710;
line-height: 1.28;
letter-spacing: -0.022em;
text-wrap: balance;
}

.card-text {
margin: 0;
color: #9eabb9;
font-size: 0.825rem;
line-height: 1.68;
text-wrap: pretty;
}

.card-badge {
width: fit-content;
margin-top: 0.9rem;
padding: 0.26rem 0.52rem;
border: 1px solid rgba(121,169,255,.15);
border-radius: var(--radius-full);
color: #a9cbff;
background: rgba(121,169,255,.065);
font-size: 0.66rem;
font-weight: 660;
line-height: 1.2;
}

.card-link,
article.page .card-link {
width: fit-content;
max-width: 100%;
margin-top: auto;
padding-top: 1.05rem;
color: #82b1ff;
border-top: 1px solid rgba(135,164,195,.085);
font-size: 0.79rem;
font-weight: 650;
line-height: 1.45;
text-decoration: none !important;
overflow-wrap: anywhere;
transition: color var(--transition-fast);
}

.card-link:hover,
article.page .card-link:hover {
color: #afd0ff;
text-decoration: none !important;
}

/* ============================================================
22. FORMS / INPUTS — GENERIC CMS SAFETY NET
============================================================ */
:where(input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], textarea, select) {
width: 100%;
min-height: 42px;
border: 1px solid #243446;
border-radius: 10px;
color: var(--color-text);
background: #0a121a;
box-shadow: inset 0 1px 2px rgba(0,0,0,.22);
transition:
border-color var(--transition-fast),
background-color var(--transition-fast),
box-shadow var(--transition-fast);
}

:where(input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"]) {
padding: 0.65rem 0.75rem;
}

textarea {
min-height: 120px;
padding: 0.7rem 0.75rem;
resize: vertical;
}

select {
padding: 0.6rem 2.2rem 0.6rem 0.75rem;
}

:where(input, textarea, select)::placeholder {
color: #5f6e80;
opacity: 1;
}

:where(input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], textarea, select):hover {
border-color: #31465e;
}

:where(input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], textarea, select):focus {
outline: none;
border-color: #5279a8;
background: #0b141e;
box-shadow: var(--focus-ring), inset 0 1px 2px rgba(0,0,0,.20);
}

/* ============================================================
23. TABLES / DETAILS / MISC CONTENT
============================================================ */
article.page table {
width: 100%;
margin: 1.8rem 0;
overflow: hidden;
border-collapse: separate;
border-spacing: 0;
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
background: #0a121a;
font-size: 0.86rem;
}

article.page th,
article.page td {
padding: 0.78rem 0.9rem;
border-bottom: 1px solid var(--color-hairline);
text-align: left;
vertical-align: top;
}

article.page th {
color: #dce7f4;
background: #0e1823;
font-weight: 660;
}

article.page td {
color: #aab6c4;
}

article.page tr:last-child td {
border-bottom: 0;
}

article.page details {
margin: 1.25rem 0;
padding: 0.9rem 1rem;
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
background: #0a121a;
}

article.page summary {
cursor: pointer;
color: #e6edf6;
font-weight: 630;
}

article.page details[open] summary {
margin-bottom: 0.8rem;
}

article.page mark {
padding: 0.08em 0.26em;
border-radius: 4px;
color: #fff0c9;
background: rgba(244,198,109,.16);
}

article.page kbd {
padding: 0.16rem 0.4rem;
border: 1px solid #34465a;
border-bottom-width: 2px;
border-radius: 6px;
color: #dce8f7;
background: #101a25;
font-family: var(--font-mono);
font-size: 0.78em;
}

/* ============================================================
24. OSM MAP BLOCK
============================================================ */
.osm-map-block {
width: 100%;
min-width: 0;
}

.osm-map-frame {
position: relative;
isolation: isolate;
width: 100%;
height: clamp(300px, 48vw, 500px);
overflow: hidden;
border: 1px solid var(--color-border);
border-radius: var(--radius-xl);
background: #d9e1e7;
box-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.7);
}

.osm-map-tiles {
position: absolute;
inset: 0;
z-index: 1;
overflow: hidden;
}

.osm-map-tile {
position: absolute;
display: block;
width: 256px;
height: 256px;
max-width: none;
margin: 0;
padding: 0;
border: 0;
border-radius: 0;
box-shadow: none;
user-select: none;
-webkit-user-drag: none;
}

.osm-map-marker {
position: absolute;
z-index: 3;
top: 50%;
left: 50%;
width: 32px;
height: 42px;
pointer-events: none;
filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.34));
transform: translate(-50%, -100%);
}

.osm-map-marker svg {
display: block;
width: 100%;
height: 100%;
overflow: visible;
}

.osm-map-marker path {
fill: #d94040;
stroke: #fff;
stroke-width: 2.5;
stroke-linejoin: round;
}

.osm-map-marker circle {
fill: #fff;
}

.osm-map-controls {
position: absolute;
z-index: 4;
top: 12px;
right: 12px;
display: grid;
overflow: hidden;
border: 1px solid rgba(15, 23, 42, 0.2);
border-radius: 10px;
background: rgba(255, 255, 255, 0.94);
box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
}

.osm-map-controls button {
width: 36px;
height: 34px;
padding: 0;
border: 0;
border-bottom: 1px solid rgba(15, 23, 42, 0.12);
color: #172033;
background: transparent;
font: 600 1.25rem/1 system-ui, sans-serif;
cursor: pointer;
}

.osm-map-controls button:last-child {
border-bottom: 0;
}

.osm-map-controls button:hover,
.osm-map-controls button:focus-visible {
background: #eef3f7;
}

.osm-map-controls button:focus-visible {
outline: 2px solid #356fc4;
outline-offset: -3px;
}

.osm-map-noscript {
position: absolute;
z-index: 5;
inset: 0;
display: grid;
place-items: center;
padding: 1.5rem;
background: #d9e1e7;
text-align: center;
}

.osm-map-noscript a {
color: #173d73;
font-weight: 650;
}

.osm-map-meta {
display: flex;
align-items: baseline;
flex-wrap: wrap;
gap: 0.35rem 0.8rem;
margin-top: 0.65rem;
color: var(--color-text-muted);
font-size: 0.78rem;
}

.osm-map-address {
color: var(--color-text-soft);
font-weight: 600;
}

.osm-map-meta a {
color: var(--color-primary);
text-decoration: none;
}

.osm-map-meta a:hover {
text-decoration: underline;
}

.osm-map-attribution {
margin-left: auto;
color: var(--color-text-muted) !important;
opacity: 0.82;
}


/* ============================================================
25. EXTERNAL CONTENT CONSENT + YOUTUBE
============================================================ */
.external-consent-block {
width: 100%;
min-width: 0;
}

.external-consent-placeholder[hidden],
.external-consent-content[hidden] {
display: none !important;
}

.external-consent-placeholder {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
width: 100%;
min-height: 250px;
padding: clamp(1.25rem, 4vw, 2.25rem);
border: 1px solid var(--color-border);
border-radius: var(--radius-xl);
background: linear-gradient(145deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
box-shadow: 0 20px 50px -38px rgba(0, 0, 0, 0.75);
}

.osm-map-block .external-consent-placeholder {
min-height: clamp(300px, 48vw, 500px);
}

.youtube-block .external-consent-placeholder {
min-height: 0;
aspect-ratio: 16 / 9;
}

.external-consent-icon {
flex: 0 0 auto;
display: grid;
place-items: center;
width: 48px;
height: 48px;
border: 1px solid var(--color-border-strong);
border-radius: 50%;
background: rgba(255,255,255,0.035);
font-size: 1.25rem;
}

.external-consent-copy {
width: min(100%, 640px);
}

.external-consent-copy > strong {
display: block;
margin-bottom: 0.4rem;
color: var(--color-text);
font-size: 1rem;
}

.external-consent-copy > p {
margin: 0 0 0.9rem;
color: var(--color-text-muted);
font-size: 0.88rem;
line-height: 1.55;
}

.external-consent-check {
display: inline-flex;
align-items: flex-start;
gap: 0.65rem;
cursor: pointer;
color: var(--color-text-soft);
font-size: 0.86rem;
line-height: 1.45;
}

.external-consent-check input {
flex: 0 0 auto;
width: 18px;
height: 18px;
margin: 0.08rem 0 0;
cursor: pointer;
}

.external-consent-noscript {
margin-top: 0.8rem !important;
font-size: 0.78rem !important;
}

.external-consent-revoke {
display: block;
margin: 0.6rem 0 0 auto;
padding: 0;
border: 0;
color: var(--color-text-muted);
background: transparent;
font: inherit;
font-size: 0.72rem;
text-decoration: underline;
text-underline-offset: 2px;
cursor: pointer;
}

.external-consent-revoke:hover,
.external-consent-revoke:focus-visible {
color: var(--color-primary);
}

.youtube-block {
margin: 2rem 0;
}

.youtube-video-frame {
position: relative;
width: 100%;
aspect-ratio: 16 / 9;
overflow: hidden;
border: 1px solid var(--color-border);
border-radius: var(--radius-lg);
background: #030507;
box-shadow: var(--shadow-md);
}

.youtube-video-frame iframe {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border: 0;
}

/* ============================================================
25A. IMAGE GALLERY + LIGHTBOX
============================================================ */
.image-gallery-block {
margin: 2rem 0;
}

.image-gallery-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
gap: clamp(0.55rem, 1.2vw, 0.9rem);
}

.image-gallery-thumb {
position: relative;
width: 100%;
aspect-ratio: 1;
overflow: hidden;
padding: 0;
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
cursor: zoom-in;
background: var(--color-bg-alt);
box-shadow: var(--shadow-xs);
isolation: isolate;
transition:
transform var(--transition-normal),
border-color var(--transition-fast),
box-shadow var(--transition-normal);
}

.image-gallery-thumb::after {
content: "";
position: absolute;
inset: 0;
z-index: 1;
pointer-events: none;
background: linear-gradient(180deg, transparent 54%, rgba(0, 0, 0, .26) 100%);
opacity: 0;
transition: opacity var(--transition-fast);
}

.image-gallery-thumb img {
width: 100%;
height: 100%;
border-radius: 0;
object-fit: cover;
transition: transform 420ms var(--ease-out), filter var(--transition-normal);
}

.image-gallery-thumb:hover,
.image-gallery-thumb:focus-visible {
z-index: 2;
transform: translateY(-3px);
border-color: var(--color-border-hover);
box-shadow: var(--shadow-md);
}

.image-gallery-thumb:hover::after,
.image-gallery-thumb:focus-visible::after {
opacity: 1;
}

.image-gallery-thumb:hover img,
.image-gallery-thumb:focus-visible img {
transform: scale(1.045);
filter: saturate(1.04) contrast(1.02);
}

.image-gallery-zoom-hint {
position: absolute;
right: 0.65rem;
bottom: 0.65rem;
z-index: 2;
display: inline-flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
border: 1px solid rgba(255, 255, 255, .26);
border-radius: 999px;
color: #fff;
background: rgba(4, 8, 12, .66);
box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
font-size: 1.2rem;
font-weight: 300;
line-height: 1;
opacity: 0;
transform: translateY(4px) scale(.92);
transition: opacity var(--transition-fast), transform var(--transition-normal);
}

.image-gallery-thumb:hover .image-gallery-zoom-hint,
.image-gallery-thumb:focus-visible .image-gallery-zoom-hint {
opacity: 1;
transform: translateY(0) scale(1);
}

.image-gallery-caption {
max-width: 70ch;
margin: 0.8rem auto 0;
color: var(--color-text-muted);
font-size: 0.82rem;
line-height: 1.55;
text-align: center;
}

body.gallery-lightbox-open {
overflow: hidden;
}

.gallery-lightbox[hidden] {
display: none !important;
}

.gallery-lightbox {
position: fixed;
inset: 0;
z-index: 10000;
display: grid;
grid-template-rows: auto minmax(0, 1fr) auto;
min-width: 0;
min-height: 0;
padding: clamp(0.6rem, 1.5vw, 1.25rem);
color: #fff;
background:
radial-gradient(circle at 50% 45%, rgba(33, 46, 63, .32), transparent 45%),
rgba(2, 4, 7, .965);
backdrop-filter: blur(18px);
-webkit-backdrop-filter: blur(18px);
overscroll-behavior: contain;
}

.gallery-lightbox-topbar,
.gallery-lightbox-bottombar {
position: relative;
z-index: 5;
display: flex;
align-items: center;
gap: 0.75rem;
min-height: 48px;
}

.gallery-lightbox-topbar {
justify-content: space-between;
}

.gallery-lightbox-counter {
min-width: 4.5rem;
color: rgba(255, 255, 255, .7);
font-size: 0.82rem;
font-variant-numeric: tabular-nums;
letter-spacing: .04em;
}

.gallery-lightbox button {
border: 1px solid rgba(255, 255, 255, .13);
color: #fff;
background: rgba(255, 255, 255, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.gallery-lightbox button:hover:not(:disabled) {
border-color: rgba(255, 255, 255, .25);
background: rgba(255, 255, 255, .13);
}

.gallery-lightbox button:active:not(:disabled) {
transform: scale(.96);
}

.gallery-lightbox button:disabled {
opacity: .32;
cursor: default;
}

.gallery-lightbox-close {
display: inline-flex;
align-items: center;
justify-content: center;
width: 42px;
height: 42px;
padding: 0;
border-radius: 999px;
cursor: pointer;
font-size: 1.8rem;
font-weight: 200;
line-height: 1;
}

.gallery-lightbox-stage {
position: relative;
min-width: 0;
min-height: 0;
display: grid;
grid-template-columns: 56px minmax(0, 1fr) 56px;
align-items: stretch;
gap: clamp(0.35rem, 1vw, 0.8rem);
}

.gallery-lightbox-image-shell {
position: relative;
min-width: 0;
min-height: 0;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
border-radius: var(--radius-lg);
cursor: zoom-in;
touch-action: none;
user-select: none;
}

.gallery-lightbox-image-shell.is-zoomed {
cursor: grab;
}

.gallery-lightbox-image-shell.is-dragging {
cursor: grabbing;
}

.gallery-lightbox-image {
max-width: 100%;
max-height: calc(100vh - 9.5rem);
width: auto;
height: auto;
border-radius: 0;
object-fit: contain;
transform-origin: center center;
will-change: transform;
transition: opacity 140ms ease;
}

.gallery-lightbox-image-shell.is-loading .gallery-lightbox-image {
opacity: .15;
}

.gallery-lightbox-spinner {
position: absolute;
z-index: 2;
width: 38px;
height: 38px;
border: 3px solid rgba(255, 255, 255, .18);
border-top-color: rgba(255, 255, 255, .85);
border-radius: 999px;
animation: gallery-lightbox-spin .8s linear infinite;
}

.gallery-lightbox-spinner[hidden] {
display: none;
}

@keyframes gallery-lightbox-spin {
to { transform: rotate(360deg); }
}

.gallery-lightbox-nav {
align-self: center;
width: 52px;
height: 64px;
padding: 0;
border-radius: 999px;
cursor: pointer;
font-size: 2.35rem;
font-weight: 200;
line-height: 1;
}

.gallery-lightbox-bottombar {
justify-content: space-between;
padding-top: 0.45rem;
}

.gallery-lightbox-caption {
min-width: 0;
overflow: hidden;
color: rgba(255, 255, 255, .76);
font-size: 0.82rem;
white-space: nowrap;
text-overflow: ellipsis;
}

.gallery-lightbox-zoom-controls {
flex: 0 0 auto;
display: inline-flex;
align-items: center;
gap: 0.35rem;
}

.gallery-lightbox-zoom-controls button {
min-width: 40px;
height: 38px;
padding: 0 .65rem;
border-radius: 999px;
cursor: pointer;
font-size: 1rem;
}

.gallery-lightbox-zoom-controls .gallery-lightbox-zoom-value {
min-width: 68px;
font-size: 0.76rem;
font-variant-numeric: tabular-nums;
}

/* ============================================================
26. RESPONSIVE
============================================================ */
@media (max-width: 980px) {
.image-gallery-grid {
grid-template-columns: repeat(auto-fill, minmax(min(100%, 165px), 1fr));
}

.card-grid-columns-4 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid-columns-3 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

@media (max-width: 768px) {
header nav {
width: min(100% - 1.5rem, var(--container-max));
min-height: 60px;
gap: 0.55rem;
}

.top-menu {
gap: 0.05rem;
}

.top-menu a,
header nav > a:not(:first-child) {
padding-inline: 0.48rem;
}

main {
padding: 2.6rem var(--space-5) 4.5rem;
}

article.page h1 {
max-width: 20ch;
}

.card-grid-columns-2,
.card-grid-columns-3,
.card-grid-columns-4 {
grid-template-columns: 1fr;
}

.hero-block {
min-height: 360px;
}

.hero-content {
padding: 3.75rem 1.5rem;
}

.hero-alignment-left .hero-content {
margin-left: 0;
}
}

@media (max-width: 640px) {
.image-gallery-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.55rem;
}

.image-gallery-thumb {
border-radius: var(--radius-sm);
}

.image-gallery-zoom-hint {
right: 0.45rem;
bottom: 0.45rem;
width: 1.8rem;
height: 1.8rem;
opacity: .8;
transform: none;
}

.gallery-lightbox {
padding: 0.5rem;
}

.gallery-lightbox-stage {
grid-template-columns: 1fr;
}

.gallery-lightbox-image {
max-height: calc(100vh - 10rem);
}

.gallery-lightbox-nav {
position: absolute;
top: 50%;
z-index: 4;
width: 44px;
height: 56px;
transform: translateY(-50%);
}

.gallery-lightbox-nav:active:not(:disabled) {
transform: translateY(-50%) scale(.96);
}

.gallery-lightbox-prev { left: 0.25rem; }
.gallery-lightbox-next { right: 0.25rem; }

.gallery-lightbox-bottombar {
align-items: flex-end;
}

.gallery-lightbox-caption {
max-width: 42vw;
}

body::before {
display: none;
}

header nav {
width: 100%;
min-height: auto;
padding: 0.72rem 1rem;
flex-wrap: wrap;
gap: 0.55rem 0.8rem;
}

header nav > a:first-child {
margin-right: auto;
}

.top-menu {
order: 3;
width: 100%;
overflow-x: auto;
padding-bottom: 0.1rem;
scrollbar-width: none;
}

.top-menu::-webkit-scrollbar {
display: none;
}

.top-menu a {
white-space: nowrap;
}

.logout-form {
margin-left: 0;
}

main {
padding: 2.2rem 1rem 4rem;
}

nav.breadcrumb {
width: calc(100% - 2rem);
}

article.page h1 {
margin-bottom: 1.55rem;
font-size: clamp(2rem, 10vw, 2.7rem);
}

article.page h2 {
margin-top: 3rem;
}

article.page > :where(.cms-container, .text-block, .html-block, .card-grid-section, .video-block, .quote-block, .file-block, .children-block, .osm-map-block, .youtube-block, .image-gallery-block) +
:where(.cms-container, .text-block, .html-block, .card-grid-section, .video-block, .quote-block, .file-block, .children-block, .osm-map-block, .youtube-block, .image-gallery-block) {
margin-top: 2.25rem;
}

article.page > .cms-container[style*="background"] {
margin-inline: 0;
border-radius: var(--radius-lg);
}

.hero-block {
min-height: 340px;
border-radius: var(--radius-lg);
}

.hero-content {
padding: 3.2rem 1.15rem;
}

.hero-title {
font-size: clamp(1.85rem, 10vw, 2.55rem);
}

.hero-subtitle {
font-size: 0.94rem;
}

.button-block {
flex-direction: column;
align-items: stretch;
}

.button-block.button-alignment-center,
.button-block.button-alignment-right {
justify-content: stretch;
}

.button {
width: 100%;
}

.quote-block {
padding: 1.2rem 1.2rem 1.25rem;
}

.children-list {
grid-template-columns: 1fr;
}

.card-grid {
gap: 1rem;
}

.card-body {
padding: 1.05rem 1.1rem 1.15rem;
}

.card-icon {
margin: 1.15rem 1.1rem 0.05rem;
}

.osm-map-frame {
height: 300px;
border-radius: var(--radius-lg);
}

.osm-map-meta {
align-items: flex-start;
flex-direction: column;
gap: 0.3rem;
}

.osm-map-attribution {
margin-left: 0;
}
}

/* ============================================================
26. ACCESSIBILITY / MOTION
============================================================ */
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}

*,
*::before,
*::after {
scroll-behavior: auto !important;
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
}
}

@media (prefers-contrast: more) {
:root {
--color-text: #ffffff;
--color-text-soft: #d8e0e9;
--color-text-muted: #b0bcc9;
--color-border: #31465c;
--color-border-strong: #46627f;
}
}

/* ============================================================
27. PRINT
============================================================ */
@media print {
header,
footer,
.logout-form,
.flash-message,
nav.breadcrumb,
.admin-edit-link,
.children-pagination,
.gallery-lightbox {
display: none !important;
}

html,
body {
color: #000 !important;
background: #fff !important;
}

body::before {
display: none;
}

main {
max-width: none;
padding: 0;
}

article.page,
article.page p,
article.page li,
article.page h1,
article.page h2,
article.page h3,
article.page h4,
article.page h5,
article.page h6 {
color: #000 !important;
}

.card-item,
.quote-block,
article.page blockquote,
article.page pre,
.file-block-link,
.children-list li a {
color: #000 !important;
background: #fff !important;
box-shadow: none !important;
}
}
/* Audio block */
.audio-block { margin: 1.25rem 0; }
.audio-block audio { display: block; width: 100%; max-width: 720px; }
.audio-caption { margin: .5rem 0 0; font-size: .95rem; opacity: .8; }

/* Responsive CMS media image sizes */
figure img[src*="/media/"][src$="/xs"] {
    width: auto;
    max-width: min(100%, 150px);
    height: auto;
}

figure img[src*="/media/"][src$="/sm"] {
    width: auto;
    max-width: min(100%, 300px);
    height: auto;
}

figure img[src*="/media/"][src$="/md"] {
    width: auto;
    max-width: min(100%, 600px);
    height: auto;
}

figure img[src*="/media/"][src$="/lg"] {
    width: auto;
    max-width: min(100%, 900px);
    height: auto;
}

figure img[src*="/media/"][src$="/original"] {
    width: auto;
    max-width: min(100%, 1200px);
    height: auto;
}

/* Image block: optional forced full container width */
figure.image-block-full-width {
    width: 100%;
}

figure.image-block-full-width > img {
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
}

/* Image block: optional removal of the standard image shadow/frame */
figure.image-block-no-frame > img {
    box-shadow: none !important;
}


/* Article metadata */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    margin: -.35rem 0 1.5rem;
    font-size: .9rem;
    opacity: .75;
}

.article-meta > span:not(:last-child)::after {
    content: "·";
    margin-left: 1rem;
}

@media (max-width: 600px) {
    .article-meta {
        display: grid;
        gap: .25rem;
    }

    .article-meta > span::after {
        content: none !important;
    }
}
