/* HIH Projekte – front end */
.hih-projects, .hih-single {
	--hih-accent: #0067b1;
	--hih-hero-bg: #cfccc0;
	--hih-text: #1d1d1b;
	--hih-heading: #3c3c3b;
	--hih-border: #d6d6d6;
	--hih-field: #f2f2f2;
	--hih-gap: 26px;
	color: var(--hih-text);
	box-sizing: border-box;
}
.hih-projects *, .hih-single * { box-sizing: border-box; }

.hih-container { max-width: 1170px; margin: 0 auto; padding: 0 16px; }

/* Hero */
.hih-hero { background: var(--hih-hero-bg); padding: 80px 0 70px; margin-bottom: 40px; }
.hih-hero__title { font-size: clamp(40px, 6vw, 72px); line-height: 1.05; font-weight: 700; color: var(--hih-heading); margin: 0 0 30px; }
.hih-hero__subtitle { font-size: clamp(17px, 2vw, 22px); font-weight: 600; color: var(--hih-heading); margin: 0; max-width: 760px; line-height: 1.45; }
.hih-hero--single .hih-hero__title { font-size: clamp(32px, 4.6vw, 56px); margin-bottom: 20px; }
.hih-breadcrumb { font-size: 14px; margin-bottom: 18px; color: var(--hih-heading); }
.hih-breadcrumb a { color: inherit; text-decoration: none; }
.hih-breadcrumb a:hover { color: var(--hih-accent); }
.hih-breadcrumb span { margin: 0 6px; opacity: .6; }

/* Full-width banner: breaks out of the theme's content container */
.hih-hero--full {
	width: 100vw !important;
	max-width: 100vw !important;
	position: relative;
	left: 50%;
	margin-left: -50vw !important;
	margin-right: 0 !important;
	border-radius: 0;
}
html:has(.hih-hero--full), body:has(.hih-hero--full) { overflow-x: clip; } /* hide scrollbar-width overflow, keeps sticky working */

/* Filter bar */
.hih-filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 22px; position: relative; z-index: 5; }
.hih-search { position: relative; flex: 0 1 214px; min-width: 180px; }
.hih-search input[type="search"] {
	width: 100%; height: 39px; border: 0; border-bottom: 1px solid var(--hih-border); border-radius: 0;
	background: var(--hih-field); padding: 0 40px 0 12px; font: inherit; font-size: 15px; color: var(--hih-text);
	-webkit-appearance: none; appearance: none; box-shadow: none;
}
.hih-search input::placeholder { color: #808080; }
.hih-search input:focus { outline: 2px solid var(--hih-accent); outline-offset: -2px; }
.hih-search__btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer; color: var(--hih-text); line-height: 0; }

