/* =====================================================================
   psl.ee facelift - Mupax OÜ, 2026-11
   Sits on top of the NativeChurch theme (loaded last in <head>).
   One type family (Roboto + Roboto Condensed), brand green from the logo
   used as an accent, calm greys, less chrome.
   ===================================================================== */

:root {
  --psl-green: #008a00;        /* logo green */
  --psl-green-dark: #006e00;   /* links / hover - AA on white */
  --psl-green-tint: #eaf4e8;
  --psl-ink: #1d231f;
  --psl-text: #3a423c;
  --psl-muted: #69726b;
  --psl-line: #e3e6e1;
  --psl-soft: #f5f6f2;
  --psl-deep: #12231a;         /* footer */
  --psl-radius: 6px;
  --psl-head: "Roboto Condensed", "Roboto", Arial, sans-serif;
  --psl-body: "Roboto", Arial, sans-serif;
}

/* ---------- Typography: one family everywhere ---------- */
body,
.page-content, .page-content p,
.site-footer-bottom,
blockquote p, .cursive, .fact {
  font-family: var(--psl-body) !important;
}
body { color: var(--psl-text); }
.page-content, .page-content p, .page-content li {
  color: var(--psl-text) !important;
  font-size: 16px;
  line-height: 1.65;
}
h1, h2, h3, h4, h5, h6,
.page-header h1, .widgettitle, .widget-title {
  font-family: var(--psl-head) !important;
  font-weight: 700;
  color: var(--psl-ink);
  letter-spacing: 0;
}
.meta-data, .meta-data span, .meta-data a {
  font-family: var(--psl-body) !important;
  font-style: normal !important;
  font-size: 13px !important;
  color: var(--psl-muted) !important;
}
.page-content a:not(.btn):not(.psl-btn) { color: var(--psl-green-dark); text-decoration: underline; text-underline-offset: 2px; }
.page-content a:not(.btn):not(.psl-btn):hover { color: var(--psl-ink); }

