/* =========================================================
   WP-Atlas frontend
   ========================================================= */

.atlas-root {
    --atlas-fg: #1f2937;
    --atlas-muted: #6b7280;
    --atlas-border: rgba(15, 23, 42, .09);
    --atlas-card: #fff;
    --atlas-soft: #f6f7f9;
    --atlas-accent: #1e40af;
    --atlas-accent-soft: #e8eefc;
    --atlas-good: #15803d;
    --atlas-bad: #b91c1c;
    --atlas-warn: #b45309;
    --atlas-tmax: #dc2626;
    --atlas-tmin: #2563eb;
    --atlas-prec: #93c5fd;
    --atlas-radius: 14px;
    color: var(--atlas-fg);
    font-size: 16px;
    line-height: 1.55;
}

.atlas-root *, .atlas-root *::before, .atlas-root *::after { box-sizing: border-box; }

.atlas-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}
.atlas-member .atlas-layout { padding-top: 8px; }


.atlas-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* Ad slots between sections: fixed min-height so nothing jumps when the ad loads (CLS). */
.atlas-ad { position: relative; min-height: 280px; padding-top: 18px; text-align: center; }
.atlas-ad .adsbygoogle { min-height: 250px; }
.atlas-ad-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed #cbd5e1; border-radius: var(--atlas-radius); background: #f1f5f9; color: #64748b; font-weight: 600; }
.atlas-ad-placeholder small { font-weight: 400; }
.atlas-ad-label { position: absolute; top: 0; left: 0; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; }
.atlas-ad-placeholder .atlas-ad-label { top: 6px; left: 10px; }

