/*
Theme Name: TPO Fondacija
Theme URI: https://tpo.ba
Author: nBTA d.o.o.
Description: Responzivna uredničko-magazinska tema za TPO Fondaciju (Transkulturna psihosocijalna obrazovna fondacija). Dvojezična (BHS/EN) uz Polylang.
Version: 0.2.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: tpo
*/

:root {
	--ink: #16153b;
	--text: #2b2b3d;
	--muted: #686880;
	--brand: #3b34a1;
	--brand-dark: #25206e;
	--lav: #ebe9f8;
	--lav-2: #f6f5fc;
	--accent: #c51015;
	--line: #e4e2f1;
	--paper: #fff;
	--max: 1200px;
	--read: 760px;
	--radius: 6px;
	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.7;
	color: var(--text);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover, a:focus { color: var(--accent); }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.25; font-weight: 700; }

.screen-reader-text {
	position: absolute !important; clip: rect(1px, 1px, 1px, 1px);
	width: 1px; height: 1px; overflow: hidden; white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; background: #fff; padding: 8px 14px;
	z-index: 100; left: 8px; top: 8px; border-radius: var(--radius);
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------ top bar */
.topbar { background: var(--ink); color: #d8d6f0; font-size: .8rem; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #ffd0d2; }
.lang-switch { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; font-weight: 600; letter-spacing: .04em; }
.lang-switch li + li::before { content: "|"; opacity: .5; margin: 0 10px; }
.lang-switch [aria-current="true"] { opacity: .7; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar .social-mini { display: flex; gap: 14px; }
.topbar .search-form { display: flex; }
.topbar .search-form input[type="search"] {
	width: 150px; background: rgba(255, 255, 255, .1); border: 0; border-radius: 12px 0 0 12px;
	color: #fff; padding: 4px 12px; font: inherit; font-size: .8rem;
}
.topbar .search-form input[type="search"]::placeholder { color: #bdbbe0; }
.topbar .search-form input[type="search"]:focus { outline: 2px solid #fff; background: rgba(255, 255, 255, .18); }
.topbar .search-form button {
	border: 0; background: rgba(255, 255, 255, .18); color: #fff; border-radius: 0 12px 12px 0;
	padding: 4px 12px; font: inherit; font-size: .8rem; cursor: pointer;
}

/* ------------------------------------------------------------ header + nav */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 30; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; }
.brand img { display: block; width: 300px; height: auto; }

.nav-toggle {
	display: none; padding: 9px 18px; border: 1px solid var(--line); background: #fff; border-radius: 12px;
	font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
}
.nav-menu-wrap { display: block; }
.main-menu, .main-menu ul { list-style: none; margin: 0; padding: 0; }
.main-menu { display: flex; align-items: center; gap: 4px; }
.main-menu > li { position: relative; }
.main-menu a {
	display: block; padding: 10px 14px; color: var(--ink); font-weight: 600; font-size: .95rem;
	text-decoration: none; border-bottom: 2px solid transparent;
}
.main-menu > li:hover > a, .main-menu > li:focus-within > a, .main-menu .current-menu-item > a, .main-menu .current-menu-ancestor > a {
	color: var(--brand); border-bottom-color: var(--accent);
}
.main-menu .menu-item-has-children > a::after { content: " \25BE"; font-size: .7em; opacity: .7; }
.main-menu .sub-menu {
	display: none; position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff;
	border: 1px solid var(--line); border-top: 2px solid var(--accent);
	box-shadow: 0 14px 28px rgba(22, 21, 59, .14); padding: 6px 0; z-index: 40;
}
.main-menu li:hover > .sub-menu, .main-menu li:focus-within > .sub-menu { display: block; }
.main-menu .sub-menu a { padding: 9px 18px; font-weight: 500; border: 0; font-size: .9rem; }
.main-menu .sub-menu a:hover { background: var(--lav-2); color: var(--accent); }

/* ------------------------------------------------------------ section heads */
.section-title {
	font-size: 1.5rem; margin: 0 0 22px; padding-bottom: 10px; border-bottom: 1px solid var(--line); position: relative;
}
.section-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 3px; background: var(--accent); }
.meta { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------------ hero (home) */
.hero-band { background: linear-gradient(180deg, #eef0f5 0%, #f5f6f9 100%); border-bottom: 1px solid var(--line); padding: 34px 0 40px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 28px; padding: 0 24px; align-items: stretch; }
.hero-main { position: relative; display: block; border-radius: 16px; overflow: hidden; background: var(--ink); color: #fff; text-decoration: none; box-shadow: 0 18px 40px rgba(22, 21, 59, .18); }
.hero-main img { display: block; width: 100%; height: 100%; min-height: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s ease; }
.hero-main:hover img { transform: scale(1.03); }
.hero-main .hero-text {
	position: absolute; inset: auto 0 0 0; padding: 90px 32px 30px;
	background: linear-gradient(180deg, rgba(22, 21, 59, 0) 0, rgba(22, 21, 59, .9) 75%);
}
.hero-main .meta { display: inline-block; padding: 4px 10px; background: var(--accent); color: #fff; border-radius: 6px; font-size: .72rem; }
.hero-main h2 { color: #fff; font-size: 2.1rem; margin: 12px 0 0; line-height: 1.18; text-wrap: balance; }
.hero-side { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px 8px; box-shadow: 0 10px 30px rgba(22, 21, 59, .07); display: flex; flex-direction: column; }
.hero-side h2.side-title { display: flex; align-items: center; gap: 10px; font-size: .85rem; text-transform: uppercase; letter-spacing: .14em; font-family: var(--sans); color: var(--ink); margin: 0 0 6px; }
.hero-side .side-title .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(197, 16, 21, .15); }
.side-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); flex: 1; align-items: start; }
.side-item:first-of-type { border-top: 0; }
.side-num { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; line-height: 1; color: var(--brand); opacity: .35; }
.side-item h3 { font-size: 1.15rem; margin: 4px 0 0; line-height: 1.3; }
.side-item h3 a { color: var(--ink); text-decoration: none; }
.side-item h3 a:hover { color: var(--accent); }
.side-item:hover .side-num { opacity: 1; }


/* ------------------------------------------------------------ project tiles (home) */
.projects { padding: 28px 0 6px; }
.project-tile {
	display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; text-decoration: none; color: var(--text); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.project-tile:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(22, 21, 59, .14); border-color: var(--brand); color: var(--text); }
.pt-media { display: flex; align-items: center; justify-content: center; height: 150px; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); overflow: hidden; }
.pt-media.is-logo { background: var(--lav-2); padding: 22px; }
.pt-media.is-logo img { height: 100%; width: auto; max-width: 92%; object-fit: contain; }
.pt-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pt-media img.cover { width: 100%; height: 100%; object-fit: cover; max-height: none; transition: transform .5s ease; }
.project-tile:hover .pt-media img.cover { transform: scale(1.05); }
.pt-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.pt-body strong { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); line-height: 1.25; }
.pt-desc { font-size: .9rem; line-height: 1.5; color: var(--muted); }
.pt-count { margin-top: auto; padding-top: 8px; font-size: .8rem; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.project-tile:hover .pt-count { color: var(--accent); }


/* ------------------------------------------------------------ home blocks */
.home-block { padding-top: 30px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.section-head .section-title { border: 0; margin: 0; }
.see-all { font-weight: 600; font-size: .9rem; text-decoration: none; padding-bottom: 10px; }
.see-all:hover { text-decoration: underline; }

.news-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.news-mini { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.nm-thumb { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--lav); margin-bottom: 4px; }
.nm-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-mini:hover .nm-thumb img { transform: scale(1.05); }
.news-mini strong { font-family: var(--serif); font-size: 1.08rem; line-height: 1.3; }
.news-mini:hover strong { color: var(--accent); }

.carousel-nav { display: flex; gap: 8px; padding-bottom: 8px; }
.cn-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.cn-btn:hover:not(:disabled) { background: var(--brand); border-color: var(--brand); color: #fff; }
.cn-btn:disabled { opacity: .35; cursor: default; }
.carousel-track { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 18px; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track .project-tile { flex: 0 0 calc((100% - 44px) / 3); scroll-snap-align: start; }
@media (max-width: 1000px) { .carousel-track .project-tile { flex-basis: calc((100% - 22px) / 2); } .news-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .carousel-track .project-tile { flex-basis: 84%; } .pt-media { height: 120px; } .news-strip { grid-template-columns: minmax(0, 1fr); } }

.archive-btn-wrap { text-align: center; margin: 30px 0 0; }
.btn-primary { display: inline-block; padding: 11px 26px; background: var(--brand); color: #fff; border-radius: 12px; font-weight: 600; text-decoration: none; transition: background .2s; }
.btn-primary:hover { background: var(--accent); color: #fff; }

.about-band { background: var(--lav-2); border-top: 1px solid var(--line); margin-top: 40px; padding: 64px 0; }
.about-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 56px; align-items: center; }
.contact-band { background: #fff; border-top: 1px solid var(--line); }
.contact-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.contact-info { padding: 56px 40px 56px max(24px, calc((100vw - var(--max)) / 2 + 24px)); align-self: center; }
.contact-map { min-height: 460px; }
.contact-map iframe { display: block; width: 100%; height: 100%; min-height: 460px; border: 0; }
.about-logo img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.about-text h2, .contact-info h2 { margin: 0 0 12px; font-size: 1.8rem; }
.about-text .lead { font-family: var(--serif); font-size: 1.25rem; color: var(--brand-dark); font-weight: 600; line-height: 1.45; margin: 0 0 14px; }
@media (max-width: 860px) { .about-card, .contact-card { grid-template-columns: minmax(0, 1fr); } .about-band { padding: 40px 0; } .about-card { gap: 22px; } .contact-info { padding: 32px 24px; } .contact-map, .contact-map iframe { min-height: 340px; } }

/* ------------------------------------------------------------ main grid */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; padding: 34px 0 60px; align-items: start; }
.layout.narrow { grid-template-columns: minmax(0, var(--read)); justify-content: center; }

/* ------------------------------------------------------------ news rows */
.post-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.post-row:first-of-type { border-top: 0; padding-top: 4px; }
.post-row.no-thumb { grid-template-columns: minmax(0, 1fr); }
.post-row .thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.post-row h2, .post-row h3 { font-size: 1.4rem; margin: 4px 0 8px; }
.post-row h2 a, .post-row h3 a { color: var(--ink); text-decoration: none; }
.post-row h2 a:hover, .post-row h3 a:hover { color: var(--accent); }
.post-row .excerpt { color: var(--text); font-size: .98rem; }
.post-row .excerpt p { margin: 0; }
.post-row .more { margin-top: 8px; font-weight: 600; font-size: .9rem; }
.post-row .more a { text-decoration: none; }
.post-row .more a:hover { text-decoration: underline; }

.pagination { margin: 30px 0 0; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.page-numbers {
	display: inline-block; min-width: 40px; padding: 7px 12px; text-align: center; border: 1px solid var(--line);
	border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem;
}
.page-numbers.current { background: var(--brand); border-color: var(--brand); color: #fff; }
a.page-numbers:hover { background: var(--lav); }

.archive-title { margin: 0 0 22px; font-size: 1.6rem; padding-bottom: 10px; border-bottom: 1px solid var(--line); }

/* ------------------------------------------------------------ sidebar */
.sidebar { display: grid; gap: 34px; align-content: start; }
.sb-projects { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sb-proj { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: border-color .2s, transform .2s; }
.sb-proj:hover { border-color: var(--brand); transform: translateY(-2px); color: var(--accent); }
.sb-proj-media { display: flex; align-items: center; justify-content: center; height: 84px; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); overflow: hidden; }
.sb-proj-media.is-logo { background: var(--lav-2); padding: 10px; }
.sb-proj-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sb-proj-media.is-logo img { object-fit: contain; }
.sb-proj-title { display: block; padding: 9px 10px; font-weight: 600; font-size: .86rem; line-height: 1.3; }
.sb-pubs { display: grid; gap: 14px; }
.sb-pub { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; line-height: 1.35; }
.sb-pub img { width: 64px; height: auto; min-height: 48px; object-fit: contain; align-self: start; border-radius: 3px; box-shadow: 0 4px 12px rgba(22, 21, 59, .2); background: var(--lav); }
.sb-pub:hover { color: var(--accent); }
.sb-more { margin: 14px 0 0; font-weight: 600; font-size: .92rem; }
.widget .widget-title {
	font-size: 1.3rem; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); position: relative;
}
.widget .widget-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 40px; height: 3px; background: var(--accent); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { border-bottom: 1px solid var(--line); }
.widget li a { display: block; padding: 10px 2px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.widget li a:hover { color: var(--accent); padding-left: 6px; }
.year-list { display: flex; flex-wrap: wrap; gap: 8px; }
.year-list li { border: 0; }
.year-list li a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: .88rem; }
.year-list li a:hover { padding-left: 14px; background: var(--lav); }
.promo-slider {
	position: relative; aspect-ratio: 600 / 135; border-radius: var(--radius); overflow: hidden;
	background: var(--lav); box-shadow: 0 0 0 1px var(--line);
}
.promo-slider img {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease;
}
.promo-slider img.is-active { opacity: 1; }

/* ------------------------------------------------------------ single / page */
.entry-header { text-align: left; margin-bottom: 22px; }
.entry-title { font-size: 2.3rem; margin: 0 0 12px; letter-spacing: -.01em; }
.entry-meta { color: var(--muted); font-size: .85rem; }
.entry-meta a { color: var(--muted); }
.entry-thumb { margin: 0 0 26px; }
.entry-thumb img { display: block; width: 100%; border-radius: var(--radius); }
.entry-content { font-size: 1.06rem; overflow-wrap: anywhere; }
.entry-content > * { max-width: 100%; }
.entry-content p { margin: 0 0 1.15em; }
.entry-content h2 { font-size: 1.6rem; margin: 1.6em 0 .6em; }
.entry-content h3 { font-size: 1.3rem; margin: 1.4em 0 .5em; }
.entry-content img { height: auto; border-radius: var(--radius); }
.entry-content iframe, .entry-content video { max-width: 100%; }
.entry-content iframe[src*="youtube"], .entry-content iframe[src*="vimeo"], .entry-content .wp-block-embed iframe {
	width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: var(--radius);
}
.entry-content table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.entry-content td, .entry-content th { border: 1px solid var(--line); padding: 8px 12px; }
.entry-content blockquote { margin: 1.6em 0; padding: .3em 0 .3em 1.3em; border-left: 4px solid var(--accent); font-family: var(--serif); font-style: italic; font-size: 1.15em; }
.entry-content iframe[src*="google.com/maps"] { width: 100%; height: 420px; border: 0; border-radius: var(--radius); }
.entry-content .lead { font-family: var(--serif); font-size: 1.3rem; line-height: 1.5; color: var(--brand-dark); font-weight: 600; margin: 0 0 1em; }
.entry-content a[href$=".pdf"]::before { content: "PDF"; display: inline-block; margin-right: 8px; padding: 0 6px; font: 700 .65rem/1.6 var(--sans); color: #fff; background: var(--accent); border-radius: 3px; vertical-align: 2px; }
.entry-content a:has(> img)::before { content: none; }
.alignleft { float: left; margin: .3em 1.3em .8em 0; }
.alignright { float: right; margin: .3em 0 .8em 1.3em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .92rem; }
.post-nav .next { text-align: right; }
.related { margin-top: 56px; }


/* ------------------------------------------------------------ publications list */
.pub-list { display: grid; gap: 18px; margin-top: 8px; }
.pub { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 26px; align-items: start; padding: 22px 26px; background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.pub:hover { border-color: var(--brand); box-shadow: 0 10px 26px rgba(22, 21, 59, .08); }
.pub-cover { display: flex; align-items: center; justify-content: center; height: 240px; padding: 14px; background: var(--lav-2); border-radius: 8px; }
.pub-cover img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 3px; box-shadow: 0 6px 18px rgba(22, 21, 59, .22); background: var(--lav); }
.pub-cover a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; transition: transform .25s ease; }
.pub-cover a:hover { transform: translateY(-3px); }
.entry-content .pub h3 { font-size: 1.3rem; margin: 0 0 8px; line-height: 1.3; }
.pub-excerpt { margin: 0 0 10px; font-size: .96rem; color: var(--text); }
.pub-more { margin: 0 0 12px; font-size: .92rem; }
.pub-more summary { cursor: pointer; color: var(--brand); font-weight: 600; list-style: none; }
.pub-more summary::-webkit-details-marker { display: none; }
.pub-more summary::after { content: " \25BE"; }
.pub-more[open] summary::after { content: " \25B4"; }
.pub-more > :not(summary) { margin-top: 10px; }
.pub-extra { font-size: .92rem; margin-bottom: 10px; }
.pub-actions { margin: 0; }
.entry-content a.btn-pdf { display: inline-block; padding: 6px 16px; background: var(--brand); color: #fff; border-radius: 12px; font-weight: 600; font-size: .85rem; text-decoration: none; }
.entry-content a.btn-pdf::before { content: none; }
.entry-content a.btn-pdf:hover { background: var(--accent); color: #fff; }
.entry-content .pub a[href$=".pdf"]::before { content: none; }
@media (max-width: 640px) { .pub { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; } .entry-content .pub h3 { font-size: 1.1rem; } }

/* ------------------------------------------------------------ search form */
.search-form { display: flex; gap: 0; }
.search-form input[type="search"] { flex: 1; min-width: 0; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius) 0 0 var(--radius); font: inherit; }
.search-form button { padding: 9px 16px; border: 0; background: var(--brand); color: #fff; border-radius: 0 var(--radius) var(--radius) 0; font: inherit; font-weight: 600; cursor: pointer; }

/* ------------------------------------------------------------ footer */
.site-footer { background: var(--ink); color: #c9c7e6; font-size: .92rem; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 48px 0 36px; }
.site-footer h2 { color: #fff; font-size: 1.1rem; margin: 0 0 12px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #ffd0d2; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .14); padding: 16px 0 22px; font-size: .8rem; color: #9d9bc8; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1000px) {
	.hero { grid-template-columns: minmax(0, 1fr); }
	.layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.sidebar { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
	.nav-toggle { display: inline-block; }
	.header-row { flex-wrap: wrap; }
	.nav-menu-wrap { display: none; width: 100%; }
	.nav-menu-wrap.is-open { display: block; }
	.main-menu { flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); }
	.main-menu a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
	.main-menu .sub-menu { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 14px; }
	.main-menu .sub-menu a { font-size: .88rem; }
	.main-menu .menu-item-has-children > a::after { content: ""; }
	.brand img { width: 240px; }
}
@media (max-width: 640px) {
	body { font-size: 16px; }
	.wrap { padding: 0 18px; }
	.topbar .search-form input[type="search"] { width: 90px; }
	.topbar .social-mini { display: none; }
	.hero-main h2 { font-size: 1.45rem; } .hero-band { padding: 22px 0 28px; } .hero { padding: 0 18px; gap: 18px; }
	.hero-main .hero-text { padding: 50px 18px 18px; }
	.post-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.entry-title { font-size: 1.75rem; }
	.footer-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
	.post-nav { grid-template-columns: minmax(0, 1fr); }
	.post-nav .next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
	.promo-slider img, .hero-main img { transition: none; }
	html { scroll-behavior: auto; }
}

/* Static pages: lead image sits left of its text instead of on a line of its own */
.entry-content p > img:first-child:not([width="1"]) { float: left; max-width: 200px; height: auto; margin: 4px 22px 12px 0; border-radius: 4px; }
.entry-content p:has(> img:first-child) { overflow: hidden; }
@media (max-width: 560px) { .entry-content p > img:first-child { float: none; display: block; margin: 0 0 12px; } }

/* Donors list (static page): logo box + text, separated cards */
.org-list { display: grid; gap: 18px; margin-top: 8px; }
.org { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 26px; align-items: center; padding: 22px 26px; background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.org:hover { border-color: var(--brand); box-shadow: 0 10px 26px rgba(22, 21, 59, .08); }
.org-logo { display: flex; align-items: center; justify-content: center; height: 110px; padding: 10px; background: var(--lav-2); border-radius: 8px; }
.entry-content .org-logo img { float: none; margin: 0; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 0; }
.org-body h3 { margin: 0 0 8px; font-size: 1.25rem; line-height: 1.25; }
.org-body p { margin: 0 0 8px; font-size: .96rem; }
.org-body .org-link { margin: 0; font-weight: 600; font-size: .9rem; }
@media (max-width: 700px) { .pub { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px; } .pub-cover { height: 220px; } .org { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px; } .org-logo { height: 96px; } }

.sb-archive-btn { margin: 16px 0 0; }
.sb-archive-btn .btn-primary { display: block; text-align: center; padding: 11px 16px; font-size: .92rem; }

/* About page */
.about-page .about-intro { max-width: 760px; }
.about-lead { font-family: var(--serif); font-size: 1.5rem; line-height: 1.4; font-weight: 600; color: var(--brand-dark); margin: 0 0 20px; }
.about-callout { margin: 26px 0; padding: 22px 26px; background: var(--lav-2); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; font-family: var(--serif); font-size: 1.18rem; line-height: 1.5; font-weight: 600; color: var(--ink); }
.about-h2 { margin: 48px 0 8px; padding-top: 34px; border-top: 1px solid var(--line); font-size: 1.7rem; line-height: 1.25; color: var(--brand-dark); }
.about-sub { margin: 0 0 22px; color: var(--muted, #5b5a7a); font-size: 1rem; }
.area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.area { padding: 20px 22px 22px; background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.area:hover { border-color: var(--brand); box-shadow: 0 10px 26px rgba(22, 21, 59, .08); }
.area-icon { display: flex; align-items: center; justify-content: center; height: 130px; margin-bottom: 16px; padding: 10px; background: var(--lav-2); border-radius: 8px; }
.entry-content .area-icon img { float: none; margin: 0; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 0; mix-blend-mode: multiply; }
.area h3 { margin: 0 0 8px; font-size: 1.25rem; line-height: 1.25; }
.area p { margin: 0; font-size: .95rem; line-height: 1.6; }
@media (max-width: 760px) { .area-grid { grid-template-columns: minmax(0, 1fr); } .about-lead { font-size: 1.25rem; } }

/* Activities page */
.act-list { display: grid; gap: 16px; margin-top: 8px; }
.act { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 24px; align-items: start; padding: 22px 26px; background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.act:hover { border-color: var(--brand); box-shadow: 0 10px 26px rgba(22, 21, 59, .08); }
.act-year { justify-self: start; padding: 6px 12px; background: var(--lav); color: var(--brand-dark); border-radius: 8px; font-weight: 700; font-size: .9rem; letter-spacing: .02em; white-space: nowrap; }
.act-body h3 { margin: 0 0 8px; font-size: 1.2rem; line-height: 1.3; }
.act-body p { margin: 0 0 8px; font-size: .96rem; line-height: 1.6; }
.act-body .act-link { margin: 0; font-size: .9rem; font-weight: 600; word-break: break-all; }
@media (max-width: 700px) { .act { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px; } }

/* Partners + documents pages */
.list-h2 { margin: 36px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 1.35rem; color: var(--brand-dark); position: relative; }
.list-h2::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 40px; height: 3px; background: var(--accent); }
.partners > .list-h2:first-child, .docs > .list-h2:first-child { margin-top: 8px; }
.partner-grid, .doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.partner { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); transition: border-color .2s, box-shadow .2s, transform .2s; }
.partner:hover { border-color: var(--brand); box-shadow: 0 10px 26px rgba(22, 21, 59, .08); transform: translateY(-2px); }
.entry-content .partner-name { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.partner-alt { font-size: .85rem; color: #5b5a7a; line-height: 1.4; }
.partner-url { margin-top: auto; padding-top: 6px; font-size: .85rem; font-weight: 600; word-break: break-all; }
.partner-url a { color: var(--brand); text-decoration: none; }
.partner-url a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.entry-content a.doc { display: flex; align-items: center; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.35; transition: border-color .2s, box-shadow .2s, transform .2s; }
.entry-content a.doc::before { flex: none; margin-right: 14px; padding: 4px 8px; font-size: .72rem; }
.entry-content a.doc:hover { border-color: var(--brand); color: var(--brand); box-shadow: 0 10px 26px rgba(22, 21, 59, .08); transform: translateY(-2px); }
@media (max-width: 700px) { .partner-grid, .doc-grid { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ Projekti page */
.proj-feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 8px; }
.proj-feat .project-tile { min-width: 0; }
.proj-feat .pt-media { height: 120px; }
.proj-feat .pt-body strong { font-size: 1.1rem; }
.proj-feat .pt-desc { font-size: .85rem; }
.proj-list { display: flex; flex-direction: column; gap: 14px; }
.proj { display: flex; gap: 20px; align-items: flex-start; padding: 18px 22px; background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.proj:hover { border-color: var(--brand); box-shadow: 0 10px 26px rgba(22, 21, 59, .08); }
.proj-logo { flex: 0 0 110px; width: 110px; height: 84px; display: flex; align-items: center; justify-content: center; background: var(--lav-2); border-radius: 10px; padding: 8px; }
.proj-logo.none { background: var(--lav); }
.proj-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; float: none; margin: 0; }
.proj-body { flex: 1; min-width: 0; }
.proj-body h3 { margin: 0 0 6px; font-size: 1.15rem; line-height: 1.3; color: var(--ink); }
.proj-teaser { margin: 0 0 8px; font-size: .95rem; line-height: 1.55; color: var(--muted); }
.proj details summary { list-style: none; cursor: pointer; display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); }
.proj details summary::-webkit-details-marker { display: none; }
.proj details summary::after { content: " \2192"; }
.proj details[open] summary::after { content: " \2191"; }
.proj details summary .less { display: none; }
.proj details[open] summary .less { display: inline; }
.proj details[open] summary .more { display: none; }
.proj details summary:hover { color: var(--accent); }
.proj-full { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.proj-full p { margin: 0 0 .9em; font-size: .95rem; }
.proj-full ul { margin: 0 0 .9em 1.2em; }
@media (max-width: 760px) { .proj-feat { grid-template-columns: 1fr 1fr; } .proj { flex-direction: column; } .proj-logo { width: 100%; flex-basis: auto; } }
@media (max-width: 480px) { .proj-feat { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ book tour page + homepage strip */
.tour-intro .lead { font-size: 1.1rem; }
.tour-count { margin: 6px 0 18px; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; }
.tour-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tour-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s; }
.tour-card:hover { border-color: var(--brand); box-shadow: 0 10px 26px rgba(22, 21, 59, .08); transform: translateY(-2px); }
.tour-img { display: block; aspect-ratio: 1.414 / 1; background: var(--lav-2); overflow: hidden; }
.tour-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tour-img.none { display: flex; align-items: center; justify-content: center; color: var(--muted); font-style: italic; background: var(--lav); }
.tour-body { position: relative; padding: 16px 20px 18px 92px; min-height: 92px; }
.tour-date { position: absolute; left: 18px; top: 14px; width: 58px; text-align: center; background: var(--lav); border-radius: 10px; padding: 6px 0; color: var(--brand-dark); line-height: 1.1; }
.tour-date strong { display: block; font-family: var(--serif); font-size: 1.6rem; }
.tour-date span { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.tour-body h3 { margin: 0 0 2px; font-size: 1.2rem; color: var(--ink); }
.tour-time { margin: 0 0 4px; font-weight: 600; color: var(--accent); font-size: .9rem; }
.tour-venue { margin: 0; font-size: .92rem; line-height: 1.45; }
.tour-host { margin: 4px 0 0; font-size: .82rem; color: var(--muted); }
.tour-card.is-past { opacity: .6; }
.tour-card.is-past .tour-img img { filter: grayscale(.7); }
.tour-badge { position: absolute; right: 14px; top: 14px; background: var(--ink); color: #fff; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.tour-band { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; padding: 22px 0; }
.tour-band-in { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.tour-band-title { flex: 0 0 auto; max-width: 260px; }
.tour-band-title small { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; opacity: .8; }
.tour-band-title strong { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; display: block; }
.tour-band-items { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.tour-chip { display: flex; gap: 12px; align-items: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; padding: 10px 14px; color: #fff; transition: background .2s; }
.tour-chip:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.tour-chip b { font-family: var(--serif); font-size: 1.5rem; line-height: 1; text-align: center; min-width: 38px; }
.tour-chip b em { display: block; font-style: normal; font-family: var(--sans, inherit); font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.tour-chip span { font-size: .9rem; line-height: 1.35; }
.tour-chip span i { display: block; font-style: normal; font-size: .78rem; opacity: .8; }
.tour-band-all { flex: 0 0 auto; background: #fff; color: var(--brand-dark); border-radius: 12px; padding: 10px 18px; font-weight: 600; white-space: nowrap; }
.tour-band-all:hover { background: var(--lav); color: var(--brand-dark); }
@media (max-width: 900px) { .tour-list { grid-template-columns: 1fr; } .tour-band-items { grid-template-columns: 1fr; } .tour-band-title { max-width: none; } }

/* lightbox (book tour) */
.lb-lock { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; background: rgba(10, 9, 30, .92); padding: 24px 64px; }
.lb.open { display: flex; }
.lb-fig { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lb-fig img { display: block; max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; border-radius: 6px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lb-fig figcaption { color: #fff; font-size: .9rem; opacity: .85; text-align: center; }
.lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 4px; transition: background .2s; }
.lb button:hover, .lb button:focus-visible { background: rgba(255, 255, 255, .3); outline: 2px solid #fff; outline-offset: 2px; }
.lb-x { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb.single .lb-prev, .lb.single .lb-next { display: none; }
@media (max-width: 700px) { .lb { padding: 56px 8px 24px; } .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; width: 40px; height: 40px; } }
