/*
 * Ahlaisten kyläyhdistys – lapsiteeman tyylit.
 * Lähde: hyväksytty leiska design/assets/css/{base,site}.css (esikatselu v4). Rakenneluokat ahl-etuliitteellä,
 * jotta pääteeman Bootstrap-luokat (.btn, .nav-link, .lead, .pagination, .site-footer) eivät sekoitu.
 */

/* Parent theme tokens mapped to the design */
:root {
  --louhos-primary: #275396;
  --louhos-primary-rgb: 39, 83, 150;
  --louhos-primary-dark: #1d4380;
  --louhos-accent: #3b68a5;
  --louhos-link-color: #275396;
  --louhos-headings: #1b2b3c;
  --louhos-body-color: #1b2b3c;
  --louhos-grey: #f4f5f6;
  --louhos-border: #dfe5ec;
  --louhos-border-rgb: 223, 229, 236;
  --louhos-dark-1: #3b68a5;
  --louhos-dark-1-rgb: 59, 104, 165;
  --louhos-dark-2: #24425f;
  --louhos-dark-2-rgb: 36, 66, 95;
  --louhos-font-family: "Google Sans", "Segoe UI", system-ui, sans-serif;
}

/* Base (from design/assets/css/base.css): reset, accessibility helpers, navigation mechanics.
   Each concept sets its own tokens (--louhos-*) and visual styles in its style.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body { margin: 0; font-family: var(--louhos-font-body); color: var(--louhos-ink); background: var(--louhos-bg);
  font-size: var(--louhos-step-0); line-height: 1.6; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { font-family: var(--louhos-font-head); line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--louhos-link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--louhos-focus); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1rem; background: var(--louhos-ink);
  color: #fff; text-decoration: none; border-radius: 4px; transition: top .15s; }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Logo: gull silhouette + "Ahlaisten" bold / "kyläyhdistys" light in the heading face */
.ahl-logo { display: inline-flex; align-items: center; gap: .5em; text-decoration: none; color: inherit; line-height: .92;
  font-family: var(--louhos-font-head); font-size: var(--logo-size, 1.5rem); }
.ahl-logo-mark { flex: none; width: 1.7em; aspect-ratio: 600 / 639; background: currentColor;
  -webkit-mask: url(../img/lokki.svg) center / contain no-repeat; mask: url(../img/lokki.svg) center / contain no-repeat; }
.ahl-logo-text { display: grid; }
.ahl-logo-text b { font-weight: var(--logo-bold, 800); }
.ahl-logo-text span { font-weight: var(--logo-light, 300); }

/* Navigation mechanics (disclosure menus). Visuals per concept. */
.ahl-nav-toggle { display: none; }
.ahl-nav ul { list-style: none; }
.ahl-nav-list { display: flex; align-items: center; }
.ahl-nav-item { position: relative; }
.ahl-nav-sub { position: absolute; top: 100%; left: 0; min-width: 15rem; z-index: 30; }
.ahl-nav-sub[hidden] { display: none; }
.ahl-nav-sub-toggle { display: inline-flex; align-items: center; gap: .35em; background: none; border: 0; cursor: pointer; padding: 0; }
.ahl-nav-sub-toggle::after { content: ""; width: .45em; height: .45em; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  transform: translateY(-.15em) rotate(45deg); transition: transform .2s; }
.ahl-nav-sub-toggle[aria-expanded="true"]::after { transform: translateY(.1em) rotate(-135deg); }

@media (max-width: 63.99em) {
  .ahl-nav-toggle { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 0; cursor: pointer; padding: .5rem; }
  .ahl-nav-toggle-icon { width: 1.4rem; height: 2px; background: currentColor; position: relative; transition: background .2s; }
  .ahl-nav-toggle-icon::before, .ahl-nav-toggle-icon::after { content: ""; position: absolute; left: 0; width: 100%; height: 2px;
    background: currentColor; transition: transform .25s; }
  .ahl-nav-toggle-icon::before { top: -6px; } .ahl-nav-toggle-icon::after { top: 6px; }
  .ahl-nav-toggle[aria-expanded="true"] .ahl-nav-toggle-icon { background: transparent; }
  .ahl-nav-toggle[aria-expanded="true"] .ahl-nav-toggle-icon::before { transform: translateY(6px) rotate(45deg); }
  .ahl-nav-toggle[aria-expanded="true"] .ahl-nav-toggle-icon::after { transform: translateY(-6px) rotate(-45deg); }
  .ahl-nav-panel { position: fixed; inset: var(--nav-top, 4.5rem) 0 0 0; overflow-y: auto; z-index: 40; padding: 1rem 1.25rem 3rem; }
  .ahl-nav-panel:not(.is-open) { display: none; }
  .ahl-nav-list { flex-direction: column; align-items: stretch; }
  .ahl-nav-sub { position: static; min-width: 0; }
  body.ahl-nav-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* Ahlaisten kyläyhdistys – ulkoasu (konsepti A).
   Full-bleed photo heroes, content and header limited to 1200 px, a light blue sidebar (1/4) that starts flush
   under the hero and runs to the right edge of the screen. Pages without the sidebar end with a two-column
   events + news row before the footer. Tokens map to --louhos-* in the Timber theme. */
:root {
  --louhos-font-head: "Roboto Condensed", "Arial Narrow", sans-serif;
  --louhos-font-body: "Google Sans", "Segoe UI", system-ui, sans-serif;
  --louhos-bg: #ffffff;
  --louhos-ink: #1b2b3c;
  --louhos-muted: #4f5f70;
  --louhos-viiri: #5b87c5;      /* pennant blue (decorative) */
  --louhos-gull-ph: #cfe0f2;    /* placeholder gull silhouette */
  --louhos-viiri-deep: #3b68a5; /* pennant blue, AA with white text */
  --louhos-link: #275396;       /* AA text/link blue */
  --louhos-sky: #eaf3fb;        /* light blue */
  --louhos-sky-light: #f3f8fd;  /* sidebar: sky 2 % lighter */
  --louhos-mist: #f4f5f6;       /* very light grey highlight */
  --louhos-line: #dfe5ec;
  --louhos-error: #b3261e;
  --louhos-success: #1f6b3a;
  --louhos-focus: #275396;
  --louhos-step--1: .9rem;
  --louhos-step-0: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --louhos-step-1: clamp(1.2rem, 1.1rem + .4vw, 1.4rem);
  --louhos-step-2: clamp(1.5rem, 1.3rem + .9vw, 2rem);
  --louhos-step-3: clamp(2rem, 1.5rem + 2.2vw, 3.2rem);
  --louhos-step-4: clamp(2.6rem, 1.6rem + 4.4vw, 5.4rem);
  --louhos-max: 1200px;
  --louhos-gutter: clamp(1rem, 4vw, 3rem);
  --louhos-col-gap: clamp(2rem, 4vw, 3.5rem);
  --louhos-radius: 10px;
  --louhos-ease: cubic-bezier(.22, 1, .36, 1);
  /* left edge of the 1200 px content area, used to align full-bleed things */
  --edge: max(var(--louhos-gutter), (100% - var(--louhos-max)) / 2);
  --logo-size: 1.55rem;
  --logo-bold: 700;
  --logo-light: 300;
}

/* ---------- Buttons ---------- */
.ahl-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.9rem; padding: .7rem 1.25rem;
  border: 0; border-radius: 999px; font-family: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s; }
