/*
Theme Name: TTC Kellen
Author: Tischtennisclub (TTC) Kellen
Description: Schlankes Block-Theme für den Tischtennisclub (TTC) Kellen – in den Vereinsfarben Blau und Neongrün, Schriften lokal eingebunden (keine Google-Server).
Version: 1.0.1
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ttc-kellen
*/

/* ---------- Grundlagen ---------- */
:root {
	--ttc-radius: 12px;
	--ttc-shadow: 0 14px 34px -22px rgba(14, 42, 71, 0.45);
}

:where(a, button, input, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--lime);
	outline-offset: 2px;
}

img {
	height: auto;
}

/* ---------- Kopfbereich ---------- */
.ttc-header {
	box-shadow: 0 6px 24px -18px rgba(14, 42, 71, 0.6);
	position: relative;
	z-index: 20;
}

.ttc-brand .wp-block-site-logo img {
	display: block;
}

.ttc-phone {
	margin: 0;
	font-weight: 600;
	font-size: 1rem;
	white-space: nowrap;
}

.ttc-phone a {
	color: var(--wp--preset--color--navy);
	text-decoration: none;
}

.ttc-phone a:hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--lime);
	text-decoration-thickness: 3px;
	text-underline-offset: 5px;
}

.ttc-phone .ttc-phone__label {
	color: var(--wp--preset--color--muted);
	font-weight: 500;
}

/* Suche mit Lupe */
.ttc-search .wp-block-search__button {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--navy);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	padding: 0.55rem;
	width: 2.75rem;
	height: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ttc-search .wp-block-search__button:hover {
	background: var(--wp--preset--color--lime);
	border-color: var(--wp--preset--color--lime);
	color: var(--wp--preset--color--navy);
}

.ttc-search .wp-block-search__button svg {
	width: 1.4rem;
	height: 1.4rem;
	fill: currentColor;
}

.ttc-search .wp-block-search__input {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	padding: 0.5rem 1rem;
	font-size: 1rem;
}

.ttc-search .wp-block-search__inside-wrapper {
	gap: 0.4rem;
	border: 0;
}

/* Navigationsleiste (Desktop) */
.ttc-navbar .ttc-mainnav .wp-block-navigation-item__content {
	display: block;
	padding: 0.95rem 1.05rem;
	color: var(--wp--preset--color--base);
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.ttc-navbar .ttc-mainnav .wp-block-navigation-item:first-child .wp-block-navigation-item__content {
	padding-left: 0;
}

.ttc-navbar .ttc-mainnav .wp-block-navigation-item__content:hover,
.ttc-navbar .ttc-mainnav .current-menu-item > .wp-block-navigation-item__content {
	box-shadow: inset 0 -4px 0 var(--wp--preset--color--lime);
	color: var(--wp--preset--color--base);
}

/* Mobil/Tablet: Menü-Button statt Leiste */
body .ttc-nav-toggle {
	display: none;
}

@media (max-width: 999px) {
	body .ttc-navbar {
		display: none;
	}

	body .ttc-nav-toggle {
		display: flex;
	}

	body .ttc-phone {
		display: none;
	}
}

@media (max-width: 599px) {
	.ttc-brand .wp-block-site-tagline {
		display: none;
	}
}

.ttc-nav-toggle .wp-block-navigation__responsive-container-open {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--base);
	border-radius: 999px;
	width: 2.75rem;
	height: 2.75rem;
	align-items: center;
	justify-content: center;
}

.ttc-nav-toggle .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem;
}

.ttc-nav-toggle .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.6rem;
	font-weight: 700;
	padding: 0.35rem 0;
}

/* ---------- Seitenkopf (blaues Band) ---------- */
.ttc-pagehead {
	background-image:
		radial-gradient(circle at 88% 15%, rgba(197, 218, 43, 0.22), transparent 42%),
		linear-gradient(135deg, var(--wp--preset--color--navy) 0%, var(--wp--preset--color--navy-2) 100%);
}

.ttc-pagehead h1,
.ttc-pagehead .wp-block-post-title,
.ttc-pagehead .wp-block-query-title {
	color: var(--wp--preset--color--base);
}

.ttc-pagehead h1::after {
	content: "";
	display: block;
	width: 72px;
	height: 5px;
	margin-top: 0.9rem;
	border-radius: 3px;
	background: var(--wp--preset--color--lime);
}

