/* Heilige Huisjes Activiteiten – front end. Uses theme presets where possible. */
:root {
	--hh-accent: #bc4028;
	--hh-highlight: var(--hh-accent);
	--hh-date: var(--hh-accent);
	--hh-border: color-mix(in srgb, currentColor 14%, transparent);
	--hh-soft: color-mix(in srgb, currentColor 4%, transparent);
	--hh-radius: 8px;
}

.hh-empty, .hh-placeholder { opacity: .75; font-style: italic; }
.hh-placeholder { padding: 1em; border: 1px dashed var(--hh-border); border-radius: var(--hh-radius); }

/* Header above titles */
.hh-kop p { margin: 0; }
.hh-kop__datum { color: var(--hh-date); font-weight: 600; letter-spacing: .01em; }
.hh-kop__datum a { color: inherit; }
.hh-kop__soort { display: inline-block; margin-left: .5em; padding: .1em .6em; border: 1px solid currentColor; border-radius: 99px; font-size: .75em; font-weight: 500; vertical-align: .1em; }
.hh-kop__uitvoerder { margin-top: .35em !important; font-size: var(--wp--preset--font-size--large, 1.4rem); }
.wp-block-hh-activiteit-kop + .wp-block-post-title, .wp-block-hh-spreker-kop + .wp-block-post-title { margin-top: .2em; }

/* Card grid */
.hh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: var(--wp--preset--spacing--40, 1.5rem); margin: 1.5rem 0; }
.hh-card { height: 100%; }
.hh-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; border: 1px solid var(--hh-border); border-radius: var(--hh-radius); overflow: hidden; background: var(--wp--preset--color--base, #fff); transition: box-shadow .2s, transform .2s; }
.hh-card__link:hover, .hh-card__link:focus-visible { box-shadow: 0 6px 22px rgb(0 0 0 / .09); transform: translateY(-2px); }
.hh-card__media { aspect-ratio: 210 / 148; /* landscape A5 */ background: var(--hh-soft); overflow: hidden; }
.hh-card__img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.hh-card__noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, color-mix(in srgb, var(--hh-accent) 18%, transparent), color-mix(in srgb, var(--hh-accent) 4%, transparent)); }
.hh-card__body { padding: 1rem 1.1rem 1.2rem; }
.hh-card__body p { margin: 0; }
.hh-card__date { color: var(--hh-date); font-size: .85em; font-weight: 600; }
.hh-card__by { margin-top: .35em !important; font-size: .9em; opacity: .8; }
.hh-card__title { margin: .25em 0 0; font-size: 1.15em; line-height: 1.3; }

