/*
Theme Name: Gaggoo
Description: Schlankes Reise-Theme für gaggoo.de. Benötigt das Plugin "Gaggoo Reisen".
Author: Klaus Wiedemann
Version: 0.14.0
Requires PHP: 7.4
Text Domain: gaggoo
*/

:root {
	color-scheme: dark;
	--bg: #0e1412;
	--surface: #161e1b;
	--surface-2: #1d2723;
	--line: #2b3833;
	--text: #e9e7e0;
	--muted: #9aa59f;
	--route: #f2b544;
	--route-soft: #f7cf80;
	--radius: 6px;
	--gutter: max(16px, env(safe-area-inset-left));
	--page-max: 1240px;
	--edge: max(var(--gutter), calc((100% - var(--page-max)) / 2 + var(--gutter)));
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }

body {
	margin: 0;
	padding-top: env(safe-area-inset-top, 0px);
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.55;
}

a { color: var(--route); text-underline-offset: 0.18em; }
a:hover { color: var(--route-soft); }
:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }

img { max-width: 100%; height: auto; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto;
	padding: 8px 12px; background: var(--surface-2); color: var(--text); z-index: 100;
}

/* Kopf und Fuß */
.site-header {
	display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
	padding: 14px var(--edge);
	border-bottom: 1px solid var(--line);
}
.site-title { margin: 0; font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em; }
.site-title a { color: var(--text); text-decoration: none; }
.page { position: relative; z-index: 2; background: var(--bg); }

.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current-menu-ancestor > a { color: var(--text); }
.site-nav .menu-item { position: relative; display: flex; align-items: center; }

/* Untermenüs */
.sub-toggle {
	width: 26px; height: 26px; padding: 0; margin-left: 2px;
	background: none; border: 0; cursor: pointer; color: var(--muted);
	display: inline-flex; align-items: center; justify-content: center;
}
.sub-toggle::before {
	content: ""; width: 6px; height: 6px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg); transition: transform 0.15s ease;
}
.sub-toggle[aria-expanded="true"]::before { transform: translateY(1px) rotate(-135deg); }
.sub-toggle:hover { color: var(--text); }
.site-nav .sub-menu {
	display: none; flex-direction: column; flex-wrap: nowrap; gap: 0;
	position: absolute; top: 100%; left: 0; z-index: 60;
	min-width: 13rem; padding: 6px;
	background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.site-nav .menu-item-has-children { flex-wrap: wrap; }
.site-nav .is-open > .sub-menu { display: flex; }
@media (hover: hover) {
	.site-nav .menu-item-has-children:hover > .sub-menu,
	.site-nav .menu-item-has-children:focus-within > .sub-menu { display: flex; }
}
.site-nav .sub-menu a { display: block; padding: 8px 10px; color: var(--text); white-space: nowrap; }
.site-nav .sub-menu a:hover { color: var(--route); }
.site-nav .sub-menu .menu-item { display: block; }

@media (max-width: 720px) {
	.site-header { flex-wrap: wrap; }
	.site-nav { width: 100%; }
	.site-nav ul { gap: 2px 14px; }
	.site-nav .sub-menu { position: static; width: 100%; margin: 4px 0 6px; }
}

.site-footer {
	padding: 28px var(--edge) 36px;
	color: var(--muted); font-size: 0.85rem;
	border-top: 1px solid var(--line);
	margin-top: 56px;
}
.site-footer p { margin: 0; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px !important; }
.site-footer-links a, .linklike { color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 0.18em; }
.linklike { padding: 0; background: none; border: 0; cursor: pointer; }
.linklike:hover, .site-footer-links a:hover { color: var(--text); }

/* Inhalt (Beiträge, Seiten) */
.content-narrow { max-width: 46rem; margin: 0 auto; padding: 28px var(--gutter) 0; }
.entry-title { font-size: clamp(1.5rem, 5vw, 2.1rem); line-height: 1.2; margin: 0 0 0.4em; }
.entry-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.4em; }
.entry-content > * { max-width: 100%; }
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption { color: var(--muted); font-size: 0.9rem; }
.notice {
	margin: 24px var(--gutter); padding: 14px 16px;
	border: 1px solid var(--line); border-left: 3px solid var(--route);
	background: var(--surface);
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* Weiche Überblendung zwischen Seiten, wo der Browser das kann */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Seitenüberschriften (Startseite, Seiten, Suche) */
.page-title { margin: 0 0 6px; font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.2; font-weight: 600; }
