/*
Theme Name: ESL 2026
Theme URI: https://esvl.ee
Description: Eesti Seeniorispordi ja Spordiveteranide Liidu koduleht – uuendatud disain 2026. Värvid on tuletatud ESL logost.
Author: Heiki Laja
Version: 2.0.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: default
*/

/* ==========================================================================
   ESL – Eesti Seeniorispordi ja Spordiveteranide Liit
   Disainisüsteem · värvid tuletatud logost (#0068b8 → #00a0e8, #202020)
   ========================================================================== */

:root {
  /* Brändivärvid (logo) */
  --blue-900: #0a3d6e;
  --blue-700: #0068b8;
  --blue-500: #0090d8;
  --blue-300: #52c7fa;
  --blue-100: #dbeefb;
  --blue-50:  #eef6fc;

  /* Neutraalid – kerge sinine kalle */
  --ink:      #1c1f24;
  --ink-2:    #3c4753;
  --muted:    #62707f;
  --line:     #d9e3ed;
  --paper:    #ffffff;
  --paper-2:  #f3f7fb;

  --gold: #d9a441;

  /* Tüpograafia */
  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Open Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  --shadow: 0 10px 30px -12px rgba(10, 61, 110, .25);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-900); }
:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .005em;
  margin: 0;
  color: var(--blue-900);
  text-wrap: balance;
}
h1 { font-size: clamp(38px, 5.2vw, 64px); }
h2 { font-size: clamp(30px, 3.6vw, 44px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); }
h4 { font-size: 20px; }
p  { margin: 0 0 1.1em; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(56px, 7vw, 96px); }
.section--tight { padding-block: clamp(36px, 4vw, 56px); }
.section--alt { background: var(--paper-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 15px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue-500);
}
.eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--blue-500); border-radius: 2px; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: clamp(24px, 3vw, 40px);
  flex-wrap: wrap;
}
.section-head h2 { margin-top: 6px; }

/* Nupud ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: .04em; text-transform: uppercase;
  padding: 13px 22px; border-radius: var(--radius); text-decoration: none;
  border: 2px solid transparent; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
  cursor: pointer; line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue-700); color: #fff; }
.btn--primary:hover { background: var(--blue-900); color: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn--outline { border-color: var(--blue-700); color: var(--blue-700); }
.btn--outline:hover { background: var(--blue-700); color: #fff; }
.btn--sm { font-size: 16px; padding: 10px 16px; }
.btn svg { width: 18px; height: 18px; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--blue-700); text-decoration: none;
}
.arrow-link svg { width: 20px; height: 20px; transition: transform .2s var(--ease); }
.arrow-link:hover svg { transform: translateX(4px); }

/* Päis -------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { height: 58px; width: auto; }
.brand__text { display: grid; line-height: 1.05; }
.brand__text strong { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: .02em; color: var(--blue-900); text-transform: uppercase; max-width: 24ch; line-height: 1; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav li { position: relative; }
.nav a, .nav button {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 4px;
  background: none; border: 0; cursor: pointer; line-height: 1;
}
.nav a:hover, .nav button:hover, .nav li.is-open > a { color: var(--blue-700); background: var(--blue-50); }
.nav li.is-active > a, .nav > ul > li.current-menu-item > a, .nav > ul > li.current-menu-ancestor > a, .nav > ul > li.current_page_parent > a { color: var(--blue-700); box-shadow: inset 0 -3px 0 var(--blue-700); border-radius: 4px 4px 0 0; }
.nav .has-sub > a::after, .nav .menu-item-has-children > a::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); opacity: .7;
}
.nav .sub, .nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 280px;
  list-style: none; margin: 0; padding: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  display: none;
}
.nav .sub--wide { min-width: 340px; }
.nav .menu-item-has-children > .sub-menu { min-width: 300px; }
.nav li:hover > .sub, .nav li:focus-within > .sub, .nav li.is-open > .sub,
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu, .nav li.is-open > .sub-menu { display: block; }
.nav .sub a, .nav .sub-menu a { font-family: var(--font-body); font-weight: 600; font-size: 15px; text-transform: none; letter-spacing: 0; padding: 9px 12px; display: block; color: var(--ink-2); }
.nav .sub a:hover, .nav .sub-menu a:hover, .nav .sub-menu .current-menu-item > a { background: var(--blue-50); color: var(--blue-700); }
.nav .sub .sub__label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 12px 4px; font-weight: 700; }

.nav .icon-link { padding: 10px; }
.nav .icon-link svg { width: 20px; height: 20px; }

.nav-toggle {
  display: none; align-items: center; gap: 10px;
  background: var(--blue-700); color: #fff; border: 0; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: .06em; text-transform: uppercase;
  padding: 10px 14px; cursor: pointer;
}
.nav-toggle .bars { width: 20px; height: 14px; display: grid; gap: 4px; }
.nav-toggle .bars i { display: block; height: 2px; background: #fff; border-radius: 2px; }

@media (max-width: 1080px) {
  /* Let the fixed mobile menu use the viewport as its containing block. */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
  .brand__text { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 84px 0 0 0; z-index: 40;
    background: var(--paper); overflow-y: auto; padding: 16px var(--gutter) 40px;
    display: none;
  }
  .nav.is-open { display: block; }
  .nav > ul { display: block; }
  .nav a, .nav button { font-size: 22px; padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav .sub, .nav .sub-menu, .nav .menu-item-has-children > .sub-menu { position: static; display: none; box-shadow: none; border: 0; padding: 0 0 8px 16px; min-width: 0; }
  .nav li.is-open > .sub, .nav li.is-open > .sub-menu { display: block; }
  .nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { display: none; }
  .nav li.is-open:hover > .sub-menu, .nav li.is-open:focus-within > .sub-menu { display: block; }
  .nav .sub a, .nav .sub-menu a { font-size: 17px; border: 0; }
  .nav .has-sub > a::after, .nav .menu-item-has-children > a::after { margin-left: auto; }
  .nav .icon-link { padding: 14px 8px; }
}

