/*
Theme Name: RuF Ebsdorfergrund Modern
Theme URI: https://reitundfahrverein-ebsdorfergrund.de
Author: Reit- und Fahrverein Ebsdorfergrund e.V.
Author URI: https://reitundfahrverein-ebsdorfergrund.de
Description: Modernes Vereinstheme für den Reit- und Fahrverein Ebsdorfergrund e.V. Warme, natürliche Farben, große Bildflächen, Veranstaltungen prominent auf der Startseite. Voll responsiv, Customizer-Unterstützung für Hero, Karten und Kontaktdaten.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ruf-modern
Tags: custom-logo, custom-menu, featured-images, one-column, two-columns, right-sidebar, footer-widgets, translation-ready
*/

/* ==========================================================================
   Design-Tokens
   ========================================================================== */
:root {
	--ruf-green-900: #1c2f22;
	--ruf-green-700: #2f4f38;
	--ruf-green-500: #4a7256;
	--ruf-cream: #f8f4eb;
	--ruf-sand: #efe6d4;
	--ruf-tan: #b08d57;
	--ruf-tan-dark: #96733f;
	--ruf-ink: #26251f;
	--ruf-muted: #6b6a60;
	--ruf-white: #ffffff;
	--ruf-radius: 14px;
	--ruf-shadow: 0 10px 30px rgba(28, 47, 34, 0.10);
	--ruf-shadow-hover: 0 16px 40px rgba(28, 47, 34, 0.16);
	--ruf-font-head: "Playfair Display", Georgia, serif;
	--ruf-font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
	--ruf-container: 1180px;
}

/* ==========================================================================
   Reset / Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--ruf-font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--ruf-ink);
	background: var(--ruf-cream);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ruf-font-head);
	font-weight: 700;
	line-height: 1.2;
	color: var(--ruf-green-900);
	margin: 0 0 0.6em;
}

a { color: var(--ruf-green-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ruf-tan-dark); }

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

.container {
	width: 100%;
	max-width: var(--ruf-container);
	margin: 0 auto;
	padding: 0 24px;
}

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden;
	padding: 0; position: absolute !important;
	width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--ruf-white); clip: auto !important; clip-path: none;
	color: var(--ruf-ink); display: block; font-size: 1rem;
	height: auto; left: 6px; padding: 12px 16px; top: 6px;
	width: auto; z-index: 100000; border-radius: 8px;
}

/* Buttons */
.btn, .wp-block-button__link, button[type="submit"], input[type="submit"] {
	display: inline-block;
	font-family: var(--ruf-font-body);
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: 0.02em;
	padding: 13px 30px;
	border-radius: 999px;
	border: 2px solid transparent;
	background: var(--ruf-tan);
	color: var(--ruf-white) !important;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.btn:hover, .wp-block-button__link:hover, button[type="submit"]:hover, input[type="submit"]:hover {
	background: var(--ruf-tan-dark);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(150, 115, 63, 0.35);
}
.btn--outline {
	background: transparent;
	border-color: var(--ruf-white);
	color: var(--ruf-white) !important;
}
.btn--outline:hover {
	background: rgba(255,255,255,0.14);
	box-shadow: none;
}
.btn--green { background: var(--ruf-green-700); }
.btn--green:hover { background: var(--ruf-green-900); }

/* ==========================================================================
   Header
   ========================================================================== */
.topbar {
	background: var(--ruf-green-900);
	color: rgba(255,255,255,0.85);
	font-size: 0.9rem;
}
.topbar .container {
	display: flex; justify-content: space-between; align-items: center;
	gap: 16px; padding-top: 8px; padding-bottom: 8px;
}
.topbar a { color: var(--ruf-white); text-decoration: none; }
.topbar a:hover { color: var(--ruf-tan); }
.topbar__contact span { margin-right: 18px; }
.topbar__social a { margin-left: 14px; font-weight: 600; }

.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(248, 244, 235, 0.96);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(28,47,34,0.08);
}
.site-header .container {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; min-height: 84px;
}
.site-branding { display: flex; align-items: center; gap: 14px; }
.site-branding img { max-height: 62px; width: auto; }
.site-branding .site-title {
	font-family: var(--ruf-font-head);
	font-size: 1.35rem; font-weight: 700;
	margin: 0; line-height: 1.15;
}
.site-branding .site-title a { color: var(--ruf-green-900); text-decoration: none; }
.site-branding .site-description {
	margin: 0; font-size: 0.85rem; color: var(--ruf-muted);
}

