/*
Theme Name: Reiterhofwelt
Theme URI: https://reiterhofwelt.de
Description: Premium, einzigartiges Verzeichnis-Theme für Reiterhöfe in Deutschland. Responsiv, SEO- und GEO-optimiert, mit OpenStreetMap-Karten, Standort-Archiven und Profilseiten. Präsentationsebene zum Plugin Reiterhofwelt Core.
Author: Reiterhofwelt
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: reiterhofwelt
Tags: directory, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ====== Design tokens ====== */
:root {
	--bg: #faf8f3;
	--surface: #ffffff;
	--surface-2: #f4efe5;
	--primary: #2f4a3a;
	--primary-dark: #233a2d;
	--primary-soft: #e6efe7;
	--accent: #c0883e;
	--accent-dark: #9c6a2a;
	--text: #2b2823;
	--muted: #6f685c;
	--line: #e7e0d3;
	--success: #2e7d4f;
	--success-soft: #e3f3ea;
	--danger: #b14a3a;
	--star: #e3a52b;
	--radius: 18px;
	--radius-sm: 12px;
	--shadow: 0 4px 18px rgba(45, 38, 25, 0.07);
	--shadow-lg: 0 18px 48px rgba(45, 38, 25, 0.16);
	--maxw: 1200px;
	--font-head: "Fraunces", Georgia, "Times New Roman", serif;
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ====== Base ====== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--text);
	background: var(--bg);
	line-height: 1.65;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--primary-dark); line-height: 1.18; font-weight: 600; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 820px; }
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--accent-dark); margin-bottom: .6rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 12px; background: #fff; padding: 10px 16px; z-index: 1000; border-radius: 8px; box-shadow: var(--shadow); }

/* ====== Buttons ====== */
.btn { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; font-family: var(--font-body); border-radius: 999px; padding: 13px 24px; border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; font-size: 1rem; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-block { width: 100%; justify-content: center; }

/* ====== Header ====== */
.site-header { position: relative; z-index: 500; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: var(--primary-dark); }
.brand .mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: #fff; font-size: 1.2rem; }
.brand img { max-height: 44px; width: auto; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; align-items: center; }
.main-nav a { padding: 9px 14px; border-radius: 10px; font-weight: 500; color: var(--text); }
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--primary-soft); color: var(--primary-dark); }
.header-cta { display: inline-flex; }
.nav-toggle { display: none; margin-left: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; width: 46px; height: 46px; font-size: 1.3rem; cursor: pointer; }

