/*
 * Theme Name: Gerne Reise
 * Theme URI: https://gernereise.de
 * Description: Eigenes Child-Theme auf Basis von Blocksy für gernereise.de. Salbeigrüner Header und Footer, Logo mit Taj-Mahal-Icon, Überschriften in Pacifico, Text in Poppins.
 * Author: gernereise.de
 * Author URI: https://gernereise.de
 * Template: blocksy
 * Version: 1.0.0
 * Requires at least: 6.0
 * 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: gernereise
 */

/* ==========================================================================
   1. Schriften (Poppins lokal, Pacifico siehe functions.php)
   ========================================================================== */
@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/poppins-400.woff") format("woff");
}
@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("assets/fonts/poppins-500.woff") format("woff");
}
@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/poppins-700.woff") format("woff");
}

/* ==========================================================================
   2. Design-Variablen
   ========================================================================== */
:root {
	/* Farben */
	--gr-salbei: #7FB59E;          /* Header, Footer, Flächen */
	--gr-salbei-hell: #DCE9E2;     /* Rahmen, Chips */
	--gr-tiefgruen: #4F7C77;       /* Überschriften, Outline-Buttons */
	--gr-creme: #FFF6CC;           /* Seitenhintergrund */
	--gr-creme-hell: #FFFBE6;      /* Eingabefelder, helle Flächen */
	--gr-koralle: #CF4A38;         /* Komplementärfarbe (Logo) */
	--gr-koralle-text: #C2402E;    /* Links und Buttons (etwas dunkler wegen Kontrast, WCAG AA) */
	--gr-koralle-hover: #A93526;   /* Hover von Links und Buttons */
	--gr-tinte: #24403E;           /* Fließtext, Navigation */
	--gr-weiss: #FFFFFF;

	/* Schriften */
	--gr-font-head: "Pacifico", cursive;
	--gr-font-text: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	/* Formen */
	--gr-radius-pill: 999px;
	--gr-radius-card: 24px;
	--gr-radius-tile: 16px;
	--gr-radius-input: 12px;

	/* Layout */
	--gr-container: 1290px;
	--gr-header-h: 84px;
}

/* Blocksy-Variablen auf dem body überschreiben (schlägt die Werte aus :root) */
body {
	--theme-palette-color-1: var(--gr-koralle-text);
	--theme-palette-color-2: var(--gr-koralle-hover);
	--theme-palette-color-3: var(--gr-tinte);
	--theme-palette-color-4: var(--gr-tiefgruen);
	--theme-palette-color-5: var(--gr-salbei-hell);
	--theme-palette-color-6: var(--gr-creme);
	--theme-palette-color-7: var(--gr-creme-hell);
	--theme-palette-color-8: var(--gr-weiss);

	--theme-text-color: var(--gr-tinte);
	--theme-headings-color: var(--gr-tiefgruen);
	--theme-link-initial-color: var(--gr-koralle-text);
	--theme-link-hover-color: var(--gr-koralle-hover);
	--theme-border-color: var(--gr-salbei-hell);
	--theme-font-family: var(--gr-font-text);

	--theme-button-background-initial-color: var(--gr-koralle-text);
	--theme-button-background-hover-color: var(--gr-koralle-hover);
	--theme-button-text-initial-color: var(--gr-weiss);
	--theme-button-text-hover-color: var(--gr-weiss);
	--theme-button-border-radius: var(--gr-radius-pill);
	--theme-button-min-height: 44px;
}

/* ==========================================================================
   3. Basis und Typografie
   ========================================================================== */