.main-navigation { display: flex; align-items: center; }
.main-navigation ul {
	list-style: none; margin: 0; padding: 0;
	display: flex; gap: 6px;
}
.main-navigation li { position: relative; }
.main-navigation a {
	display: block; padding: 12px 16px;
	color: var(--ruf-green-900); text-decoration: none;
	font-weight: 600; font-size: 0.98rem;
	border-radius: 10px;
	transition: background 0.2s ease, color 0.2s ease;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
	background: var(--ruf-green-700);
	color: var(--ruf-white);
}
/* Dropdown */
.main-navigation ul ul {
	display: none;
	position: absolute; top: 100%; left: 0;
	min-width: 230px;
	background: var(--ruf-white);
	border-radius: 12px;
	box-shadow: var(--ruf-shadow);
	padding: 8px;
	z-index: 100;
}
.main-navigation li:hover > ul, .main-navigation li:focus-within > ul { display: block; }
.main-navigation ul ul a { border-radius: 8px; padding: 10px 14px; }

.menu-toggle {
	display: none;
	background: var(--ruf-green-700);
	border: 0; border-radius: 10px;
	width: 48px; height: 48px;
	cursor: pointer; position: relative;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
	content: "";
	display: block; position: absolute;
	width: 24px; height: 3px; border-radius: 2px;
	background: var(--ruf-white);
	left: 12px;
	transition: transform 0.25s ease, opacity 0.2s ease;
}
.menu-toggle span { top: 22px; }
.menu-toggle span::before { top: -8px; left: 0; }
.menu-toggle span::after { top: 8px; left: 0; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
	position: relative;
	min-height: 68vh;
	display: flex; align-items: center;
	background: var(--ruf-green-900) center/cover no-repeat;
	color: var(--ruf-white);
}
.hero::before {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(100deg, rgba(28,47,34,0.82) 0%, rgba(28,47,34,0.45) 55%, rgba(28,47,34,0.15) 100%);
}
.hero .container { position: relative; z-index: 2; padding-top: 72px; padding-bottom: 72px; }
.hero__content { max-width: 640px; }
.hero__kicker {
	display: inline-block;
	font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
	font-size: 0.85rem; color: var(--ruf-sand);
	border: 1px solid rgba(255,255,255,0.35);
	padding: 6px 16px; border-radius: 999px;
	margin-bottom: 20px;
}
.hero h1 {
	color: var(--ruf-white);
	font-size: clamp(2.4rem, 5vw, 3.9rem);
	margin-bottom: 0.35em;
}
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.92); max-width: 34em; }
.hero .btn { margin-top: 14px; margin-right: 12px; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 84px 0; }
.section--sand { background: var(--ruf-sand); }
.section--green { background: var(--ruf-green-900); color: var(--ruf-cream); }
.section--green h2, .section--green h3 { color: var(--ruf-white); }

.section-head { max-width: 720px; margin-bottom: 46px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .kicker {
	font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
	font-size: 0.8rem; color: var(--ruf-tan-dark);
	display: block; margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 0.25em; }

/* Cards (Auf einen Blick / Service) */
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 26px;
}
.card {
	background: var(--ruf-white);
	border-radius: var(--ruf-radius);
	box-shadow: var(--ruf-shadow);
	padding: 34px 30px;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--ruf-shadow-hover); }