.ttc-pagehead .wp-block-post-date,
.ttc-pagehead .wp-block-post-terms,
.ttc-pagehead .wp-block-post-terms a {
	color: rgba(255, 255, 255, 0.85);
}

.ttc-pagehead .wp-block-post-terms a {
	color: var(--wp--preset--color--lime);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 700;
	font-size: 0.85rem;
}

/* ---------- Kleine Überschrift ---------- */
.ttc-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--wp--preset--color--lime-deep);
	margin-bottom: 0;
}

.has-navy-background-color .ttc-eyebrow,
.ttc-pagehead .ttc-eyebrow,
.ttc-hero .ttc-eyebrow {
	color: var(--wp--preset--color--lime);
}

.ttc-eyebrow + .wp-block-heading {
	margin-top: 0.35rem;
}

/* ---------- Startseite ---------- */
.ttc-hero {
	min-height: min(76vh, 660px);
}

.ttc-hero .wp-block-media-text__content {
	padding-top: clamp(2.75rem, 7vw, 6rem);
	padding-bottom: clamp(2.75rem, 7vw, 6rem);
	padding-right: clamp(1.25rem, 4vw, 4rem);
	padding-left: max(clamp(1.25rem, 4vw, 2rem), calc((100vw - var(--wp--style--global--wide-size)) / 2));
}

.ttc-hero h1 {
	font-size: var(--wp--preset--font-size--huge);
	color: var(--wp--preset--color--base);
	margin-top: 0.4rem;
}

.ttc-hero .wp-block-buttons {
	margin-top: 2rem;
}

.ttc-hero .is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--base);
	border-color: rgba(255, 255, 255, 0.75);
}

.ttc-hero .is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--navy);
}

@media (max-width: 600px) {
	.ttc-hero .wp-block-media-text__media {
		min-height: 260px;
	}

	.ttc-hero .wp-block-media-text__content {
		padding-left: clamp(1.25rem, 4vw, 2rem);
	}
}

.ttc-section-head {
	margin-bottom: var(--wp--preset--spacing--40);
}

.ttc-section-head p:last-child a {
	font-weight: 600;
	text-decoration: none;
}

.ttc-section-head p:last-child a:hover {
	text-decoration: underline;
}

/* ---------- Karten ---------- */
.ttc-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-top: 5px solid var(--wp--preset--color--lime);
	border-radius: var(--ttc-radius);
	padding: clamp(1.25rem, 3vw, 1.85rem);
	box-shadow: var(--ttc-shadow);
}

.ttc-card > :first-child {
	margin-top: 0;
}

.ttc-card a {
	overflow-wrap: anywhere;
}

.ttc-card .ttc-card__label {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--wp--preset--color--lime-deep);
	margin-bottom: 0.25rem;
}

.ttc-card--soft {
	background: var(--wp--preset--color--lime-soft);
	border-color: #dfe8a6;
}

/* Nummerierte Schritte */
.ttc-step {
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--wp--preset--color--lime);
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.5rem;
	line-height: 2.75rem;
	text-align: center;
}

/* Beitragskarten */
.wp-block-post-template > li {
	display: flex;
}

.ttc-post-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--ttc-radius);
	overflow: hidden;
	box-shadow: var(--ttc-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ttc-post-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 22px 40px -24px rgba(14, 42, 71, 0.55);
}

.ttc-post-card > .wp-block-post-featured-image {
	margin: 0;
}

.ttc-post-card__body {
	padding: 1.25rem 1.4rem 1.5rem;
}

.ttc-post-card__body > * {
	margin-top: 0;
	margin-bottom: 0;
}

.ttc-post-card__body > * + * {
	margin-top: 0.55rem;
}

.ttc-post-card .wp-block-post-title {
	font-size: var(--wp--preset--font-size--large);
}

.ttc-post-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--navy-2);
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--lime);
	text-decoration-thickness: 3px;
}

.wp-block-post-excerpt__more-link {
	font-weight: 600;
}

/* ---------- Platzhalter-Hinweis ---------- */
.ttc-note {
	background: #fff7dc;
	border: 1px dashed #d9b23c;
	border-left: 6px solid #d9b23c;
	border-radius: 8px;
	padding: 1rem 1.25rem;
	color: #5b4a10;
	font-size: 1rem;
}

.ttc-note p {
	margin: 0;
}

/* ---------- Zeitleiste ---------- */
.ttc-timeline {
	border-left: 3px solid var(--wp--preset--color--lime);
	padding-left: 1.9rem;
	margin-left: 0.6rem;
}