/* ====== Hero ====== */
.hero { position: relative; overflow: hidden; background: radial-gradient(1100px 480px at 78% -8%, rgba(192,136,62,.18), transparent 60%), linear-gradient(180deg, #f3eee2, var(--bg)); padding: 70px 0 56px; }
.hero-copy, .archive-copy, .profile-copy { display: flex; flex-direction: column; }
.hero-copy > .google-auto-placed, .archive-copy > .google-auto-placed, .profile-copy > .google-auto-placed { order: 99; width: 100%; }
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 40px; }
.hero-stat .num { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: var(--primary-dark); line-height: 1; }
.hero-stat .lbl { color: var(--muted); font-size: .95rem; }

/* ====== Search ====== */
.rhw-search { display: flex; gap: 8px; background: var(--surface); padding: 8px; border-radius: 999px; box-shadow: var(--shadow); max-width: 560px; border: 1px solid var(--line); }
.rhw-search input { flex: 1; border: 0; background: transparent; padding: 10px 16px; font-size: 1rem; color: var(--text); outline: none; }
.rhw-search button { white-space: nowrap; }

/* ====== Section heads ====== */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head p { margin: 0; }
.section-head .link-more { font-weight: 600; }

/* ====== Grids ====== */
.grid { display: grid; gap: 22px; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-states { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-cities { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

/* ====== Cards: stable ====== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .14s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-visual { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; color: #fff; }
.card-visual .emoji { font-size: 3rem; filter: drop-shadow(0 3px 8px rgba(0,0,0,.25)); }
.card-visual .ribbon { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.card-visual .open-now { position: absolute; top: 12px; right: 12px; }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.18rem; }
.card-body h3 a { color: var(--primary-dark); }
.card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }
.card-loc { display: flex; align-items: center; gap: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--surface-2); color: var(--primary-dark); border-radius: 999px; padding: 4px 11px; font-size: .8rem; font-weight: 500; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }
.card-dist { font-size: .85rem; color: var(--accent-dark); font-weight: 600; }

/* ====== Badges ====== */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.badge-open { background: var(--success-soft); color: var(--success); }
.badge-closed { background: #f6e7e3; color: var(--danger); }
.badge-soft { background: rgba(255,255,255,.9); color: var(--primary-dark); backdrop-filter: blur(4px); }
.badge-verified { background: var(--primary-soft); color: var(--primary-dark); }
.rating { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--text); }
.stars { color: var(--star); letter-spacing: 1px; font-size: .95rem; }
.rating .count { color: var(--muted); font-weight: 400; font-size: .85rem; }

/* ====== Location cards ====== */
.loc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .14s ease; display: block; }
.loc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.loc-card .name { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; color: var(--primary-dark); margin-bottom: 4px; }
.loc-card .stat-line { color: var(--muted); font-size: .92rem; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.loc-card .big { font-family: var(--font-head); font-size: 1.9rem; color: var(--accent-dark); font-weight: 700; line-height: 1; }
.loc-card .open-line { color: var(--success); font-weight: 600; font-size: .88rem; }

/* ====== Breadcrumbs ====== */
.rhw-breadcrumbs { padding: 16px 0 0; }
.rhw-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: .88rem; color: var(--muted); }
.rhw-breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--line); }
.rhw-breadcrumbs a { color: var(--muted); }
.rhw-breadcrumbs a:hover { color: var(--accent-dark); }
.rhw-breadcrumbs [aria-current="page"] span { color: var(--primary-dark); font-weight: 600; }

/* ====== Maps ====== */
.rhw-map { width: 100%; height: 440px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); z-index: 1; background: linear-gradient(135deg, var(--surface-2), var(--primary-soft)); }
.rhw-map::before { content: "Karte wird geladen"; display: grid; place-items: center; height: 100%; color: var(--muted); font-weight: 600; }
.rhw-map.leaflet-container::before { display: none; }
.rhw-map.map-load-error::before { content: "Karte konnte nicht geladen werden"; }
.rhw-map-sm { height: 320px; }
.leaflet-popup-content { font-family: var(--font-body); }
.map-popup strong { display: block; font-size: 1rem; color: var(--primary-dark); }
.map-popup .muted { color: var(--muted); font-size: .85rem; }
.map-popup a { font-weight: 600; }

