/* ============================================================================
 * Frontend base framework.
 *
 * Written entirely against CSS custom properties so named themes
 * (/themes/<name>/theme.css), per-project overrides (/themes/_custom/<slug>.css)
 * and generated token files (/themes/_vars/<slug>.css) can re-skin the site by
 * overriding :root variables — no inline styles, no per-client forks.
 * ========================================================================== */

:root {
    /* Palette */
    --color-primary:            #2980b9;
    --color-primary-dark:       #1a5276;
    --color-button-border:      #2980b9;
    --color-button-border-hover:#1a5276;
    --color-text:           #2d3436;
    --color-text-muted:     #6b7378;
    --color-heading:        #1f2a30;
    --color-bg:             #ffffff;
    --color-surface:        #f6f8fa;
    --color-card:           #ffffff;
    --color-border:         #e7eaee;

    --color-footer-bg:      #1f2a30;
    --color-footer-text:    #aeb9c2;
    --color-footer-heading: #ffffff;

    /* Semantic "traffic light" colours (alerts, form messages) */
    --color-success:        #2e7d32;
    --color-error:          #c62828;
    --color-info:           #1565c0;

    --color-banner-overlay: linear-gradient(to right, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 100%);

    /* Typography */
    --font-body:    'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: var(--font-body);
    --font-size:    16px;
    --line-height:  1.7;

    /* Layout */
    --container:        1200px;
    --container-narrow: 760px;
    --radius:           8px;
    --radius-sm:        6px;
    --header-height:    72px;
    --space:            24px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: var(--font-size);
    line-height: var(--line-height);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space);
}

.container-narrow { max-width: var(--container-narrow); }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--color-primary-dark); }

img { max-width: 100%; height: auto; }

/* Interactive controls always show the pointer cursor. */
button, .btn, .btn-front, .category-btn, .page-link,
input[type="submit"], input[type="button"], input[type="reset"] { cursor: pointer; }
button:disabled, .btn:disabled { cursor: not-allowed; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    line-height: 1.2;
}

/* ---- Header ---- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition:
        background  0.35s ease,
        border-color 0.35s ease,
        box-shadow  0.35s ease,
        transform   0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Solid (light) state — no banner, or scrolled past banner */
body:not(.has-banner) .site-header,
.site-header.header--solid {
    background: var(--color-bg);
    border-bottom-color: var(--color-border);
    box-shadow: 0 1px 12px rgba(0,0,0,0.07);
}

/* Slide the header out of view on scroll-down */
.site-header.header--hidden {
    transform: translateY(-110%);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
}

.site-logo .site-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-heading);
    transition: color 0.3s;
}
.site-logo img { height: 40px; width: auto; display: block; }
.site-logo:hover { text-decoration: none; }

/* Logo visibility logic */
.logo-light { display: none; }

/* Over banner (transparent header) → show light logo */
body.has-banner .site-header:not(.header--solid) .logo-dark  { display: none; }
body.has-banner .site-header:not(.header--solid) .logo-light { display: block; }

/* Solid header (always, or after scroll) → show dark logo */
body:not(.has-banner) .logo-light,
body.has-banner .site-header.header--solid .logo-light { display: none; }
body:not(.has-banner) .logo-dark,
body.has-banner .site-header.header--solid .logo-dark { display: block; }

/* Nav link colour over transparent banner header */
body.has-banner .site-header:not(.header--solid) .main-nav > ul > li > a {
    color: rgba(255,255,255,0.92);
}
body.has-banner .site-header:not(.header--solid) .main-nav > ul > li > a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
body.has-banner .site-header:not(.header--solid) .site-logo .site-name {
    color: #fff;
}
body.has-banner .site-header:not(.header--solid) .nav-toggle span {
    background: #fff;
}
body.has-banner .site-header:not(.header--solid) .lang-switch {
    border-left-color: rgba(255,255,255,0.3);
}
body.has-banner .site-header:not(.header--solid) .lang-switch a {
    color: rgba(255,255,255,0.8);
}
/* Hover over the dark/transparent header: the base hover swaps to a light surface,
   which would leave white text unreadable — keep it light-on-translucent instead. */
