/* Together — thema
   De basis van de oude site (bordeauxrood, Questrial, witte kaarten met
   rode bovenrand, rode footer met noten), opgefrist: meer witruimte,
   grotere tekst, afgeronde kaarten en een bredere slider. */

:root {
	--tg-red: var(--wp--preset--color--rood);
	--tg-red-dark: var(--wp--preset--color--donkerrood);
	--tg-ink: var(--wp--preset--color--inkt);
	--tg-text: var(--wp--preset--color--tekst);
	--tg-line: var(--wp--preset--color--lijn);
	--tg-soft: var(--wp--preset--color--zacht);
	--tg-radius: 18px;
	--tg-shadow: 0 12px 40px rgba(70, 20, 20, .08);
	--tg-gutter: clamp(16px, 3vw, 28px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[lang] { hyphens: manual; }
.tg-card { overflow-wrap: break-word; }
@media (max-width: 480px) { .tg-card { padding: 22px 18px; } }
body { margin: 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--tg-red); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
p { margin: 0 0 1.1em; }
h1, h2, h3, h4 { margin: 0 0 .55em; }
* + h2 { margin-top: 1.4em; }
* + h3 { margin-top: 1.2em; }
.wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; }
.wp-site-blocks > main, .wp-site-blocks > .tg-main { flex: 1; }

.tg-container { width: 100%; max-width: 1228px; margin-left: auto; margin-right: auto; padding-left: var(--tg-gutter); padding-right: var(--tg-gutter); }

/* ---------- Header ---------- */
/* Sticky: de hele header-template-part plakt, met een negatieve top zodat op
   desktop alleen de rode menubalk in beeld blijft. theme.js rekent die top
   uit (hoogte logo-rij + eventuele adminbalk) en zet --tg-sticky-h. */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 100; }
html { scroll-padding-top: calc(var(--tg-sticky-h, 60px) + 12px); }
.tg-nav, .tg-header-top { transition: box-shadow .25s; }
.is-stuck .tg-nav { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14), 0 8px 24px rgba(60, 10, 10, .18); }
@media (max-width: 900px) {
	.is-stuck .tg-header { box-shadow: 0 6px 20px rgba(60, 10, 10, .12); }
	.tg-nav.is-open { max-height: calc(100vh - var(--tg-sticky-h, 80px)); max-height: calc(100dvh - var(--tg-sticky-h, 80px)); overflow-y: auto; overscroll-behavior: contain; }
}
.tg-header { background: #fff; position: relative; z-index: 50; }
.tg-header-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; padding-bottom: 18px; }
.tg-logo { margin: 0; flex: 0 1 auto; }
.tg-logo img { display: block; width: clamp(170px, 20vw, 230px); height: auto; }
.tg-header-login { margin-left: auto; }
.tg-hamburger { display: none; }