/* Filters and paging */
.hh-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem 1.25rem; margin: 1rem 0; }
.hh-filters label { display: flex; flex-direction: column; gap: .25em; font-size: .85em; }
.hh-filters select { min-width: 12em; padding: .45em .6em; border: 1px solid var(--hh-border); border-radius: 6px; background: var(--wp--preset--color--base, #fff); color: inherit; font: inherit; font-size: 1rem; }
.hh-filters__reset { font-size: .9em; padding-bottom: .5em; }
.hh-paging { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.5rem 0; }
.hh-paging a, .hh-paging span { display: inline-block; min-width: 2.2em; padding: .35em .6em; text-align: center; border: 1px solid var(--hh-border); border-radius: 6px; text-decoration: none; }
.hh-paging__current { background: var(--hh-accent); border-color: var(--hh-accent) !important; color: #fff; }

/* Agenda */
.hh-agenda { list-style: none; margin: 0; padding: 0; }
.hh-agenda__item + .hh-agenda__item { border-top: 1px solid var(--hh-border); }
.hh-agenda__item a { display: flex; gap: 1rem; align-items: flex-start; padding: .85rem 0; color: inherit; text-decoration: none; }
.hh-agenda__item a:hover .hh-agenda__title { text-decoration: underline; }
.hh-agenda__date { flex: 0 0 3.4rem; display: flex; flex-direction: column; align-items: center; padding: .35rem 0; border-radius: 6px; background: var(--hh-accent); color: #fff; line-height: 1.1; border-bottom: 3px solid var(--hh-highlight); }
.hh-agenda__day { font-size: 1.35rem; font-weight: 700; }
.hh-agenda__month { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.hh-agenda__text { display: flex; flex-direction: column; gap: .1rem; }
.hh-agenda__title { font-weight: 600; }
.hh-agenda__meta { font-size: .85em; opacity: .75; }

/* Practical info box */
.hh-praktisch { margin-top: 1.5rem; padding: 1.25rem 1.4rem; border-left: 4px solid var(--hh-highlight); border-radius: 0 var(--hh-radius) var(--hh-radius) 0; background: var(--hh-soft); }
.hh-praktisch > :first-child { margin-top: 0; }
.hh-praktisch > :last-child { margin-bottom: 0; }
.hh-praktisch p { margin: .5em 0; }
.hh-sessies { list-style: none; margin: 0 0 .75em; padding: 0; }
.hh-sessies li { padding: .35em 0; }
.hh-sessies li + li { border-top: 1px solid var(--hh-border); }
.hh-sessies__datum { font-weight: 600; }
.hh-sessies__label, .hh-sessies__locatie { display: block; font-size: .9em; opacity: .8; }
.hh-praktisch__locatie { font-weight: 500; }
.hh-button { display: inline-block; margin-top: .75em; padding: .6em 1.1em; border-radius: 6px; background: var(--hh-accent); color: #fff !important; text-decoration: none; font-weight: 600; }
.hh-button:hover { filter: brightness(1.08); }
.hh-button .hh-doc__meta { opacity: .8; font-weight: 400; font-size: .85em; }

/* Sections below the content */
.hh-sectie { margin-top: var(--wp--preset--spacing--60, 3rem); }
.hh-docs ul { list-style: none; padding: 0; }
.hh-docs li { padding: .5em 0; border-bottom: 1px solid var(--hh-border); }
.hh-doc__meta { font-size: .8em; opacity: .65; }

/* Speaker rows on a Preekstoel page */
.hh-spreker { display: grid; grid-template-columns: 140px 1fr; gap: 1.25rem; padding: 1.25rem 0; border-top: 1px solid var(--hh-border); }
.hh-spreker__foto img, .hh-spreker__foto .hh-card__noimg { width: 140px; height: 140px; object-fit: cover; border-radius: var(--hh-radius); display: block; }
.hh-spreker__body p { margin: .3em 0; }
.hh-spreker__datum { color: var(--hh-date); font-weight: 600; font-size: .9em; }
.hh-spreker__naam { margin: .1em 0 .3em; font-size: 1.25em; }
.hh-spreker__naam a { color: inherit; text-decoration: none; }
.hh-spreker__links { font-size: .9em; }
@media (max-width: 600px) { .hh-spreker { grid-template-columns: 90px 1fr; } .hh-spreker__foto img, .hh-spreker__foto .hh-card__noimg { width: 90px; height: 90px; } }

/* Speaker overview */
.hh-sprekers__jaar { margin-top: 2.5rem; }
.hh-sprekers__jaar h2 a { color: inherit; text-decoration: none; }
.hh-sprekers__grid { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1.25rem; }
.hh-sprekers__grid a { display: flex; flex-direction: column; color: inherit; text-decoration: none; font-size: .9em; }
.hh-sprekers__foto img, .hh-sprekers__foto .hh-card__noimg { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: var(--hh-radius); display: block; transition: transform .2s; }
.hh-sprekers__grid a:hover img { transform: scale(1.03); }
.hh-sprekers__naam { margin-top: .5em; font-weight: 600; line-height: 1.25; }
.hh-sprekers__datum { opacity: .7; font-size: .9em; }

/* Gallery + lightbox */
.hh-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem; }
.hh-foto img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 6px; }
.hh-lightbox { max-width: 94vw; max-height: 94vh; padding: 0; border: 0; background: transparent; }
.hh-lightbox::backdrop { background: rgb(0 0 0 / .85); }
.hh-lightbox img { display: block; max-width: 94vw; max-height: 86vh; margin: 0 auto; }
.hh-lightbox p { color: #fff; text-align: center; margin: .5em 0 0; }
.hh-lightbox button { position: fixed; top: 50%; border: 0; background: rgb(0 0 0 / .4); color: #fff; font-size: 2rem; width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer; }
.hh-lightbox .hh-lightbox__prev { left: 1rem; }
.hh-lightbox .hh-lightbox__next { right: 1rem; }
.hh-lightbox .hh-lightbox__close { top: 1rem; right: 1rem; }

.hh-video iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.hh-spreker-foto img { border-radius: var(--hh-radius); }

/* Upcoming cards: excerpt; a single upcoming activity is shown wide. */
.hh-card__excerpt { margin-top: .6em !important; font-size: .92em; opacity: .85; }
.hh-card__more { margin-top: .8em !important; font-weight: 700; color: var(--hh-accent); }
.hh-grid:has(> .hh-card:only-child) { grid-template-columns: 1fr; }
@media (min-width: 700px) {
	.hh-grid:has(> .hh-card--staand:only-child) .hh-card__link { flex-direction: row; }
	.hh-grid:has(> .hh-card--staand:only-child) .hh-card__media { flex: 0 0 44%; aspect-ratio: auto; min-height: 280px; }
	.hh-grid:has(> .hh-card--staand:only-child) .hh-card__body { padding: 1.5rem 1.75rem; align-self: center; }
	.hh-grid:has(> .hh-card--staand:only-child) .hh-card__title { font-size: 1.6em; }
}
@media (min-width: 700px) {
	.hh-grid:has(> .hh-card--staand:only-child) .hh-card__media { flex-basis: 40%; min-height: 340px; background: var(--hh-soft); }
	.hh-grid:has(> .hh-card--staand:only-child) .hh-card__img { object-fit: contain; object-position: center; }
}

/* Show the whole image in cards: contain, with a blurred copy behind it. */
.hh-card__media { position: relative; isolation: isolate; }
.hh-card__media::before {
	content: ""; position: absolute; inset: -24px; z-index: -1;
	background: var(--hh-bg, none) center / cover no-repeat;
	filter: blur(18px) saturate(1.15); opacity: .5;
}
.hh-card__img { object-fit: contain !important; object-position: center !important; }

/* Single upcoming activity with a landscape image: image above the text, uncropped. */
.hh-grid:has(> .hh-card--liggend:only-child) .hh-card__media { aspect-ratio: auto; }
.hh-grid:has(> .hh-card--liggend:only-child) .hh-card__img { height: auto; }
.hh-grid:has(> .hh-card--liggend:only-child) .hh-card__body { padding: 1.25rem 1.5rem 1.5rem; }
.hh-grid:has(> .hh-card--liggend:only-child) .hh-card__title { font-size: 1.5em; }
/* In a wide column, keep a landscape featured image to a reasonable height. */
.hh-grid:has(> .hh-card--liggend:only-child) .hh-card__img { max-height: 420px; margin: 0 auto; }

/* PDF overlay viewer */
html.hh-pdf-open { overflow: hidden; }
.hh-pdf { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #2b2f36; color: #fff; display: none; flex-direction: column; }
.hh-pdf[open] { display: flex; }
.hh-pdf::backdrop { background: rgb(0 0 0 / .7); }
.hh-pdf__bar { display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; background: var(--hh-accent); box-shadow: 0 2px 8px rgb(0 0 0 / .3); }
.hh-pdf__titel { flex: 1; min-width: 0; margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hh-pdf__nav { display: flex; align-items: center; gap: .5rem; }
.hh-pdf__teller { min-width: 8.5em; text-align: center; font-size: .9rem; font-variant-numeric: tabular-nums; }
.hh-pdf__acties { display: flex; align-items: center; gap: .5rem; }
.hh-pdf button { width: 2.4rem; height: 2.4rem; border: 0; border-radius: 6px; background: rgb(255 255 255 / .12); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.hh-pdf button:hover:not(:disabled) { background: rgb(255 255 255 / .25); }
.hh-pdf button:disabled { opacity: .35; cursor: default; }
.hh-pdf__download { padding: .5rem .9rem; border-radius: 6px; background: var(--hh-highlight); color: var(--hh-accent) !important; font-weight: 700; text-decoration: none; }
.hh-pdf__download:hover { filter: brightness(1.08); }
.hh-pdf__stage { position: relative; flex: 1; min-height: 0; display: flex; overflow: auto; padding: 8px; touch-action: pan-y pinch-zoom; }
.hh-pdf__stage canvas { margin: auto; background: #fff; box-shadow: 0 4px 24px rgb(0 0 0 / .45); }
.hh-pdf__status { position: absolute; inset: auto 0; text-align: center; color: #fff; }
.hh-pdf__status a { color: var(--hh-highlight); }
@media (max-width: 600px) {
	.hh-pdf__bar { flex-wrap: wrap; gap: .5rem; }
	.hh-pdf__titel { flex-basis: 100%; order: -1; font-size: .9rem; }
	.hh-pdf__nav { flex: 1; }
	.hh-pdf__teller { min-width: 0; flex: 1; }
}
.hh-pdf__zoom { display: flex; gap: .35rem; }
.hh-pdf__stage.is-zoomed { touch-action: pan-x pan-y pinch-zoom; }
@media (max-width: 600px) { .hh-pdf__zoom { order: 1; } }

/* Mailing list sign-up ------------------------------------------------- */
.hh-lijst__titel { margin: 0 0 .5rem; }
.hh-lijst__tekst { margin: 0 0 .9rem; }
.hh-lijst__rij { display: flex; flex-wrap: wrap; gap: .5rem; }
.hh-lijst__rij input[type="email"] {
	flex: 1 1 12rem; min-width: 0; padding: .6rem .75rem; font: inherit; font-size: .95rem;
	border: 1px solid var(--wp--preset--color--accent-6, #e2dacb); border-radius: 6px; background: #fff; color: inherit;
}
.hh-lijst__rij input[type="email"]:focus { outline: 2px solid var(--hh-accent, #203954); outline-offset: 1px; }
.hh-lijst__rij button { flex: 0 0 auto; padding: .6rem 1.1rem; font-size: .95rem; cursor: pointer; }
.hh-lijst__privacy { margin: .6rem 0 0; font-size: .8rem; opacity: .75; }
.hh-lijst__melding { margin: 0 0 .8rem; padding: .6rem .75rem; border-radius: 6px; font-size: .95rem; }
.hh-lijst__melding--ok { background: #e8f3ea; color: #1d5a2c; }
.hh-lijst__melding--fout { background: #fbeae7; color: #8c2a1e; }
.hh-lijst__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