html body {
	background-color: var(--gr-creme) !important;
	color: var(--gr-tinte);
	font-family: var(--gr-font-text);
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

body h1,
body h2,
body h3,
body .entry-title,
body .page-title,
body .ct-title {
	font-family: var(--gr-font-head) !important;
	font-weight: 400 !important; /* Pacifico gibt es nur in einem Schnitt */
	color: var(--gr-tiefgruen);
	line-height: 1.3;
	letter-spacing: 0;
}
body h1,
body h1.entry-title,
body .page-title { font-size: clamp(1.875rem, 1.4rem + 2vw, 3rem); line-height: 1.2; }
body h2 { font-size: clamp(1.375rem, 1.15rem + 1vw, 2rem); }
body h3 { font-size: clamp(1.125rem, 1.05rem + .5vw, 1.5rem); }

body h4,
body h5,
body h6 {
	font-family: var(--gr-font-text);
	font-weight: 500;
	color: var(--gr-tinte);
}

/* Links im Inhalt: Koralle */
body .entry-content a:not(.wp-element-button):not(.wp-block-button__link):not(.ct-button),
body .ct-comment-content a,
body .widget a:not(.wp-element-button) {
	color: var(--gr-koralle-text);
	text-decoration: underline;
	text-underline-offset: .2em;
	text-decoration-thickness: 1px;
}
body .entry-content a:not(.wp-element-button):not(.wp-block-button__link):not(.ct-button):hover,
body .ct-comment-content a:hover,
body .widget a:not(.wp-element-button):hover {
	color: var(--gr-koralle-hover);
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 3px solid var(--gr-tiefgruen);
	outline-offset: 3px;
}

/* ==========================================================================
   4. Buttons (Pill) und Formulare
   ========================================================================== */
body .wp-element-button,
body .wp-block-button__link,
body .ct-button,
body .button,
body button[type="submit"],
body input[type="submit"],
body input[type="button"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: .65em 1.6em;
	background-color: var(--gr-koralle-text);
	border: 2px solid var(--gr-koralle-text);
	border-radius: var(--gr-radius-pill);
	color: var(--gr-weiss);
	font-family: var(--gr-font-text);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
body .wp-element-button:hover,
body .wp-block-button__link:hover,
body .ct-button:hover,
body .button:hover,
body button[type="submit"]:hover,
body input[type="submit"]:hover,
body input[type="button"]:hover {
	background-color: var(--gr-koralle-hover);
	border-color: var(--gr-koralle-hover);
	color: var(--gr-weiss);
}

/* Outline-Variante */
body .is-style-outline > .wp-block-button__link,
body .wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
	border-color: var(--gr-tiefgruen);
	color: var(--gr-tiefgruen);
}
body .is-style-outline > .wp-block-button__link:hover,
body .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--gr-tiefgruen);
	border-color: var(--gr-tiefgruen);
	color: var(--gr-creme);
}

body input[type="text"],
body input[type="email"],
body input[type="url"],
body input[type="tel"],
body input[type="search"],
body input[type="password"],
body input[type="number"],
body textarea,
body select {
	background-color: var(--gr-creme-hell);
	border: 1.5px solid var(--gr-tiefgruen);
	border-radius: var(--gr-radius-input);
	color: var(--gr-tinte);
	font-family: var(--gr-font-text);
}
body input:focus,
body textarea:focus,
body select:focus {
	border-color: var(--gr-tiefgruen);
	outline: 3px solid var(--gr-salbei);
	outline-offset: 2px;
}

/* ==========================================================================
   5. Karten, Chips, Bilder
   ========================================================================== */
body article.entry-card,
body .is-style-gr-card {
	background-color: var(--gr-weiss);
	border: 1px solid var(--gr-salbei-hell);
	border-radius: var(--gr-radius-card);
	overflow: hidden;
}
body .is-style-gr-card { padding: clamp(1.25rem, 3vw, 2rem); }

body .entry-card .ct-media-container,
body .entry-card .ct-media-container img { border-radius: 0; }
body .wp-block-image img,
body .entry-content img { border-radius: var(--gr-radius-tile); }

/* Kategorien als Chips */
body .meta-categories a,
body .ct-meta-element-categories a,
body .entry-meta .meta-categories a {
	display: inline-block;
	padding: 4px 12px;
	background-color: var(--gr-salbei-hell);
	border-radius: var(--gr-radius-pill);
	color: var(--gr-tinte);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	text-decoration: none;
}
body .meta-categories a:hover,
body .ct-meta-element-categories a:hover {
	background-color: var(--gr-salbei);
	color: var(--gr-tinte);
}

body blockquote,
body .wp-block-quote {
	border-left: 4px solid var(--gr-salbei);
	color: var(--gr-tinte);
}

/* ==========================================================================
   6. Header (salbeigrün, Logo links)
   ========================================================================== */

/* Den Header und Footer des Blocksy-Builders ausblenden, das Theme liefert eigene. */
header.ct-header,
#header.ct-header,
footer.ct-footer,
#footer.ct-footer {
	display: none !important;
}

.gr-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.gr-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--gr-salbei);
	color: var(--gr-tinte);
	box-shadow: 0 2px 0 rgba(36, 64, 62, .12);
}
body.admin-bar .gr-header { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .gr-header { top: 46px; }
}

.gr-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: min(100% - 2.5rem, var(--gr-container));
	min-height: var(--gr-header-h);
	margin-inline: auto;
}