/* ====== Archive header ====== */
.archive-hero { background: linear-gradient(180deg, #f3eee2, var(--bg)); padding: 24px 0 36px; }
.archive-hero h1 { margin-top: 10px; }
.archive-intro { max-width: 70ch; color: var(--muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 26px 0; }
.toolbar .count { font-weight: 600; color: var(--primary-dark); }

/* ====== Profile ====== */
.profile-hero { background: linear-gradient(180deg, #f3eee2, var(--bg)); padding: 18px 0 30px; }
.profile-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0; }
.profile-grid { display: grid; grid-template-columns: 1fr 360px; gap: 34px; align-items: start; }
.prose { font-size: 1.06rem; }
.prose p { margin-bottom: 1.1rem; }
.profile-section { margin: 30px 0; }
.profile-section h2 { font-size: 1.5rem; }
.data-note { margin-top: 18px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); color: var(--muted); font-size: .88rem; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.info-card + .info-card { margin-top: 18px; }
.side-map-card { padding: 16px; }
.rhw-map-side { height: 240px; }
.info-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.info-row:last-child { border-bottom: 0; }
.info-row .ico { width: 22px; text-align: center; flex: none; }
.info-row .v { font-weight: 500; }
.info-row .k { color: var(--muted); font-size: .82rem; }
.hours-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours-table td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.hours-table td:last-child { text-align: right; color: var(--muted); }
.hours-table tr.today td { font-weight: 700; color: var(--primary-dark); }
.amenities { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.amenity { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: var(--radius-sm); padding: 9px 12px; font-size: .92rem; }
.amenity .ok { color: var(--success); }
.rating-card { position: static; top: auto; margin-top: 18px; }
.rating-bars { display: grid; gap: 6px; max-width: 360px; }
.rating-bar { display: grid; grid-template-columns: 28px 1fr 40px; gap: 10px; align-items: center; font-size: .85rem; color: var(--muted); }
.rating-bar .track { background: var(--surface-2); border-radius: 999px; height: 9px; overflow: hidden; }
.rating-bar .fill { background: var(--star); height: 100%; }

/* ====== FAQ ====== */
.rhw-faq { margin: 16px 0; }
.rhw-faq-list { display: grid; gap: 12px; }
.rhw-faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 18px; box-shadow: var(--shadow); }
.rhw-faq-item summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 14px; color: var(--primary-dark); font-family: var(--font-head); font-size: 1.08rem; }
.rhw-faq-item summary::-webkit-details-marker { display: none; }
.rhw-faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.rhw-faq-item[open] summary::after { content: "−"; }
.rhw-faq-answer { padding: 0 0 16px; color: var(--text); }
.rhw-faq-answer p { margin: 0; }

/* ====== Internal link clusters ====== */
.linklist { display: flex; flex-wrap: wrap; gap: 8px; }
.linklist a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: .9rem; color: var(--primary-dark); }
.linklist a:hover { background: var(--primary-soft); }
.guide-links { margin-top: 28px; }
.guide-links h2 { font-size: 1.45rem; }
.location-insights { background: var(--surface-2); }
.location-insights .notice-box { margin-top: 20px; }
.insight-chips { margin: 12px 0 18px; }

/* ====== Steps ====== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step .n { width: 40px; height: 40px; border-radius: 11px; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-weight: 700; font-family: var(--font-head); margin-bottom: 12px; }

/* ====== Guides / articles ====== */
.guide-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.guide-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .14s ease; }
.guide-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.guide-card .thumb { aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.guide-card .pad { padding: 18px; }
.guide-card h3 { margin-bottom: 8px; }
.guide-card .excerpt { color: var(--muted); font-size: .95rem; }
.article { max-width: 760px; margin: 0 auto; }
.article-body { font-size: 1.1rem; }
.article-body h2 { margin-top: 1.8rem; }
.article-body img { border-radius: var(--radius); margin: 1.4rem 0; }
.entry-meta { color: var(--muted); font-size: .9rem; margin-bottom: 1.2rem; }
.guide-cta { margin-top: 42px; padding: 26px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }

/* ====== Nearby ====== */
.nearby-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 20px 0; }
.nearby-controls select, .nearby-controls input { padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 1rem; }
.nearby-status { color: var(--muted); margin: 10px 0; }

/* ====== Footer ====== */
.site-footer { background: var(--primary-dark); color: #d8e0d6; margin-top: 70px; }
.footer-top { padding: 56px 0 38px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.site-footer a { color: #cdd6c9; }
.site-footer a:hover { color: #fff; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: .94rem; }
.footer-brand .brand { color: #fff; }
.footer-brand p { color: #b9c3b4; font-size: .95rem; max-width: 38ch; }
.footer-states { columns: 2; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .88rem; color: #aab5a5; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 16px; }

/* ====== Misc ====== */
.notice-box { background: var(--surface-2); border-left: 4px solid var(--accent); border-radius: 12px; padding: 14px 18px; font-size: .95rem; color: var(--text); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
#load-more-wrap { text-align: center; margin-top: 34px; }

/* ====== Responsive ====== */
@media (max-width: 980px) {
	.profile-grid { grid-template-columns: 1fr; }
	.info-card { position: static; }
	.footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
	body { font-size: 16px; }
	.main-nav { position: fixed; inset: 74px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 18px 18px; box-shadow: var(--shadow-lg); display: none; }
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
	.main-nav a { padding: 12px 14px; }
	.header-cta { display: none; }
	.nav-toggle { display: block; }
	.section { padding: 46px 0; }
	.amenities { grid-template-columns: 1fr; }
	.footer-top { grid-template-columns: 1fr; gap: 26px; }
	.footer-states { columns: 2; }
	.hero-stats { gap: 22px; }
}
