/* =============================================================================
   Kalangala — design tokens
   ========================================================================== */

:root {
	--color-primary: #ef7f02;   /* orange — headlines, buttons, CTA bar */
	--color-secondary: #668943; /* green — news cards, gallery box, links hover */
	--color-brown: #5b3417;     /* brown — meta nav, subline text */
	--color-dark: #393939;
	--color-text: #555555;
	--color-white: #ffffff;
	--font-heading: 'Lato', Helvetica, Arial, sans-serif;
	--font-body: 'Lato', Helvetica, Arial, sans-serif;
	--container-width: 1080px;
	--gutter: 10px;
}

/* =============================================================================
   Reset / base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 18px;
	line-height: 1.8;
	color: var(--color-brown);
	background: #fff url('../img/content_beige_bg.jpg') center top / cover no-repeat;
	background-attachment: scroll;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-brown); text-decoration: underline; }
a:hover { color: var(--color-primary); }
ul { margin: 0; padding: 0; list-style: none; }
p { line-height: 24px; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: 900;
	line-height: 1.3;
	margin: 0 0 25px;
	color: var(--color-dark);
}
h1 { font-size: 70px; }
h2 { font-size: 24px; font-weight: 400; }
h3 { font-size: 24px; color: var(--color-primary); text-transform: uppercase; }
h4 { font-size: 20px; }
h5 { font-size: 24px; margin-bottom: 0; }

.richtext p:last-child { margin-bottom: 0; }
.richtext a { font-weight: 700; }
.richtext ul { list-style: disc; padding-left: 22px; margin-bottom: 20px; }
.richtext ul li { margin-bottom: 6px; }

/* =============================================================================
   Layout helpers
   ========================================================================== */

.container {
	max-width: var(--container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

/* Spacing BETWEEN blocks inside one flow (the outer 55px top/bottom boundary
   for the whole flow comes from .page-blocks itself, matching the original
   site's single mod_article padding — these utilities are the smaller,
   heading-margin-scale gaps between sections within that flow). */
.pt-none { padding-top: 0; }
.pt-sm   { padding-top: 20px; }
.pt-md   { padding-top: 25px; }
.pt-lg   { padding-top: 60px; }
.pb-none { padding-bottom: 0; }
.pb-sm   { padding-bottom: 20px; }
.pb-md   { padding-bottom: 25px; }
.pb-lg   { padding-bottom: 60px; }

/* Buttons ("klBtn" equivalent) */
.btn {
	display: inline-block;
	box-sizing: border-box;
	height: 78px;
	padding: 25px 20px 0;
	margin: 0 10px 10px 0;
	border: 1px solid var(--color-secondary);
	border-radius: 10px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	font-family: var(--font-heading);
	font-weight: 900;
	font-size: 18px;
	line-height: 24px;
	color: var(--color-secondary);
	background: transparent;
	transition: background-color .25s ease, color .25s ease;
}
.btn--outline { border-color: var(--color-secondary); color: var(--color-secondary); }
.btn--outline:hover { background: var(--color-secondary); color: var(--color-white); }
.btn--solid { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-white); }
.btn--solid:hover { background: var(--color-white); color: var(--color-primary); }

/* Inside the orange CTA bar, buttons are white-outlined instead */
.cta-bar .btn { border-color: var(--color-white); color: var(--color-white); }
.cta-bar .btn:hover { background: var(--color-white); color: var(--color-primary); }
.cta-bar .btn.is-last { background: var(--color-white); color: var(--color-primary); }
.cta-bar .btn.is-last:hover { background: var(--color-secondary); border-color: var(--color-secondary); color: var(--color-white); }

/* =============================================================================
   Top meta bar
   ========================================================================== */

.top-bar {
	background: #f2e3c6 url('../img/content_beige_bg.jpg') center top / cover no-repeat;
	height: 40px;
	line-height: 40px;
	position: relative;
	z-index: 40;
}
.top-bar__inner { display: flex; justify-content: flex-end; }
.top-nav__list { display: flex; gap: 24px; }
.top-nav__list a {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--color-brown);
	text-decoration: none;
}
.top-nav__list a:hover { color: var(--color-primary); }

