/* Homepage composition, verified against Figma 2265:6445 and 2265:6419.
 * Editorial text and images stay dynamic; reference proportions scale with
 * the content container rather than freezing the entire page at 1280/390px. */
.hradistko-site.hradistko-front-page .hr-block--latest-posts::after {
	background-image: url("../images/illustrations/ilu_hp_1.png");
	background-size: contain;
}
.hradistko-site.hradistko-front-page .hr-front-events > .hr-container::before {
	background-image: url("../images/illustrations/ilu_hp_2.png");
	background-size: contain;
	left: 0;
	max-width: 100%;
}
@media (max-width: 74rem) {
	.hradistko-site.hradistko-front-page .hr-block--latest-posts::after {
		left: 0;
		max-width: 100%;
	}
}
.hradistko-site.hradistko-front-page .hr-block--active-alert h2 { margin-bottom: 0.25rem; }
@media (max-width: 47.999rem) {
	.hradistko-site.hradistko-front-page .hr-block--latest-posts::after {
		left: calc(-9.5625rem - var(--hr-gutter) - 0.875rem);
		width: 27.75rem;
		max-width: none;
		height: 20rem;
	}
	.hradistko-site.hradistko-front-page .hr-front-events > .hr-container::before {
		left: calc(-9.5625rem - var(--hr-gutter) - 0.875rem);
		width: 27.75rem;
		height: 20rem;
		top: auto;
		bottom: 0;
		max-width: none;
	}
	.hradistko-site.hradistko-front-page .hr-front-events > .hr-container {
		padding-bottom: 22.4375rem;
	}
	.hradistko-site.hradistko-front-page .hr-home-contact .hr-block--contact-form {
		margin-top: 3rem;
	}
	.hradistko-site.hradistko-front-page .hr-front-events .hr-card--event:nth-child(2) {
		border-top: 0;
		padding-top: var(--hr-space-s);
	}
}
.hradistko-front-page .hr-hero__overlay {
	/* Keep navigation readable, with the requested bottom-up title shading. */
	background: linear-gradient(to bottom, rgb(0 0 0 / 65%) 0%, transparent 35%, rgb(0 0 0 / 12%) 55%, rgb(0 0 0 / 75%) 100%);
}

@media (max-width: 47.999rem) {
	.hradistko-front-page .hr-hero__overlay {
		background: linear-gradient(to bottom, rgb(0 0 0 / 32%) 0%, transparent 28%, rgb(0 0 0 / 25%) 48%, rgb(0 0 0 / 78%) 100%);
	}
	.hradistko-front-page .hr-hero__scroll {
		bottom: calc(1rem + env(safe-area-inset-bottom));
	}
	.hradistko-front-page .hr-hero:has(.hr-hero__controls:focus-within) .hr-hero__scroll {
		bottom: 3.5rem;
	}
	.hradistko-front-page .hr-hero__content {
		padding-bottom: 7rem;
	}
}

.hradistko-front-page .hr-hero__scroll:focus-visible {
	outline: 2px solid white;
	outline-offset: 3px;
}

/* Portrait offsets cannot fit a short landscape/zoomed viewport. Keep the
 * original type and crest sizes, reserving space above the title and below it
 * for the scroll cue; allow the cover to exceed the viewport when necessary. */
@media (max-width: 47.999rem) and (max-height: 40rem) {
	.hradistko-front-page .hr-hero {
		min-height: 26rem;
		max-height: none;
	}

	.hradistko-front-page .hr-hero__content {
		padding-top: 10rem;
		padding-bottom: 7rem;
	}
}

.hradistko-front-page .hr-newsletter-preview__cover,
.hradistko-front-page .hr-newsletter-preview__cover img {
	height: auto;
}

.hradistko-front-page .hr-newsletter-preview__cover img {
	object-fit: contain;
}

.hradistko-front-page .hr-quick-links__nav a.hr-external-link > .hr-quick-links__label::after {
	content: none;
}

.hradistko-front-page .hr-quick-links__tail {
	white-space: nowrap;
}

.hradistko-front-page .hr-quick-links__tail::after {
	display: inline-block;
	width: 1.2em;
	height: 1.2em;
	margin-inline-start: 0.22em;
	background-color: currentColor;
	vertical-align: -0.22em;
	-webkit-mask-image: var(--hr-external-icon-mask);
	mask-image: var(--hr-external-icon-mask);
	-webkit-mask-size: var(--hr-external-icon-size);
	mask-size: var(--hr-external-icon-size);
	-webkit-mask-position: var(--hr-external-icon-position);
	mask-position: var(--hr-external-icon-position);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	content: "";
}