.tg-nav { background: var(--tg-red); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14); }
.tg-menu { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; }
.tg-menu > li { position: relative; }
.tg-menu a {
	display: block; padding: 17px clamp(12px, 1.6vw, 24px); color: #fff; text-decoration: none;
	font-family: var(--wp--preset--font-family--koppen); font-size: 16px; letter-spacing: .07em; text-transform: uppercase; line-height: 1.3;
	position: relative; transition: background .2s;
}
.tg-menu > li > a::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 4px; background: #fff; border-radius: 4px 4px 0 0; transform: scaleX(0); transition: transform .25s; }
.tg-menu > li > a:hover, .tg-menu > li > a:focus-visible { background: var(--tg-red-dark); color: #fff; }
.tg-menu > li.current-menu-item > a::after, .tg-menu > li.current-menu-ancestor > a::after, .tg-menu > li.current_page_parent > a::after,
.tg-menu > li > a:hover::after { transform: scaleX(1); }
.tg-menu .sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff; border-radius: 0 0 12px 12px; box-shadow: var(--tg-shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s; }
.tg-menu li:hover > .sub-menu, .tg-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.tg-menu .sub-menu a { color: var(--tg-ink); text-transform: none; letter-spacing: 0; padding: 10px 14px; border-radius: 8px; }
.tg-menu .sub-menu a:hover { background: var(--tg-soft); color: var(--tg-red); }

@media (min-width: 901px) {
	/* Zoals de oude site: de items vullen samen de hele rode balk, met dunne
	   scheidingslijntjes. Tekst schaalt mee en breekt nooit af; past het echt
	   niet (smal scherm, ingezoomd, extra items) dan zet theme.js de klasse
	   tg-nav-compact op <html> en wordt het de Menu-knop. */
	.tg-menu { flex-wrap: nowrap; justify-content: stretch; }
	.tg-menu > li { flex: 1 1 auto; text-align: center; }
	.tg-menu > li + li { box-shadow: -1px 0 0 rgba(0, 0, 0, .18), inset 1px 0 0 rgba(255, 255, 255, .09); }
	.tg-menu a { white-space: nowrap; padding: 18px clamp(8px, 1.2vw, 20px); font-size: clamp(14px, 1.25vw, 16px); letter-spacing: clamp(.02em, .35vw, .07em); }
	.tg-menu > li > a::after { left: 14px; right: 14px; }

	/* Compacte stand (door theme.js), zelfde gedrag als mobiel. */
	html.tg-nav-compact .tg-hamburger {
		display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
		width: 58px; height: 54px; border: 0; border-radius: 12px; background: var(--tg-red); color: #fff; cursor: pointer; padding: 0; flex: 0 0 auto; margin-left: 12px;
	}
	html.tg-nav-compact .tg-hamburger span { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: #fff; transition: transform .25s, opacity .25s; }
	html.tg-nav-compact .tg-hamburger em { font-style: normal; font-size: 11px; font-weight: 600; line-height: 1; margin-top: 2px; }
	html.tg-nav-compact .tg-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
	html.tg-nav-compact .tg-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
	html.tg-nav-compact .tg-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
	html.tg-nav-compact .tg-nav { display: none; }
	html.tg-nav-compact .tg-nav.is-open { display: block; max-height: calc(100vh - var(--tg-sticky-h, 80px)); overflow-y: auto; }
	html.tg-nav-compact .tg-menu { flex-direction: column; flex-wrap: nowrap; padding: 8px 0 14px; }
	html.tg-nav-compact .tg-menu > li { flex: none; text-align: left; box-shadow: none; }
	html.tg-nav-compact .tg-menu a { padding: 15px 4px; font-size: 18px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
	html.tg-nav-compact .tg-menu > li > a::after { display: none; }
}
@media (max-width: 900px) {
	.tg-header-top { padding-top: 12px; padding-bottom: 12px; }
	.tg-header-login .tv-login-button { padding: 10px 16px; font-size: 15px; }
	.tg-hamburger {
		display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
		width: 58px; height: 54px; border: 0; border-radius: 12px; background: var(--tg-red); color: #fff; cursor: pointer; padding: 0; flex: 0 0 auto;
	}
	.tg-hamburger span { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: #fff; transition: transform .25s, opacity .25s; }
	.tg-hamburger em { font-style: normal; font-size: 11px; font-weight: 600; line-height: 1; margin-top: 2px; }
	.tg-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
	.tg-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
	.tg-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
	.tg-nav { display: none; }
	.tg-nav.is-open { display: block; }
	.tg-menu { flex-direction: column; padding: 8px 0 14px; }
	.tg-menu a { padding: 15px 4px; font-size: 18px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
	.tg-menu > li > a::after { display: none; }
	.tg-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; padding: 0 0 0 16px; }
	.tg-menu .sub-menu a { color: #fff; }
}
@media (max-width: 480px) {
	.tg-header-login .tv-login-button span { display: none; }
	.tg-header-login .tv-login-button { padding: 12px; }
}

/* ---------- Algemene opbouw ---------- */
.tg-main { padding: clamp(24px, 4vw, 48px) 0 clamp(48px, 6vw, 80px); }
.tg-card {
	position: relative; background: #fff; border-radius: var(--tg-radius); box-shadow: var(--tg-shadow);
	padding: clamp(22px, 3.2vw, 42px); overflow: hidden;
}
.tg-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--tg-red); }
.tg-card > :last-child { margin-bottom: 0; }
.tg-page-card, .tg-article { max-width: 920px; margin: 0 auto; }
.tg-card .wp-block-post-title, .tg-card > h1:first-child, .tg-card > .wp-block-heading:first-child { margin-top: 0; }
.tg-page-card > .wp-block-post-title::after, .tg-article > .wp-block-post-title::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--tg-red); margin-top: 14px; }
.tg-card h2 { position: relative; }

.tg-more { margin: 18px 0 0; font-weight: 600; }
.tg-more a { display: inline-flex; align-items: center; gap: 10px; color: var(--tg-ink); text-decoration: none; }
.tg-more a::before { content: "→"; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--tg-red); color: #fff; font-size: 15px; transition: transform .2s; }
.tg-more a:hover { color: var(--tg-red); }
.tg-more a:hover::before { transform: translateX(3px); }

.wp-block-buttons { gap: 12px; margin: 1.2em 0; }
.wp-block-button__link { transition: background .2s, transform .2s; }
.wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--tg-red); border: 2px solid currentColor; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--tg-red); color: #fff; border-color: var(--tg-red); }