body.has-banner .site-header:not(.header--solid) .lang-switch a:hover {
    background: rgba(255,255,255,0.16);
    color: #fff;
}
body.has-banner .site-header:not(.header--solid) .lang-switch a.active {
    background: rgba(255,255,255,0.22);
    color: #fff;
}
body.has-banner .site-header:not(.header--solid) .lang-switch a.active:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

/* ---- Admin bar (shown to a logged-in editor; not themeable) ---- */
.cms-adminbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 36px;
    background: #1d2327;
    color: #c3c4c7;
    z-index: 1000;
    font-size: 13px;
    font-family: var(--font-body);
}
.cms-adminbar-inner { display: flex; align-items: center; gap: 18px; height: 100%; }
.cms-adminbar a { color: #c3c4c7; text-decoration: none; }
.cms-adminbar a:hover { color: #fff; }
.cms-adminbar-brand { font-weight: 600; color: #fff; }
.cms-adminbar-user { margin-left: auto; color: #a7aaad; }
body.has-adminbar .site-header { top: 36px; }

/* Mobile nav toggle — pure CSS via a hidden checkbox */
.nav-toggle {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 22px;
    position: relative;
    z-index: 2; /* stay above the fullscreen menu (same header stacking context) */
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--color-text);
    position: absolute;
    left: 0;
    transition: transform 0.3s ease, opacity 0.2s ease, background-color 0.3s ease, top 0.3s ease;
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { top: 100%; transform: translateY(-100%); }

/* Open state → hamburger morphs into a red "close" cross */
.nav-toggle-cb:checked ~ .nav-toggle span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.nav-toggle-cb:checked ~ .nav-toggle span:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
}
.nav-toggle-cb:checked ~ .nav-toggle span:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}
/* The cross uses the semantic "error" red (override the over-banner white too) */
.nav-toggle-cb:checked ~ .nav-toggle span,
body.has-banner .site-header:not(.header--solid) .nav-toggle-cb:checked ~ .nav-toggle span {
    background: var(--color-error);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.main-nav ul { list-style: none; }
.main-nav > ul {
    display: flex;
    align-items: center;
    gap: 4px;
}
.main-nav > ul > li > a {
    display: block;
    padding: 8px 16px;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
}
.main-nav > ul > li > a:hover {
    background: var(--color-surface);
    color: var(--color-primary);
    text-decoration: none;
}

/* Dropdown */
.has-children { position: relative; }
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 8px 0;
    z-index: 200;
}
.has-children:hover .submenu,
.has-children:focus-within .submenu { display: block; }
.submenu li a {
    display: block;
    padding: 8px 20px;
    color: var(--color-text);
    font-size: 0.9rem;
    transition: background 0.2s;
}
.submenu li a:hover { background: var(--color-surface); text-decoration: none; }

/* Language switch */
.lang-switch {
    display: flex;
    gap: 4px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--color-border);
}
.lang-switch a {
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    border-radius: 4px;
    text-transform: uppercase;
    transition: background 0.2s, color 0.2s;
}
.lang-switch a.active { background: var(--color-primary); color: #fff; }
.lang-switch a:hover { text-decoration: none; background: var(--color-surface); color: var(--color-text); }
.lang-switch a.active:hover { background: var(--color-primary-dark); color: #fff; }

/* ---- Banner ---- */
@keyframes bannerFadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes bannerFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.page-banner {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    animation: bannerFadeIn 1.2s ease forwards;
}
.banner-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    background: var(--color-banner-overlay);
    padding: 0;
    display: flex;
    align-items: center;
    min-height: 100vh;
}
.banner-overlay .container {
    padding-top: calc(var(--header-height) + 80px);
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.banner-heading {
    color: #fff;
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-shadow: 0 2px 24px rgba(0,0,0,0.25);
    animation: bannerFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
.banner-subheading {
    color: rgba(255,255,255,0.88);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 400;
    line-height: 1.6;
    max-width: 620px;
    margin-top: 20px;
    text-shadow: 0 1px 10px rgba(0,0,0,0.2);
    animation: bannerFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}
.banner-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 36px;
    animation: bannerFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}
.banner-cta .btn {
    margin: 0;
    padding: 14px 36px;
    font-size: 1rem;
    letter-spacing: 0.02em;
    border-radius: 50px;
}
/* Ghost / outline CTA on the dark overlay */
.banner-cta .btn-invert {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.7);
    backdrop-filter: blur(4px);
}
.banner-cta .btn-invert:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
    border-color: #fff;
}

/* ---- Page content ---- */

/* Push content below fixed header on non-banner pages */
body:not(.has-banner) main { padding-top: var(--header-height); }
body.has-adminbar:not(.has-banner) main { padding-top: calc(var(--header-height) + 36px); }

.page-content { padding: 60px 0; }
.page-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 32px;
}