.hih-dropdown { position: relative; }
.hih-dropdown__toggle {
	display: inline-flex; align-items: center; gap: 8px; height: 39px; padding: 0 12px;
	background: var(--hih-field); border: 0; border-bottom: 1px solid var(--hih-border); border-radius: 0;
	font: inherit; font-size: 15px; color: var(--hih-text); cursor: pointer; white-space: nowrap;
}
.hih-dropdown__toggle:hover, .hih-dropdown__toggle[aria-expanded="true"] { background: #e8e8e8; }
.hih-dropdown__toggle:focus-visible { outline: 2px solid var(--hih-accent); outline-offset: -2px; }
.hih-dropdown.is-active .hih-dropdown__toggle { border-bottom-color: var(--hih-accent); }
.hih-chevron { transition: transform .2s; }
.hih-dropdown__toggle[aria-expanded="true"] .hih-chevron { transform: rotate(180deg); }
.hih-count { background: var(--hih-accent); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.hih-count[hidden] { display: none; }

.hih-dropdown__panel {
	position: absolute; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: 340px;
	max-height: 320px; overflow: auto; background: #fff; border: 1px solid var(--hih-border);
	box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 8px 0;
}
.hih-dropdown__panel[hidden] { display: none; }
.hih-option { display: flex; align-items: flex-start; gap: 10px; padding: 7px 14px; cursor: pointer; font-size: 15px; line-height: 1.35; margin: 0; }
.hih-option:hover { background: var(--hih-field); }
.hih-option input { accent-color: var(--hih-accent); margin: 3px 0 0; flex: none; }
.hih-dropdown__clear { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--hih-border); background: none; padding: 9px 14px 3px; margin-top: 6px; color: var(--hih-accent); font: inherit; font-size: 14px; cursor: pointer; }

/* Results */
.hih-results { position: relative; transition: opacity .2s; }
.hih-results.is-loading { opacity: .45; pointer-events: none; }
.hih-results__meta { display: flex; gap: 18px; align-items: center; font-size: 14px; color: #666; margin-bottom: 22px; }
.hih-reset { color: var(--hih-accent); }
.hih-empty { padding: 40px 0; font-size: 17px; }

.hih-grid { display: grid; gap: var(--hih-gap); grid-template-columns: repeat(var(--hih-cols, 4), minmax(0, 1fr)); margin-bottom: 40px; }
@media (max-width: 1100px) { .hih-grid--grid { grid-template-columns: repeat(min(var(--hih-cols, 4), 3), minmax(0, 1fr)); } }
@media (max-width: 820px)  { .hih-grid--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px)  { .hih-grid--grid { grid-template-columns: 1fr; } }

/* Card */
.hih-card { background: #fff; border: 1px solid var(--hih-border); display: flex; transition: box-shadow .2s, transform .2s; }
.hih-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.10); transform: translateY(-2px); }
.hih-card__link { display: flex; flex-direction: column; width: 100%; color: inherit !important; text-decoration: none !important; }
.hih-card__link:focus-visible { outline: 3px solid var(--hih-accent); outline-offset: 2px; }
.hih-card__media { aspect-ratio: 3 / 2; overflow: hidden; background: #e6e4dc; }
.hih-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.hih-card:hover .hih-card__media img { transform: scale(1.04); }
.hih-card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #e6e4dc, #cfccc0); }
.hih-card__body { padding: 22px 18px 28px; display: flex; flex-direction: column; gap: 0; }
.hih-card__title { font-size: 18px; line-height: 1.35; font-weight: 700; margin: 0 0 16px; color: var(--hih-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hih-card:hover .hih-card__title { color: var(--hih-accent); }
.hih-card__text { font-size: 15px; line-height: 1.55; margin: 0 0 24px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hih-card__meta { font-size: 15px; line-height: 1.55; margin-bottom: 14px; }
.hih-card__meta strong { display: block; font-weight: 700; margin-bottom: 2px; }

/* List view */
.hih-grid--list { grid-template-columns: 1fr; }
.hih-grid--list .hih-card__link { flex-direction: row; }
.hih-grid--list .hih-card__media { flex: 0 0 34%; aspect-ratio: auto; min-height: 220px; }
.hih-grid--list .hih-card__body { padding: 24px 28px; }
.hih-grid--list .hih-card__title { font-size: 21px; }
.hih-grid--list .hih-card__meta { display: inline-block; margin-right: 32px; vertical-align: top; }
@media (max-width: 640px) {
	.hih-grid--list .hih-card__link { flex-direction: column; }
	.hih-grid--list .hih-card__media { aspect-ratio: 3 / 2; min-height: 0; }
}

/* Pagination */
.hih-pagination { margin: 10px 0 70px; }
.hih-pagination ul.page-numbers { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; background: none; }
.hih-pagination ul.page-numbers li { margin: 0; padding: 0; border: 0; background: none; list-style: none; }
.hih-pagination ul.page-numbers li::before { content: none; }
.hih-pagination .page-numbers:not(ul) {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-width: 44px; height: 44px; padding: 0 14px; margin: 0;
	border: 1px solid var(--hih-border); border-radius: 0; background: #fff;
	color: var(--hih-text); font-size: 15px; font-weight: 500; line-height: 1;
	text-decoration: none; box-shadow: none; transition: background .15s, border-color .15s, color .15s;
}
.hih-pagination a.page-numbers:hover,
.hih-pagination a.page-numbers:focus-visible { border-color: var(--hih-accent); color: var(--hih-accent); outline: none; }
.hih-pagination .page-numbers.current { background: var(--hih-accent); border-color: var(--hih-accent); color: #fff; font-weight: 700; }
.hih-pagination .page-numbers.dots { border-color: transparent; background: none; min-width: 24px; padding: 0; }
.hih-pagination .prev, .hih-pagination .next { padding: 0 18px; }
.hih-pagination .hih-arrow { display: inline-block; width: 16px; height: 16px; flex: none; }
.hih-pagination .hih-pag-label { display: inline; border: 0; padding: 0; margin: 0; background: none; min-width: 0; height: auto; }
@media (max-width: 540px) {
	.hih-pagination .hih-pag-label { display: none; }
	.hih-pagination .prev, .hih-pagination .next { padding: 0 14px; }
}

/* Single */
.hih-single__layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 50px; margin-bottom: 60px; }
@media (max-width: 900px) { .hih-single__layout { grid-template-columns: 1fr; gap: 30px; } }
.hih-single__image { margin: 0 0 30px; }
.hih-single__image img { width: 100%; height: auto; display: block; }
.hih-single__image figcaption { font-size: 13px; color: #666; margin-top: 8px; }
.hih-entry { font-size: 17px; line-height: 1.7; }
.hih-entry h2 { font-size: 28px; margin: 1.6em 0 .6em; color: var(--hih-heading); }
.hih-entry h3 { font-size: 22px; margin: 1.4em 0 .5em; }
.hih-entry a { color: var(--hih-accent); }
.hih-entry img { max-width: 100%; height: auto; }

.hih-single__aside { align-self: start; position: sticky; top: 30px; }
.hih-infobox { background: var(--hih-field); padding: 26px 24px; border-top: 4px solid var(--hih-accent); }
.hih-infobox__title { font-size: 20px; margin: 0 0 18px; }
.hih-infobox dl { margin: 0; }
.hih-infobox dt { font-weight: 700; font-size: 15px; margin: 0 0 3px; }
.hih-infobox dd { margin: 0 0 16px; font-size: 15px; line-height: 1.55; }
.hih-infobox dd a { color: var(--hih-accent); word-break: break-word; }
.hih-btn { display: inline-block; background: var(--hih-accent); color: #fff !important; padding: 12px 20px; text-decoration: none !important; font-weight: 600; border: 0; cursor: pointer; font: inherit; }
.hih-btn:hover { filter: brightness(.9); }
.hih-btn--block { display: block; text-align: center; margin-top: 6px; }
.hih-back { display: inline-block; margin-top: 18px; color: var(--hih-accent); text-decoration: none; font-weight: 600; }
.hih-back:hover { text-decoration: underline; }

.hih-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--hih-border); border-bottom: 1px solid var(--hih-border); padding: 24px 0; margin-bottom: 60px; }
.hih-postnav a { color: inherit; text-decoration: none; display: block; }
.hih-postnav small { display: block; color: #777; font-size: 13px; margin-bottom: 4px; }
.hih-postnav span { font-weight: 700; font-size: 17px; }
.hih-postnav a:hover span { color: var(--hih-accent); }
.hih-postnav__next { text-align: right; }

.hih-related { background: #f7f6f2; padding: 60px 0 30px; }
.hih-related__title { font-size: 30px; margin: 0 0 30px; color: var(--hih-heading); }

.hih-projects .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