/* Hero (avaleht) --------------------------------------------------------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--blue-900);
  height: clamp(560px, 68vh, 720px);
  display: grid; align-items: end;
}
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--ease);
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(10,61,110,.88) 0%, rgba(10,61,110,.55) 45%, rgba(10,61,110,.15) 100%),
    linear-gradient(180deg, rgba(10,61,110,0) 40%, rgba(10,61,110,.75) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-block: 40px clamp(120px, 12vw, 150px); }
.hero__quotes { display: grid; align-items: end; }
.hero__quote { max-width: 760px; grid-area: 1 / 1; transition: opacity .8s var(--ease), visibility .8s; }
.hero__quote[aria-hidden="true"] { opacity: 0; visibility: hidden; }
.hero__quote .eyebrow { color: var(--blue-300); }
.hero__quote .eyebrow::before { background: var(--blue-300); }
.hero__quote blockquote { margin: 18px 0 0; }
.hero__quote blockquote p {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4vw, 52px); line-height: 1.08; color: #fff; margin: 0;
  text-wrap: balance;
}
.hero__quote cite { display: block; margin-top: 16px; font-style: normal; font-size: 17px; color: rgba(255,255,255,.8); }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero__dots { display: flex; gap: 8px; margin-top: 36px; }
.hero__dots button {
  width: 34px; height: 4px; border: 0; border-radius: 2px; background: rgba(255,255,255,.35); cursor: pointer; padding: 0;
  transition: background .2s;
}
.hero__dots button[aria-current="true"] { background: var(--blue-300); }
.hero__caption { position: absolute; right: var(--gutter); top: 20px; z-index: 2; font-size: 12.5px; color: rgba(255,255,255,.7); letter-spacing: .04em; background: rgba(10,61,110,.45); padding: 4px 10px; border-radius: 3px; }

/* Kiirlingid ------------------------------------------------------------- */
.quick { position: relative; z-index: 3; margin-top: -76px; }
.quick__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.quick__item {
  background: var(--paper); padding: 26px 24px 24px; text-decoration: none; color: var(--ink);
  display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start;
  transition: background .2s var(--ease);
}
.quick__item:hover { background: var(--blue-50); }
.quick__item svg { width: 44px; height: 44px; color: var(--blue-700); }
.quick__item strong { display: block; font-family: var(--font-display); font-size: 23px; font-weight: 700; color: var(--blue-900); line-height: 1; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .02em; }
.quick__item span { font-size: 14.5px; color: var(--muted); line-height: 1.45; display: block; }
@media (max-width: 900px) { .quick__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .quick { margin-top: -40px; } .quick__grid { grid-template-columns: 1fr; } }