/* ---------- Buttons ---------- */
.btn-primary, .psl-btn-primary {
  background: var(--psl-green) !important;
  border-color: var(--psl-green) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .psl-btn-primary:hover { background: var(--psl-green-dark) !important; border-color: var(--psl-green-dark) !important; }
.btn { border-radius: var(--psl-radius); font-family: var(--psl-body) !important; font-weight: 500; text-transform: none; letter-spacing: 0; }
.psl-btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--psl-radius);
  font: 500 15px/1.2 var(--psl-body); text-decoration: none !important; border: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.psl-btn-ghost { border-color: rgba(255, 255, 255, .85); color: #fff !important; }
.psl-btn-ghost:hover { background: #fff; color: var(--psl-ink) !important; }
.psl-btn:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid #f5c400; outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header .topbar { border-bottom: 1px solid var(--psl-line); }
.top-navigation > li > a {
  font-family: var(--psl-body) !important;
  font-size: 13px !important; font-weight: 500; letter-spacing: .02em;
  text-transform: none !important; color: var(--psl-muted) !important;
}
.top-navigation > li > a:hover { color: var(--psl-green-dark) !important; }
.main-menu-wrapper { background: #fff !important; border-bottom: 1px solid var(--psl-line); }
.navigation > ul > li > a {
  font-family: var(--psl-head) !important; font-weight: 700; font-size: 16px !important;
  color: var(--psl-ink) !important;
}
.navigation > ul > li > a:hover,
.navigation > ul > li.current-menu-item > a,
.navigation > ul > li.current-menu-ancestor > a { color: var(--psl-green-dark) !important; }
.navigation > ul > li > ul { border-top: 3px solid var(--psl-green) !important; box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.navigation > ul > li > ul li > a { font-family: var(--psl-body) !important; font-size: 14px !important; }

.psl-mobile-only { display: none !important; }
@media (max-width: 991px) {
  /* the theme's "---" select for the top menu: its links now live in the mobile menu */
  .enabled-top-mobile select, .enabled-top-mobile .tinynav, .tinymenu select { display: none !important; }
  .navigation .psl-mobile-only { display: block !important; }
  .navigation .psl-mobile-only > a { font-family: var(--psl-body) !important; font-weight: 500; font-size: 15px !important; text-transform: none; }
  .navigation .psl-lang { display: flex !important; gap: 8px; padding: 12px 15px; }
  .navigation .psl-lang a {
    flex: 1; text-align: center; padding: 10px !important; border: 1px solid var(--psl-line) !important;
    border-radius: var(--psl-radius); font-size: 14px !important;
  }
  .site-header .menu-toggle { font-size: 22px !important; color: var(--psl-ink) !important; }
}

/* ---------- Homepage hero ---------- */
.psl-hero { position: relative; }
.psl-hero-text {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 120px 0 64px; color: #fff; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 20, 14, .78) 0%, rgba(10, 20, 14, .45) 55%, rgba(10, 20, 14, 0) 100%);
}
.psl-hero-text .container > * { pointer-events: auto; }
.psl-hero-kicker { margin: 0 0 6px; font: 500 14px/1.3 var(--psl-body); letter-spacing: .08em; text-transform: uppercase; color: #cfe8cc; }
.psl-hero-title { margin: 0 0 10px; color: #fff !important; font-size: clamp(32px, 4.6vw, 56px); line-height: 1.05; max-width: 14em; }
.psl-hero-lead { margin: 0 0 22px; font: 400 18px/1.5 var(--psl-body); max-width: 34em; color: #f1f4f1; }
.psl-hero-actions { margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-slider .flex-control-nav { z-index: 6; bottom: 18px !important; }
.hero-slider .flex-direction-nav { display: none; }
@media (max-width: 767px) {
  .psl-hero-text { padding: 80px 0 44px; }
  .psl-hero-lead { font-size: 16px; }
  .psl-btn { padding: 11px 18px; font-size: 15px; }
}

/* ---------- Next event bar under the hero ---------- */
.notice-bar { background: #fff !important; border-bottom: 1px solid var(--psl-line); }
.notice-bar .eventer-countdown { box-shadow: none !important; border: 0 !important; }
.notice-bar .eventer-event-details label,
.notice-bar .eventer-labeler { font: 500 12px/1.3 var(--psl-body) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--psl-muted) !important; }
.notice-bar .eventer-event-details h3 a { color: var(--psl-ink) !important; font-family: var(--psl-head) !important; }
.notice-bar .eventer-event-details h3 a:hover { color: var(--psl-green-dark) !important; }
.notice-bar .eventer-event-date { background: var(--psl-green) !important; }
.notice-bar .eventer-countdown-timer { display: none; } /* empty, English labels */

/* ---------- Homepage sections ---------- */
.home .content { padding-top: 48px; }
.home .widget_media_image { margin-bottom: 48px; }
.home .widget_media_image img { border-radius: var(--psl-radius); }
.sidebar-widget-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border: 0 !important; margin-bottom: 20px; }
.sidebar-widget-title .widgettitle, .home .widget-title { font-size: 30px !important; margin: 0; }
.sidebar-widget-title .push-btn {
  order: 2; float: none !important; background: none !important; border: 0 !important; padding: 0 !important;
  color: var(--psl-green-dark) !important; font-size: 15px !important; text-decoration: underline; text-underline-offset: 3px;
}

/* News as cards (the theme's isotope grid, laid out with CSS grid instead) */
.widget_posts-list-widget .isotope-grid {
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px;
  height: auto !important; margin: 0 !important; padding: 0; list-style: none;
}
.widget_posts-list-widget .isotope-grid:before,
.widget_posts-list-widget .isotope-grid:after { display: none !important; } /* bootstrap .row clearfix would take a grid cell */
.widget_posts-list-widget .isotope-grid > li {
  position: static !important; transform: none !important; left: auto !important; top: auto !important;
  width: auto !important; float: none !important; padding: 0 !important; margin: 0 !important;
}
.widget_posts-list-widget .grid-item-inner { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.widget_posts-list-widget .media-box { display: block; border-radius: var(--psl-radius); overflow: hidden; background: var(--psl-soft); margin-bottom: 14px; border: 0 !important; padding: 0 !important; }
.widget_posts-list-widget .media-box img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; transition: transform .3s ease; }
.widget_posts-list-widget .media-box:hover img { transform: scale(1.03); }
.widget_posts-list-widget .grid-content { padding: 0 !important; }
.widget_posts-list-widget .grid-content h3 { font-size: 20px !important; line-height: 1.25; margin: 0 0 8px; }
.widget_posts-list-widget .grid-content h3 a { color: var(--psl-ink) !important; text-decoration: none !important; }
.widget_posts-list-widget .grid-content h3 a:hover { color: var(--psl-green-dark) !important; }
.widget_posts-list-widget .grid-content .meta-data { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; background: none !important; padding: 0 !important; border: 0 !important; }
.widget_posts-list-widget .grid-content .meta-data i { display: none; }
.widget_posts-list-widget .grid-content .meta-data a { text-decoration: none !important; }
.widget_posts-list-widget .grid-content p { font-size: 15px; line-height: 1.55; color: var(--psl-text); margin: 0; }
.widget_posts-list-widget .grid-content .btn { display: none; } /* "Jätka lugemist" - the card is the link */
@media (max-width: 991px) { .widget_posts-list-widget .isotope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .widget_posts-list-widget .isotope-grid { grid-template-columns: 1fr; gap: 28px; } }

/* Events + Facebook row */
.home .eventer-minimal-list .eventer-event-item-link { display: flex !important; align-items: center; gap: 20px; }
.home .eventer-minimal-list .eventer-event-date { flex: 0 0 170px; width: 170px !important; margin: 0 !important; }
.home .eventer-minimal-list .eventer-event-details { flex: 1; min-width: 0; padding: 0 !important; margin: 0 !important; }
.home .eventer-minimal-list .eventer-event-title { color: var(--psl-ink) !important; font-weight: 500; }
.home .eventer-minimal-list a:hover .eventer-event-title { color: var(--psl-green-dark) !important; }
@media (max-width: 599px) {
  .home .eventer-minimal-list .eventer-event-item-link { flex-direction: column; align-items: flex-start; gap: 6px; }
  .home .eventer-minimal-list .eventer-event-date { width: auto !important; flex: none; }
}
.home .widget_text .widget-title { margin-bottom: 18px; }
.psl-more { margin: 18px 0 0; }
.psl-more a { font-weight: 500; }
.psl-fb-fallback {
  margin: 0; padding: 24px; border: 1px solid var(--psl-line); border-radius: var(--psl-radius);
  background: #fff; font-size: 15px; color: var(--psl-text);
}
.psl-fb-fallback p { margin: 0 0 14px; font-style: normal; }
.fb-like-box[fb-xfbml-state="rendered"] + .psl-fb-fallback { display: none; }

/* Sponsors: one calm row, colour on hover */
.sow-image-grid-wrapper {
  display: flex !important; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 28px 44px; padding: 40px 0 8px; border-top: 1px solid var(--psl-line);
}
.sow-image-grid-wrapper .sow-image-grid-image { margin: 0 !important; padding: 0 !important; width: auto !important; }
.sow-image-grid-wrapper img {
  max-height: 52px !important; width: auto !important; max-width: 150px !important; height: auto;
  filter: grayscale(1); opacity: .7; transition: filter .2s ease, opacity .2s ease;
}
.sow-image-grid-wrapper a:hover img, .sow-image-grid-wrapper a:focus img { filter: none; opacity: 1; }

/* ---------- Inner pages: slim header, one title ---------- */
.nav-backed-header {
  background: var(--psl-soft) !important; background-image: none !important;
  padding: 0 !important; min-height: 0 !important; border-bottom: 1px solid var(--psl-line);
}
.nav-backed-header .breadcrumb { margin: 0 !important; padding: 12px 0 !important; background: none !important; font-size: 13px; }
.nav-backed-header .breadcrumb, .nav-backed-header .breadcrumb a, .nav-backed-header .breadcrumb span { color: var(--psl-muted) !important; }
.nav-backed-header .breadcrumb a:hover { color: var(--psl-green-dark) !important; }
.nav-backed-header .breadcrumb > li + li:before { color: #b5bbb6 !important; }
.page-header { background: #fff !important; border: 0 !important; padding: 36px 0 8px !important; margin: 0 !important; }
.page-header h1, .page-header h1.cpt-page-title {
  color: var(--psl-ink) !important; text-transform: none !important;
  font-size: clamp(30px, 3.6vw, 44px) !important; line-height: 1.1 !important; margin: 0 !important;
}
.content { padding-top: 24px; }

/* Single post: title once, quiet meta, readable column */
.single-post .single-post-header { display: none; } /* repeats the H1 + "Kommentaarid puuduvad" */
.single-post article.post-content, .single-post .post-comment-form, .single-post .share-bar {
  max-width: 820px; margin-left: auto; margin-right: auto;
}
.single-post article.post-content { border-top: 0 !important; padding-top: 8px !important; }
.single-post .page-header .detail-page-title-bar,
.single-post .nav-backed-header .breadcrumb { max-width: 820px; margin-left: auto !important; margin-right: auto !important; }
.single-post .page-header .detail-page-title-bar > div { width: 100%; float: none; padding-left: 0; padding-right: 0; }
.single-post .page-header .detail-page-title-bar { margin-left: auto !important; margin-right: auto !important; }
.post-meta.meta-data {
  display: flex !important; flex-wrap: wrap; gap: 4px 18px;
  background: none !important; border: 0 !important; padding: 0 !important; margin: 0 0 18px !important;
}
.post-meta .post-author-meta { display: none !important; }
.post-meta i { display: none; }
.single-post .featured-image img { border-radius: var(--psl-radius); }

/* ---------- Footer ---------- */
.site-footer { background: var(--psl-deep) !important; padding: 56px 0 40px !important; }
.site-footer, .site-footer p, .site-footer .textwidget { color: #d6dfd8 !important; font-size: 15px; }
.site-footer .widgettitle { color: #fff !important; font-size: 18px !important; letter-spacing: .02em; border: 0 !important; padding: 0 !important; margin-bottom: 14px; }
.site-footer .widgettitle:after, .site-footer .widgettitle:before { display: none !important; }
.site-footer a { color: #fff !important; text-decoration: none; }
.site-footer a:hover { color: #b9e3b4 !important; text-decoration: underline; }
.site-footer .widget ul > li { border-bottom: 0 !important; padding: 5px 0 !important; }
.site-footer-bottom { background: #0b1711 !important; color: #a8b4ab !important; }
.site-footer-bottom, .site-footer-bottom p, .site-footer-bottom a { color: #a8b4ab !important; font-size: 13px; }
.site-footer-bottom a:hover { color: #fff !important; }
.site-footer-bottom .social-icons a { background: transparent !important; color: #a8b4ab !important; font-size: 18px !important; width: auto !important; height: auto !important; }

/* ---------- Forms ---------- */
.page-content input[type=text], .page-content input[type=email], .page-content input[type=tel],
.page-content textarea, .comment-respond input[type=text], .comment-respond input[type=email], .comment-respond textarea {
  border: 1px solid #cdd3ce; border-radius: var(--psl-radius); padding: 10px 12px; max-width: 100%;
  font: 400 16px/1.4 var(--psl-body); color: var(--psl-ink); background: #fff;
}
.page-content input:focus, .page-content textarea:focus { border-color: var(--psl-green); outline: 2px solid var(--psl-green-tint); }
.wpcf7 label { font-weight: 500; color: var(--psl-ink); }
.wpcf7 input[type=submit] {
  background: var(--psl-green); color: #fff; border: 0; border-radius: var(--psl-radius);
  padding: 12px 26px; font: 500 15px/1 var(--psl-body); text-transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .widget_posts-list-widget .media-box img, .psl-btn, .sow-image-grid-wrapper img { transition: none; }
  .widget_posts-list-widget .media-box:hover img { transform: none; }
}

/* ---------- Calendar page (Eventer compact list) on phones: tight rows ---------- */
@media (max-width: 767px) {
  .eventer-compact-list ul { margin: 0; padding: 0; }
  .eventer-compact-list .eventer-event-list-item {
    margin: 0 0 10px !important; padding: 0 !important; list-style: none;
    background: #fff; border: 1px solid var(--psl-line) !important; border-left: 4px solid var(--psl-green) !important;
    border-radius: var(--psl-radius);
  }
  .eventer-compact-list .eventer-event-item-link {
    display: flex !important; align-items: center; gap: 14px; padding: 12px 14px !important;
    text-decoration: none !important; min-height: 0 !important; height: auto !important;
  }
  .eventer-compact-list .eventer-event-date {
    flex: 0 0 48px; width: 48px !important; display: flex !important; flex-direction: column; align-items: center;
    float: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important;
  }
  .eventer-compact-list .eventer-event-day { font: 700 26px/1 var(--psl-head) !important; color: var(--psl-green-dark) !important; }
  .eventer-compact-list .eventer-event-month { font: 500 12px/1.2 var(--psl-body) !important; text-transform: uppercase; color: var(--psl-muted) !important; margin-top: 3px; letter-spacing: .04em; }
  .eventer-compact-list .eventer-event-year {
    font: 400 11px/1.2 var(--psl-body) !important; color: var(--psl-muted) !important;
    background: none !important; padding: 0 !important; margin: 1px 0 0 !important; letter-spacing: 0 !important;
  }
  .eventer-compact-list .eventer-event-details {
    flex: 1; min-width: 0; float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
  }
  .eventer-compact-list .eventer-event-details-side {
    display: flex !important; flex-direction: row-reverse; align-items: center; gap: 12px;
    padding: 0 !important; margin: 0 !important; float: none !important; width: auto !important;
  }
  .eventer-compact-list .eventer-cl-details-cont {
    flex: 1; min-width: 0; display: flex !important; flex-direction: column; gap: 4px;
    padding: 0 !important; margin: 0 !important; float: none !important; width: auto !important;
  }
  .eventer-compact-list .eventer-event-title { order: 0; font: 500 16px/1.3 var(--psl-body) !important; color: var(--psl-ink) !important; margin: 0 !important; }
  .eventer-compact-list .eventer-event-time { order: 1; font: 400 13px/1.3 var(--psl-body) !important; color: var(--psl-muted) !important; margin: 0 !important; text-transform: none !important; letter-spacing: 0 !important; }
  .eventer-compact-list .eventer-badges { order: 2; margin: 0 !important; }
  .eventer.eventer-compact-list .eventer-event-list-item .eventer-event-image {
    flex: 0 0 48px; width: 48px !important; min-width: 48px !important; height: 48px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
    border-radius: 50%; float: none !important; background-size: cover !important; background-position: center !important;
  }
  .eventer-compact-list .eventer-event-item-link > .eventer-icon-arrow-right { display: none !important; }
  .eventer-compact-list a:hover .eventer-event-title { color: var(--psl-green-dark) !important; }
}

/* =====================================================================
   Header (theme header layout 5 + top strip): one row - logo left, main
   menu right; utility links + language in a slim strip above.
   ===================================================================== */
.toprow {
  background: var(--psl-soft) !important; border-bottom: 1px solid var(--psl-line);
  padding: 0 !important; height: auto !important; min-height: 0 !important; position: relative; z-index: 20;
}
.toprow .row { display: flex; align-items: center; justify-content: flex-end; }
.toprow .col-md-6:first-child { display: none; } /* empty social icons column */
.toprow .col-md-6:last-child { width: 100%; display: flex; justify-content: flex-end; }
.toprow .top-navigation { display: flex !important; align-items: center; gap: 2px; margin: 0 !important; float: none !important; }
.toprow .top-navigation > li { float: none !important; position: relative; }
.toprow .top-navigation > li > a {
  display: block; padding: 8px 10px !important; line-height: 1.2 !important;
  font: 500 13px/1.2 var(--psl-body) !important; color: var(--psl-muted) !important; text-transform: none !important;
}
.toprow .top-navigation > li > a:hover { color: var(--psl-green-dark) !important; }
.toprow .top-navigation > li + li:before { display: none !important; }
.toprow .top-navigation .nav-line { display: none !important; }
.toprow .top-navigation .sub-menu { min-width: 0 !important; width: auto !important; right: 0; left: auto !important; padding: 4px 0 !important; }
.toprow .top-navigation .sub-menu a { padding: 6px 12px !important; }

/* In normal flow (layout 5 overlays the hero by default). No !important: the theme's sticky
   script sets an inline position:fixed while scrolling, which must still win. */
body .body.header-style5 .site-header { position: relative; top: auto; background: #fff; }
@media (min-width: 992px) {
  .header-style5 .site-header {
    background: #fff !important;
    border-bottom: 1px solid var(--psl-line); box-shadow: none; z-index: 19;
  }
  .header-style5 .site-header > .container {
    display: flex !important; align-items: center; justify-content: space-between; gap: 24px;
    min-height: 84px; padding-top: 0 !important; padding-bottom: 0 !important;
  }
  .header-style5 .site-header > .container:before, .header-style5 .site-header > .container:after { display: none !important; }
  .header-style5 .site-header .logo { margin: 0 !important; padding: 0 !important; flex: 0 0 auto; line-height: 1; }
  .header-style5 .site-header .logo img { max-height: 54px; width: auto !important; }
  .header-style5 .site-header .navigation { float: none !important; margin: 0 !important; display: flex; justify-content: flex-end; flex: 1 1 auto; }
  .header-style5 .site-header .navigation > ul { display: flex; flex-wrap: nowrap; float: none !important; margin: 0 !important; }
  .header-style5 .site-header .navigation > ul > li { float: none !important; }
  .header-style5 .site-header .navigation > ul > li > a {
    display: flex; align-items: center; gap: 4px; height: 84px; line-height: 1 !important;
    padding: 0 14px !important; font: 700 16px/1 var(--psl-head) !important; text-transform: uppercase; letter-spacing: .02em;
    color: var(--psl-ink) !important; background: none !important; position: relative;
  }
  .header-style5 .site-header .navigation > ul > li > a:after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 22px; height: 2px;
    background: var(--psl-green); transform: scaleX(0); transition: transform .18s ease;
  }
  .header-style5 .site-header .navigation > ul > li:hover > a:after,
  .header-style5 .site-header .navigation > ul > li.current-menu-item > a:after,
  .header-style5 .site-header .navigation > ul > li.current-menu-ancestor > a:after,
  .header-style5 .site-header .navigation > ul > li.current-page-ancestor > a:after { transform: scaleX(1); }
  .header-style5 .site-header .navigation > ul > li > a .nav-line { display: none !important; }

  /* Dropdowns: left-aligned, normal case, long lists in two columns */
  .header-style5 .site-header .navigation > ul > li > ul {
    top: 100% !important; left: 0 !important; min-width: 260px; margin: 0 !important; padding: 8px 0 !important;
    background: #fff !important; border: 1px solid var(--psl-line) !important; border-top: 3px solid var(--psl-green) !important;
    border-radius: 0 0 var(--psl-radius) var(--psl-radius); box-shadow: 0 12px 32px rgba(18, 35, 26, .12);
  }
  .header-style5 .site-header .navigation > ul > li > ul:has(> li:nth-child(10)) { columns: 2; column-gap: 0; width: 540px; }
  .header-style5 .site-header .navigation > ul > li:nth-last-child(-n+3) > ul { left: auto !important; right: 0 !important; }
  .header-style5 .site-header .navigation > ul > li > ul > li { break-inside: avoid; float: none !important; width: auto !important; border: 0 !important; }
  .header-style5 .site-header .navigation > ul > li > ul li > a {
    display: block; padding: 9px 18px !important; border: 0 !important; background: none !important;
    font: 400 15px/1.35 var(--psl-body) !important; text-transform: none !important; letter-spacing: 0 !important;
    text-align: left !important; color: var(--psl-text) !important; white-space: normal;
  }
  .header-style5 .site-header .navigation > ul > li > ul li > a:hover,
  .header-style5 .site-header .navigation > ul > li > ul li.current-menu-item > a { background: var(--psl-green-tint) !important; color: var(--psl-green-dark) !important; }

  /* Sticky (theme script fixes the header on scroll): solid, compact */
  .header-style5 .is-sticky .site-header, .header-style5 .site-header.is-sticky,
  .header-style5 .sticky-wrapper.is-sticky .site-header {
    background: #fff !important; box-shadow: 0 2px 12px rgba(18, 35, 26, .08);
  }
  .header-style5 .is-sticky .site-header > .container { min-height: 64px; }
  .header-style5 .is-sticky .site-header .navigation > ul > li > a { height: 64px; }
  .header-style5 .is-sticky .site-header .navigation > ul > li > a:after { bottom: 14px; }
  .header-style5 .is-sticky .site-header .logo img { max-height: 42px; }
  .header-style5 .site-header .navigation, .header-style5 .site-header .navigation > ul { margin-top: 0 !important; padding-top: 0 !important; top: auto !important; }
}

/* Narrower desktops: tighter menu so it stays on one row */
@media (min-width: 992px) and (max-width: 1199px) {
  .header-style5 .site-header .logo img { max-height: 44px; }
  .header-style5 .site-header .navigation > ul > li > a { padding: 0 8px !important; font-size: 14px !important; letter-spacing: 0; }
  .header-style5 .site-header .navigation > ul > li > a:after { left: 8px; right: 8px; }
}
/* Phones/tablets: the strip's links live in the mobile menu */
@media (max-width: 991px) {
  .toprow { display: none !important; }
  .header-style5 .site-header > .container { min-height: 72px; }
  .header-style5 .site-header .logo img { max-height: 46px; }
}

/* Hero photos: crop from the upper part (faces sit in the top third), a bit taller on big screens */
.hero-slider .slides > li {
  background-position: center 22% !important;
  background-size: cover !important;
}
@media (min-width: 992px) {
  .hero-slider, .hero-slider .slides > li { height: clamp(500px, 62vh, 620px) !important; }
}
/* Phones: photo on top (no text over faces), text on a dark panel below it */
@media (max-width: 767px) {
  .hero-slider, .hero-slider .slides > li { height: 74vw !important; min-height: 240px; max-height: 420px; }
  .psl-hero-text { position: static; background: var(--psl-deep); padding: 22px 0 26px; pointer-events: auto; }
  .psl-hero-title { font-size: 30px; }
  .hero-slider .flex-control-nav { bottom: 10px !important; }
}
/* Logo vertically centred with the menu (theme h1.logo sits at the top of its box) */
.header-style5 .site-header .logo { display: flex !important; align-items: center; align-self: stretch; height: auto !important; }
.header-style5 .site-header .logo a { display: flex !important; align-items: center; height: 100%; padding: 0 !important; margin: 0 !important; }
.header-style5 .site-header .logo a.retina-logo { display: none !important; }
@media (min-width: 992px) {
  /* the (empty on desktop) mobile-menu button wrapped to a 2nd flex line and broke vertical centring */
  .header-style5 .site-header .mmenu-opener-button { display: none !important; }
  .header-style5 .site-header > .container { flex-wrap: nowrap !important; align-content: center; }
  .header-style5 .site-header .logo { align-self: center; }
}
@media (min-width: 992px) {
  .header-style5 .site-header .navigation, .header-style5 .site-header .navigation > ul { align-self: stretch; height: 84px; align-items: stretch; }
  .header-style5 .site-header .navigation > ul > li { display: flex !important; align-items: stretch; height: 84px; margin: 0 !important; }
  .header-style5 .site-header .navigation > ul > li > a { height: 84px !important; margin: 0 !important; top: auto !important; }
  .header-style5 .is-sticky .site-header .navigation, .header-style5 .is-sticky .site-header .navigation > ul,
  .header-style5 .is-sticky .site-header .navigation > ul > li, .header-style5 .is-sticky .site-header .navigation > ul > li > a { height: 64px !important; }
}
@media (min-width: 992px) {
  .header-style5 .site-header .navigation > ul > li.psl-mobile-only { display: none !important; }
  .header-style5 .site-header .navigation > ul > li > a { white-space: nowrap; }
}

/* =====================================================================
   Content pages (e.g. /spordiinfo/spordikoolitus/): section nav, readable
   text, posters that don't take a whole screen each.
   ===================================================================== */
/* Section navigation (sidebar menus) */
.sidebar .sidebar-widget-title { border: 0 !important; margin-bottom: 12px; }
.sidebar .sidebar-widget-title .widgettitle { font-size: 20px !important; }
.sidebar .menu {
  list-style: none; margin: 0 0 32px; padding: 6px 0;
  border: 1px solid var(--psl-line); border-radius: var(--psl-radius); background: #fff;
}
.sidebar .menu > li { border: 0 !important; padding: 0 !important; margin: 0 !important; }
.sidebar .menu > li > a {
  display: block; padding: 10px 16px; border-left: 3px solid transparent;
  color: var(--psl-text) !important; text-decoration: none !important; font-size: 15px; line-height: 1.35;
  transition: background-color .15s ease, color .15s ease;
}
.sidebar .menu > li > a:hover { background: var(--psl-soft); color: var(--psl-green-dark) !important; }
.sidebar .menu > li.current-menu-item > a, .sidebar .menu > li.current-page-ancestor > a, .sidebar .menu > li.current-menu-ancestor > a { border-left-color: var(--psl-green); background: var(--psl-green-tint); color: var(--psl-ink) !important; font-weight: 500; }
@media (min-width: 992px) {
  #sidebar-col { position: sticky; top: 84px; align-self: flex-start; }
}

/* Content typography */
/* readable line length for running text only - never for calendars, tables or widgets */
body:not(.home) .page-content > p, body:not(.home) .page-content > ul > li, body:not(.home) .page-content > ol > li { max-width: 72ch; }
.page-content [style*="comic sans"], .page-content [style*="Comic Sans"] { font-family: inherit !important; }
.page-content h2, .page-content h3, .page-content h4 { margin: 0 0 12px; line-height: 1.25; }
.page-content h4 { font-size: 22px !important; }
.page-content a[style*="ff0000"], .page-content [style*="#ff0000"] { color: var(--psl-green-dark) !important; }
.page-content a { overflow-wrap: anywhere; }
.page-content hr { border: 0; border-top: 1px solid var(--psl-line); margin: 32px 0 !important; height: 0; }
.page-content .psl-ico { width: 1.05em; height: 1.05em; vertical-align: -0.15em; margin-right: .35em; color: var(--psl-green-dark); flex: none; }

/* Posters and big images inside content: cap the height (they repeat the text next to them) */
body:not(.home) .page-content img:not(.emoji):not(.wp-smiley) { max-height: 480px; width: auto !important; height: auto !important; max-width: 100%; }
body:not(.home) .page-content img.aligncenter { display: block; margin-left: auto; margin-right: auto; }
body:not(.home) .page-content p:has(> img:only-child), body:not(.home) .page-content p:has(> a:only-child > img) { max-width: none; text-align: center; }
@media (max-width: 767px) {
  body:not(.home) .page-content img:not(.emoji):not(.wp-smiley) { max-height: 520px; }
}

/* WordPress emoji images must stay text-sized (never caught by the poster rule above) */
img.emoji, img.wp-smiley, .page-content img.emoji {
  display: inline !important; width: 1em !important; height: 1em !important; max-height: 1em !important;
  margin: 0 .07em !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; vertical-align: -0.1em !important;
}

/* "No upcoming courses" box on /spordiinfo/spordikoolitus/ */
.page-content .psl-empty {
  max-width: 72ch; padding: 28px 28px 24px; border: 1px solid var(--psl-line); border-left: 4px solid var(--psl-green);
  border-radius: var(--psl-radius); background: var(--psl-soft);
}
.page-content .psl-empty h3 { font-size: 22px !important; margin: 0 0 10px; }
.page-content .psl-empty p:last-child { margin-bottom: 0; }
.page-content .psl-empty .psl-btn { text-decoration: none !important; color: #fff !important; }

/* Per-photo crop for the hero slides (matched by file name, so reordering slides keeps it right).
   Default 22% suits slides 1 and 3. */
.hero-slider .slides > li[style*="IMG_6372"]      { background-position: center 52% !important; } /* cyclists: skip treetops */
.hero-slider .slides > li[style*="IMG_4655"]      { background-position: center 0% !important; }  /* group photo: keep standing row's faces */
.hero-slider .slides > li[style*="DSC_0282"]      { background-position: center 45% !important; } /* team + banner: skip sky */
.hero-slider .slides > li[style*="DSC_0189"]      { background-position: center 75% !important; } /* dance on lawn: skip sky */

/* Icons inside buttons/links (e.g. "Jätka lugemist →"): gap between text and icon */
.btn > i.fa:last-child, a > i.fa-long-arrow-right:last-child, a > i.fa-angle-right:last-child, a > i.fa-arrow-right:last-child { margin-left: .5em; }
.btn > i.fa:first-child:not(:last-child) { margin-right: .5em; }

/* Lighthouse fixes (2026-11-10) */
/* Cookie banner: no slide-in animation - it was measured as a 0.47 layout shift (CLS) */
#cc-main .cm, #cc-main .pm, #cc-main .cm-wrapper, #cc-main .pm-wrapper { transition: none !important; animation: none !important; }
/* Eventer greys and status badge: readable contrast (AA) */
.eventer .eventer-event-venue, .eventer .eventer-event-time, .eventer .eventer-event-year { color: var(--psl-muted) !important; }
.eventer .eventer-status-upcoming { background-color: #2e7d32 !important; color: #fff !important; }
/* Cookie banner in the system UI font: no reflow (layout shift) when Roboto arrives */
#cc-main { --cc-font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important; }
/* The banner box exists with zero size before it's shown, so showing it counts as a layout shift.
   Keep it out of rendering until CookieConsent marks it shown -> it's "new", not "moved". */
html:not(.show--consent) #cc-main .cm { display: none !important; }

/* hero title is the homepage H1 now */
h1.psl-hero-title { font-size: clamp(32px, 4.6vw, 56px) !important; line-height: 1.05 !important; color: #fff !important; margin: 0 0 10px; }
@media (max-width: 767px) { h1.psl-hero-title { font-size: 30px !important; } }

/* Language dropdown: the list shrank to ~27px and squeezed the flags to 1px */
.toprow .menu-item-gtranslate > .sub-menu { min-width: 56px !important; width: max-content !important; }
.toprow .menu-item-gtranslate img, .navigation .menu-item-gtranslate img { max-width: none !important; width: 20px !important; height: auto !important; display: inline-block; vertical-align: middle; }
.toprow .menu-item-gtranslate > .sub-menu a { display: flex !important; align-items: center; gap: 8px; padding: 8px 14px !important; }
/* chevron as CSS: GTranslate rewrites the link's HTML on switch and drops the theme's <i> arrow */
.toprow .gt-current-wrapper > i.fa { display: none !important; }
.toprow .gt-current-wrapper { display: inline-flex !important; align-items: center; gap: 6px; }
.toprow .gt-current-wrapper:after {
  content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); opacity: .7;
}
/* Eventer calendar: align with the page title (it pulled itself 15px outside the column) */
.page-content > .row:has(> .eventer-dynamic-list-set), .page-content > .row:has(> .eventer) { margin-left: 0 !important; margin-right: 0 !important; }

/* Calendar: active filter chips */
.psl-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; flex-basis: 100%; padding: 14px 0 0; margin-top: 4px; }
.psl-af-title { font: 500 13px/1 var(--psl-body); color: var(--psl-text); margin-right: 4px; }
.psl-chip, .psl-chip-clear {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 4px 12px; border-radius: 999px;
  font: 400 14px/1.2 var(--psl-body); cursor: pointer; transition: background-color .15s ease;
}
.psl-chip { background: var(--psl-green-tint); border: 1px solid #b9dcb3; color: var(--psl-ink); }
.psl-chip:hover { background: #d6ebd2; }
.psl-chip-group { color: var(--psl-muted); }
.psl-chip-clear { background: none; border: 1px solid transparent; color: var(--psl-green-dark); text-decoration: underline; }
.eventer-filter-trigger.psl-has-active { border-color: var(--psl-green) !important; color: var(--psl-green-dark) !important; font-weight: 500; }

.notice-bar h2.psl-next-title { font-size: 20px !important; line-height: 1.3 !important; margin: 4px 0 !important; }
.notice-bar h2.psl-next-title a { color: var(--psl-ink) !important; font-family: var(--psl-head) !important; }
.eventer-filter-trigger .psl-count { margin: 0 2px 0 4px; }

/* Calendar list (desktop): events without a picture keep the text in the same column -
   the 85px picture slot + 20px gap stays as empty space. (Phones: picture is on the right, already aligned.) */
@media (min-width: 768px) {
  .eventer-compact-list .eventer-event-details-side:not(:has(.eventer-event-image)) > .eventer-cl-details-cont { margin-left: 105px !important; }
}

/* Calendar: events that already happened stay in the month view, dimmed */
.eventer-compact-list .eventer-event-list-item:has(.eventer-status-passed) { opacity: .6; }
.eventer-compact-list .eventer-event-list-item:has(.eventer-status-passed):hover { opacity: 1; }

/* Kaisa 2026-11-11: hero lead line removed; keep the 22px gap above the buttons */
.psl-hero-title + .psl-hero-actions { margin-top: 12px; }

/* 2026-11-12: featured images now carry width/height (no layout shift) - keep them fluid */
img.wp-post-image { max-width: 100%; height: auto; }

/* 2026-11-12: show the first hero slide before flexslider has started (LCP) */
.hero-slider .slides > li:first-child { display: block; }

/* 2026-11-12: mobile burger menu - darken the page behind the open menu */
.psl-menu-overlay { display: none; }
@media (max-width: 991px) {
  .psl-menu-overlay {
    display: block; position: fixed; inset: 0; z-index: 998;   /* header is 999, so header + menu stay above */
    background: rgba(10, 22, 15, .6);
    opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
  }
  body.psl-menu-open .psl-menu-overlay { opacity: 1; visibility: visible; }
  html:has(body.psl-menu-open), body.psl-menu-open { overflow: hidden; }
  body.psl-menu-open .site-header .navigation {
    /* stop short of the screen bottom: a strip of the darkened page shows the menu is a panel (tap it to close) */
    max-height: calc(100vh - 144px); max-height: calc(100dvh - 144px); overflow-y: auto; overscroll-behavior: contain;
    background: #fff; box-shadow: 0 18px 32px rgba(0, 0, 0, .28);
  }
}
@media (max-width: 991px) {
  .site-header .menu-toggle.opened i::before { content: "\f00d"; }   /* burger -> X while open */
}
@media (prefers-reduced-motion: reduce) { .psl-menu-overlay { transition: none; } }

/* 2026-11-12: theme fades these with opacity .8, which dropped them below 4.5:1 contrast */
.top-navigation > li > a, .eventer-event-month { opacity: 1 !important; }
/* logo now has width/height attributes - keep its ratio where CSS caps the height (mobile) */
.site-header .logo img { width: auto; }