/* =============================================================================
   Site header / main nav
   ========================================================================== */

.site-header {
	position: absolute;
	top: 40px;
	left: 0;
	right: 0;
	z-index: 30;
	padding: 25px 0;
	background: transparent;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.site-branding img { max-height: 70px; width: auto; }
.site-branding__fallback {
	font-family: var(--font-heading);
	font-size: 1.6rem;
	font-weight: 900;
	color: var(--color-primary);
	text-decoration: none;
}

.main-nav__list { display: flex; align-items: center; gap: 32px; }
.main-nav__list > li { position: relative; }
.main-nav__list > li > a {
	font-family: var(--font-heading);
	font-size: 1.05rem;
	text-decoration: none;
	color: var(--color-dark);
}
.main-nav__list > li > a:hover,
.main-nav__list > li.current-menu-item > a,
.main-nav__list > li.current-menu-ancestor > a { color: var(--color-primary); }

.main-nav__list .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--color-white);
	box-shadow: 0 8px 20px rgba(0,0,0,.12);
	border-top: 3px solid var(--color-primary);
	padding: 8px 0;
	z-index: 40;
}
.main-nav__list li:hover > .sub-menu,
.main-nav__list li.is-expanded > .sub-menu { display: block; }
.main-nav__list .sub-menu a {
	display: block;
	padding: 10px 20px;
	font-size: .95rem;
	text-decoration: none;
	color: var(--color-dark);
	white-space: nowrap;
}
.main-nav__list .sub-menu a:hover { color: var(--color-primary); background: #faf6ee; }

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	border: 0;
	background: none;
	cursor: pointer;
}
.nav-toggle span { display: block; height: 3px; background: var(--color-dark); border-radius: 2px; }

/* =============================================================================
   Page header banner ("kl_header") + CTA bar — identical on every page
   ========================================================================== */

.page-header {
	box-sizing: border-box;
	position: relative;
	height: 650px;
	padding-top: 240px; /* NOT a margin on __inner: a child's margin-top here
		would collapse through this parent (no padding/border of its own to
		contain it) and push the whole .page-header box down instead of just
		positioning the content within it. */
	background-color: var(--color-dark);
	background-image: url('../img/header_bg.jpg');
	background-position: center bottom;
	background-size: cover;
	color: var(--color-white);
}
.page-header__inner { position: relative; }
.page-header h1, .page-header h2, .page-header p { color: var(--color-white); }
.page-header h2 { text-transform: none; font-weight: 400; }
.page-header p { max-width: 640px; font-size: 18px; }

.cta-bar { background: var(--color-primary); height: 140px; padding-top: 30px; }
.cta-bar__inner { display: flex; gap: 15px; }
.cta-bar .btn { flex: 1; margin: 0; }

/* =============================================================================
   Page builder — flex grid for the modular content blocks
   ========================================================================== */

.page-blocks {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 55px var(--gutter);
	display: flex;
	flex-wrap: wrap;
}

/* padding-left/right only (NOT the "padding" shorthand) — these classes
   combine with the pt-x / pb-x vertical-spacing utility classes on the same
   element, and the shorthand would silently zero out their top/bottom
   values since it comes later in the cascade at equal specificity. */
.block--full { flex: 0 0 100%; max-width: 100%; padding-left: 15px; padding-right: 15px; }
.block--half { flex: 0 0 50%; max-width: 50%; padding-left: 15px; padding-right: 15px; }
.block--third { flex: 0 0 33.3333%; max-width: 33.3333%; padding-left: 15px; padding-right: 15px; }
.block--two-thirds { flex: 0 0 66.6667%; max-width: 66.6667%; padding-left: 15px; padding-right: 15px; }

/* The homepage welcome text sits at two-thirds width with extra right-side
   breathing room before the news teaser column, matching the original
   site's #startseite-specific spacing rule. */
