/*
Theme Name: Kollund
Description: Moderne tema til Kollund Forsamlingshus og Borgerforening. Child theme af Twenty Twenty-Five.
Template: twentytwentyfive
Version: 1.0.2
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kollund
*/

/* ---------- Header ---------- */
.kollund-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(251, 248, 243, 0.86);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}
body.admin-bar .kollund-header { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .kollund-header { top: 46px; }
}

.kollund-brand { gap: 0.75rem; }
.kollund-brand a { text-decoration: none; color: inherit; }
.kollund-mark {
	display: grid;
	place-items: center;
	width: 2.6rem;
	height: 2.6rem;
	margin: 0;
	border-radius: 12px;
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--literata);
	font-weight: 600;
	font-size: 1.35rem;
	line-height: 1;
}
.kollund-mark a { color: inherit; }
.kollund-brand-text p { margin: 0; line-height: 1.15; }
.kollund-brand-name {
	font-family: var(--wp--preset--font-family--literata);
	font-weight: 600;
	font-size: 1.3rem;
	letter-spacing: -0.01em;
}
.kollund-brand-sub {
	font-size: 0.78rem;
	color: var(--wp--preset--color--accent-4);
}
@media (max-width: 480px) {
	.kollund-brand-sub { display: none; }
}

.kollund-header .wp-block-navigation a:not(.wp-element-button) {
	text-decoration: none;
	padding: 0.35em 0;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 2px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size 0.25s ease;
}
.kollund-header .wp-block-navigation a:hover,
.kollund-header .wp-block-navigation .current-menu-item > a {
	background-size: 100% 2px;
}
.kollund-header .wp-block-navigation__submenu-container {
	border-radius: 14px;
	border: 1px solid var(--wp--preset--color--accent-6) !important;
	box-shadow: 0 18px 40px -18px rgba(28, 36, 32, 0.35);
	padding: 0.5rem !important;
}

/* ---------- Hero ---------- */
.kollund-hero h1 {
	font-size: clamp(3rem, 8vw, 6.5rem);
	line-height: 0.98;
	letter-spacing: -0.03em;
	text-wrap: balance;
}
.kollund-hero .kollund-eyebrow { color: rgba(255, 255, 255, 0.85); }
.kollund-hero .wp-block-cover__inner-container > * {
	animation: kollund-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.kollund-hero .wp-block-cover__inner-container > *:nth-child(2) { animation-delay: 0.08s; }
.kollund-hero .wp-block-cover__inner-container > *:nth-child(3) { animation-delay: 0.16s; }
.kollund-hero .wp-block-cover__inner-container > *:nth-child(4) { animation-delay: 0.24s; }
@keyframes kollund-rise {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: none; }
}

.kollund-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-weight: 700;
	font-size: 0.78rem !important;
}

.wp-block-button.is-style-outline.kollund-btn-light > .wp-block-button__link {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.08);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.wp-block-button.is-style-outline.kollund-btn-light > .wp-block-button__link:hover {
	background: #fff;
	color: var(--wp--preset--color--contrast);
}

/* ---------- Cards ---------- */
.kollund-card {
	position: relative;
	height: 100%;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 22px;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.kollund-card:hover {
	transform: translateY(-4px);
	border-color: transparent;
	box-shadow: 0 24px 48px -24px rgba(28, 36, 32, 0.35);
}
.kollund-card .wp-block-post-title a,
.kollund-card h3 a {
	text-decoration: none;
	color: inherit;
}
.kollund-card .wp-block-post-title a::after,
.kollund-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.kollund-card .kollund-arrow {
	color: var(--wp--preset--color--accent-2);
	font-weight: 700;
	transition: transform 0.25s ease;
}
.kollund-card:hover .kollund-arrow { transform: translateX(4px); }

.kollund-icon {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	margin: 0;
	border-radius: 14px;
	background: var(--wp--preset--color--accent-5);
	font-size: 1.4rem;
	line-height: 1;
}

.wp-block-post-template.is-layout-grid > li { display: flex; }
.wp-block-post-template.is-layout-grid > li > .kollund-card { width: 100%; }

/* ---------- Images ---------- */
.kollund-rounded img,
.entry-content .wp-block-image img,
.wp-block-post-content .wp-block-image img {
	border-radius: 18px;
}

/* ---------- Content ---------- */
.wp-block-post-content .wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 0 0 1px var(--wp--preset--color--accent-6);
}
.wp-block-post-content .wp-block-table td,
.wp-block-post-content .wp-block-table th {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
	padding: 0.85em 1.1em;
}
.wp-block-post-content .wp-block-table tr:last-child td { border-bottom: 0; }

.kollund-program thead { border-bottom: 0; }
.kollund-program th {
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
	text-align: left;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
}
.kollund-program td:first-child {
	width: 38%;
	font-weight: 700;
	color: var(--wp--preset--color--accent-2);
}
.kollund-program tbody tr:hover { background: var(--wp--preset--color--accent-5); }

.wp-block-post-content .wp-block-file {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	background: #fff;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 14px;
}
.wp-block-post-content .wp-block-file::before {
	content: "📄";
	font-size: 1.25rem;
}

.kollund-page-header {
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}

/* ---------- Footer ---------- */
.kollund-footer a { color: inherit; text-decoration: none; }
.kollund-footer a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.kollund-footer .kollund-muted { color: rgba(251, 248, 243, 0.65); }
.kollund-footer .kollund-mark {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--accent-1);
}

/* ---------- Film ---------- */
.kollund-video__play,
.kollund-video iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 30px 60px -30px rgba(28, 36, 32, 0.45);
}
.kollund-video__play {
	position: relative;
	padding: 0;
	cursor: pointer;
	background: var(--wp--preset--color--contrast);
}
.kollund-video__play img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}
.kollund-video__play:hover img { transform: scale(1.03); }
.kollund-video__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	background: linear-gradient(180deg, rgba(20, 28, 24, 0.05) 30%, rgba(20, 28, 24, 0.6) 100%);
	color: #fff;
}
.kollund-video__icon {
	width: 5.5rem;
	height: 5.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-2);
	box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.25);
	position: relative;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.kollund-video__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 0.9rem 0 0.9rem 1.5rem;
	border-color: transparent transparent transparent #fff;
}
.kollund-video__play:hover .kollund-video__icon,
.kollund-video__play:focus-visible .kollund-video__icon {
	transform: scale(1.08);
	box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.3);
}
.kollund-video__title {
	font-family: var(--wp--preset--font-family--literata);
	font-size: clamp(1.4rem, 3vw, 2.2rem);
	font-weight: 600;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.kollund-video__note {
	margin-top: 0.75rem;
	text-align: center;
	font-size: 0.8rem;
	color: var(--wp--preset--color--accent-4);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
	}
}