.content-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text);
}
.content-body > * + * { margin-top: 16px; }
/* Editor font-size changes carry a proportional (unitless) line-height, so larger
   text gets adequate line spacing instead of overlapping. */
.content-body [style*="font-size"] { line-height: 1.35; }
.content-body h2 { font-size: 1.6rem; margin-top: 40px; }
.content-body h3 { font-size: 1.3rem; margin-top: 32px; }
.content-body img { border-radius: var(--radius); }
.content-body ul, .content-body ol { padding-left: 24px; }
.content-body a { text-decoration: underline; }
.content-body blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--color-surface);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--color-text-muted);
}

/* ---- Citation / quote block (TinyMCE custom "Citace" element) ---- */
/* Full inner-width block with generous padding, no left border. The background
   colour is set inline per quote; quote-mark icons are optional (a class). */
.content-body blockquote.cms-quote {
    border: 0;
    border-radius: 14px;
    background: var(--color-surface);
    color: var(--color-text);
    padding: 48px 44px;
    margin: 32px 0;
    text-align: center;
    font-style: normal;
    position: relative;
    overflow: hidden;
}
.content-body blockquote.cms-quote > :first-child { margin-top: 0; }
.content-body blockquote.cms-quote > :last-child { margin-bottom: 0; }

/* "With quotes" variant — extra side padding so the corner icons have room. */
.content-body blockquote.cms-quote-quoted { padding-left: 92px; padding-right: 92px; }
.content-body blockquote.cms-quote-quoted::before,
.content-body blockquote.cms-quote-quoted::after {
    content: "";
    position: absolute;
    width: 46px;
    height: 46px;
    background-color: currentColor;
    opacity: 0.3;
    -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M9.7%206.3C7%207.4%205%2010%205%2013.2V18h6v-6H7.8c.2-1.6%201-2.9%202.6-3.6l-.7-2.1Zm9%200C16%207.4%2014%2010%2014%2013.2V18h6v-6h-3.2c.2-1.6%201-2.9%202.6-3.6l-.7-2.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M9.7%206.3C7%207.4%205%2010%205%2013.2V18h6v-6H7.8c.2-1.6%201-2.9%202.6-3.6l-.7-2.1Zm9%200C16%207.4%2014%2010%2014%2013.2V18h6v-6h-3.2c.2-1.6%201-2.9%202.6-3.6l-.7-2.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.content-body blockquote.cms-quote-quoted::before { top: 28px; left: 30px; }
.content-body blockquote.cms-quote-quoted::after { bottom: 28px; right: 30px; transform: rotate(180deg); }
.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}
.content-body th, .content-body td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
.content-body th { background: var(--color-surface); font-weight: 600; }

/* ---- Video embed ---- */
.video-embed { margin: 40px 0; }
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* ---- Gallery ---- */
.page-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 40px 0;
}
.gallery-thumb {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-thumb:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.gallery-thumb picture { display: block; width: 100%; height: 100%; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Blog listing ---- */
.blog-listing { padding: 60px 0; background: var(--color-bg); }
.blog-intro { margin: 16px 0 8px; }
.category-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 28px; }
.category-btn {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.category-btn:hover,
.category-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    text-decoration: none;
}
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 32px;
}
.article-card {
    display: flex;
    flex-direction: column;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
/* Body fills the rest of a stretched card so its colour reaches the bottom edge. */
.article-card-body { flex: 1 1 auto; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.10); }
.article-card-media {
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--color-surface);
}
.article-card-media picture { display: block; width: 100%; height: 100%; }
.article-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-card-placeholder { display: block; width: 100%; height: 100%; background: var(--color-surface); }
.article-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; background: var(--color-card); }
.article-card-date { font-size: 0.8rem; color: var(--color-text-muted); }
.article-card-title { font-size: 1.2rem; line-height: 1.3; }
.article-card-title a { color: var(--color-heading); }
.article-card-title a:hover { color: var(--color-primary); text-decoration: none; }
.article-card-excerpt { color: var(--color-text-muted); font-size: 0.95rem; }
.article-card-more { margin-top: auto; font-weight: 600; font-size: 0.9rem; }