/* Alert details are a text CTA, just like the newsletter archive link. */
.hradistko-front-page .hr-quick-links__alert .hr-text-link {
	font-family: var(--hr-display);
	font-size: var(--hr-step-0);
	font-weight: 600;
	line-height: 1.25;
	text-decoration: underline;
}

.hradistko-front-page .hr-block--active-alert .hr-alert__content {
	font-weight: 400;
	line-height: 1.4;
}

.hradistko-front-page .hr-quick-links__alert :is(p, .hr-alert__content) {
	font-size: var(--hr-step-0);
	font-weight: 400;
}

@media (min-width: 74.01rem) {
	/* The news CTA occupies the illustration column, beside the cards, rather
	 * than adding an empty full-width row below them. */
	.hradistko-front-page .hr-block--latest-posts {
		display: grid;
		grid-template-columns: minmax(0, calc(75% - 0.5rem)) minmax(0, 1fr);
		column-gap: 2rem;
	}

	.hradistko-front-page .hr-block--latest-posts .hr-section-heading {
		grid-column: 1 / -1;
	}

	.hradistko-front-page .hr-block--latest-posts .hr-card-grid {
		grid-column: 1;
		grid-row: 2;
		width: 100%;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hradistko-front-page .hr-block--latest-posts .hr-card__media {
		height: auto;
		min-height: 0;
		flex: 0 0 auto;
		aspect-ratio: 8 / 5;
	}

	.hradistko-front-page .hr-block--latest-posts .hr-section-cta-row {
		grid-column: 2;
		grid-row: 2;
		align-self: end;
		margin: 0;
	}

	.hradistko-front-page .hr-block--latest-posts::after {
		left: calc(75% + 2rem);
		right: 0;
		width: calc(25% - 2rem);
		height: auto;
		aspect-ratio: 1;
		background-image: url("../images/gate.png");
		background-size: contain;
	}

	.hradistko-front-page .hr-front-events::before {
		position: absolute;
		top: 2rem;
		left: 50%;
		width: min(var(--hr-container), calc(100% - 2 * var(--hr-gutter)));
		border-top: 1px solid var(--hr-line);
		transform: translateX(-50%);
		content: "";
	}

	.hradistko-front-page .hr-front-events .hr-block {
		padding-left: 34.23%;
	}

	.hradistko-front-page .hr-front-events .hr-card-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.hradistko-front-page .hr-front-events .hr-card__media {
		width: 100%;
		height: auto;
		min-height: 0;
		aspect-ratio: 1;
	}

	.hradistko-front-page .hr-quick-links {
		min-height: 21.25rem;
		padding-bottom: 3rem;
	}

	.hradistko-front-page .hr-quick-links__grid {
		grid-template-columns: minmax(0, 17fr) minmax(0, 38fr) minmax(0, 15fr);
		column-gap: 2rem;
	}

	.hradistko-front-page .hr-block--active-alert {
		width: 100%;
	}

	.hradistko-front-page .hr-quick-links__nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: repeat(2, auto);
		grid-auto-flow: column;
		align-content: start;
		gap: 1.75rem 2rem;
	}

	.hradistko-front-page .hr-quick-links__nav a {
		width: 100%;
		height: auto;
		align-items: center;
	}

	.hradistko-front-page .hr-quick-links__nav a > span:last-child {
		white-space: normal;
	}

	.hradistko-front-page .hr-newsletter-preview__cover {
		width: 100%;
	}
}

@media (min-width: 48rem) and (max-width: 74rem) {
	/* Tablet illustrations share the CTA row. Reserving a second full-width
	 * band beneath each CTA made these layouts much taller than either frame. */
	.hradistko-front-page .hr-block--latest-posts {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		padding-bottom: 0;
	}

	.hradistko-front-page .hr-block--latest-posts .hr-section-heading {
		grid-column: 1;
		grid-row: 1;
	}

	.hradistko-front-page .hr-block--latest-posts .hr-card-grid {
		grid-column: 1;
		grid-row: 2;
	}

	.hradistko-front-page .hr-block--latest-posts::after {
		position: relative;
		grid-column: 1;
		grid-row: 3;
		top: auto;
		right: auto;
		bottom: auto;
		left: calc(-1 * var(--hr-gutter));
		width: clamp(12rem, 23vw, 16rem);
		height: auto;
		aspect-ratio: 292 / 320;
		margin-top: 1.5rem;
		background-image: url("../images/news-illustration-mobile.png");
	}

	.hradistko-front-page .hr-block--latest-posts .hr-section-cta-row {
		position: relative;
		grid-column: 1;
		grid-row: 3;
		align-self: center;
		margin-top: 1.5rem;
	}

	.hradistko-front-page .hr-front-events > .hr-container {
		padding-bottom: 0;
	}

	.hradistko-front-page .hr-front-events > .hr-container::before {
		top: auto;
		bottom: 0;
		left: calc(-1 * var(--hr-gutter));
		width: clamp(16rem, 31vw, 22rem);
		height: auto;
		aspect-ratio: 548 / 375.686;
	}

	.hradistko-front-page .hr-front-events .hr-section-cta-row {
		min-height: clamp(12rem, 23vw, 16rem);
		align-items: center;
		margin-top: 1rem;
	}

	.hradistko-front-page .hr-quick-links > .hr-container {
		padding-bottom: 10rem;
	}

	.hradistko-front-page .hr-quick-links__illustration {
		right: calc(-1 * var(--hr-gutter));
		width: 13rem;
		height: auto;
	}

	.hradistko-front-page .hr-quick-links__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
		align-items: start;
	}

	.hradistko-front-page .hr-block--active-alert {
		width: 100%;
	}

	.hradistko-front-page .hr-quick-links__nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: repeat(2, auto);
		grid-auto-flow: column;
		align-items: start;
	}
}