.ttc-timeline__item {
	position: relative;
}

.ttc-timeline__item::before {
	content: "";
	position: absolute;
	left: calc(-1.9rem - 10px);
	top: 0.3rem;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	background: var(--wp--preset--color--navy);
	border: 3px solid var(--wp--preset--color--lime);
	box-sizing: border-box;
}

.ttc-timeline__item + .ttc-timeline__item {
	margin-top: 2.25rem;
}

.ttc-timeline__item > * {
	margin-top: 0.4rem;
	margin-bottom: 0;
}

.ttc-timeline__year {
	display: inline-block;
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--base);
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.04em;
	padding: 0.1rem 0.65rem;
	border-radius: 4px;
}

/* ---------- Bilder, Galerie, Tabellen ---------- */
.wp-block-post-content .wp-block-image img,
.wp-block-post-featured-image img,
.wp-block-gallery .wp-block-image img {
	border-radius: 10px;
}

.ttc-post-card .wp-block-post-featured-image img {
	border-radius: 0;
}

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table th,
.wp-block-table td {
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--line);
	text-align: left;
}

.wp-block-table thead {
	border-bottom: 0;
}

.wp-block-table th {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--base);
	font-weight: 600;
}

.wp-block-table tbody tr:nth-child(even) {
	background: var(--wp--preset--color--surface);
}

/* ---------- Fußbereich ---------- */
.ttc-footer a {
	text-decoration-color: rgba(197, 218, 43, 0.75);
	text-underline-offset: 3px;
}

.ttc-footer a:hover {
	color: var(--wp--preset--color--lime);
}

.ttc-footer .wp-block-site-title a {
	color: var(--wp--preset--color--base);
}

.ttc-footer-heading {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--wp--preset--color--lime);
}

.ttc-footer .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.1rem 0;
}

.ttc-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	font-size: 0.95rem;
	color: rgba(255, 255, 255, 0.8);
}

.ttc-footer-bottom p {
	margin: 0;
}

/* ---------- Ergänzungen ---------- */
.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: 0;
}

.ttc-footer {
	font-size: 1rem;
}

.wp-block-gallery .wp-block-image figcaption {
	font-size: 0.95rem;
	padding-top: 2.5rem;
}

.ttc-card__value {
	font-weight: 600;
	font-size: 1.15rem;
	line-height: 1.5;
	color: var(--wp--preset--color--navy);
}

.ttc-eyebrow a {
	color: inherit;
	text-decoration: none;
}

/* Hervorgehobener neuester Beitrag (Startseite) */
.ttc-post-card--featured .wp-block-columns {
	margin: 0;
	gap: 0;
}

.ttc-post-card--featured .wp-block-column:first-child {
	align-self: stretch;
}

.ttc-post-card--featured .wp-block-post-featured-image {
	margin: 0;
	height: 100%;
}

.ttc-post-card--featured .wp-block-post-featured-image a,
.ttc-post-card--featured .wp-block-post-featured-image img {
	height: 100%;
}

.ttc-post-card--featured .wp-block-post-featured-image img {
	min-height: 280px;
	object-fit: cover;
}

.ttc-post-card--featured .ttc-post-card__body {
	padding: clamp(1.5rem, 4vw, 3rem);
}

.ttc-post-card--featured .wp-block-post-title {
	font-size: var(--wp--preset--font-size--x-large);
}

.ttc-post-card--featured + * {
	margin-top: var(--wp--preset--spacing--40);
}

.ttc-backlink {
	font-weight: 600;
}

.ttc-backlink a {
	text-decoration: none;
}

.ttc-backlink a:hover {
	text-decoration: underline;
}

/* Kompakte, gleich hohe Beitragskacheln */
.ttc-post-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.ttc-post-card .wp-block-post-title a {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ttc-post-card .wp-block-post-excerpt {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.ttc-post-card .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
}

.ttc-post-card .wp-block-post-excerpt__more-text {
	margin-top: auto;
	padding-top: 0.75rem;
	margin-bottom: 0;
}

.ttc-fallback-image img {
	display: block;
}

/* Menüleiste auf mittleren Bildschirmen etwas enger, damit sie einzeilig bleibt */
@media (max-width: 1199px) {
	.ttc-navbar .ttc-mainnav .wp-block-navigation-item__content {
		padding-left: 0.7rem;
		padding-right: 0.7rem;
		font-size: 1rem;
	}
}