.wp-block-image img { border-radius: 12px; }
.wp-block-image figcaption { font-size: 14px; color: #777; }
.wp-block-separator { border: 0; border-top: 1px solid var(--tg-line); margin: 2em 0; }
.wp-block-quote { border-left: 4px solid var(--tg-red); margin: 1.5em 0; padding: 4px 0 4px 22px; font-size: 1.1em; }
.wp-block-list { padding-left: 1.3em; }
.wp-block-list li { margin-bottom: .35em; }
.wp-block-list li::marker { color: var(--tg-red); }
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table td, .wp-block-table th { border-bottom: 1px solid var(--tg-line); padding: 10px 8px; text-align: left; }

/* Verticale ritmiek binnen kaarten en inhoud (WordPress' eigen
   flow-layout zet alle marges op 0 omdat blockGap bewust 0 is). */
:root :where(.tg-card, .wp-block-post-content, .tg-info-box, .wp-block-column) > * + * { margin-block-start: 1.05em; }
:root :where(.tg-card, .wp-block-post-content, .tg-info-box, .wp-block-column) > * + :is(h2, h3, h4) { margin-block-start: 1.6em; }
:root :where(.tg-card, .wp-block-post-content, .tg-info-box, .wp-block-column) > :is(h1, h2, h3, h4) + * { margin-block-start: .5em; }
.tg-card p, .tg-info-box p { margin-bottom: 0; }
.tg-lead { font-size: 1.15em; color: var(--tg-ink); }

/* ---------- Home ---------- */
.tg-main-home { padding-top: clamp(16px, 3vw, 32px); }
.tg-home > * { width: 100%; max-width: 1228px; margin-left: auto !important; margin-right: auto !important; padding-left: var(--tg-gutter); padding-right: var(--tg-gutter); }

.wp-block-gallery.tg-slider {
	position: relative; display: block !important; height: clamp(230px, 38vw, 470px); padding: 0 !important;
	max-width: calc(1228px - 2 * var(--tg-gutter)) !important; width: calc(100% - 2 * var(--tg-gutter)) !important;
	border-radius: 24px; overflow: hidden; box-shadow: var(--tg-shadow); background: #eee; margin-bottom: 0 !important;
}
.wp-block-gallery.tg-slider > .wp-block-image {
	position: absolute !important; inset: 0; width: 100% !important; height: 100%; margin: 0 !important;
	opacity: 0; transition: opacity 1.4s ease; display: block;
}
.wp-block-gallery.tg-slider > .wp-block-image:first-child, .wp-block-gallery.tg-slider > .wp-block-image.is-active { opacity: 1; }
.wp-block-gallery.tg-slider.is-running > .wp-block-image:first-child:not(.is-active) { opacity: 0; }
.wp-block-gallery.tg-slider img { width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0 !important; }
.wp-block-gallery.tg-slider > .wp-block-image.is-active img { animation: tg-kenburns 9s ease-out both; }
.wp-block-gallery.tg-slider::after { content: ""; position: absolute; inset: auto 0 0 0; height: 35%; background: linear-gradient(to top, rgba(40, 8, 10, .35), transparent); pointer-events: none; z-index: 1; }
.tg-slider-dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 8px; }
.tg-slider-dots button { width: 11px; height: 11px; border-radius: 99px; border: 0; padding: 0; background: rgba(255, 255, 255, .55); cursor: pointer; transition: width .3s, background .3s; }
.tg-slider-dots button.is-active { width: 28px; background: #fff; }
@keyframes tg-kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
	.wp-block-gallery.tg-slider > .wp-block-image.is-active img { animation: none; }
}