@media (min-width: 48rem) and (max-width: 59.99rem) {
	/* At narrow tablet widths each label needs room for its 48px icon and
	 * readable text. Retain the mobile link stack beside the alert panel. */
	.hradistko-front-page .hr-quick-links__nav {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
		grid-auto-flow: row;
	}

	.hradistko-front-page .hr-quick-links > .hr-container {
		padding-bottom: 0;
	}

	.hradistko-front-page .hr-quick-links__illustration {
		display: none;
	}
}

@media (max-width: 47.99rem) {
	.hradistko-front-page .hr-hero__controls:focus-within {
		bottom: .5rem;
	}

	.hradistko-front-page .hr-block--latest-posts .hr-card__media {
		height: auto;
		min-height: 0;
		flex: 0 0 auto;
		aspect-ratio: 358 / 237;
	}

	.hradistko-front-page .hr-front-events .hr-card__media {
		width: 100%;
		height: auto;
		min-height: 0;
		aspect-ratio: 1;
	}

	/* One divider follows the actual grid row. The older fixed-y divider
	 * duplicated it at 390px and cut through the enlarged images at 600px. */
	.hradistko-front-page .hr-front-events .hr-card-grid {
		row-gap: 3.4375rem;
	}

	.hradistko-front-page .hr-front-events .hr-card-grid::after {
		content: none;
	}

	.hradistko-front-page .hr-front-events .hr-card--event:nth-child(2n + 3)::before {
		top: -1.71875rem;
		width: calc(200% + 1.0625rem);
	}

	.hradistko-front-page .hr-quick-links__nav,
	.hradistko-front-page .hr-quick-links__nav a {
		width: 100%;
	}

	.hradistko-front-page .hr-home-contact .hr-newsletter-preview {
		height: auto;
	}

	.hradistko-front-page .hr-newsletter-preview__cover {
		width: 100%;
		max-width: none;
	}
}
/* Empty upcoming-events state keeps the original bridge without reserving
 * the four-card composition's height. Populated sections are unaffected. */
.hradistko-front-page .hr-front-events:has(.hr-events-empty) {
	height: auto;
	min-height: 0;
	padding-block: 4rem 2rem;
}

.hradistko-front-page .hr-front-events:has(.hr-events-empty) > .hr-container {
	height: auto;
	min-height: 13rem;
	padding-bottom: 0;
}

.hradistko-front-page .hr-front-events:has(.hr-events-empty) > .hr-container::before {
	top: auto;
	bottom: 0;
	width: 18rem;
	height: auto;
	aspect-ratio: 548 / 375.686;
	left: 0;
}

@media (max-width: 63.999rem) {
	.hradistko-front-page .hr-front-events:has(.hr-events-empty) {
		padding-block: 1.6875rem 0;
	}

	.hradistko-front-page .hr-front-events:has(.hr-events-empty) > .hr-container {
		min-height: 0;
		padding-bottom: 10rem;
	}

	.hradistko-front-page .hr-front-events:has(.hr-events-empty) > .hr-container::before {
		left: auto;
		right: calc(-1 * var(--hr-gutter));
		width: 13rem;
	}
}
/* Missing editorial imagery is a text-card variant, never a blank media slot. */
.hradistko-front-page .hr-block--latest-posts .hr-card--text-only {
	height: auto;
	min-height: 0;
}

.hradistko-front-page .hr-block--latest-posts .hr-card--text-only .hr-card__meta {
	margin-top: 0;
}

@media (max-width: 47.999rem) {
	.hradistko-front-page .hr-block--latest-posts .hr-card--text-only .hr-card__excerpt {
		flex: 0 0 auto;
	}

	.hradistko-front-page .hr-block--latest-posts .hr-card--text-only .hr-card__more {
		margin-top: 1.5rem;
	}
}