body.is-home .block--two-thirds { padding-right: calc(15% + 15px); }

.block--bleed {
	position: relative;
	width: 100vw;
	left: 50%;
	margin-left: -50vw;
	margin-bottom: -55px; /* cancels .page-blocks' own bottom padding so this full-bleed section's background runs flush to the footer, like the original's separate "kl_gallery" article */
	flex-basis: 100vw;
	max-width: 100vw;
	padding: 0;
}

/* =============================================================================
   Block: text_image_section
   ========================================================================== */

.b-text-image { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.b-text-image__text, .b-text-image__image { flex: 1 1 320px; }
.is-image-left { flex-direction: row-reverse; }

/* =============================================================================
   Block: team_grid
   ========================================================================== */

.b-team__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 40px 30px;
	margin-top: 30px;
}
.b-team__item { flex: 1 1 220px; max-width: 260px; text-align: center; }
.b-team__photo {
	margin: 0 0 20px;
	padding: 10px;
	background: var(--color-white);
	border: 10px solid var(--color-white);
	box-shadow: -4px 4px 7px rgba(0,0,0,.3);
	display: inline-block;
}
.b-team__photo img { display: block; }
.b-team__name { color: var(--color-secondary); font-size: 1.5rem; margin-bottom: 4px; }
.b-team__role { color: var(--color-brown); font-weight: 900; font-size: 1.1rem; }

/* =============================================================================
   Block: gallery_block (plain grid + lightbox)
   ========================================================================== */

.b-gallery__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 25px;
}
.b-gallery__item a {
	position: relative;
	display: block;
	overflow: hidden;
	border: 10px solid var(--color-white);
	box-shadow: -4px 4px 7px rgba(0,0,0,.25);
	background: var(--color-white);
}
.b-gallery__item img { width: 100%; height: 200px; object-fit: cover; }

/* Hover: an orange tint fades in over the photo and a "+" grows out of a
   flat dash — matching the original ce_gallery hover behaviour. */
.b-gallery__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-primary);
	opacity: 0;
	transition: opacity .5s ease;
}
.b-gallery__item a:hover .b-gallery__overlay { opacity: 1; }
.b-gallery__plus {
	position: relative;
	width: 50px;
	height: 50px;
}
.b-gallery__plus::before,
.b-gallery__plus::after {
	content: '';
	position: absolute;
	top: 24px;
	left: 0;
	width: 50px;
	height: 2px;
	background: var(--color-white);
}
.b-gallery__plus::before { transition: transform .2s ease; }
.b-gallery__item a:hover .b-gallery__plus::before { transform: rotate(90deg); }

/* =============================================================================
   Block: gallery_teaser ("Bilderbuch" preview box)
   ========================================================================== */

.b-gallery-teaser {
	background-color: var(--color-secondary);
	background-image: url('../img/content_green_bg.jpg');
	background-position: center top;
	background-size: cover;
	padding: 55px 0;
}
.b-gallery-teaser h3 { color: var(--color-white); }
.b-gallery-teaser__grid {
	display: flex;
	align-items: center;
	gap: 40px;
	flex-wrap: wrap;
	margin-top: 20px;
}
.b-gallery-teaser__photo {
	position: relative;
	display: block;
	overflow: hidden;
	width: 220px;
	border: 10px solid var(--color-white);
	box-shadow: -4px 4px 7px rgba(0,0,0,.3);
	background: var(--color-white);
}
.b-gallery-teaser__photo img { width: 100%; height: 150px; object-fit: cover; }
.b-gallery-teaser__photo:hover .b-gallery__overlay { opacity: 1; }
.b-gallery-teaser__photo:hover .b-gallery__plus::before { transform: rotate(90deg); }

/* The "Zur Galerie" tile is its own pre-designed graphic (rounded corners +
   transparent background already baked into the PNG) — unlike the photo
   tiles above, it gets no polaroid frame/shadow/rotation of its own. */