.card__icon {
	width: 58px; height: 58px;
	border-radius: 16px;
	background: var(--ruf-sand);
	display: flex; align-items: center; justify-content: center;
	margin-bottom: 20px;
}
.card__icon svg { width: 30px; height: 30px; fill: none; stroke: var(--ruf-green-700); stroke-width: 1.8; }
.card h3 { font-size: 1.3rem; margin-bottom: 0.4em; }
.card p { color: var(--ruf-muted); flex-grow: 1; margin: 0 0 18px; }
.card a.card__link {
	font-weight: 700; text-decoration: none;
	color: var(--ruf-tan-dark);
}
.card a.card__link::after { content: " →"; transition: margin 0.2s ease; }
.card a.card__link:hover::after { margin-left: 4px; }

/* Events */
.event-list { display: grid; gap: 18px; }
.event-item {
	display: flex; gap: 24px; align-items: center;
	background: var(--ruf-white);
	border-radius: var(--ruf-radius);
	box-shadow: var(--ruf-shadow);
	padding: 22px 28px;
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.event-item:hover { transform: translateY(-3px); box-shadow: var(--ruf-shadow-hover); }
.event-item__date {
	flex: 0 0 auto;
	width: 84px; height: 84px;
	border-radius: 14px;
	background: var(--ruf-green-700);
	color: var(--ruf-white);
	display: flex; flex-direction: column;
	align-items: center; justify-content: center;
	text-align: center;
}
.event-item__date .day { font-family: var(--ruf-font-head); font-size: 1.9rem; font-weight: 700; line-height: 1; }
.event-item__date .month { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }
.event-item__body h3 { margin: 0 0 4px; font-size: 1.25rem; }
.event-item__body .meta { color: var(--ruf-muted); font-size: 0.95rem; margin: 0; }
.events-empty {
	background: var(--ruf-white); border-radius: var(--ruf-radius);
	padding: 30px; color: var(--ruf-muted); box-shadow: var(--ruf-shadow);
}

/* News */
.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 28px;
}
.post-card {
	background: var(--ruf-white);
	border-radius: var(--ruf-radius);
	overflow: hidden;
	box-shadow: var(--ruf-shadow);
	display: flex; flex-direction: column;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--ruf-shadow-hover); }
.post-card__thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--ruf-sand); }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .post-card__thumb img { transform: scale(1.05); }
.post-card__body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex-grow: 1; }
.post-card__body .meta { font-size: 0.85rem; color: var(--ruf-tan-dark); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 8px; }
.post-card__body h3 { font-size: 1.25rem; margin: 0 0 8px; }
.post-card__body h3 a { color: var(--ruf-green-900); text-decoration: none; }
.post-card__body h3 a:hover { color: var(--ruf-tan-dark); }
.post-card__body p { color: var(--ruf-muted); margin: 0 0 16px; flex-grow: 1; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 40em; margin: 0 auto 26px; }

/* ==========================================================================
   Content (pages & posts)
   ========================================================================== */
.site-main { padding: 64px 0 84px; }
.content-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 48px;
}
.content-sidebar.no-sidebar { grid-template-columns: 1fr; }

.entry-header { margin-bottom: 28px; }
.entry-title { font-size: clamp(2rem, 4vw, 2.9rem); }
.entry-meta { color: var(--ruf-muted); font-size: 0.95rem; }
.entry-content { font-size: 1.08rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: 12px; }
.entry-content blockquote {
	margin: 1.6em 0; padding: 6px 0 6px 26px;
	border-left: 4px solid var(--ruf-tan);
	font-family: var(--ruf-font-head);
	font-size: 1.25rem; color: var(--ruf-green-900);
}
.entry-content table { border-collapse: collapse; width: 100%; margin: 1.4em 0; }
.entry-content th, .entry-content td { border: 1px solid var(--ruf-sand); padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--ruf-sand); }
.post-thumbnail { margin-bottom: 28px; border-radius: var(--ruf-radius); overflow: hidden; box-shadow: var(--ruf-shadow); }

/* Sidebar */
.widget {
	background: var(--ruf-white);
	border-radius: var(--ruf-radius);
	box-shadow: var(--ruf-shadow);
	padding: 26px;
	margin-bottom: 26px;
}
.widget-title, .widgettitle {
	font-size: 1.2rem;
	padding-bottom: 12px; margin-bottom: 16px;
	border-bottom: 2px solid var(--ruf-sand);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 7px 0; border-bottom: 1px solid rgba(28,47,34,0.07); }