.page-children { margin-top: 44px; }

.empty-note { color: var(--color-text-muted); margin-top: 24px; }

/* ---- Pagination ---- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 48px; justify-content: center; }
.page-link {
    min-width: 40px;
    padding: 8px 12px;
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--color-text);
}
.page-link:hover { background: var(--color-surface); text-decoration: none; }
.page-link.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ---- Single article ---- */
.article-single .article-back { margin-bottom: 16px; font-size: 0.9rem; }
.article-meta { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 24px; }

/* Custom article metaboxes (label → value list) */
.article-metaboxes {
    margin: 36px 0;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    display: grid;
    gap: 14px;
}
.article-metabox {
    display: grid;
    grid-template-columns: minmax(140px, 28%) 1fr;
    gap: 6px 24px;
}
.article-metabox dt { font-weight: 600; color: var(--color-heading); }
.article-metabox dd { margin: 0; color: var(--color-text); }

/* ---- Hero (empty-site fallback) ---- */
.hero {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: #fff;
}
.hero h1 { color: #fff; font-size: 3rem; margin-bottom: 16px; }
.hero p { font-size: 1.2rem; opacity: 0.9; }

/* ---- Error page ---- */
.error-page { text-align: center; padding: 80px 24px; }
.error-page h1 { font-size: 6rem; font-weight: 800; color: var(--color-border); }
.btn-front {
    display: inline-block;
    padding: 12px 32px;
    background: var(--color-primary);
    color: #fff;
    border: 2px solid var(--color-button-border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
    margin-top: 16px;
}
.btn-front:hover { background: var(--color-primary-dark); color: #fff; text-decoration: none; }

/* ---- Content buttons (TinyMCE "Button" element) ---- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--color-primary);
    color: #fff;
    border: 2px solid var(--color-button-border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--color-primary-dark); border-color: var(--color-button-border-hover); color: #fff; text-decoration: none; }
.btn-invert { background: transparent; color: var(--color-primary); border-color: var(--color-button-border); }
/* Inverted button keeps the transparent fill on hover; only border + text change. */
.btn-invert:hover { background: transparent; color: var(--color-button-border-hover); border-color: var(--color-button-border-hover); }
.content-body a.btn { text-decoration: none; }
.content-body .btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }
.content-body .btn-row .btn { margin: 0; }

/* ---- Footer ---- */
.site-footer { background: var(--color-footer-bg); color: var(--color-footer-text); margin-top: 60px; }
.footer-columns {
    display: grid;
    grid-template-columns: var(--footer-cols, 1.5fr 1fr 1fr 1fr);
    gap: 40px;
    padding: 60px var(--space);
}
.footer-col h4 {
    color: var(--color-footer-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--color-footer-text); font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--color-footer-heading); text-decoration: none; }
/* Contact (info) column sits after the menu columns (order: 1). */
.footer-col-info { order: 1; font-size: 0.9rem; line-height: 1.7; }
.footer-col-info a { color: var(--color-footer-text); }
.footer-col-info a:hover { color: var(--color-footer-heading); }
.footer-col-info strong { color: var(--color-footer-heading); display: block; margin-bottom: 10px; font-size: 1.05rem; }
.footer-address { display: block; }
.footer-reg { display: block; margin-top: 12px; font-size: 0.85rem; opacity: 0.85; }

/* Prominent phone + email with icons */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0 4px;
}
.footer-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-footer-heading) !important;
    width: fit-content;
}
.footer-contact-item:hover { color: var(--color-primary) !important; }
/* Plain icon — no circle. */
.footer-contact-icon {
    display: inline-flex;
    flex: none;
    color: inherit;
    transition: color 0.2s;
}
.footer-contact-icon svg { width: 20px; height: 20px; }

/* Social icons */
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: var(--color-footer-text) !important;
    transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}