/* ---------- Typography ---------- */
.atlas-root h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.15; margin: 0; font-weight: 800; }
.atlas-root h2 { font-size: 1.3rem; margin: 0 0 12px; font-weight: 750; }
.atlas-root h2 a { color: inherit; }
.atlas-root h3 { font-size: 1.02rem; margin: 18px 0 10px; font-weight: 700; }
.atlas-root p { margin: 0 0 10px; }
.atlas-root a { color: var(--atlas-accent); }
.atlas-muted { color: var(--atlas-muted); }
.atlas-small { font-size: .85rem; }
.atlas-kicker { margin: 0 !important; color: var(--atlas-muted); font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; }
.atlas-lead { font-size: 1.08rem; color: #374151; }
.atlas-source { font-size: .8rem; color: var(--atlas-muted); margin-top: 8px !important; }
.atlas-source a { color: inherit; }

/* ---------- Cards ---------- */
.atlas-card, .atlas-hero {
    background: var(--atlas-card);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius);
    padding: 18px 20px;
}
.atlas-hero-home { background: linear-gradient(135deg, #eef3ff, #fff 60%); padding: 28px 24px; }
.atlas-logo-h1 { margin: 0 0 12px; line-height: 0; text-align: center; }
.atlas-logo-h1 .atlas-logo { display: inline-block; width: 100%; max-width: 640px; height: auto; }
.atlas-hero-home .atlas-lead { text-align: center; }

/* ---------- Breadcrumbs ---------- */
.atlas-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .88rem; color: var(--atlas-muted); }
.atlas-crumbs li + li::before { content: "/"; margin-right: 4px; opacity: .6; }
.atlas-crumbs a { color: inherit; }

/* ---------- Hero ---------- */
.atlas-hero-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.atlas-hero-head > div { flex: 1 1 auto; min-width: 0; }
.atlas-hero-head .atlas-muted { margin: 4px 0 0; }
.atlas-flag-lg { width: 84px; height: auto; border-radius: 6px; box-shadow: 0 0 0 1px var(--atlas-border); flex: 0 0 auto; }
.atlas-flag-md { width: 36px; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px var(--atlas-border); flex: 0 0 auto; }
.atlas-flag-sm { width: 22px; height: auto; border-radius: 2px; vertical-align: -3px; margin-right: 6px; box-shadow: 0 0 0 1px var(--atlas-border); }
.atlas-hero-badge { margin-left: auto; }
.atlas-banner { margin: 16px 0 0; position: relative; border-radius: 10px; overflow: hidden; background: var(--atlas-soft); aspect-ratio: 3 / 1; }
.atlas-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.atlas-banner figcaption { position: absolute; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #fff; font-size: .72rem; padding: 3px 8px; border-top-left-radius: 6px; }
.atlas-banner figcaption a { color: #fff; }
.atlas-banner figcaption { max-width: 100%; }
.atlas-banner .atlas-cap-title { font-weight: 600; }
.atlas-summary { margin-top: 14px; }

/* ---------- Search ---------- */
.atlas-search { position: relative; display: flex; gap: 8px; margin: 16px auto 0; max-width: 640px; }
.atlas-search input[type=search] { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 1rem; background: #fff; }
.atlas-search button { padding: 0 18px; border: 0; border-radius: 10px; background: var(--atlas-accent); color: #fff; font-weight: 700; cursor: pointer; }
.atlas-suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; list-style: none; margin: 4px 0 0; padding: 4px; background: #fff; border: 1px solid var(--atlas-border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.atlas-suggest a { display: block; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--atlas-fg); }
.atlas-suggest a:hover, .atlas-suggest a:focus { background: var(--atlas-accent-soft); }
.atlas-suggest a:focus-visible { outline: 2px solid var(--atlas-accent); outline-offset: -2px; }

/* ---------- Tiles & lists ---------- */
.atlas-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.atlas-tile { display: block; padding: 12px 14px; border: 1px solid var(--atlas-border); border-radius: 12px; background: var(--atlas-soft); text-decoration: none; color: var(--atlas-fg) !important; transition: border-color .15s, transform .15s; }
.atlas-tile:hover, .atlas-tile:focus { border-color: var(--atlas-accent); transform: translateY(-1px); }
.atlas-tile-title { display: block; font-weight: 700; }
.atlas-tile-meta { display: block; font-size: .85rem; color: var(--atlas-muted); }
.atlas-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.atlas-chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--atlas-soft); border: 1px solid var(--atlas-border); text-decoration: none; color: var(--atlas-fg) !important; font-size: .92rem; }
.atlas-chip:hover { border-color: var(--atlas-accent); }
.atlas-list { list-style: none; margin: 0; padding: 0; }
.atlas-list li a { display: block; padding: 8px 4px; border-bottom: 1px solid var(--atlas-border); text-decoration: none; }
.atlas-textlinks { line-height: 1.9; }

.atlas-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.atlas-filter input { padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; min-width: 240px; }
.atlas-country-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.atlas-country-list a { display: grid; grid-template-columns: 40px 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--atlas-border); border-radius: 10px; text-decoration: none; color: var(--atlas-fg) !important; }
.atlas-country-list a:hover { border-color: var(--atlas-accent); }
.atlas-country-list .atlas-flag-md { grid-row: 1 / 3; }
.atlas-cl-name { font-weight: 700; }
.atlas-cl-meta { grid-column: 2; font-size: .82rem; color: var(--atlas-muted); }
.atlas-country-list .atlas-ta { grid-column: 3; grid-row: 1 / 3; }

/* ---------- Subnav ---------- */
.atlas-subnav { display: flex; flex-wrap: wrap; gap: 8px; }
.atlas-subnav-btn { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--atlas-border); background: #fff; text-decoration: none; color: var(--atlas-fg) !important; font-weight: 600; font-size: .95rem; }
.atlas-subnav-btn:hover { border-color: var(--atlas-accent); }
.atlas-subnav-btn.is-active { background: var(--atlas-accent); border-color: var(--atlas-accent); color: #fff !important; }

/* ---------- Facts ---------- */
.atlas-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 18px; margin: 0; }
.atlas-facts div { padding: 8px 0; border-bottom: 1px solid var(--atlas-border); }
.atlas-facts dt { font-size: .8rem; color: var(--atlas-muted); text-transform: uppercase; letter-spacing: .03em; }
.atlas-facts dd { margin: 2px 0 0; font-weight: 600; }
.atlas-borders { margin-top: 12px !important; }

/* ---------- KPI tiles ---------- */
.atlas-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.atlas-kpi { border: 1px solid var(--atlas-border); border-radius: 12px; padding: 12px 14px; background: var(--atlas-soft); display: flex; flex-direction: column; gap: 4px; }
.atlas-kpi-label { font-size: .85rem; color: #374151; font-weight: 600; }
.atlas-kpi-value { font-size: 1.45rem; font-weight: 800; line-height: 1.2; }
.atlas-kpi-text { font-size: 1.05rem; }
.atlas-kpi-meta { font-size: .78rem; color: var(--atlas-muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.atlas-kpis-compact .atlas-kpi-value { font-size: 1.15rem; }
.atlas-hint { display: inline-block; position: relative; margin-left: 4px; }
.atlas-hint summary { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #e5e7eb; font-size: .7rem; cursor: help; list-style: none; }
.atlas-hint summary::-webkit-details-marker { display: none; }
.atlas-hint summary:focus-visible { outline: 2px solid var(--atlas-accent); outline-offset: 2px; }
.atlas-hint-text { position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: max-content; max-width: min(280px, 80vw); padding: 8px 10px; border-radius: 8px; background: #1f2937; color: #fff; font-size: .8rem; font-weight: 400; line-height: 1.4; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.atlas-cmp { padding: 1px 6px; border-radius: 999px; font-weight: 600; }
.atlas-cmp-good { background: #dcfce7; color: var(--atlas-good); }
.atlas-cmp-bad { background: #fee2e2; color: var(--atlas-bad); }
.atlas-cmp-neutral, .atlas-cmp-eq { background: #e5e7eb; color: #374151; }

/* ---------- Charts ---------- */
.atlas-spark { margin-top: 4px; }
.atlas-spark-line { fill: none; stroke: var(--atlas-accent); stroke-width: 1.6; }
.atlas-spark-fc { fill: none; stroke: var(--atlas-accent); stroke-width: 1.4; stroke-dasharray: 3 3; opacity: .7; }
.atlas-spark-dot { fill: var(--atlas-accent); }
.atlas-chart { width: 100%; height: auto; display: block; }
.atlas-grid { stroke: #e5e7eb; stroke-width: 1; }
.atlas-axis { fill: var(--atlas-muted); font-size: 11px; }
.atlas-axis-prec { fill: #3b82f6; }
.atlas-line-main { fill: none; stroke: var(--atlas-accent); stroke-width: 2.4; }
.atlas-line-fc { fill: none; stroke: var(--atlas-accent); stroke-width: 2; stroke-dasharray: 5 4; opacity: .75; }
.atlas-line-de { fill: none; stroke: #9ca3af; stroke-width: 1.8; stroke-dasharray: 2 3; }
.atlas-bar-prec { fill: var(--atlas-prec); }
.atlas-line-tmax { fill: none; stroke: var(--atlas-tmax); stroke-width: 2.4; }
.atlas-line-tmin { fill: none; stroke: var(--atlas-tmin); stroke-width: 2.4; }
.atlas-dot-tmax { fill: var(--atlas-tmax); }
.atlas-dot-tmin { fill: var(--atlas-tmin); }
.atlas-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--atlas-muted); }
.atlas-legend span::before { content: ""; display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; background: currentColor; }
.atlas-lg-tmax::before { background: var(--atlas-tmax) !important; }
.atlas-lg-tmin::before { background: var(--atlas-tmin) !important; }
.atlas-lg-prec::before { background: var(--atlas-prec) !important; height: 10px !important; }
.atlas-lg-main::before { background: var(--atlas-accent) !important; }
.atlas-lg-fc::before { background: repeating-linear-gradient(90deg, var(--atlas-accent) 0 4px, transparent 4px 7px) !important; }
.atlas-lg-de::before { background: repeating-linear-gradient(90deg, #9ca3af 0 2px, transparent 2px 5px) !important; }
.atlas-climate-summary { font-size: .95rem; }

/* ---------- Tables ---------- */
.atlas-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.atlas-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.atlas-table th, .atlas-table td { padding: 7px 8px; border-bottom: 1px solid var(--atlas-border); text-align: left; white-space: nowrap; }
.atlas-table thead th { font-size: .78rem; text-transform: uppercase; color: var(--atlas-muted); letter-spacing: .03em; }
.atlas-table-months td, .atlas-table-months thead th { text-align: center; }

/* ---------- Travel advice & visa ---------- */
.atlas-ta { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.atlas-ta-0 { background: #dcfce7; color: var(--atlas-good); }
.atlas-ta-1 { background: #fef3c7; color: var(--atlas-warn); }
.atlas-ta-2 { background: #ffedd5; color: #c2410c; }
.atlas-ta-3 { background: #fee2e2; color: var(--atlas-bad); }
.atlas-entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.atlas-entry-grid h3 { margin-top: 0; }
.atlas-visa { list-style: none; margin: 0 0 8px; padding: 0; }
.atlas-visa li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; background: var(--atlas-soft); }
.atlas-visa-visa-free strong { color: var(--atlas-good); }
.atlas-visa-visa-required strong, .atlas-visa-no-admission strong { color: var(--atlas-bad); }
.atlas-visa-e-visa strong, .atlas-visa-eta strong, .atlas-visa-visa-on-arrival strong { color: var(--atlas-warn); }
.atlas-aa-changes { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; margin: 10px 0 16px; font-size: .9rem; }
.atlas-aa-content h2 { font-size: 1.15rem; margin-top: 22px; }
.atlas-aa-content h3 { font-size: 1rem; }
.atlas-aa-content blockquote { margin: 10px 0; padding: 10px 14px; border-left: 4px solid var(--atlas-accent); background: var(--atlas-accent-soft); border-radius: 0 8px 8px 0; }
.atlas-aa-content ul { padding-left: 20px; }
.atlas-fx-rate { font-size: 1.15rem; }

/* ---------- Forecast ---------- */
.atlas-fc-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.atlas-fc-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; background: var(--atlas-soft); border: 1px solid var(--atlas-border); border-radius: 10px; }
.atlas-fc-date { font-size: .8rem; color: var(--atlas-muted); }
.atlas-fc-icon { font-size: 1.6rem; line-height: 1.3; }
.atlas-fc-temp { font-weight: 700; }
.atlas-fc-prec { font-size: .78rem; color: #2563eb; }

/* ---------- Map ---------- */
.atlas-map { height: 380px; border-radius: 10px; overflow: hidden; background: var(--atlas-soft); z-index: 0; }

/* ---------- Gallery & lightbox ---------- */
.atlas-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .atlas-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .atlas-gallery { grid-template-columns: minmax(0, 1fr); } }
.atlas-gallery-item { margin: 0; }
.atlas-gallery-btn { display: block; width: 100%; padding: 0; border: 0; background: var(--atlas-soft); border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 16 / 10; }
.atlas-gallery-btn img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.atlas-gallery-btn:hover img { transform: scale(1.03); }
.atlas-gallery-cap { font-size: .72rem; color: var(--atlas-muted); margin-top: 4px; line-height: 1.4; overflow-wrap: anywhere; }
.atlas-cap-credit { display: block; }
.atlas-gallery-cap .atlas-cap-title { display: block; font-size: .85rem; font-weight: 600; color: var(--atlas-fg); line-height: 1.35; margin-bottom: 2px; }
.atlas-gallery-cap a { color: inherit; }
.atlas-lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; padding: 20px 60px; }
.atlas-lightbox[hidden] { display: none; }
.atlas-lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.atlas-lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 8px; }
.atlas-lightbox figcaption { color: #e5e7eb; font-size: .9rem; margin-top: 10px; text-align: center; max-width: 900px; line-height: 1.45; }
.atlas-lightbox figcaption strong { display: block; color: #fff; font-size: 1rem; margin-bottom: 2px; }
.atlas-lightbox figcaption a { color: #fff; }
.atlas-lightbox button { position: absolute; background: transparent; border: 0; color: #fff; font-size: 44px; line-height: 1; cursor: pointer; padding: 8px 14px; }
.atlas-lightbox-close { top: 8px; right: 10px; }
.atlas-lightbox-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.atlas-lightbox-next { right: 6px; top: 50%; transform: translateY(-50%); }
html.atlas-noscroll, html.atlas-noscroll body { overflow: hidden; }

/* ---------- Videos ---------- */
.atlas-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.atlas-video-btn, .atlas-video-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: #111; cursor: pointer; }
.atlas-video-btn img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.atlas-video-play { position: absolute; left: 50%; top: 50%; width: 62px; height: 44px; transform: translate(-50%, -50%); background: rgba(220, 38, 38, .92); border-radius: 12px; }
.atlas-video-play::after { content: ""; position: absolute; left: 25px; top: 13px; border-left: 16px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.atlas-video-title { font-weight: 600; font-size: .92rem; margin-top: 6px; line-height: 1.35; }
.atlas-video-channel { font-size: .8rem; color: var(--atlas-muted); }

/* ---------- Misc ---------- */
.atlas-root .screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) {
    .atlas-card, .atlas-hero { padding: 14px; }
    .atlas-hero-badge { margin-left: 0; }
    .atlas-banner { aspect-ratio: 16 / 9; }
    .atlas-country-list { grid-template-columns: minmax(0, 1fr); }
    .atlas-lightbox { padding: 10px; }
}

/* ---------- Aufenthalt & Einbürgerung ---------- */
.atlas-res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.atlas-res-permit { border: 1px solid var(--atlas-border); border-radius: var(--atlas-radius); padding: 14px 16px; background: #fff; }
.atlas-res-permit h3 { margin: 2px 0 6px; }
.atlas-res-permit ul { margin: 8px 0; padding-left: 18px; }
.atlas-res-permit li { margin: 3px 0; }
.atlas-res-type { margin: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--atlas-accent); font-weight: 700; }
.atlas-res-free { border-color: #86efac; background: #f0fdf4; }
.atlas-res-who { margin: 0; color: #4b5563; font-size: .92rem; }
.atlas-res-validity { margin: 6px 0 0; font-size: .92rem; }
.atlas-res-summary { font-size: 1.05rem; margin: 0; }
.atlas-res-links, .atlas-res-sourcelist { margin: 0; padding-left: 20px; }
.atlas-res-links li, .atlas-res-sourcelist li { margin: 4px 0; overflow-wrap: anywhere; }
.atlas-res-original { margin-top: 12px; }
.atlas-res-original summary { cursor: pointer; font-weight: 600; }
.atlas-res-original dt { font-weight: 600; margin-top: 8px; }
.atlas-res-original dd { margin: 2px 0 0; }

/* Key facts box (includes/seo.php) */
.atlas-keyfacts ul { margin: 0 0 .5em 1.2em; padding: 0; }
.atlas-keyfacts li { margin: .3em 0; line-height: 1.5; }

/* =========================================================
   Community CTA (guests only, frontend/community.php)
   ========================================================= */
:root {
    --atlas-community: #ff6600;        /* site orange (theme-color meta, headings, cookie button) */
    --atlas-community-hover: #e65c00;
    --atlas-community-ink: #b34700;    /* readable orange for links on light backgrounds */
    --atlas-community-soft: #fff4ec;
    --atlas-community-bar-h: 52px;
}
.atlas-cta { margin: 0; padding: 12px 16px; border-radius: 10px; text-align: center; background: var(--atlas-community-soft); font-size: 1rem; line-height: 1.5; }
.atlas-root .atlas-cta a, .atlas-root .atlas-cta-about a { color: var(--atlas-community-ink); font-weight: 700; text-decoration: underline; }
.atlas-cta-inline { margin-top: 12px !important; }
.atlas-cta-brand { font-weight: 700; }

/* Fixed registration bar; sits below the cookie notice (z-index 100000) and hides while it is open */
.atlas-cta-bar { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); /* centred pill button, as wide as its text */ z-index: 9990; display: flex; align-items: center; justify-content: center; min-height: var(--atlas-community-bar-h); padding: 10px 52px 10px 28px; border-radius: 999px; background: var(--atlas-community); box-shadow: 0 4px 18px rgba(0, 0, 0, .22); box-sizing: border-box; }
.atlas-cta-bar[hidden], body.cookies-not-set .atlas-cta-bar { display: none; }
.atlas-cta-bar-link, .atlas-cta-bar-link:visited { color: #fff !important; font-weight: 700; font-size: 1.05rem; line-height: 1.3; text-align: center; text-decoration: none; }
.atlas-cta-bar-link::after { content: ""; position: absolute; inset: 0; } /* whole bar clickable */
.atlas-cta-bar-link:hover, .atlas-cta-bar-link:focus-visible { text-decoration: underline; }
.atlas-cta-bar:hover { background: var(--atlas-community-hover); }
.atlas-cta-bar-close { position: absolute; z-index: 1; top: 50%; right: 10px; transform: translateY(-50%); width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; opacity: .85; }
.atlas-cta-bar-close:hover, .atlas-cta-bar-close:focus-visible { opacity: 1; background: rgba(255, 255, 255, .18); }
body:has(.atlas-cta-bar:not([hidden])) { padding-bottom: calc(var(--atlas-community-bar-h) + 20px + env(safe-area-inset-bottom, 0px)); }
body.cookies-not-set:has(.atlas-cta-bar) { padding-bottom: 0; }
@media (max-width: 600px) {
    :root { --atlas-community-bar-h: 56px; }
    .atlas-cta-bar { max-width: calc(100% - 16px); bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding-left: 18px; padding-right: 44px; }
    .atlas-cta-bar-link { font-size: .95rem; }
}

/* Videos: 4 per row on wide screens, 2x2 on tablets, 1 on phones (no 3+1 orphan). */
.atlas-videos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .atlas-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .atlas-videos { grid-template-columns: minmax(0, 1fr); } }

/* Map: placeholder until the visitor clicks "Karte laden" */
.atlas-map-consent { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; }
.atlas-map-consent p { margin: 0; max-width: 34em; font-size: .85rem; color: var(--atlas-muted); }
.atlas-map-load { padding: 10px 22px; border: 0; border-radius: 999px; background: var(--atlas-accent, #1e40af); color: #fff; font-weight: 600; font-size: 1rem; cursor: pointer; }
.atlas-map-load:hover, .atlas-map-load:focus-visible { filter: brightness(1.1); outline: 2px solid currentColor; outline-offset: 2px; }
.atlas-map-load:disabled { opacity: .7; cursor: progress; }
.atlas-map-forget { margin-left: .4em; }
.atlas-map-forget[hidden] { display: none; }

/* Screen-reader-only status text (search suggestions) */
.atlas-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
    .atlas-root *, .atlas-lightbox * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
    .atlas-tile:hover, .atlas-tile:focus, .atlas-gallery-btn:hover img { transform: none; }
}

/* ---------- Ländervergleich ---------- */
.atlas-cmp-controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; margin-bottom: 14px; }
.atlas-cmp-controls label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--atlas-muted); }
.atlas-cmp select { padding: 7px 10px; border: 1px solid var(--atlas-border); border-radius: 8px; background: #fff; color: var(--atlas-fg); font-size: .95rem; max-width: 100%; }
.atlas-cmp-share { margin-left: auto; padding: 8px 14px; border: 1px solid var(--atlas-border); border-radius: 999px; background: #fff; font-weight: 600; cursor: pointer; }
.atlas-cmp-share:hover { border-color: var(--atlas-accent); }
.atlas-cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--atlas-border); border-radius: 10px; }
.atlas-cmp-table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; font-size: .93rem; }
.atlas-cmp-table th, .atlas-cmp-table td { padding: 8px 10px; border-bottom: 1px solid var(--atlas-border); text-align: left; vertical-align: top; }
.atlas-cmp-table tbody th { position: sticky; left: 0; z-index: 1; background: #fff; font-weight: 600; width: 200px; min-width: 160px; }
.atlas-cmp-table thead th { position: sticky; top: 0; z-index: 2; background: #fff; vertical-align: bottom; width: 22%; }
.atlas-cmp-table thead .atlas-cmp-corner { left: 0; z-index: 3; vertical-align: bottom; }
.atlas-cmp-corner-h { display: block; font-weight: 700; }
.atlas-cmp-table thead select { width: 100%; margin-bottom: 8px; }
.atlas-cmp-home, .atlas-cmp-table td:nth-child(2) { background: var(--atlas-soft); }
.atlas-cmp-head { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--atlas-fg) !important; text-decoration: none; }
.atlas-cmp-head img { flex: 0 0 auto; margin: 0; }
.atlas-cmp-total { margin-top: 6px; display: flex; align-items: baseline; gap: 2px; color: var(--atlas-muted); }
.atlas-cmp-total strong { font-size: 1.9rem; line-height: 1; color: var(--atlas-accent); }
.atlas-cmp-sec th { position: static; background: var(--atlas-accent-soft) !important; color: var(--atlas-accent); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; padding-top: 10px; }
.atlas-cmp-table tbody tr.atlas-cmp-sec th { position: sticky; left: 0; }
.atlas-cmp-val { display: block; }
.atlas-cmp-diff { display: block; font-size: .78rem; color: var(--atlas-muted); }
.atlas-cmp-diff.is-up { color: var(--atlas-good); }
.atlas-cmp-diff.is-down { color: var(--atlas-bad); }
.atlas-cmp-table td.is-best { background: #ecfdf3; }
.atlas-cmp-table td.is-best .atlas-cmp-val, .atlas-cmp-table td.is-best .atlas-cmp-num { font-weight: 700; color: var(--atlas-good); }
.atlas-cmp-num { display: inline-block; min-width: 2.2em; font-weight: 600; }
.atlas-cmp-bar { display: inline-block; vertical-align: middle; width: calc(100% - 3em); max-width: 120px; height: 7px; border-radius: 4px; background: #e5e7eb; overflow: hidden; }
.atlas-cmp-bar-fill { display: block; height: 100%; border-radius: 4px; }
.atlas-cmp-table tr.is-off td, .atlas-cmp-table tr.is-off th { opacity: .45; }
.atlas-cmp-links td { border-bottom: 0; font-weight: 600; }
.atlas-cmp-weights { overflow-x: auto; }
.atlas-cmp-weights table { border-collapse: collapse; font-size: .88rem; min-width: 640px; }
.atlas-cmp-weights th, .atlas-cmp-weights td { padding: 5px 8px; border-bottom: 1px solid var(--atlas-border); text-align: right; }
.atlas-cmp-weights th:first-child { text-align: left; }

/* Teaser on the atlas home: light orange box, button centred below the text */
.atlas-cmp-promo { background: var(--atlas-community-soft); border-color: #fcd9bf; }
.atlas-cmp-teaser { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.atlas-cmp-teaser p { margin: 0; align-self: stretch; }
.atlas-btn { display: inline-block; padding: 11px 22px; border-radius: 999px; background: var(--atlas-accent); color: #fff !important; font-weight: 700; text-decoration: none; white-space: nowrap; }
.atlas-btn:hover, .atlas-btn:focus-visible { filter: brightness(1.1); }
.atlas-guest .atlas-btn-community { background: var(--atlas-community); }
.atlas-cmp-link { margin: 6px 0 0; font-size: .95rem; }
@media (max-width: 640px) {
    .atlas-cmp-table tbody th { width: 130px; min-width: 120px; font-size: .85rem; }
    .atlas-cmp-share { margin-left: 0; }
    .atlas-btn { white-space: normal; text-align: center; }
}

/* ---------- Schule & Bildung ---------- */
.atlas-school-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 28px; }
.atlas-school h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.atlas-school p { margin: 0 0 8px; }
.atlas-hs { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.atlas-hs-erlaubt { background: #dcfce7; color: #166534; }
.atlas-hs-auflagen { background: #fef3c7; color: #92400e; }
.atlas-hs-ausnahme { background: #ffedd5; color: #9a3412; }
.atlas-hs-verboten { background: #fee2e2; color: #991b1b; }
.atlas-hs-unklar { background: #f1f5f9; color: #475569; }
.atlas-das { margin: 0 0 8px; padding-left: 18px; }
.atlas-pisa { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 6px; }
.atlas-pisa-item { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--atlas-border); border-radius: 10px; background: var(--atlas-soft); }
.atlas-pisa-label { font-size: .85rem; color: var(--atlas-muted); font-weight: 600; }
.atlas-pisa-val { font-size: 1.6rem; line-height: 1.2; color: var(--atlas-accent); }
.atlas-das li { margin: 2px 0; }
/* Profil / Wunschklima hervorheben */
.atlas-cmp-controls select { border: 2px solid var(--atlas-community); }
.atlas-cmp-controls select:focus { outline: 2px solid var(--atlas-community-hover); outline-offset: 1px; }