/* Uudised + Kalender ------------------------------------------------------ */
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 4vw, 64px); align-items: start; }
@media (max-width: 960px) { .news-layout { grid-template-columns: 1fr; } }

.thumb {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; place-items: center; overflow: hidden; flex: none;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 14%; }
.thumb--cover img { object-fit: cover; padding: 0; }

.meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.meta time { font-weight: 600; color: var(--blue-700); font-variant-numeric: tabular-nums; }
.meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.tag {
  display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  background: var(--blue-100); color: var(--blue-900); padding: 4px 8px; border-radius: 3px; line-height: 1;
}

.feature {
  display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: center;
  padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.feature .thumb { aspect-ratio: 1; width: 100%; }
.feature h3 { font-size: clamp(28px, 2.8vw, 36px); margin: 10px 0 12px; }
.feature h3 a { color: inherit; text-decoration: none; }
.feature h3 a:hover { color: var(--blue-700); }
.feature p { color: var(--ink-2); margin-bottom: 16px; }
@media (max-width: 640px) { .feature { grid-template-columns: 1fr; } .feature .thumb { max-width: 220px; } }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: grid; grid-template-columns: 88px 1fr; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.news-list .thumb { width: 88px; height: 88px; }
.news-list h4 { font-size: 22px; margin: 4px 0 0; font-weight: 600; }
.news-list h4 a { color: var(--ink); text-decoration: none; }
.news-list h4 a:hover { color: var(--blue-700); }
.news-more { margin-top: 24px; }

/* Kalender-kaart */
.cal-card { background: var(--blue-900); color: #fff; border-radius: var(--radius); padding: 28px; position: sticky; top: 108px; }
.cal-card .eyebrow { color: var(--blue-300); }
.cal-card .eyebrow::before { background: var(--blue-300); }
.cal-card h3 { color: #fff; margin-top: 8px; }
.event { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: start; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.14); text-decoration: none; color: #fff; }
.event:first-of-type { border-top: 0; }
.event__date { background: #fff; color: var(--blue-900); border-radius: 4px; text-align: center; padding: 8px 4px 10px; line-height: 1; }
.event__date b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.event__date small { display: block; font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; color: var(--blue-700); }
.event__body .tag { background: rgba(255,255,255,.14); color: var(--blue-300); }
.event__body h4 { color: #fff; font-size: 22px; font-weight: 600; margin: 8px 0 6px; }
.event__body span { font-size: 14px; color: rgba(255,255,255,.7); }
.event:hover h4 { color: var(--blue-300); }
.cal-card .arrow-link { color: var(--blue-300); margin-top: 8px; }
.cal-card__note { font-size: 14px; color: rgba(255,255,255,.65); margin: 18px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.cal-card__note a { color: #fff; }
@media (max-width: 960px) { .cal-card { position: static; } }

/* Hele variant külgpaanis */
.event--light { color: var(--ink); padding-top: 0; border-top: 0; }
.event--light .event__date { background: var(--blue-900); color: #fff; }
.event--light .event__date small { color: var(--blue-300); }
.event--light .event__body .tag { background: var(--blue-100); color: var(--blue-900); }
.event--light .event__body h4 { color: var(--ink); }
.event--light .event__body span { color: var(--muted); }
.event--light:hover h4 { color: var(--blue-700); }
.arrow-link--sm { font-size: 16px; }

/* Missioon ---------------------------------------------------------------- */
.mission { position: relative; overflow: hidden; color: #fff; background: linear-gradient(120deg, var(--blue-900) 0%, var(--blue-700) 60%, var(--blue-500) 100%); }
.mission::before {
  content: "ESL"; position: absolute; right: -2%; bottom: -18%; z-index: 0;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(200px, 30vw, 420px); line-height: 1; color: rgba(255,255,255,.06); letter-spacing: -.02em;
}
.mission .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.mission .eyebrow, .mission h2 { color: #fff; }
.mission .eyebrow::before { background: var(--blue-300); }
.mission h2 { margin-top: 8px; }
.mission p { font-size: 19px; color: rgba(255,255,255,.88); max-width: 60ch; }
.mission__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mission__links a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255,255,255,.1); color: #fff; text-decoration: none; padding: 16px 20px; border-radius: 4px;
  font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: .04em; text-transform: uppercase;
  transition: background .2s;
}
.mission__links a:hover { background: rgba(255,255,255,.2); }
.mission__links a svg { width: 20px; height: 20px; flex: none; }
@media (max-width: 860px) { .mission .wrap { grid-template-columns: 1fr; } }

/* Partnerid ---------------------------------------------------------------- */
.partners .eyebrow { justify-content: center; width: 100%; }
.partners .eyebrow::before { display: none; }
.partners__row { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(24px, 5vw, 72px); align-items: center; margin-top: 28px; }
.partners__row img { height: 64px; width: auto; filter: grayscale(1) contrast(.9); opacity: .7; transition: filter .25s, opacity .25s; }
.partners__row a:hover img { filter: none; opacity: 1; }

/* Jalus -------------------------------------------------------------------- */
.site-footer { background: var(--blue-900); color: rgba(255,255,255,.82); font-size: 15.5px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--blue-300); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(28px, 4vw, 56px); padding-block: clamp(48px, 6vw, 72px) 40px; }
.footer__grid h4, .footer__grid .widget-title { color: var(--blue-300); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin-bottom: 16px; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer__grid ul a { text-decoration: none; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { height: 72px; width: auto; }
.footer__brand strong { font-family: var(--font-display); font-size: 22px; line-height: 1.05; color: #fff; text-transform: uppercase; letter-spacing: .02em; display: block; }
.footer__brand span { font-size: 13px; color: rgba(255,255,255,.65); }
.footer__contact { display: grid; gap: 8px; font-size: 15.5px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 18px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: rgba(255,255,255,.55); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* Lehe päis (alalehed) ---------------------------------------------------- */
.page-head {
  background: var(--blue-900) linear-gradient(110deg, var(--blue-900), var(--blue-700) 85%);
  color: #fff; padding-block: clamp(36px, 5vw, 64px);
  position: relative; overflow: hidden;
}
.page-head::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(82,199,250,.35), rgba(82,199,250,0) 70%);
}
.page-head .wrap { position: relative; z-index: 1; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0 0 12px; padding: 0; font-size: 14px; color: rgba(255,255,255,.7); }
.crumbs a { color: rgba(255,255,255,.85); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.page-head h1 { color: #fff; }
.page-head .lead { font-size: 18px; color: rgba(255,255,255,.82); max-width: 62ch; margin: 12px 0 0; }

/* Sisu + külgpaan ----------------------------------------------------------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 80px); align-items: start; }
.layout--narrow { grid-template-columns: minmax(0, 760px); justify-content: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

.layout > *, .post-card > * { min-width: 0; }
.sidebar { display: grid; gap: 28px; }
.widget { border-top: 3px solid var(--blue-700); padding-top: 18px; }
.widget h3, .widget .widget-title { font-size: 22px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget--recent li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.widget--recent a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15.5px; line-height: 1.4; display: block; }
.widget--recent a:hover { color: var(--blue-700); }
.widget--recent time { font-size: 13px; color: var(--muted); display: block; margin-top: 3px; }

form.search { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
form.search input { flex: 1; border: 0; padding: 12px 14px; font: inherit; font-size: 15.5px; min-width: 0; background: transparent; color: var(--ink); }
form.search button { border: 0; background: var(--blue-700); color: #fff; padding: 0 14px; cursor: pointer; display: grid; place-items: center; }
form.search button svg { width: 18px; height: 18px; }
form.search:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-100); }

.archive-years details { border-bottom: 1px solid var(--line); }
.archive-years summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 2px; font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--blue-900);
}
.archive-years summary::-webkit-details-marker { display: none; }
.archive-years summary small { font-family: var(--font-body); font-size: 13px; color: var(--muted); font-weight: 400; }
.archive-years summary::after { content: "+"; font-size: 22px; color: var(--blue-500); margin-left: 12px; }
.archive-years details[open] summary::after { content: "–"; }
.archive-years .months { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 14px; }
.archive-years .months a {
  font-size: 13.5px; text-decoration: none; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); border-radius: 3px; padding: 4px 9px;
}
.archive-years .months a:hover { background: var(--blue-100); color: var(--blue-900); border-color: var(--blue-100); }

/* Arhiivi loend ------------------------------------------------------------- */
.post-list { display: grid; gap: 2px; }
.post-card {
  display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 28px; align-items: start;
  padding: 30px 0; border-bottom: 1px solid var(--line);
}
.post-card .thumb { width: 140px; aspect-ratio: 1; }
.post-card h2 { overflow-wrap: anywhere; font-size: clamp(26px, 2.6vw, 34px); margin: 8px 0 10px; }
.post-card h2 a { color: inherit; text-decoration: none; }
.post-card h2 a:hover { color: var(--blue-700); }
.post-card p { overflow-wrap: anywhere; color: var(--ink-2); margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .arrow-link { font-size: 16px; }
@media (max-width: 640px) { .post-card { grid-template-columns: 1fr; gap: 16px; } .post-card .thumb { width: 120px; } }

.results { font-size: 14.5px; color: var(--muted); margin-bottom: 8px; }
.results b { color: var(--ink); }

.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 36px; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums;
}
.pagination a:hover { border-color: var(--blue-700); color: var(--blue-700); }
.pagination [aria-current="page"] { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.pagination .gap { border: 0; min-width: 24px; color: var(--muted); }
.pagination .pg-nav { text-transform: uppercase; letter-spacing: .04em; gap: 6px; }
.pagination .pg-nav svg { width: 16px; height: 16px; }

/* Üksik postitus ------------------------------------------------------------ */
.post-head { padding-block: clamp(40px, 6vw, 72px) 0; }
.post-head .crumbs { color: var(--muted); }
.post-head .crumbs a { color: var(--blue-700); }
.post-head h1 { font-size: clamp(36px, 4.6vw, 58px); max-width: 22ch; margin: 10px 0 18px; }
.post-head .meta { font-size: 15px; }
.post-figure { display: flex; align-items: center; gap: 22px; margin: 32px 0 8px; padding: 18px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); }
.post-figure .thumb { width: 110px; height: 110px; background: #fff; }
.post-figure figcaption { font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.post-figure figcaption b { display: block; color: var(--ink); font-size: 15.5px; }

.entry { overflow-wrap: anywhere; font-size: 18px; line-height: 1.7; max-width: 70ch; }
.entry p { margin-bottom: 1.25em; }
.entry a { word-break: break-word; }
.entry .links { margin-top: 30px; padding: 20px 22px; border-left: 4px solid var(--blue-500); background: var(--blue-50); border-radius: 0 var(--radius) var(--radius) 0; }
.entry .links h4 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-700); margin-bottom: 10px; }
.entry .links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 16px; }
.entry .links li { display: flex; gap: 10px; align-items: baseline; }
.entry .links li span { color: var(--muted); flex: none; min-width: 92px; font-size: 14px; }

.share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.share span { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.share a, .share button {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: var(--paper); cursor: pointer; font-family: inherit;
}
.share a:hover, .share button:hover { border-color: var(--blue-700); color: var(--blue-700); }
.share svg { width: 16px; height: 16px; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-top: 40px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.post-nav a { background: var(--paper-2); padding: 22px 24px; text-decoration: none; color: var(--ink); display: grid; gap: 6px; transition: background .2s; }
.post-nav a:hover { background: var(--blue-50); }
.post-nav a.next { text-align: right; }
.post-nav small { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-700); }
.post-nav strong { font-size: 17px; font-weight: 600; line-height: 1.35; }
.post-nav a.is-empty { opacity: .5; pointer-events: none; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .post-nav a.next { text-align: left; } }

/* Tavaleht (kontakt) ---------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.info-list { list-style: none; margin: 0; padding: 0; display: grid; }
.info-list li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.info-list li:first-child { padding-top: 0; }
.info-list svg { width: 44px; height: 44px; color: var(--blue-700); background: var(--blue-50); border-radius: 8px; padding: 10px; }
.info-list small { display: block; font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.info-list strong, .info-list a.big { font-size: 20px; font-weight: 600; color: var(--ink); text-decoration: none; display: inline-block; line-height: 1.35; }
.info-list a.big:hover { color: var(--blue-700); }
.info-list .sub { font-size: 15px; color: var(--muted); display: block; margin-top: 2px; }
.info-list code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 16.5px; background: var(--paper-2); padding: 3px 8px; border-radius: 4px; font-variant-numeric: tabular-nums; }

.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card--blue { background: var(--blue-900); color: #fff; border: 0; }
.card--blue h3 { color: #fff; }
.card--blue p { color: rgba(255,255,255,.82); }
.card h3 { margin-bottom: 10px; }
.card .btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.card--blue .btn--primary { background: #fff; color: var(--blue-900); }
.card--blue .btn--primary:hover { background: var(--blue-300); color: var(--blue-900); }


.sub-pages { margin-top: 48px; }
.sub-pages ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.sub-pages a { display: block; background: var(--paper); padding: 16px 18px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15.5px; }
.sub-pages a:hover { background: var(--blue-50); color: var(--blue-700); }

/* Utils ------------------------------------------------------------------------ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* ==========================================================================
   WordPress-spetsiifiline (lisatakse teema style.css lõppu)
   ========================================================================== */

/* Menu Image plugina spanid */
.nav .menu-image-title { display: inline; }
.nav .menu-image { display: none; }

/* Kiirlingid ilma hero'ta (kui ACF slaidid puuduvad) */
.quick--flat { margin-top: 40px; }

/* Kalendrikaart: tühi / vidina-varuvariant */
.cal-card__empty { color: rgba(255,255,255,.7); margin: 16px 0; }
.cal-card .widget { border: 0; padding: 0; }
.cal-card .widget-title { display: none; }
.cal-card .tribe-list-widget { list-style: none; margin: 0; padding: 0; }
.cal-card .tribe-list-widget li { padding: 16px 0; border-top: 1px solid rgba(255,255,255,.14); }
.cal-card .tribe-list-widget a { color: #fff; text-decoration: none; font-weight: 600; }
.cal-card .tribe-event-duration { font-size: 14px; color: rgba(255,255,255,.7); }
.cal-card .tribe-events-widget-link { display: none; }

/* Külgpaani vidinad */
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.widget li a { text-decoration: none; color: var(--ink); font-weight: 600; }
.widget li a:hover { color: var(--blue-700); }
.widget .post-date { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.widget--recent li { padding: 12px 0; }
.archive-years summary span { font-family: var(--font-display); }
.page-nav li a { display: block; }

/* Pagineerimine (the_posts_pagination) */
.pagination .nav-links { width: 100%; height: auto; min-width: 0; padding: 0; border: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers {
  min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums;
}
.pagination a.page-numbers:hover { border-color: var(--blue-700); color: var(--blue-700); }
.pagination .page-numbers.current { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.pagination .page-numbers.dots { border: 0; min-width: 24px; color: var(--muted); }
.pagination .prev, .pagination .next { text-transform: uppercase; letter-spacing: .04em; gap: 6px; }
.pagination .prev svg, .pagination .next svg { width: 16px; height: 16px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Sisu (uudis + leht) – klassikalise redaktori HTML */
.entry h2, .entry h3, .entry h4 { margin: 1.4em 0 .5em; }
.entry h2 { font-size: clamp(26px, 2.8vw, 34px); }
.entry h3 { font-size: clamp(22px, 2.2vw, 28px); }
.entry ul, .entry ol { padding-left: 1.3em; margin: 0 0 1.25em; }
.entry li { margin-bottom: .35em; }
.entry img { border-radius: 4px; height: auto; }
.entry figure, .entry .wp-caption { max-width: 100%; margin: 1.5em 0; }
.entry .wp-caption-text, .entry figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.entry .alignleft { float: left; margin: .4em 1.5em 1em 0; }
.entry .alignright { float: right; margin: .4em 0 1em 1.5em; }
.entry .aligncenter { display: block; margin: 1.5em auto; }
.entry .alignnone { margin: 0 0 1em; }
.entry blockquote { margin: 1.5em 0; padding: 16px 22px; border-left: 4px solid var(--blue-500); background: var(--blue-50); border-radius: 0 var(--radius) var(--radius) 0; }
.entry blockquote p:last-child { margin-bottom: 0; }
.entry table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15.5px; display: block; overflow-x: auto; }
.entry th, .entry td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.entry th { font-family: var(--font-display); font-size: 17px; letter-spacing: .03em; text-transform: uppercase; color: var(--blue-900); background: var(--paper-2); }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.entry iframe, .entry embed, .entry video { max-width: 100%; }
.entry .page-links { margin-top: 24px; font-weight: 600; }
.entry--page { font-size: 17.5px; }
.section--post { padding-top: 32px; }

/* Kontakt-mall: lehe sisu suures kirjas */
.entry--contact { font-size: 19px; line-height: 1.9; }
.entry--contact p { padding: 20px 24px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); }
.entry--contact a { font-weight: 600; text-decoration: none; }
.entry--contact a:hover { text-decoration: underline; }
.map-card {
  display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: center;
  margin-top: 20px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink);
  transition: border-color .2s, background .2s;
}
.map-card:hover { border-color: var(--blue-700); background: var(--blue-50); }
.map-card > svg { width: 44px; height: 44px; color: var(--blue-700); background: var(--blue-50); border-radius: 8px; padding: 10px; }
.map-card small { display: block; font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.map-card strong { display: block; font-size: 19px; font-weight: 600; }
.map-card span { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; color: var(--blue-700); margin-top: 4px; }
.map-card span svg { width: 16px; height: 16px; }
.sub-pages .eyebrow { margin-bottom: 14px; }

/* Otsingutulemustes lehed */
.thumb--page { display: grid; place-items: center; color: var(--blue-500); }
.thumb--page svg { width: 48px; height: 48px; }
.thumb__fallback { opacity: .5; }

/* Tulemusi pole / 404 */
.search-tools { max-width: 480px; margin-bottom: 32px; }
.no-results { display: grid; gap: 18px; justify-items: start; max-width: 60ch; }
.no-results form.search { width: 100%; max-width: 480px; }
.no-results .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Jalus – vidinaveerud */
.footer__col p { margin-bottom: 0; }
.footer__col .textwidget br { display: none; }
.footer__col .textwidget a { display: block; text-decoration: none; margin-bottom: 8px; }
.footer__col .textwidget ul { display: grid; gap: 9px; }
.footer__col .textwidget ul a { margin: 0; }

/* The Events Calendar – kalendrilehed kasutavad plugina malle, anna neile raam */
.site-main > #tribe-events-pg-template,
.site-main > .tribe-events-pg-template,
.site-main > #tribe-events { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 40px auto 64px; }
#tribe-events .tribe-events-title-bar h2, .tribe-events-page-title { font-family: var(--font-display); color: var(--blue-900); }
#tribe-events a.tribe-events-button, .tribe-events-button { background: var(--blue-700) !important; border-radius: var(--radius); font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; }
.tribe-events-list .type-tribe_events h2 a { font-family: var(--font-display); color: var(--blue-900); text-decoration: none; }

/* Admin-riba korral sticky päis allapoole */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } .admin-bar .nav { inset-block-start: 130px; } }