.footer-social-link svg { width: 19px; height: 19px; }
.footer-social-link:hover {
    transform: translateY(-3px);
    color: #fff !important;
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* Bottom bar: copyright · legal menu · credit */
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; }
.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}
.footer-bottom p { font-size: 0.85rem; color: var(--color-footer-text); opacity: 0.8; margin: 0; }
.footer-legal {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0;
    padding: 0;
    justify-content: center;
}
.footer-legal li { margin: 0; }
.footer-legal a { font-size: 0.85rem; color: var(--color-footer-text); opacity: 0.85; }
.footer-legal a:hover { color: var(--color-footer-heading); opacity: 1; text-decoration: none; }
.footer-credit { display: inline-flex; gap: 6px; }
.footer-credit a { color: var(--color-footer-heading); font-weight: 600; }
.footer-credit a:hover { color: var(--color-primary); text-decoration: none; }

/* Obfuscated email shown reversed in source, flipped back for humans via CSS. */
.cx-rev { unicode-bidi: bidi-override; direction: rtl; }

/* ---- Cookie / GDPR consent bar ---- */
/* Visible by default (so it shows even before JS); JS adds .is-dismissed once a
   choice is stored, or while the mobile menu is open. */
.cookie-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    border-top: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 -6px 24px rgba(0,0,0,0.18);
    padding: 18px 0 calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.45s;
}
.cookie-bar.is-dismissed {
    transform: translateY(110%);
    visibility: hidden;
}
.cookie-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
    flex-wrap: wrap;
}
.cookie-bar-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    flex: 1 1 420px;
}
.cookie-bar-text a {
    color: var(--color-footer-heading);
    text-decoration: underline;
    white-space: nowrap;
}
.cookie-bar-text a:hover { color: var(--color-primary); }
.cookie-bar-actions {
    display: flex;
    gap: 12px;
    flex: none;
}
.cookie-bar .btn-sm-cc { padding: 10px 22px; font-size: 0.9rem; border-radius: 50px; }
/* Reject reads in white over the dark bar, like the banner's inverted button. */
.cookie-bar .btn-invert {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: rgba(255,255,255,0.55);
}
.cookie-bar .btn-invert:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border-color: #fff;
}

/* ---- Cookie opt-in / opt-out widget (on-page, e.g. privacy policy) ---- */
.cookie-settings {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    padding: 24px;
    margin: 32px 0;
}
.cookie-settings-title { font-size: 1.2rem; margin-bottom: 10px; }
.cookie-settings-line { margin-bottom: 16px; color: var(--color-text); }
.cookie-settings-status { color: var(--color-heading); }
.cookie-settings[data-state="accept"] .cookie-settings-status { color: var(--color-success); }
.cookie-settings[data-state="reject"] .cookie-settings-status { color: var(--color-error); }
.cookie-settings-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cookie-settings .btn-sm-cc { padding: 10px 22px; font-size: 0.9rem; border-radius: 50px; }

/* ---- Contact form ---- */
.contact-form-wrap { max-width: 640px; margin: 32px 0; }
/* Honeypot: kept in the DOM and submittable, but invisible/unfocusable. */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.contact-form .form-field { margin-bottom: 18px; }
.contact-form label,
.contact-form .field-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-heading);
}
.contact-form .req { color: var(--color-error); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="date"],
.contact-form input[type="time"],
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.contact-form .choice-group { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.contact-form .choice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-weight: 400;
    color: var(--color-text);
    cursor: pointer;
}
.contact-form .choice input { width: auto; margin-top: 3px; flex: none; }
.contact-form .choice span { font-weight: 400; }
.contact-form .has-error input,
.contact-form .has-error textarea,
.contact-form .has-error select { border-color: var(--color-error); }
.contact-form .field-error {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--color-error);
}
.contact-form .form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.contact-form .form-required-note { font-size: 0.85rem; color: var(--color-text-muted); }
/* Submit matches the site's primary buttons (rounded pill, same weight). */
.contact-form .form-actions .btn { border-radius: 50px; padding: 14px 36px; font-size: 1rem; letter-spacing: 0.02em; }

.form-message {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
}
.form-message-success {
    background: color-mix(in srgb, var(--color-success) 12%, transparent);
    color: var(--color-success);
    border: 1px solid color-mix(in srgb, var(--color-success) 35%, transparent);
}
.form-message-error {
    background: color-mix(in srgb, var(--color-error) 10%, transparent);
    color: var(--color-error);
    border: 1px solid color-mix(in srgb, var(--color-error) 35%, transparent);
}