.ahl-btn-light { background: #fff; color: var(--louhos-link); }
.ahl-btn-light:hover { background: var(--louhos-sky); }
.ahl-btn-ghost { color: #fff; border: 1.5px solid rgba(255,255,255,.85); }
.ahl-btn-ghost:hover { background: rgba(255,255,255,.14); }
.ahl-btn-blue { background: var(--louhos-link); color: #fff; }
.ahl-btn-blue:hover { background: #1d4380; }
.ahl-btn-outline { background: transparent; color: var(--louhos-link); border: 1.5px solid var(--louhos-link); }
.ahl-btn-outline:hover { background: var(--louhos-sky); }

/* ---------- Header (over the hero photo, white when scrolled) ---------- */
.ahl-header { position: fixed; inset: 0 0 auto; z-index: 50; color: #fff; transition: background-color .3s, color .3s, box-shadow .3s; }
.ahl-header.is-scrolled, body.ahl-nav-open .ahl-header { background: #fff; color: var(--louhos-ink); box-shadow: 0 1px 0 var(--louhos-line); }
.ahl-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  max-width: calc(var(--louhos-max) + 2 * var(--louhos-gutter)); margin-inline: auto; padding: 1rem var(--louhos-gutter); }
.ahl-header .ahl-logo { color: inherit; }
.ahl-header.is-scrolled .ahl-logo, body.ahl-nav-open .ahl-header .ahl-logo { color: var(--louhos-link); }
.ahl-nav { display: flex; align-items: center; gap: 1.5rem; }
.ahl-nav-list { gap: 1.4rem; }
.ahl-nav-link { color: inherit; text-decoration: none; font-weight: 500; padding: .5rem 0; }
.ahl-nav-link:hover, .ahl-nav-link[aria-current] { text-decoration: underline; text-underline-offset: .35em; }
.ahl-nav-sub { background: #fff; color: var(--louhos-ink); padding: .5rem; border-radius: var(--louhos-radius);
  box-shadow: 0 12px 32px rgba(20, 45, 80, .14); margin-top: .4rem; }
.ahl-nav-sub a { display: block; padding: .55rem .8rem; border-radius: 6px; color: var(--louhos-ink); text-decoration: none; }
.ahl-nav-sub a:hover { background: var(--louhos-sky); }
.ahl-nav-sub a[aria-current] { font-weight: 650; color: var(--louhos-link); }
.ahl-header.is-scrolled .ahl-nav-cta { background: var(--louhos-link); color: #fff; }
@media (max-width: 63.99em) {
  .ahl-nav-panel { background: #fff; color: var(--louhos-ink); flex-direction: column; align-items: stretch; gap: 1rem; }
  .ahl-nav-list { gap: 0; }
  .ahl-nav-item { border-bottom: 1px solid var(--louhos-line); }
  .ahl-nav-link { display: flex; width: 100%; justify-content: space-between; padding: 1rem 0; font-size: 1.15rem; }
  .ahl-nav-sub { box-shadow: none; margin: 0 0 .75rem; padding: 0; }
  .ahl-nav-cta { align-self: flex-start; background: var(--louhos-link) !important; color: #fff !important; }
}

/* ---------- Heroes ---------- */
.hero, .page-hero { position: relative; display: grid; align-items: end; color: #fff; isolation: isolate; background-color: #24425f; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before, .page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(14, 35, 64, .55) 0%, rgba(14, 35, 64, .25) 40%, rgba(14, 35, 64, 0) 65%),
    linear-gradient(180deg, rgba(14, 35, 64, .55) 0%, rgba(14, 35, 64, .2) 14%, rgba(14, 35, 64, 0) 26%, rgba(14, 35, 64, 0) 45%, rgba(14, 35, 64, .6) 100%); }
.hero-content { padding: 0 var(--edge) clamp(2.5rem, 7vh, 5rem); }
.hero .hero-content { padding-block: 6rem 3rem; }
.hero::before { background:
    linear-gradient(90deg, rgba(14, 35, 64, .68) 0%, rgba(14, 35, 64, .4) 38%, rgba(14, 35, 64, 0) 68%),
    linear-gradient(180deg, rgba(14, 35, 64, .5) 0%, rgba(14, 35, 64, 0) 22%, rgba(14, 35, 64, 0) 70%, rgba(14, 35, 64, .35) 100%); }
.hero-content > * { max-width: 46rem; }

/* sub page title band: stronger overlay */
.page-hero::before { background:
    linear-gradient(90deg, rgba(14, 35, 64, .5) 0%, rgba(14, 35, 64, .2) 60%, rgba(14, 35, 64, .1) 100%),
    linear-gradient(180deg, rgba(14, 35, 64, .55) 0%, rgba(14, 35, 64, .3) 30%, rgba(14, 35, 64, .45) 100%); }

/* front page */
.hero { min-height: 100vh; min-height: 100svh; align-items: center; }
.hero .hero-img { object-position: 50% 60%; }
.hero h1 { font-size: clamp(1.75rem, 1.07rem + 2.95vw, 3.6rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.02; } /* 2/3 of step-4 */
.hero p { font-size: var(--louhos-step-1); max-width: 34ch; margin: 1.1rem 0 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* sub pages */
.page-hero { min-height: clamp(18rem, 42vh, 26rem); }
.page-hero h1 { font-size: var(--louhos-step-3); font-weight: 700; letter-spacing: -.01em; line-height: 1.02; }
.page-hero .hero-content { padding-bottom: clamp(1.75rem, 5vh, 3rem); }
.crumbs { font-size: var(--louhos-step--1); margin-bottom: .75rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; }
.crumbs li + li::before { content: "/"; margin-right: .35rem; opacity: .7; }
.crumbs a { color: #fff; }
.page-hero .hero-lead { font-size: var(--louhos-step-1); margin: .75rem 0 0; max-width: 36ch; }

/* ---------- Layout: content 3/4 + sidebar 1/4 inside 1200 px ---------- */
.layout { display: grid; max-width: calc(var(--louhos-max) + 2 * var(--louhos-gutter)); margin-inline: auto; padding-inline: var(--louhos-gutter); }
.layout-main { padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 6rem); min-width: 0; }
.layout-main > * + * { margin-top: clamp(3rem, 6vw, 5rem); }
@media (min-width: 64em) {
  .layout.has-sidebar { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); column-gap: var(--louhos-col-gap); }
}
.layout h2 { font-size: var(--louhos-step-2); font-weight: 700; margin-bottom: 1.25rem; }

/* Sidebar: light blue, flush with the hero, background runs to the right screen edge */
/* the colour continues to the right edge with a clipped box-shadow: it does not create horizontal scroll */
.sidebar { position: relative; background: var(--louhos-sky-light); padding: clamp(2rem, 3vw, 2.5rem) 0 3rem clamp(1.25rem, 2vw, 1.75rem);
  box-shadow: 0 0 0 100vmax var(--louhos-sky-light); clip-path: inset(0 -100vmax 0 0); }
.sidebar-inner { display: grid; gap: 2.5rem; align-content: start; }
@media (min-width: 64em) { .sidebar-inner { position: sticky; top: 6rem; } }
.sidebar h2 { font-size: var(--louhos-step-1); margin-bottom: .9rem; }
@media (max-width: 63.99em) {
  /* full-width light blue band on small screens */
  .sidebar { margin-inline: calc(-1 * var(--louhos-gutter)); padding: 2.5rem var(--louhos-gutter) 3rem; }
  .sidebar { clip-path: inset(0 -100vmax); }
  .sidebar-inner { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 2.5rem 2rem; }
}

/* ---------- Shared lists: events, news ---------- */
.events { list-style: none; display: grid; }
.events a { display: grid; grid-template-columns: 3.4rem 1fr; gap: .9rem; align-items: start; padding: .9rem 0; border-top: 1px solid var(--louhos-line);
  text-decoration: none; color: var(--louhos-ink); }
.events time { display: grid; justify-items: center; padding: .45rem 0 .5rem; border-radius: 8px; background: #fff; color: var(--louhos-link); line-height: 1; }
.events time b { font-size: 1.5rem; font-weight: 700; }
.events time span { font-size: .75rem; margin-top: .2rem; }
.event-name { display: block; font-weight: 600; line-height: 1.3; }
.events a:hover .event-name { text-decoration: underline; color: var(--louhos-link); }
.event-meta { display: block; color: var(--louhos-muted); font-size: .875rem; margin-top: .2rem; }
.more { display: inline-block; margin-top: .4rem; font-weight: 600; }
.add-event { background: #fff; padding: 1.4rem; border-radius: var(--louhos-radius); }
.add-event h2 { margin-bottom: .5rem; }
.add-event p { color: var(--louhos-muted); font-size: .95rem; }
.news { list-style: none; }
.news li { display: grid; gap: .2rem; padding: .85rem 0; border-top: 1px solid var(--louhos-line); }
.news a { font-weight: 600; text-decoration: none; line-height: 1.35; }
.news a:hover { text-decoration: underline; }
.news time { font-size: .85rem; color: var(--louhos-muted); }
.sidebar-links { list-style: none; }
.sidebar-links li { padding: .5rem 0; border-top: 1px solid var(--louhos-line); }

/* Events + news row before the footer on pages without a sidebar */
.bottom-row { background: var(--louhos-sky-light); }
.bottom-row-inner { display: grid; gap: 3rem var(--louhos-col-gap); max-width: calc(var(--louhos-max) + 2 * var(--louhos-gutter)); margin-inline: auto;
  padding: clamp(3rem, 6vw, 4.5rem) var(--louhos-gutter); }
@media (min-width: 48em) { .bottom-row-inner { grid-template-columns: 1fr 1fr; } }
.bottom-row h2 { font-size: var(--louhos-step-2); margin-bottom: 1rem; }
.bottom-row .add-inline { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }

/* ---------- Editor content (WYSIWYG) ---------- */
.prose { max-width: 44rem; }
.prose > * { margin-block: 0; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--louhos-step-2); margin: 2em 0 .6em; }
.prose h3 { font-size: var(--louhos-step-1); margin: 1.6em 0 .5em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 1.5em 0; padding: .25em 0 .25em 1.25em; border-left: 3px solid var(--louhos-viiri); font-size: var(--louhos-step-1); }
.prose figure { margin: 1.75em 0; }
.prose figure img { border-radius: var(--louhos-radius); }
.prose figcaption { font-size: var(--louhos-step--1); color: var(--louhos-muted); margin-top: .5rem; }
.ahl-lead { font-size: var(--louhos-step-1); line-height: 1.5; max-width: 38em; margin: 0; }

/* 1–3 column block (image/video + text) */
.cols { display: grid; gap: 2rem var(--louhos-col-gap); }
@media (min-width: 40em) { .cols[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 48em) { .cols[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
a[href^="mailto:"] { overflow-wrap: anywhere; }
.cols img, .cols .video { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--louhos-radius); margin-bottom: 1rem; }
.cols h2, .cols h3 { font-size: var(--louhos-step-1); margin-bottom: .5rem; }
.cols p { margin: 0 0 .75rem; }
.cols-muted p { color: var(--louhos-muted); }
.cols a { font-weight: 600; }
.video { position: relative; display: grid; place-items: center; background: #1f3550 center / cover; color: #fff; }
.video::before { content: ""; position: absolute; inset: 0; background: rgba(14, 35, 64, .35); border-radius: inherit; }
.video span { position: relative; display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: rgba(255,255,255,.92); }
.video span::before { content: ""; border-style: solid; border-width: .7rem 0 .7rem 1.1rem; border-color: transparent transparent transparent var(--louhos-link); margin-left: .25rem; }
.block-label { font-size: var(--louhos-step--1); color: var(--louhos-muted); margin-bottom: .75rem; }

/* ---------- Image hover: slow 5 % zoom inside a clipping frame ---------- */
.media { display: block; overflow: hidden; }
.media > img, .media > .post-ph, .photo-grid img { transition: transform 1.2s var(--louhos-ease); }
:is(.places-list a, .albums a, .post-list article, .photo-grid button):hover :is(.media > img, .media > .post-ph, img) { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) {
  :is(.places-list a, .albums a, .post-list article, .photo-grid button):hover :is(.media > img, .media > .post-ph, img) { transform: none; }
}

/* ---------- Front page blocks ---------- */
.places-list { list-style: none; display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.places-list a { display: grid; gap: .25rem; text-decoration: none; color: var(--louhos-ink); }
.places-list .media { margin-bottom: .6rem; border-radius: var(--louhos-radius); }
.places-list img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.places-name { font-weight: 650; font-size: 1.15rem; color: var(--louhos-link); }
.places-list a:hover .places-name { text-decoration: underline; }
.places-text { color: var(--louhos-muted); font-size: .95rem; }
.front-cols { padding-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--louhos-line); }
.front-cols img { aspect-ratio: 1; }
.see-also ul { list-style: none; columns: 2 16rem; column-gap: 2rem; }
.see-also li { break-inside: avoid; padding: .55rem 0; border-bottom: 1px solid var(--louhos-line); }
.band img { width: 100%; height: clamp(16rem, 42vw, 34rem); object-fit: cover; }

/* ---------- News archive + article ---------- */
.post-list { list-style: none; }
.post-list li + li { border-top: 1px solid var(--louhos-line); }
.post-list article { display: grid; gap: .4rem 1.75rem; padding: 1.6rem 0; }
.post-list .media { grid-row: span 3; border-radius: 8px; align-self: start; }
.post-ph { display: block; width: 100%; aspect-ratio: 4 / 3; background: var(--louhos-sky); position: relative; }
.post-ph::before { content: ""; position: absolute; inset: 22% 30%; background: var(--louhos-gull-ph);
  -webkit-mask: url(../img/lokki.svg) center / contain no-repeat; mask: url(../img/lokki.svg) center / contain no-repeat; }
@media (min-width: 40em) { .post-list article { grid-template-columns: 12rem 1fr; } }
.post-list img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.post-list h2 { font-size: var(--louhos-step-1); margin: 0; line-height: 1.25; }
.post-list h2 a { text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; }
.post-list time, .post-meta { color: var(--louhos-muted); font-size: var(--louhos-step--1); }
.post-list p { margin: 0; color: var(--louhos-muted); }
.ahl-pagination { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; }
.ahl-pagination a, .ahl-pagination span { display: grid; place-items: center; min-width: 2.75rem; height: 2.75rem; padding: 0 .75rem; border-radius: 999px;
  text-decoration: none; border: 1px solid var(--louhos-line); }
.ahl-pagination [aria-current] { background: var(--louhos-link); color: #fff; border-color: var(--louhos-link); }
.ahl-pagination a:hover { background: var(--louhos-sky); }
.post-meta { margin-bottom: 1.75rem; }
.article-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 2rem; border-top: 1px solid var(--louhos-line); }

/* ---------- Calendar ---------- */
.cal-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.cal-switch { display: inline-flex; padding: .25rem; background: var(--louhos-mist); border-radius: 999px; }
.cal-switch button { border: 0; background: none; padding: .55rem 1.1rem; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--louhos-ink); }
.cal-switch button[aria-pressed="true"] { background: #fff; color: var(--louhos-link); box-shadow: 0 1px 4px rgba(20, 45, 80, .12); }
.cal-month { display: flex; align-items: center; gap: .5rem; }
.cal-month h2 { margin: 0 .5rem; font-size: var(--louhos-step-1); min-width: 9ch; text-align: center; }
.icon-btn { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--louhos-line); color: var(--louhos-link); text-decoration: none; }
.icon-btn:hover { background: var(--louhos-sky); }
.cal-list h3 { font-size: var(--louhos-step-1); margin: 2.25rem 0 .5rem; }
.cal-list h3:first-child { margin-top: 0; }
.cal-list ol { list-style: none; }
.cal-list li > a { display: grid; grid-template-columns: 4.2rem 1fr; gap: 1.25rem; padding: 1.1rem 0; border-top: 1px solid var(--louhos-line); text-decoration: none; color: var(--louhos-ink); }
@media (min-width: 40em) { .cal-list li > a:has(img) { grid-template-columns: 4.2rem 1fr 9rem; } }
.cal-list time { display: grid; justify-items: center; align-content: start; padding: .55rem 0; border-radius: 8px; background: var(--louhos-sky); color: var(--louhos-link); line-height: 1.05; }
.cal-list time b { font-size: 1.75rem; }
.cal-list time span { font-size: .8rem; }
.cal-list img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
@media (max-width: 39.99em) { .cal-list img { display: none; } }
.cal-list .event-name { font-size: 1.1rem; }
.cal-list li > a:hover .event-name { text-decoration: underline; color: var(--louhos-link); }
.cal-list .past > a { color: var(--louhos-muted); }
.cal-list .past time { background: var(--louhos-mist); color: var(--louhos-muted); }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-grid th { font-size: var(--louhos-step--1); font-weight: 600; color: var(--louhos-muted); text-align: left; padding: .5rem; }
.cal-grid td { vertical-align: top; height: 6.5rem; padding: .4rem; border: 1px solid var(--louhos-line); font-size: .85rem; }
.cal-grid .day { display: block; font-weight: 600; margin-bottom: .25rem; }
.cal-grid .out { color: #9aa6b2; background: #fbfbfc; }
.cal-grid .today .day { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--louhos-link); color: #fff; }
.cal-grid a { display: block; padding: .25rem .4rem; margin-top: .2rem; border-radius: 4px; background: var(--louhos-sky); text-decoration: none; line-height: 1.25; }
.cal-grid a:hover { text-decoration: underline; }
.cal-scroll { overflow-x: auto; }
.cal-scroll .cal-grid { min-width: 40rem; }
.cal-feed { margin-top: 2rem; font-size: var(--louhos-step--1); color: var(--louhos-muted); }

/* ---------- Single event ---------- */
.event-facts { display: grid; gap: 1rem 2rem; padding: 1.5rem; margin-bottom: 2.5rem; background: var(--louhos-mist); border-radius: var(--louhos-radius); }
@media (min-width: 40em) { .event-facts { grid-template-columns: repeat(3, 1fr); } }
.event-facts dt { font-size: var(--louhos-step--1); color: var(--louhos-muted); }
.event-facts dd { margin: .15rem 0 0; font-weight: 600; }
.event-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ---------- Form ---------- */
.form { display: grid; gap: 1.4rem; max-width: 44rem; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.form legend { font-size: var(--louhos-step-1); font-weight: 700; margin-bottom: 1rem; padding: 0; }
.form-row { display: grid; gap: 1.4rem; }
@media (min-width: 40em) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .35rem; align-content: start; }
.field label, .check label { font-weight: 600; }
.req { color: var(--louhos-error); }
.hint { font-size: var(--louhos-step--1); color: var(--louhos-muted); }
.field input, .field textarea, .field select { width: 100%; font: inherit; color: var(--louhos-ink); padding: .7rem .85rem; border: 1.5px solid #8c99a6;
  border-radius: 8px; background: #fff; }
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--louhos-focus); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--louhos-error); }
.error { color: var(--louhos-error); font-size: var(--louhos-step--1); font-weight: 600; }
.error:empty { display: none; }
.check { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; accent-color: var(--louhos-link); }
.form-summary { padding: 1rem 1.25rem; border-left: 4px solid var(--louhos-error); background: #fdf1f0; border-radius: 6px; }
.form-summary ul { margin: .5rem 0 0 1.2rem; }
.form-done { padding: 2rem; background: var(--louhos-sky); border-radius: var(--louhos-radius); }
.form-done h2 { color: var(--louhos-success); }
.notice { padding: 1.1rem 1.25rem; background: var(--louhos-mist); border-radius: var(--louhos-radius); }

/* ---------- Gallery ---------- */
.albums { list-style: none; display: grid; gap: 2.5rem 1.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.albums a { display: grid; gap: .3rem; text-decoration: none; color: var(--louhos-ink); }
.albums .media { margin-bottom: .6rem; border-radius: var(--louhos-radius); }
.albums img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.albums .album-name { font-size: var(--louhos-step-1); font-weight: 650; color: var(--louhos-link); }
.albums a:hover .album-name { text-decoration: underline; }
.albums .album-count { color: var(--louhos-muted); font-size: var(--louhos-step--1); }
.photo-grid { list-style: none; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.photo-grid button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; overflow: hidden; }
.photo-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.photo-grid figcaption { font-size: var(--louhos-step--1); color: var(--louhos-muted); margin-top: .35rem; }
.photo-grid figure { margin: 0; }
.lightbox { width: min(92vw, 80rem); max-height: 92vh; padding: 0; border: 0; border-radius: var(--louhos-radius); background: #0f1d2c; color: #fff; }
.lightbox::backdrop { background: rgba(8, 18, 30, .82); }
.lightbox figure { margin: 0; display: grid; }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; }
.lightbox figcaption { padding: .9rem 1.1rem; display: flex; justify-content: space-between; gap: 1rem; }
.lightbox-bar { position: absolute; top: .6rem; right: .6rem; display: flex; gap: .5rem; }
.lightbox-bar button { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--louhos-ink); cursor: pointer; font-size: 1.25rem; }
.lightbox { --louhos-focus: #fff; }

/* ---------- Contacts ---------- */
.contact-cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.contact-card { padding: 1.4rem; background: var(--louhos-mist); border-radius: var(--louhos-radius); }
.contact-card h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.contact-card p { margin: 0; }
.board { width: 100%; border-collapse: collapse; }
.board th, .board td { text-align: left; padding: .75rem .5rem; border-bottom: 1px solid var(--louhos-line); vertical-align: top; }
.board th { font-size: var(--louhos-step--1); color: var(--louhos-muted); font-weight: 600; }
.board caption { text-align: left; font-weight: 700; font-size: var(--louhos-step-1); padding-bottom: .5rem; }
.table-scroll { overflow-x: auto; }

/* ---------- Footer ---------- */
.ahl-footer { background: var(--louhos-viiri-deep); color: #fff; --louhos-focus: #fff; }
.ahl-footer-inner { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  max-width: calc(var(--louhos-max) + 2 * var(--louhos-gutter)); margin-inline: auto; padding: clamp(3rem, 6vw, 5rem) var(--louhos-gutter); }
.ahl-footer .ahl-logo { color: #fff; align-self: start; --logo-size: 1.7rem; }
.ahl-footer h2 { font-size: 1rem; font-weight: 650; margin-bottom: .75rem; }
.ahl-footer p { margin: 0; }
.ahl-footer a { color: #fff; }
.ahl-footer-links { list-style: none; display: grid; gap: .35rem; }

/* ---------- Small screens ---------- */
@media (max-width: 47.99em) {
  .places-list { gap: 0; }
  .places-list li + li { border-top: 1px solid var(--louhos-line); }
  .places-list a { grid-template-columns: 5.5rem 1fr; grid-template-rows: auto 1fr; column-gap: 1rem; padding: .9rem 0; }
  .places-list .media { grid-row: 1 / 3; margin: 0; border-radius: 8px; }
  .places-list img { aspect-ratio: 1; }
  .places-name { align-self: end; }
  .front-cols img { aspect-ratio: 3 / 2; }
}
@media (max-width: 63.99em) {
  /* front page: events (sidebar) right after the intro */
  .is-front .layout-main { display: contents; }
  .is-front .layout > *, .is-front .layout-main > * { order: 3; }
  .is-front .layout-main > .intro { order: 1; padding-top: 3rem; padding-bottom: 3rem; }
  .is-front .layout > .sidebar { order: 2; }
  .is-front .layout-main > * + * { margin-top: 0; }
  .is-front .layout-main > :not(.intro) { padding-block: 3rem 0; }
  .is-front .layout-main > :last-child { padding-bottom: 4rem; }
}

.ahl-nav-item[data-current] > .ahl-nav-link { text-decoration: underline; text-underline-offset: .35em; }
@media (max-width: 47.99em) {
  /* text spans the full width on phones: even overlay behind it */
  .hero::before { background: linear-gradient(180deg, rgba(14, 35, 64, .55) 0%, rgba(14, 35, 64, .42) 40%, rgba(14, 35, 64, .5) 100%); }
}

/* =====================================================================
   WordPress additions (blocks, editor content, ACF form)
   ===================================================================== */
body.admin-bar .ahl-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .ahl-header { top: 46px; } }
.hero-text p { font-size: var(--louhos-step-1); max-width: 34ch; margin: 1.1rem 0 1.6rem; }
.hero-text { margin-bottom: 1.6rem; }
.hero-text p:last-child { margin-bottom: 0; }
.page-hero .hero-img, .hero .hero-img { max-width: none; }

/* Editor content: text flows at reading width, blocks use the full column */
.ahl-content > * + * { margin-top: 1.25rem; }
.ahl-content > * + .ahl-block, .ahl-content > .ahl-block + *, .ahl-content > * + .wp-block-columns, .ahl-content > .wp-block-columns + * { margin-top: clamp(2.5rem, 5vw, 4rem); }
.ahl-content > :is(p, ul, ol, h2, h3, h4, blockquote, .wp-block-quote, .wp-block-list) { max-width: 44rem; }
.ahl-content > p:first-child:not(:only-child) { font-size: var(--louhos-step-1); line-height: 1.5; }
.ahl-content h2 { font-size: var(--louhos-step-2); margin-top: 2.5rem; margin-bottom: .75rem; }
.ahl-content h3 { font-size: var(--louhos-step-1); margin-top: 2rem; margin-bottom: .5rem; }
.ahl-content :is(ul, ol):not([class*="ahl-"]):not(.post-list):not(.places-list):not(.photo-grid) { padding-left: 1.3em; }
.ahl-content li + li { margin-top: .35em; }
.ahl-content blockquote, .ahl-content .wp-block-quote { margin: 1.5em 0; padding: .25em 0 .25em 1.25em; border-left: 3px solid var(--louhos-viiri); font-size: var(--louhos-step-1); }
.ahl-content .wp-block-image img, .ahl-content figure img { border-radius: var(--louhos-radius); height: auto; }
.ahl-content figcaption, .ahl-content .wp-element-caption { font-size: var(--louhos-step--1); color: var(--louhos-muted); margin-top: .5rem; }
.ahl-content .wp-block-embed iframe { width: 100%; border-radius: var(--louhos-radius); }
.ahl-content .wp-block-table table { width: 100%; border-collapse: collapse; }
.ahl-content .wp-block-table :is(th, td) { text-align: left; padding: .7rem .5rem; border: 0; border-bottom: 1px solid var(--louhos-line); }
.ahl-content .wp-block-button__link { display: inline-flex; min-height: 2.9rem; align-items: center; padding: .7rem 1.25rem; border-radius: 999px;
  background: var(--louhos-link); color: #fff; font-weight: 600; text-decoration: none; }
.ahl-content .wp-block-button__link:hover { background: #1d4380; }
.ahl-content .is-style-outline .wp-block-button__link { background: transparent; color: var(--louhos-link); border: 1.5px solid var(--louhos-link); }

/* Columns 1–4 (core/columns) */
.ahl-content .wp-block-columns { display: flex; flex-wrap: wrap; gap: 2rem var(--louhos-col-gap); margin-bottom: 0; }
.ahl-content .wp-block-column { flex: 1 1 0; min-width: 0; }
.ahl-content .wp-block-column > * + * { margin-top: 1rem; }
.ahl-content .wp-block-column > :is(h2, h3) { font-size: var(--louhos-step-1); margin-top: 0; }
.ahl-content .wp-block-column img { width: 100%; }
@media (max-width: 47.99em) {
  .ahl-content .wp-block-columns:not(.is-not-stacked-on-mobile) { flex-direction: column; }
}

/* Block helpers */
.ahl-block > h2 { font-size: var(--louhos-step-2); margin-bottom: 1.25rem; }
.ahl-empty { color: var(--louhos-muted); padding: 1.1rem 1.25rem; background: var(--louhos-mist); border-radius: var(--louhos-radius); }
.ahl-more { margin-top: 1rem; font-weight: 600; }
.post-list h3 { font-size: var(--louhos-step-1); margin: 0; line-height: 1.25; }
.post-list h3 a { text-decoration: none; }
.post-list h3 a:hover { text-decoration: underline; }

/* Cards (event/post lists, layout "cards") */
.ahl-cards { list-style: none; padding: 0; display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.ahl-cards a { display: grid; gap: .3rem; text-decoration: none; color: var(--louhos-ink); }
.ahl-cards .media { border-radius: var(--louhos-radius); margin-bottom: .5rem; }
.ahl-cards img, .ahl-cards .post-ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ahl-cards time { font-size: var(--louhos-step--1); color: var(--louhos-muted); }
.ahl-cards time b { color: var(--louhos-link); }
.ahl-cards .card-name { font-family: var(--louhos-font-head); font-weight: 700; font-size: 1.2rem; line-height: 1.2; color: var(--louhos-link); }
.ahl-cards .card-meta { color: var(--louhos-muted); font-size: .95rem; }
.ahl-cards a:hover .card-name { text-decoration: underline; }
:is(.ahl-cards a, .ahl-embed):hover .media > :is(img, .post-ph) { transform: scale(1.05); }
.ahl-cards .media > :is(img, .post-ph), .ahl-embed .media > :is(img, .post-ph) { transition: transform 1.2s var(--louhos-ease); }
.places-list .post-ph { display: block; aspect-ratio: 4 / 3; }

/* Embed */
.ahl-embed { display: grid; gap: 1rem 1.75rem; padding: 1.25rem; background: var(--louhos-mist); border-radius: var(--louhos-radius); max-width: 44rem; }
.ahl-embed .media { border-radius: 8px; }
.ahl-embed img, .ahl-embed .post-ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 40em) { .ahl-embed--horizontal { grid-template-columns: 14rem 1fr; align-items: start; } }
.ahl-embed h3 { font-size: var(--louhos-step-1); margin: .2rem 0 .5rem; line-height: 1.25; }
.ahl-embed h3 a { text-decoration: none; }
.ahl-embed h3 a:hover { text-decoration: underline; }
.ahl-embed p { margin: 0 0 .5rem; }
.ahl-embed-meta { color: var(--louhos-muted); font-size: var(--louhos-step--1); }
.ahl-terms { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.ahl-terms a { display: inline-block; padding: .2rem .65rem; border-radius: 999px; background: #fff; font-size: var(--louhos-step--1); text-decoration: none; }
.ahl-terms a:hover { text-decoration: underline; }

/* Gallery block: ratios, columns, carousel */
.ahl-gallery .photo-grid { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.ahl-gallery.cols-1 { --cols: 1; } .ahl-gallery.cols-2 { --cols: 2; } .ahl-gallery.cols-3 { --cols: 3; } .ahl-gallery.cols-4 { --cols: 4; }
@media (max-width: 47.99em) { .ahl-gallery .photo-grid { grid-template-columns: repeat(min(var(--cols), 2), minmax(0, 1fr)); } }
.ahl-gallery img { width: 100%; height: auto; object-fit: cover; }
.ahl-gallery.ratio-1-1 img { aspect-ratio: 1; }
.ahl-gallery.ratio-4-3 img { aspect-ratio: 4 / 3; }
.ahl-gallery.ratio-3-2 img { aspect-ratio: 3 / 2; }
.ahl-gallery.ratio-16-9 img { aspect-ratio: 16 / 9; }
.ahl-gallery.ratio-original img { aspect-ratio: auto; }
.ahl-gallery li, .ahl-gallery ul { list-style: none; }
.ahl-gallery ul { padding: 0; margin: 0; }
.ahl-gallery figure { margin: 0; }
.ahl-gallery button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; overflow: hidden; }
.ahl-gallery button img { transition: transform 1.2s var(--louhos-ease); }
.ahl-gallery button:hover img { transform: scale(1.05); }
.ahl-gallery figcaption { font-size: var(--louhos-step--1); color: var(--louhos-muted); margin-top: .35rem; }
.ahl-carousel-bar { display: flex; justify-content: flex-end; gap: .5rem; margin-bottom: .75rem; }
.ahl-carousel-bar .icon-btn { background: #fff; cursor: pointer; font-size: 1.25rem; }
.ahl-carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--cols, 3) - 1) * .75rem) / var(--cols, 3));
  gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: .5rem; }
.ahl-carousel-track > li { scroll-snap-align: start; }
@media (max-width: 47.99em) { .ahl-carousel-track { grid-auto-columns: 85%; } }
@media (prefers-reduced-motion: reduce) { .ahl-gallery button:hover img, :is(.ahl-cards a, .ahl-embed):hover .media > * { transform: none; } }

/* Front-end ACF form (Lisää tapahtuma) */
.ahl-acf-form .acf-fields > .acf-field { border: 0 !important; padding: .75rem 0 !important; }
.ahl-acf-form .acf-field .acf-label label { font-weight: 600; color: var(--louhos-ink); }
.ahl-acf-form .acf-field .acf-label .description, .ahl-acf-form .acf-field p.description { color: var(--louhos-muted); font-size: var(--louhos-step--1); }
.ahl-acf-form .acf-required { color: var(--louhos-error); }
.ahl-acf-form :is(input[type="text"], input[type="email"], input[type="url"], input[type="number"], textarea, select) {
  width: 100%; font: inherit; color: var(--louhos-ink); padding: .7rem .85rem; border: 1.5px solid #8c99a6; border-radius: 8px; background: #fff; min-height: 2.9rem; }
.ahl-acf-form textarea { min-height: 9rem; }
.ahl-acf-form .acf-accordion { border: 0 !important; margin: 1.5rem 0 0 !important; }
.ahl-acf-form .acf-accordion-title { padding: .5rem 0 !important; background: none !important; }
.ahl-acf-form .acf-accordion-title label { font-family: var(--louhos-font-head); font-size: var(--louhos-step-1); font-weight: 700; }
.ahl-acf-form .acf-accordion-icon { display: none; }
.ahl-acf-form .acf-notice.-error { background: #fdf1f0; border-left: 4px solid var(--louhos-error); color: var(--louhos-ink); padding: 1rem 1.25rem; border-radius: 6px; }
.ahl-acf-form .acf-error-message { background: none; color: var(--louhos-error); font-weight: 600; padding: 0; }
.ahl-acf-form .acf-form-submit { margin-top: 1.5rem; }
.ahl-form > h2 { font-size: var(--louhos-step-2); margin-bottom: 1rem; }
.ahl-form .notice { margin-bottom: 1.5rem; }
/* Parent theme colours headings explicitly: keep hero text white */
:is(.hero, .page-hero) :is(h1, h2, p, .crumbs a) { color: #fff; }

.ahl-content :is(h4, h5, h6) { font-size: 1.1rem; text-transform: none; letter-spacing: 0; margin-top: 1.75rem; margin-bottom: .4rem; }
.cal-feed a { font-weight: 600; }
/* ACF accordion titles on the public form = section headings */
.ahl-form .ahl-acf-form .acf-accordion .acf-accordion-title,
.ahl-form .ahl-acf-form .acf-accordion .acf-accordion-title :is(label, span, h3) {
  font-family: var(--louhos-font-head); font-size: var(--louhos-step-1); font-weight: 700; color: var(--louhos-ink); line-height: 1.2;
}
.ahl-form .ahl-acf-form .acf-accordion .acf-accordion-title { padding: .5rem 0 !important; border-bottom: 1px solid var(--louhos-line); margin-bottom: .5rem; cursor: default; }
.ahl-footer h2 { color: #fff; }
/* ACF switch: readable on/off text */
.ahl-acf-form .acf-switch { border-color: #8c99a6; }
.ahl-acf-form .acf-switch.-on { background: var(--louhos-link); border-color: var(--louhos-link); }
.ahl-acf-form .acf-switch.-on .acf-switch-on { color: #fff; text-shadow: none; }
.ahl-acf-form .acf-switch .acf-switch-off { color: var(--louhos-ink); }
/* Front page on small screens: intro → events/news (sidebar) → other blocks (WordPress markup) */
@media (max-width: 63.99em) {
  .home .layout.has-sidebar { display: flex; flex-direction: column; }
  .home .layout.has-sidebar .layout-main, .home .layout.has-sidebar .ahl-content { display: contents; }
  .home .layout.has-sidebar .ahl-content > * { order: 3; margin-top: 0; }
  .home .layout.has-sidebar .ahl-content > :first-child { order: 1; padding-block: 3rem; }
  .home .layout.has-sidebar > .sidebar { order: 2; }
  .home .layout.has-sidebar .ahl-content > :not(:first-child) { margin-top: 3rem; }
  .home .layout.has-sidebar .ahl-content > :last-child { margin-bottom: 4rem; }
}