.gr-logo {
	display: block;
	flex: none;
	line-height: 0;
	text-decoration: none;
}
.gr-logo__svg {
	display: block;
	width: auto;
	height: 64px;
	overflow: visible;
}
.gr-header :focus-visible,
.gr-footer :focus-visible {
	outline-color: var(--gr-tinte);
}

/* Navigation */
.gr-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.gr-menu li { position: relative; margin: 0; }
.gr-menu a {
	display: block;
	padding: .55rem 1rem;
	border-radius: var(--gr-radius-pill);
	color: var(--gr-tinte);
	font-family: var(--gr-font-text);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	transition: background-color .2s ease;
}
.gr-menu a:hover,
.gr-menu .current-menu-item > a,
.gr-menu .current_page_item > a,
.gr-menu .current-menu-ancestor > a {
	background-color: var(--gr-creme);
	color: var(--gr-tinte);
}

/* Untermenüs */
.gr-menu .sub-menu {
	display: none;
	min-width: 220px;
	margin: 0;
	padding: .5rem;
	list-style: none;
	background-color: var(--gr-creme);
	border-radius: var(--gr-radius-tile);
	box-shadow: 0 8px 24px rgba(36, 64, 62, .18);
}
.gr-menu .sub-menu a:hover,
.gr-menu .sub-menu .current-menu-item > a { background-color: var(--gr-salbei-hell); }

.gr-nav-toggle { display: none; }

@media (min-width: 900px) {
	.gr-menu .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 10;
	}
	.gr-menu li:hover > .sub-menu,
	.gr-menu li:focus-within > .sub-menu { display: block; }
}

@media (max-width: 899px) {
	.gr-header__inner { min-height: 72px; }
	.gr-logo__svg { height: 52px; }

	.gr-nav-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		background: transparent;
		border: 2px solid var(--gr-tinte);
		border-radius: var(--gr-radius-pill);
		color: var(--gr-tinte);
		cursor: pointer;
	}
	.gr-nav-toggle:hover { background: var(--gr-creme); border-color: var(--gr-tinte); color: var(--gr-tinte); }
	.gr-nav-toggle__bars,
	.gr-nav-toggle__bars::before,
	.gr-nav-toggle__bars::after {
		display: block;
		width: 18px;
		height: 2px;
		background-color: currentColor;
		border-radius: 2px;
		transition: transform .2s ease, opacity .2s ease;
	}
	.gr-nav-toggle__bars { position: relative; }
	.gr-nav-toggle__bars::before,
	.gr-nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
	.gr-nav-toggle__bars::before { top: -6px; }
	.gr-nav-toggle__bars::after { top: 6px; }
	.gr-header.is-open .gr-nav-toggle__bars { background-color: transparent; }
	.gr-header.is-open .gr-nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
	.gr-header.is-open .gr-nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

	.gr-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		padding: .5rem 1.25rem 1.25rem;
		background-color: var(--gr-salbei);
		border-top: 1px solid rgba(36, 64, 62, .2);
		box-shadow: 0 8px 16px rgba(36, 64, 62, .15);
	}
	.gr-header.is-open .gr-nav { display: block; }
	.gr-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.gr-menu a { padding: .75rem 1rem; }
	.gr-menu .sub-menu {
		display: block;
		min-width: 0;
		padding: 0 0 0 1rem;
		background: transparent;
		box-shadow: none;
	}
}

/* ==========================================================================
   7. Footer (salbeigrün)
   ========================================================================== */
.gr-footer {
	margin-top: 4rem;
	padding: 2.5rem 0 1.5rem;
	background-color: var(--gr-salbei);
	color: var(--gr-tinte);
	font-size: 15px;
}
.gr-footer__inner {
	width: min(100% - 2.5rem, var(--gr-container));
	margin-inline: auto;
}
.gr-footer__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem 2rem;
}
.gr-footer .gr-logo__svg { height: 56px; }

.gr-footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.gr-footer-menu li { margin: 0; }
.gr-footer a {
	color: var(--gr-tinte);
	text-decoration: underline;
	text-underline-offset: .2em;
}
.gr-footer a:hover {
	color: var(--gr-tinte);
	text-decoration-thickness: 2px;
}
.gr-footer .gr-logo { text-decoration: none; }

.gr-footer__bottom {
	margin-top: 1.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(36, 64, 62, .25);
	font-size: 14px;
}
.gr-footer__bottom p { margin: 0; }

/* ==========================================================================
   8. Weniger Bewegung
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}