.b-gallery-teaser__more { display: block; width: 220px; }
.b-gallery-teaser__more img { width: 100%; height: auto; }

/* =============================================================================
   Block: news_teaser (boxed green cards — used on the Home page teaser only)
   ========================================================================== */

.b-news-teaser__list {
	display: flex;
	flex-wrap: wrap;
	gap: 25px;
	margin-top: 20px;
}
.news-card {
	flex: 1 1 300px;
	background: var(--color-secondary);
	border-radius: 10px;
	padding: 30px;
	color: var(--color-white);
}
.news-card__date { display: block; font-size: 3rem; font-weight: 900; line-height: 1; margin-bottom: 20px; }
.news-card__title { font-size: 1.4rem; margin-bottom: 10px; }
.news-card__title a { color: var(--color-white); text-decoration: none; }
.news-card__teaser { color: var(--color-white); }
.news-card__teaser p { margin: 0; }

/* =============================================================================
   /news archive — plain stacked list of title + date + excerpt, matching
   the original site's layout (not boxed cards, which only the Home page
   teaser widget uses).
   ========================================================================== */

.news-list-item {
	padding: 40px 0;
	border-bottom: 1px solid #e4d9c5;
}
.news-list-item:first-child { padding-top: 0; }
.news-list-item__date { color: var(--color-primary); font-weight: 900; }
.news-list-item__title { margin-top: 6px; }
.news-list-item__title a { color: var(--color-dark); text-decoration: none; }
.news-list-item__title a:hover { color: var(--color-primary); }
.news-list-item__more a { font-weight: 700; text-decoration: none; }

/* =============================================================================
   Block: downloads_block / bank_details / partner_grid / cta_buttons
   ========================================================================== */

.b-bank__list { display: grid; grid-template-columns: max-content 1fr; gap: 4px 20px; margin: 20px 0; }
.b-bank__list dt { font-weight: 700; color: var(--color-dark); }
.b-bank__list dd { margin: 0; }
.b-bank__note { font-style: italic; }

.b-partners__grid { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; margin-top: 20px; }
.b-partners__item { flex: 0 1 180px; }
.b-partners__item img { max-height: 90px; width: auto; margin: 0 auto; }

.b-cta-buttons .btn.is-first { margin-left: 0; }

/* =============================================================================
   Block: contact_form_block
   ========================================================================== */

