/*
 * katholisch in Duisburg – Design „Bistumsblau“
 * Farben: Kadence-Globalpalette (palette1–9) + Ergänzungen unten.
 *   palette1 #0081C2 Blau · palette2 #00669A Hover · palette3/4 #1F2A33 Schiefer
 *   palette5 #4E5056 · palette6 #696C76 · palette7 #DFE4EA Linien · palette8 #F4F6F9 Grund · palette9 #FFF
 */

:root {
	--kd-blue: var(--global-palette1, #0081c2);
	--kd-blue-hover: var(--global-palette2, #00669a);
	--kd-sky: #009fe3;
	--kd-deep: #0b4a73;
	--kd-slate: var(--global-palette3, #1f2a33);
	--kd-text-2: var(--global-palette5, #4e5056);
	--kd-muted: var(--global-palette6, #696c76);
	--kd-line: var(--global-palette7, #dfe4ea);
	--kd-line-soft: #eef0f4;
	--kd-bg: var(--global-palette8, #f4f6f9);
	--kd-mist: #e6e7f0;
	--kd-ghost-border: #c5ccd6;

	--kd-font-display: 'Bricolage Grotesque', 'Segoe UI', Helvetica, Arial, sans-serif;
	--kd-font-body: 'Source Sans 3', 'Segoe UI', Helvetica, Arial, sans-serif;

	/* Seitenrand: 64px am Desktop, 20px mobil; Inhalt max. 1312px */
	--kd-gutter: 64px;
	--kd-inner: 1312px;
	--kd-pad-x: max(var(--kd-gutter), calc((100% - var(--kd-inner)) / 2));
}

@media (max-width: 1024px) {
	:root { --kd-gutter: 40px; }
}

@media (max-width: 767px) {
	:root { --kd-gutter: 20px; }
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.kd-display {
	font-family: var(--kd-font-display);
	letter-spacing: -0.02em;
}

/* Klassische Themes bekommen um Gruppen-Blöcke einen Zusatz-Wrapper;
   in unseren Abschnitten soll er das Grid/Flex-Layout nicht stören. */
[class*="kd-"] > .wp-block-group__inner-container { display: contents; }

/* ---------- Icons (als CSS-Masken, damit sie im Editor nicht stören) ---------- */

.kd-header-actions .kd-btn::before,
.kd-mobile-actions .kd-btn::before,
.kd-card > .kt-inside-inner-col::before {
	content: "";
	display: inline-block;
	flex: none;
	background: currentColor;
	-webkit-mask: var(--kd-icon) center / contain no-repeat;
	mask: var(--kd-icon) center / contain no-repeat;
}

.kd-icon-clock {
	--kd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.kd-icon-doc {
	--kd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l4 4v14H6z'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M9 13h6M9 17h6'/%3E%3C/svg%3E");
}

/* ---------- Header ---------- */

#masthead .site-main-header-wrap .site-header-row-container-inner {
	background: var(--kd-bg);
	border-bottom: 1px solid var(--kd-line);
}

#masthead .site-main-header-wrap .site-container {
	max-width: none;
	padding-left: var(--kd-pad-x);
	padding-right: var(--kd-pad-x);
}

.kd-wordmark {
	display: inline-flex;
	align-items: baseline;
	gap: 0.38em;
	font-family: var(--kd-font-display);
	font-size: 26px;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--kd-slate);
	text-decoration: none;
	white-space: nowrap;
}

.kd-wordmark:hover { color: var(--kd-slate); }
.kd-wordmark__a { font-weight: 800; color: var(--kd-blue); }
.kd-wordmark__b { font-weight: 500; }

/* Hauptnavigation */
.header-navigation .header-menu-container > ul > li.menu-item > a,
.main-navigation .primary-menu-container > ul > li.menu-item > a {
	font-family: var(--kd-font-display);
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--kd-slate);
	padding: 0.6em 20px;
}

.main-navigation .primary-menu-container > ul > li.menu-item > a:hover,
.main-navigation .primary-menu-container > ul > li.menu-item.current-menu-item > a,
.main-navigation .primary-menu-container > ul > li.menu-item.current-menu-ancestor > a {
	color: var(--kd-blue);
}

.header-navigation .header-menu-container ul ul.sub-menu {
	background: #fff;
	border: 1px solid var(--kd-line);
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(31, 42, 51, 0.12);
	padding: 8px 0;
}

.header-navigation .header-menu-container ul ul li.menu-item > a {
	color: var(--kd-slate);
	font-size: 16px;
	padding: 0.55em 1.2em;
	border: 0;
}

.header-navigation .header-menu-container ul ul li.menu-item > a:hover { color: var(--kd-blue); background: var(--kd-bg); }

/* Header-Buttons (Kadence-HTML-Element) */
.kd-header-actions,
.kd-mobile-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.kd-header-actions p,
.kd-mobile-actions p { margin: 0; display: contents; }

.kd-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border-radius: 999px;
	font-family: var(--kd-font-body);
	font-weight: 600;
	font-size: 16px;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .15s, color .15s, border-color .15s;
}

.kd-header-actions .kd-btn::before { width: 18px; height: 18px; }

.site-header-item a.kd-btn,
.site-header-item a.kd-btn:hover { text-decoration: none; }

.kd-btn--primary,
.kd-btn--primary:visited { background: var(--kd-blue); color: #fff; }
.kd-btn--primary:hover { background: var(--kd-blue-hover); color: #fff; }

.kd-btn--outline,
.kd-btn--outline:visited { border: 1.5px solid var(--kd-slate); color: var(--kd-slate); padding: 10.5px 16.5px; }
.kd-btn--outline:hover { background: var(--kd-slate); color: #fff; }

.site-header-item .search-toggle-open,
.site-header-item .search-toggle-open-container .search-toggle-open {
	color: var(--kd-slate);
}

.search-toggle-open .kadence-svg-iconset svg { width: 24px; height: 24px; }

@media (max-width: 1360px) {
	.kd-header-actions .kd-btn--outline { display: none; }
	.main-navigation .primary-menu-container > ul > li.menu-item > a { padding-left: 14px; padding-right: 14px; }
}

/* Mobil-Header */
#mobile-header .site-main-header-wrap .site-header-row-container-inner {
	background: var(--kd-bg);
	border-bottom: 1px solid var(--kd-line);
}

#mobile-header .kd-wordmark { font-size: 20px; gap: 0.3em; }

.kd-mobile-actions .kd-btn {
	width: 44px;
	height: 44px;
	padding: 0;
	justify-content: center;
}

.kd-mobile-actions .kd-btn::before { width: 20px; height: 20px; }

.kd-mobile-actions .kd-btn .kd-btn__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.mobile-toggle-open-container .menu-toggle-open {
	color: var(--kd-slate);
	padding: 0 10px;
}

.mobile-toggle-open-container .menu-toggle-open .menu-toggle-icon svg { width: 24px; height: 24px; }

#mobile-drawer .drawer-inner {
	background: var(--kd-slate);
}

#mobile-drawer .mobile-navigation ul li > a,
#mobile-drawer .mobile-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrap {
	font-family: var(--kd-font-display);
	font-size: 22px;
	font-weight: 700;
	color: #fff;
}

#mobile-drawer .mobile-navigation ul ul li > a { font-family: var(--kd-font-body); font-size: 17px; font-weight: 400; }

/* ---------- Inhalt allgemein ---------- */

a { text-underline-offset: 0.15em; }

/* ---------- Startseite: Kadence-Zeilen ----------
   Layout, Farben, Abstände und Radien stehen in den Block-Einstellungen (Kadence).
   Hier nur, was Kadence nicht abbildet: Icons, Feintypografie, Hover, Mobil-Details. */

.entry-content > .kb-row-layout-wrap:is(.kd-hero, .kd-areas, .kd-now, .kd-places) { margin-top: 0; margin-bottom: 0; }

.entry-content :is(.kd-hero, .kd-areas, .kd-now, .kd-places) :is(p, .wp-block-group, .wp-block-query, .wp-block-post-template, figure, .wp-block-kadence-advancedheading) {
	margin-top: 0;
	margin-bottom: 0;
}

.kd-muted { font-size: 17px; color: var(--kd-muted); }

.kd-more { font-size: 17px; font-weight: 600; }
.kd-more a { color: var(--kd-blue); text-decoration: none; }
.kd-more a:hover { color: var(--kd-blue-hover); text-decoration: underline; }

/* Hero */
@media (min-width: 1025px) {
	.kd-hero__text > .kt-inside-inner-col { padding-left: max(64px, calc(50vw - 656px)) !important; }
}

.kd-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--kd-blue);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.kd-eyebrow::before {
	content: "";
	display: inline-block;
	width: 28px;
	height: 3px;
	background: currentColor;
}

.kd-hero__title { text-wrap: balance; letter-spacing: -0.02em; }

.kd-hero__lead {
	font-size: 22px;
	line-height: 1.45;
	max-width: 520px;
	color: var(--kd-text-2);
}

.kd-hero__buttons { margin-top: 8px !important; }

/* Vier Bereiche */
.kd-card { transition: transform .2s ease; }
.kd-card > .kt-inside-inner-col { min-height: 340px; transition: box-shadow .2s ease; }
.kd-card:hover { transform: translateY(-3px); }
.kd-card:hover > .kt-inside-inner-col { box-shadow: 0 14px 30px rgba(31, 42, 51, 0.16); }
.kd-card > .kt-inside-inner-col::before { width: 36px; height: 36px; }
.kd-card .kb-section-link-overlay:focus-visible { outline: 3px solid var(--kd-sky); outline-offset: 3px; border-radius: 18px; }

.kd-card__text { font-size: 17px; line-height: 1.45; flex-grow: 1; }
.kd-card__tags { font-size: 15px; }

.kd-card--feiern .kd-card__text { color: rgba(255, 255, 255, 0.9); }
.kd-card--feiern .kd-card__tags { color: rgba(255, 255, 255, 0.8); }
.kd-card--erleben .kd-card__text { color: rgba(255, 255, 255, 0.9); }
.kd-card--erleben .kd-card__tags { color: rgba(255, 255, 255, 0.75); }
.kd-card--da-sein .kd-card__tags { color: var(--kd-muted); }

.kd-card--feiern { --kd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='M6 9h12'/%3E%3Cpath d='M8 21h8'/%3E%3C/svg%3E"); }
.kd-card--begleiten { --kd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20c2-6 6-9 8-9s6 3 8 9'/%3E%3Ccircle cx='12' cy='6' r='3'/%3E%3C/svg%3E"); }
.kd-card--erleben { --kd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V6l10-2v12'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='16' cy='16' r='3'/%3E%3C/svg%3E"); }
.kd-card--da-sein { --kd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-5.5-7-11a7 7 0 0 1 14 0c0 5.5-7 11-7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E"); }

/* Gottesdienste + Aktuell */
.kd-services > .kt-inside-inner-col {
	border: 1px solid var(--kd-line);
	border-radius: 16px;
	overflow: hidden;
	gap: 0 !important;
}

.kd-service {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 16px;
	align-items: center;
	padding: 18px 22px;
	border-bottom: 1px solid var(--kd-line-soft);
}

.kd-service:last-child { border-bottom: 0; }

.kd-service__time {
	font-family: var(--kd-font-display);
	letter-spacing: -0.02em;
	font-size: 22px;
	font-weight: 700;
	color: var(--kd-blue);
}

.kd-service__info { display: flex; flex-direction: column; }
.kd-service__title { font-weight: 600; font-size: 17px; line-height: 1.3; }
.kd-service__place { font-size: 15px; color: var(--kd-muted); line-height: 1.3; }

.kd-news .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	padding: 0;
	list-style: none;
}

.kd-news .wp-block-post {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
}

.kd-news .wp-block-post-featured-image {
	aspect-ratio: 4 / 3;
	border-radius: 12px;
	overflow: hidden;
}

.kd-news .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }

.kd-image-placeholder { background: linear-gradient(135deg, #bfe3f7, var(--kd-sky)); }
.kd-news .wp-block-post:nth-child(3n+2) .kd-image-placeholder { background: linear-gradient(135deg, #c9d1dc, #5a6b7c); }
.kd-news .wp-block-post:nth-child(3n) .kd-image-placeholder { background: linear-gradient(135deg, #dceff9, var(--kd-blue)); }

.kd-news__kicker {
	display: flex;
	flex-wrap: wrap;
	gap: 0 0.4em;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--kd-blue);
	font-weight: 600;
}

.kd-news__kicker > * { margin: 0; }
.kd-news__kicker a { color: inherit; text-decoration: none; position: relative; z-index: 1; }
.kd-news__kicker .wp-block-post-date::before { content: "· "; }

.kd-news__title { font-size: 21px; font-weight: 700; line-height: 1.2; }
.kd-news__title a { color: var(--kd-slate); text-decoration: none; }
.kd-news__title a::after { content: ""; position: absolute; inset: 0; }
.kd-news .wp-block-post:hover .kd-news__title a { color: var(--kd-blue); }

/* Orte */
.kd-places__lead { font-size: 18px; line-height: 1.5; color: rgba(255, 255, 255, 0.8); }

.kd-places__grid > .kt-row-column-wrap { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

.kd-place > .kt-inside-inner-col {
	border: 1px solid rgba(255, 255, 255, 0.12);
	transition: background-color .15s;
}

.kd-place:hover > .kt-inside-inner-col { background-color: rgba(255, 255, 255, 0.13) !important; }

.kd-place__area {
	font-size: 13px;
	color: var(--kd-sky);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 600;
}

.kd-place__note { font-size: 14px; color: rgba(255, 255, 255, 0.7); }

.kd-place--wide > .kt-inside-inner-col { border-color: var(--kd-blue); }
.kd-place--wide:hover > .kt-inside-inner-col { background-color: var(--kd-blue-hover) !important; }
.kd-place__head { display: flex; flex-direction: column; gap: 4px; }
.kd-place--wide .kd-place__area { color: rgba(255, 255, 255, 0.8); }
.kd-place--wide .kd-place__note { font-size: 15px; color: rgba(255, 255, 255, 0.9); }

/* ---------- Footer ---------- */

.site-footer .site-middle-footer-wrap .site-footer-row-container-inner {
	background: var(--kd-bg);
	border-top: 1px solid var(--kd-line);
}

.site-footer .site-middle-footer-wrap .site-container {
	max-width: none;
	padding-left: var(--kd-pad-x);
	padding-right: var(--kd-pad-x);
}

.site-footer .site-middle-footer-inner-wrap {
	padding-top: 56px;
	padding-bottom: 40px;
	column-gap: 40px;
	font-size: 15px;
	color: var(--kd-text-2);
}

.site-footer .footer-widget-area .widget { margin-bottom: 0; }
.site-footer .footer-widget-area p { margin: 0; }

.kd-footer__brand {
	font-family: var(--kd-font-display);
	letter-spacing: -0.02em;
	font-size: 20px;
	font-weight: 800;
	color: var(--kd-blue);
	margin-bottom: 10px !important;
}

.kd-footer__address { line-height: 1.5; }

.kd-footer__title {
	font-weight: 600;
	color: var(--kd-slate);
	margin-bottom: 8px !important;
}

.site-footer ul.kd-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.site-footer .kd-footer__links li { margin: 0; line-height: 1.4; }
.site-footer .kd-footer__links a { color: var(--kd-text-2); text-decoration: none; }
.site-footer .kd-footer__links a:hover { color: var(--kd-blue); }

/* ---------- Unterseiten ---------- */

.entry-hero .entry-title,
.entry-header .entry-title {
	font-family: var(--kd-font-display);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--kd-slate);
}

.entry-content .kd-note {
	font-size: 15px;
	color: var(--kd-muted);
	margin-top: -0.4em;
}

.entry-content h2[id] { scroll-margin-top: 24px; }

/* Infokästen, Kachel-Navigation und Akkordeon sind Kadence-Blöcke (Gestaltung in den Block-Einstellungen). */
.kd-box .kd-box__title + p { margin: 0; }
.kd-subcard .kt-inside-inner-col { transition: border-color .15s, box-shadow .15s; }
.kd-subcard:hover .kt-inside-inner-col { box-shadow: 0 8px 20px rgba(31, 42, 51, 0.08); }
.kd-subcard:hover .wp-block-kadence-advancedheading { color: var(--kd-blue); }
.wp-block-kadence-accordion .kt-accordion-panel-inner > :first-child { margin-top: 0; }
.wp-block-kadence-accordion .kt-accordion-panel-inner ul { margin-bottom: 0; }

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
	.kd-card > .kt-inside-inner-col { min-height: 280px; }
	.site-footer .site-middle-footer-inner-wrap { row-gap: 32px; }
}

/* ---------- Mobil (nach startseite-mobil.html) ---------- */

@media (max-width: 767px) {
	.kd-hide-mobile { display: none !important; }

	.kd-eyebrow { font-size: 13px; gap: 8px; }
	.kd-eyebrow::before { width: 22px; }
	.kd-hero__lead { font-size: 18px; }
	.kd-hero__buttons { margin-top: 0 !important; }
	.kd-hero__media > .kt-inside-inner-col { min-height: 220px; }

	.kd-card > .kt-inside-inner-col { min-height: 0; position: relative; }
	.kd-card:hover { transform: none; }
	.kd-card:hover > .kt-inside-inner-col { box-shadow: none; }
	.kd-card > .kt-inside-inner-col::before {
		content: "→";
		position: absolute;
		right: 20px;
		top: 50%;
		transform: translateY(-50%);
		width: auto;
		height: auto;
		font-size: 22px;
		background: none;
		-webkit-mask: none;
		mask: none;
	}
	.kd-card__text { display: none; }
	.kd-card__tags { font-size: 14px; }

	.kd-service { grid-template-columns: 80px 1fr; gap: 12px; padding: 14px 16px; }
	.kd-service__time { font-size: 19px; }
	.kd-service__title { font-size: 16px; }
	.kd-service__place { font-size: 14px; }
	.kd-more { font-size: 16px; }
	.kd-news .wp-block-post-template { grid-template-columns: 1fr; gap: 16px; }
	.kd-news .wp-block-post {
		display: grid;
		grid-template-columns: 96px 1fr;
		grid-template-rows: auto 1fr;
		column-gap: 14px;
		row-gap: 4px;
	}
	.kd-news .wp-block-post-featured-image { grid-row: 1 / span 2; border-radius: 10px; }
	.kd-news__kicker { align-self: end; font-size: 11px; }
	.kd-news__title { font-size: 18px; }

	.kd-places__lead { font-size: 16px; }
	.kd-places__grid > .kt-row-column-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.kd-place > .kt-inside-inner-col { border: 0; }
	.kd-place__area { font-size: 12px; letter-spacing: 0; }
	.kd-place__note { display: none; }
	.kd-place--wide .kd-place__area { display: none; }
	.kd-place--wide .kd-place__note { display: block; font-size: 0; }
	.kd-place--wide .kd-place__note::after { content: "Da sein →"; font-size: 14px; }

	.site-footer .site-middle-footer-inner-wrap { padding-top: 28px; padding-bottom: 36px; row-gap: 20px; font-size: 14px; }
	.kd-footer__brand { font-size: 17px; margin-bottom: 6px !important; }
}