/* Form heading + thank-you box */
.contact-form-title { font-size: 1.5rem; margin-bottom: 22px; }
.form-thankyou {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 32px 24px;
}
.form-thankyou-icon {
    width: 64px;
    height: 64px;
    flex: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--color-success) 15%, transparent);
    color: var(--color-success);
}
.form-thankyou-icon svg { width: 30px; height: 30px; }
.form-thankyou-text { font-size: 1.15rem; font-weight: 500; color: var(--color-heading); margin: 0; }

/* ---- Contact page template (content on top, info + map | form) ---- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 44px;
    align-items: start;
}
.contact-col {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 32px;
}
.contact-col-form .contact-form-wrap { margin: 0; max-width: none; }
.contact-info-heading { font-size: 1.5rem; margin-bottom: 22px; color: var(--color-primary); }
.contact-info-list { list-style: none; display: flex; flex-direction: column; gap: 18px; margin: 0; }
.contact-info-item { display: flex; gap: 14px; align-items: center; line-height: 1.5; }
.contact-info-item-top { align-items: flex-start; }
/* Plain icon — no circle, tinted with the primary colour. */
.contact-info-icon { flex: none; display: inline-flex; color: var(--color-primary); }
.contact-info-icon svg { width: 20px; height: 20px; }
.contact-info-strong { font-weight: 700; color: var(--color-heading) !important; }
.contact-info-strong:hover { color: var(--color-primary) !important; }
.contact-info-address { color: var(--color-text); line-height: 1.6; }
.contact-info-address strong { color: var(--color-heading); }
.contact-info-reg { display: block; margin-top: 8px; font-size: 0.9rem; color: var(--color-text-muted); }
.contact-info-sep { border: none; border-top: 1px solid var(--color-border); margin: 22px 0; }
/* Social icons reused from the footer, restyled for a light page. */
.contact-info .footer-social { margin: 0; }
.contact-info .footer-social-link {
    background: var(--color-surface) !important;
    border-color: var(--color-border);
    color: var(--color-text) !important;
}
.contact-info .footer-social-link:hover {
    background: var(--color-primary) !important;
    border-color: var(--color-primary);
    color: #fff !important;
}
.contact-map {
    margin-top: 22px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    aspect-ratio: 4 / 3;
}
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    /* Keep the logo (and toggle) above the fullscreen menu, which lives inside
       the header's stacking context. */
    .site-logo { position: relative; z-index: 2; }

    /* Lock page scroll while the menu is open: only the overlay itself scrolls,
       the content underneath stays put. */
    html:has(.nav-toggle-cb:checked),
    body:has(.nav-toggle-cb:checked) { overflow: hidden; }

    @keyframes navItemIn {
        from { opacity: 0; transform: translateY(16px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* Fullscreen menu that fills the viewport *below* the header, so its content is
       clipped at the header's bottom edge — scrolled items never bleed up under
       the header. It is its own scroll container (overscroll contained so reaching
       its edge doesn't chain to the page); content aligns to the top once it
       overflows ("safe center") so nothing is clipped out of reach on small phones.
       The menu reveals with a fade while its rows stagger in. */
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        justify-content: safe center;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 32px 20px calc(40px + env(safe-area-inset-bottom, 0px));
        background: var(--color-bg);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        opacity: 0;
        visibility: hidden;
        transition:
            opacity    0.3s ease,
            visibility 0.3s;
    }
    /* Keep the menu anchored below the (taller) header when the admin bar is shown. */
    body.has-adminbar .main-nav { top: calc(var(--header-height) + 36px); }

    /* Opaque header while the menu is open, so a transparent banner header doesn't
       show the banner above the menu. */
    body:has(.nav-toggle-cb:checked) .site-header {
        background: var(--color-bg);
        border-bottom-color: var(--color-border);
        box-shadow: 0 1px 12px rgba(0,0,0,0.07);
    }

    .nav-toggle-cb:checked ~ .main-nav {
        opacity: 1;
        visibility: visible;
    }

    /* The open overlay has a solid light background, so swap to the dark logo and
       force dark link text even when the (still transparent) banner header would
       otherwise show the light logo / tint the links white. */
    body.has-banner .site-header:not(.header--solid) .nav-toggle-cb:checked ~ .site-logo .logo-light { display: none; }
    body.has-banner .site-header:not(.header--solid) .nav-toggle-cb:checked ~ .site-logo .logo-dark  { display: block; }

    body.has-banner .site-header:not(.header--solid) .nav-toggle-cb:checked ~ .main-nav > ul > li > a,
    .nav-toggle-cb:checked ~ .main-nav > ul > li > a {
        color: var(--color-text);
    }
    body.has-banner .site-header:not(.header--solid) .nav-toggle-cb:checked ~ .main-nav .lang-switch a,
    .nav-toggle-cb:checked ~ .main-nav .lang-switch a {
        color: var(--color-text-muted);
    }
    body.has-banner .site-header:not(.header--solid) .nav-toggle-cb:checked ~ .main-nav .lang-switch a.active,
    .nav-toggle-cb:checked ~ .main-nav .lang-switch a.active {
        color: #fff;
        background: var(--color-primary);
    }

    .main-nav > ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
        max-width: 460px;
    }
    .main-nav ul { flex-direction: column; gap: 0; width: 100%; }
    .main-nav > ul > li { text-align: center; }
    .main-nav > ul > li > a {
        padding: 16px;
        font-size: 1.4rem;
        font-weight: 600;
    }
    .submenu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 8px;
        display: block;
        text-align: center;
    }
    .submenu li a { font-size: 1.05rem; padding: 10px; color: var(--color-text-muted); }

    /* Stagger the menu rows in once the overlay is open */
    .nav-toggle-cb:checked ~ .main-nav > ul > li {
        animation: navItemIn 0.4s ease both;
    }
    .nav-toggle-cb:checked ~ .main-nav > ul > li:nth-child(1) { animation-delay: 0.12s; }
    .nav-toggle-cb:checked ~ .main-nav > ul > li:nth-child(2) { animation-delay: 0.18s; }
    .nav-toggle-cb:checked ~ .main-nav > ul > li:nth-child(3) { animation-delay: 0.24s; }
    .nav-toggle-cb:checked ~ .main-nav > ul > li:nth-child(4) { animation-delay: 0.30s; }
    .nav-toggle-cb:checked ~ .main-nav > ul > li:nth-child(5) { animation-delay: 0.36s; }
    .nav-toggle-cb:checked ~ .main-nav > ul > li:nth-child(n+6) { animation-delay: 0.42s; }

    .lang-switch {
        margin: 24px 0 0;
        padding: 16px 0 0;
        border-left: none;
        border-top: 1px solid var(--color-border);
        justify-content: center;
    }
    .nav-toggle-cb:checked ~ .main-nav .lang-switch {
        animation: navItemIn 0.4s ease 0.42s both;
    }

    .page-banner { min-height: 100svh; }
    .banner-overlay .container { padding-top: calc(var(--header-height) + 48px); padding-bottom: 60px; }
    .page-title { font-size: 1.6rem; }
    .footer-columns { grid-template-columns: 1fr; gap: 32px; padding: 40px var(--space); }
    .footer-bottom-inner { flex-direction: column; text-align: center; gap: 14px; }
    .contact-layout { grid-template-columns: 1fr; gap: 32px; }
    .article-metabox { grid-template-columns: 1fr; gap: 2px; }
    .content-body blockquote.cms-quote { padding: 32px 24px; }
    .content-body blockquote.cms-quote-quoted { padding-left: 48px; padding-right: 48px; }
    .content-body blockquote.cms-quote-quoted::before { top: 14px; left: 12px; width: 30px; height: 30px; }
    .content-body blockquote.cms-quote-quoted::after { bottom: 14px; right: 12px; width: 30px; height: 30px; }
    .cookie-bar-inner { flex-direction: column; align-items: stretch; text-align: center; }
    .cookie-bar-actions { justify-content: center; }
    /* Don't let the consent bar cover the bottom of the open fullscreen menu. */
    body:has(.nav-toggle-cb:checked) .cookie-bar { transform: translateY(110%); visibility: hidden; }
    .hero h1 { font-size: 2rem; }
    .page-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