.b-contact-form__form { max-width: 560px; margin-top: 20px; }
.b-contact-form__form p { margin-bottom: 18px; }
.b-contact-form__form label { display: block; margin-bottom: 6px; font-weight: 700; }
.b-contact-form__form input[type="text"],
.b-contact-form__form input[type="email"],
.b-contact-form__form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-family: var(--font-body);
	font-size: 1rem;
}
.b-contact-form__form button { cursor: pointer; }
.b-contact-form__hp { position: absolute; left: -9999px; }
.b-contact-form__success { color: var(--color-secondary); font-weight: 700; }
.b-contact-form__error { color: #c0392b; font-weight: 700; }

/* =============================================================================
   Single news article
   ========================================================================== */

.news-single__date { display: block; color: var(--color-primary); font-weight: 900; margin-bottom: 10px; }
.news-single__thumb { margin: 20px 0; }
.news-single__video { margin: 20px 0; }
.news-single__gallery { margin-top: 40px; }
.back-link a { text-decoration: none; font-weight: 700; }
.back-link a::before { content: '‹ '; }

/* =============================================================================
   Newsarchiv
   ========================================================================== */

.news-archive__year { margin-top: 40px; }
.news-archive__year-list li { padding: 8px 0; border-bottom: 1px solid #eee; }
.news-archive__date { display: inline-block; width: 90px; color: var(--color-primary); font-weight: 700; }
.news-archive__year-list a { text-decoration: none; }
.news-archive__pagination { margin-top: 40px; }

/* =============================================================================
   Footer sitemap
   ========================================================================== */

.site-footer {
	background-color: var(--color-secondary);
	background-image: url('../img/content_green_bg.jpg');
	background-position: center top;
	background-size: cover;
	padding: 65px 0;
	color: var(--color-white);
}
.footer-nav__list { display: flex; flex-wrap: wrap; gap: 30px; }
.footer-nav__list > li { flex: 1 1 150px; }
.footer-nav__list > li:first-child { display: none; } /* hides "Home", matching the original footer sitemap */
.footer-nav__list > li > a {
	display: block;
	margin-bottom: 20px;
	font-family: var(--font-heading);
	font-weight: 900;
	text-transform: uppercase;
	font-size: 1.1rem;
	color: var(--color-white);
	text-decoration: none;
}
.footer-nav__list .sub-menu li { margin-bottom: 8px; }
.footer-nav__list .sub-menu a { color: var(--color-white); text-decoration: none; font-size: .95rem; opacity: .9; }
.footer-nav__list .sub-menu a:hover { opacity: 1; text-decoration: underline; }

/* =============================================================================
   Cookie banner
   ========================================================================== */

.cookie-banner {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	background: var(--color-primary);
	color: var(--color-white);
	z-index: 100;
}
.cookie-banner__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 15px; flex-wrap: wrap; }
.cookie-banner p { margin: 0; }
.cookie-banner a { color: var(--color-white); font-weight: 700; }
.cookie-banner .btn { margin: 0; white-space: nowrap; }

/* =============================================================================
   Lightbox
   ========================================================================== */

.lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 200;
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-overlay__figure { margin: 0; max-width: 90vw; }
.lightbox-overlay__img { max-width: 90vw; max-height: 85vh; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox-overlay__caption { margin-top: 12px; color: var(--color-white); text-align: center; font-size: 15px; }
.lightbox-overlay__close,
.lightbox-overlay__prev,
.lightbox-overlay__next {
	position: absolute;
	border: 0;
	background: rgba(255,255,255,.1);
	color: var(--color-white);
	cursor: pointer;
	border-radius: 50%;
}
.lightbox-overlay__close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 1.6rem; }
.lightbox-overlay__prev { left: 20px; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; font-size: 1.8rem; }
.lightbox-overlay__next { right: 20px; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; font-size: 1.8rem; }
body.lightbox-open { overflow: hidden; }

/* =============================================================================
   Responsive
   ========================================================================== */

@media only screen and (max-width: 900px) {
	.nav-toggle { display: flex; }
	.main-nav {
		display: none;
		width: 100%;
		order: 3;
	}
	body.nav-open .main-nav {
		display: block;
		background: var(--color-white);
		padding: 10px 15px 20px;
		box-shadow: 0 10px 20px rgba(0,0,0,.15);
	}
	.site-header__inner { flex-wrap: wrap; }
	.main-nav__list { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
	.main-nav__list > li { width: 100%; border-top: 1px solid #eee; }
	.main-nav__list > li > a { display: block; padding: 14px 0; }
	.main-nav__list .sub-menu { position: static; box-shadow: none; border-top: 0; display: none; padding-left: 15px; width: 100%; }
	.main-nav__list li.is-expanded > .sub-menu { display: block; }

	.top-nav__list { gap: 14px; }

	.b-gallery__grid { grid-template-columns: repeat(2, 1fr); }
	.footer-nav__list > li:first-child { display: none; }
}

@media only screen and (max-width: 767px) {
	.block--half, .block--third, .block--two-thirds { flex: 0 0 100%; max-width: 100%; }
	.b-text-image, .b-text-image.is-image-left { flex-direction: column; }

	.cta-bar__inner { flex-direction: column; }
	.cta-bar .btn { width: 100%; }
}

@media only screen and (max-width: 576px) {
	.page-header { height: 450px; padding-top: 100px; }
	.page-header h1 { font-size: 50px; }
}

@media only screen and (max-width: 480px) {
	.b-gallery__grid { grid-template-columns: 1fr; }
	.b-team__grid { justify-content: center; }
}