.tg-home-grid { gap: 28px !important; margin-top: clamp(24px, 3vw, 36px) !important; margin-bottom: 0 !important; align-items: flex-start !important; }
.tg-home-grid > .wp-block-column { display: flex; flex-direction: column; gap: 28px; }
.tg-home-grid .tg-card { margin: 0; }
.tg-home-grid .wp-block-column:last-child h3 { font-size: 24px; }
.tg-card-rood p { font-size: 17px; }
.tg-home .tg-intro h1 { font-size: clamp(30px, 4vw, 44px); }
.tg-waarden { font-family: var(--wp--preset--font-family--koppen); color: var(--tg-red); letter-spacing: .08em; font-size: 18px; }

.tg-card.tg-card-rood { background: var(--tg-red) url(../img/notes.png) no-repeat center bottom / 160% auto; color: #fff; }
.tg-card.tg-card-rood::before { background: var(--tg-ink); }
.tg-card.tg-card-rood h2, .tg-card.tg-card-rood h3, .tg-card.tg-card-rood a:not(.wp-block-button__link) { color: #fff; }
.tg-card.tg-card-rood .wp-block-button__link { background: #fff; color: var(--tg-red); }
.tg-card.tg-card-rood .wp-block-button__link:hover { background: var(--tg-ink); color: #fff; }

/* ---------- Nieuwsoverzicht (query) ---------- */
.tg-news-list { list-style: none; margin: 0; padding: 0; }
.tg-news-row { display: grid; grid-template-columns: 220px 1fr; gap: 26px; padding: 26px 0; border-bottom: 1px solid var(--tg-line); }
.tg-news-list > li:first-child .tg-news-row { padding-top: 6px; }
.tg-news-thumb { margin: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--tg-soft); }
.tg-news-thumb img { width: 100%; height: 100% !important; object-fit: cover; border-radius: 0; transition: transform .4s; }
.tg-news-row:hover .tg-news-thumb img { transform: scale(1.05); }
.tg-news-text .wp-block-post-title { font-size: 22px; margin: 4px 0 8px; }
.tg-news-text .wp-block-post-title a { color: var(--tg-ink); text-decoration: none; }
.tg-news-text .wp-block-post-title a:hover { color: var(--tg-red); }
.tg-post-date { font-size: 14px; font-weight: 700; color: var(--tg-red); text-transform: uppercase; letter-spacing: .05em; }
.wp-block-post-excerpt__more-link { font-weight: 600; }
.tg-pagination { margin-top: 28px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.tg-pagination a, .tg-pagination .page-numbers { display: inline-flex; min-width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0 14px; border-radius: 99px; background: var(--tg-soft); color: var(--tg-ink); text-decoration: none; font-weight: 600; }
.tg-pagination .current { background: var(--tg-red); color: #fff; }
.tg-post-image { margin: 0 0 24px; }
.tg-post-image img { border-radius: 14px; }
.tg-back { margin-top: 32px; font-weight: 600; }
.tg-article .wp-block-image.alignright, .tg-article .alignright { float: right; margin: 6px 0 16px 24px; max-width: 45%; }
.tg-article .wp-block-image.alignleft, .tg-article .alignleft { float: left; margin: 6px 24px 16px 0; max-width: 45%; }
.tg-article .wp-block-post-content::after { content: ""; display: table; clear: both; }

/* ---------- Inhoudspagina's ---------- */
.tg-person { gap: 26px !important; align-items: center !important; padding: 18px 0; border-bottom: 1px solid var(--tg-line); margin: 0 !important; }
.tg-person:last-of-type { border-bottom: 0; }
.tg-person .wp-block-column:first-child { flex: 0 0 150px !important; }
.tg-portrait { margin: 0; }
.tg-portrait img { width: 150px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; }
.tg-person h3 { margin: 0 0 4px; font-size: 22px; }
.tg-role { color: var(--tg-red); font-weight: 600; margin-bottom: 6px; }
.tg-lijst-kolommen .wp-block-list { list-style: none; padding: 0; }
.tg-lijst-kolommen .wp-block-list li { padding: 7px 0; border-bottom: 1px solid var(--tg-line); margin: 0; }
.tg-info-box { background: var(--tg-soft); border-radius: 14px; padding: 22px 26px; margin: 1.5em 0; }
.tg-info-box > :last-child { margin-bottom: 0; }
@media (max-width: 600px) {
	.tg-person .wp-block-column:first-child { flex-basis: auto !important; }
	.tg-portrait img { width: 130px; }
	.tg-news-row { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- Ledenomgeving ---------- */
.tg-leden-grid > * { min-width: 0; }
.tg-leden-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.tg-leden-grid > .tv-ledenmenu { position: sticky; top: calc(var(--tg-sticky-top-visible, 0px) + var(--tg-sticky-h, 60px) + 20px); }
.tg-leden-content .wp-block-post-title::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--tg-red); margin-top: 14px; }
@media (max-width: 900px) {
	.tg-leden-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.tg-leden-grid > .tv-ledenmenu { position: static; }
}

/* ---------- Footer ---------- */
.tg-footer { background: var(--tg-red) url(../img/notes.png) no-repeat center 42% / min(1600px, 140%) auto; color: rgba(255, 255, 255, .88); margin-top: auto; }
.tg-footer-inner { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(30px, 4vw, 48px); }
.tg-footer-cols { gap: 32px !important; margin: 0 !important; }
.tg-footer h3 { color: #fff; font-size: 20px; margin: 0 0 14px; }
.tg-footer p { font-size: 15px; line-height: 1.8; }
.tg-footer a { color: #fff; text-decoration: none; }
.tg-footer a:hover { text-decoration: underline; }
.tg-footer-menu { list-style: none; margin: 0; padding: 0; }
.tg-footer-menu li { margin: 0 0 6px; font-size: 15px; }
.tg-social { gap: 10px !important; margin: 0 0 14px !important; }
.tg-social .wp-social-link { background: rgba(255, 255, 255, .14) !important; border-radius: 12px !important; color: #fff !important; transition: background .2s; }
.tg-social .wp-social-link:hover { background: var(--tg-ink) !important; transform: none; }
.tg-social .wp-social-link a { padding: 10px !important; }
.tg-social .wp-social-link svg { width: 26px; height: 26px; }
.tg-footer-bottom {
	background: rgba(0, 0, 0, .22); padding: 16px max(var(--tg-gutter), calc((100% - 1180px) / 2));
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px;
}
.tg-footer-bottom p { margin: 0 !important; font-size: 14px; color: rgba(255, 255, 255, .75); }
.tg-footer-bottom .tg-credit { font-size: 13px; color: rgba(255, 255, 255, .6); }
.tg-footer-bottom .tg-credit a { color: rgba(255, 255, 255, .85); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.tg-footer-bottom .tg-credit a:hover { color: #fff; text-decoration-color: #fff; }
@media (max-width: 600px) {
	.tg-footer-bottom { flex-direction: column; align-items: stretch; text-align: center; }
}

@media print {
	.tg-header, .tg-footer, .tv-ledenmenu { display: none !important; }
	.tg-card { box-shadow: none; padding: 0; }
	.tg-leden-grid { display: block; }
	body { background: #fff; }
}