.widget ul li:last-child { border-bottom: 0; }
.widget a { text-decoration: none; }
.widget table { width: 100%; font-size: 0.92rem; }
.widget caption { font-weight: 700; padding-bottom: 8px; }
.widget td, .widget th { text-align: center; padding: 4px; }
.widget a { color: var(--ruf-green-700); }

/* Search */
.search-form { display: flex; gap: 10px; }
.search-form input[type="search"] {
	flex: 1; padding: 12px 18px;
	border: 1px solid rgba(28,47,34,0.18);
	border-radius: 999px; font-size: 1rem;
	background: var(--ruf-white);
}

/* Comments */
.comments-area {
	background: var(--ruf-white);
	border-radius: var(--ruf-radius);
	box-shadow: var(--ruf-shadow);
	padding: 34px;
	margin-top: 44px;
}
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--ruf-sand); }
.comment-form input:not([type="submit"]), .comment-form textarea {
	width: 100%; padding: 12px 16px; margin-bottom: 14px;
	border: 1px solid rgba(28,47,34,0.18); border-radius: 10px;
	font-family: var(--ruf-font-body); font-size: 1rem;
	background: var(--ruf-cream);
}

/* Pagination */
.pagination, .nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination .page-numbers, .nav-links .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; height: 44px; padding: 0 14px;
	border-radius: 10px; background: var(--ruf-white);
	box-shadow: var(--ruf-shadow);
	text-decoration: none; font-weight: 600;
}
.pagination .current, .nav-links .current { background: var(--ruf-green-700); color: var(--ruf-white); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	background: var(--ruf-green-900);
	color: rgba(255,255,255,0.8);
	padding: 64px 0 0;
}
.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 40px;
	padding-bottom: 44px;
}
.footer-widgets .widget {
	background: transparent; box-shadow: none; padding: 0; margin: 0;
	color: rgba(255,255,255,0.8);
}
.footer-widgets .widget-title {
	color: var(--ruf-white);
	border-bottom-color: rgba(255,255,255,0.18);
}
.footer-widgets a { color: var(--ruf-sand); text-decoration: none; }
.footer-widgets a:hover { color: var(--ruf-tan); }
.footer-widgets ul li { border-bottom-color: rgba(255,255,255,0.1); }
.footer-brand img { max-height: 74px; width: auto; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.14);
	padding: 20px 0;
	font-size: 0.9rem;
}
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { color: var(--ruf-sand); text-decoration: none; }
.footer-bottom a:hover { color: var(--ruf-tan); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
	.content-sidebar { grid-template-columns: 1fr; }
	.topbar__contact span:not(:first-child) { display: none; }
}

@media (max-width: 820px) {
	.menu-toggle { display: block; }
	.main-navigation ul.menu, .main-navigation > div > ul {
		display: none;
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: var(--ruf-cream);
		flex-direction: column;
		padding: 12px 20px 20px;
		box-shadow: var(--ruf-shadow);
		border-bottom: 1px solid rgba(28,47,34,0.1);
	}
	.main-navigation.toggled ul.menu, .main-navigation.toggled > div > ul { display: flex; }
	.main-navigation ul ul { position: static; box-shadow: none; padding-left: 16px; display: block; background: transparent; }
	.site-branding .site-description { display: none; }
	.hero { min-height: 60vh; }
	.section { padding: 60px 0; }
	.event-item { flex-direction: row; padding: 18px; }
	.event-item__date { width: 68px; height: 68px; }
	.event-item__date .day { font-size: 1.5rem; }
}

@media (max-width: 520px) {
	.site-branding .site-title { font-size: 1.05rem; }
	.site-branding img { max-height: 48px; }
	.topbar { display: none; }
}

/* Print */
@media print {
	.topbar, .site-header, .site-footer, .hero .btn { display: none; }
	body { background: #fff; }
}
