/* Kultur- und Heimatverein Weipoltshausen – Vereinsdesign mit Fotos */
:root {
	--teal: #1d4e4a;
	--teal-d: #123532;
	--teal-l: #e4efec;
	--sun: #eba93f;
	--sun-d: #c98716;
	--rust: #b6492f;
	--sand: #f7f2e8;
	--sand-d: #ece3d1;
	--ink: #23302e;
	--muted: #5d6b68;
	--line: #d9d2c1;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--radius: 14px;
	--shadow: 0 10px 30px rgba(18, 53, 50, .14);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: #fff; overflow-x: hidden; }
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--rust); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--sun); color: #000; padding: .6rem 1rem; }
.skip-link:focus { left: 0; }

/* Buttons */
.btn { display: inline-block; padding: .75rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .2s, color .2s; line-height: 1.3; font-family: inherit; }
.btn:hover { transform: translateY(-2px); }
.btn-sun { background: var(--sun); color: #2a1c00; }
.btn-sun:hover { background: #f5bb5c; color: #2a1c00; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-d); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, .85); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--teal); }
.eyebrow { margin: 0 0 .6rem; font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sun-d); }

/* Kopfzeile */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(18, 53, 50, .06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 78px; }
.brand { display: block; flex: 0 1 auto; }
.brand img { display: block; height: 46px; width: auto; max-width: 100%; }
.main-nav ul { list-style: none; display: flex; gap: .2rem; margin: 0; padding: 0; }
.main-nav a { position: relative; display: block; padding: .6rem .85rem; font-weight: 600; font-size: .98rem; color: var(--ink); text-decoration: none; border-radius: 8px; }
.main-nav a::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem; height: 3px; border-radius: 3px; background: var(--sun); transform: scaleX(0); transition: transform .2s; }
.main-nav a:hover { color: var(--teal); }
.main-nav a:hover::after, .main-nav .is-active a::after { transform: scaleX(1); }
.main-nav .is-active a { color: var(--teal); }
.nav-toggle { display: none; align-items: center; gap: .6rem; padding: .55rem .9rem; border: 2px solid var(--teal); border-radius: 999px; background: #fff; color: var(--teal); font: 700 .95rem var(--sans); cursor: pointer; }
.nav-toggle .bars { display: grid; gap: 4px; }
.nav-toggle .bars i { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle .bars i:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Titelbild */
.hero { position: relative; color: #fff; background: linear-gradient(100deg, rgba(10, 36, 34, .92) 0%, rgba(10, 36, 34, .72) 45%, rgba(10, 36, 34, .25) 100%), var(--hero) center 40% / cover no-repeat; padding: clamp(4rem, 11vw, 8.5rem) 0 clamp(6.5rem, 12vw, 9rem); }
.hero-inner { max-width: 1180px; }
.hero .eyebrow { color: var(--sun); }
.hero h1 { margin: 0 0 1.2rem; max-width: 18ch; font-family: var(--serif); font-size: clamp(2.3rem, 6.2vw, 4.4rem); line-height: 1.08; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
.hero h1 span { color: var(--sun); font-style: italic; }
.hero .lead { max-width: 40rem; margin: 0 0 1.8rem; font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: rgba(255, 255, 255, .92); }
.hero .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0; }

/* Nächste Termine, überlappt das Titelbild */
.upnext { margin-top: -4.5rem; position: relative; z-index: 2; }
.upnext .wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem 1.6rem 1.6rem; }
.upnext-title { margin: 0 0 1rem; font-family: var(--serif); font-size: 1.35rem; color: var(--teal); }
.upnext-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; }
.upnext-list a { display: flex; gap: 1rem; align-items: center; height: 100%; padding: .9rem 1rem; border-radius: 12px; background: var(--sand); text-decoration: none; color: var(--ink); border: 1px solid transparent; transition: border-color .2s, box-shadow .2s, transform .2s; }
.upnext-list a:hover { border-color: var(--sun); box-shadow: 0 6px 16px rgba(0, 0, 0, .08); transform: translateY(-2px); color: var(--ink); }
.upnext .date { flex: none; display: grid; place-items: center; width: 58px; height: 62px; border-radius: 10px; background: var(--teal); color: #fff; line-height: 1; text-align: center; }
.upnext .date b { font: 700 1.55rem var(--serif); }
.upnext .date small { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sun); margin-top: -.5rem; }
.upnext .info { display: grid; gap: .1rem; min-width: 0; }
.upnext .info strong { font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.upnext .info small { color: var(--muted); font-size: .85rem; }

/* Vereinsleben mit Fotokacheln */
.life { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0 0 .6rem; font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; color: var(--teal-d); }
.section-head p:last-child { margin: 0; color: var(--muted); }
.tiles { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin: 0; padding: 0; }
.tile a { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); color: #fff; text-decoration: none; box-shadow: 0 6px 18px rgba(18, 53, 50, .15); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile-feste img { object-position: 85% 70%; }
.tile-chor img { object-position: 50% 30%; }
.tile a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 36, 34, .88) 0%, rgba(10, 36, 34, .35) 45%, rgba(10, 36, 34, 0) 70%); }
.tile a:hover img { transform: scale(1.06); }
.tile-text { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 1.1rem 1.3rem; display: grid; gap: .15rem; }
.tile-text strong { font: 700 1.3rem var(--serif); }
.tile-text small { font-size: .92rem; color: rgba(255, 255, 255, .88); line-height: 1.4; }

/* Haus */
.house { background: var(--sand); margin-top: clamp(2rem, 5vw, 4rem); }
.house-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding: clamp(2.5rem, 6vw, 5rem) 0; }
.house-photo { aspect-ratio: 4 / 3.4; border-radius: var(--radius); background: var(--photo) center / cover no-repeat; box-shadow: var(--shadow); }
.house-text h2 { margin: 0 0 .8rem; font-family: var(--serif); font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.15; color: var(--teal-d); }
.house-logo { display: block; width: min(100%, 420px); margin: 1.2rem 0; padding: .8rem 1rem; background: #fff; border-radius: 10px; border: 1px solid var(--line); }

/* Seitenkopf auf Unterseiten */
.page-head { background: linear-gradient(rgba(18, 53, 50, .9), rgba(18, 53, 50, .9)), var(--band) center / cover; padding: 1.6rem 0 3.6rem; color: #fff; font-size: .92rem; }
.page-head a { color: var(--sun); }
.page-head ol, .page-head ul { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem .6rem; margin: 0; padding: 0; }
.page-head .breadcrumb-item + .breadcrumb-item::before, .page-head li + li::before { content: "›"; margin-right: .6rem; color: rgba(255, 255, 255, .6); }
.page-head li:first-child { opacity: .75; }
.page-head nav, .page-head .mod-breadcrumbs__wrapper { margin: 0; }

/* Inhalt */
.main { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.is-inner .main { margin-top: -2rem; position: relative; z-index: 1; }
.is-home .main > nav, .is-home .main .mod-breadcrumbs__wrapper { display: none; }
.is-home .main { padding-top: 1rem; }
.content-card { background: #fff; border-radius: var(--radius); padding: clamp(1.2rem, 4vw, 3rem); }
.is-inner .content-card { box-shadow: var(--shadow); }
.is-home .content-card { background: var(--teal-l); }
.content-card > :first-child { margin-top: 0; }
.content-card h1, .content-card h2, .content-card h3, .content-card h4 { font-family: var(--serif); color: var(--teal-d); line-height: 1.2; text-wrap: balance; }
.content-card h1, .content-card h2.page-header { font-size: clamp(1.8rem, 4.5vw, 2.5rem); margin: 0 0 1.2rem; }
.content-card h2 { font-size: clamp(1.45rem, 3.4vw, 1.9rem); margin: 2rem 0 .8rem; }
.content-card h3 { font-size: 1.3rem; margin: 1.6rem 0 .6rem; }
.content-card p, .content-card li { overflow-wrap: break-word; }
.content-card hr { border: 0; height: 1px; background: var(--line); margin: 2rem 0; }
.content-card img { border-radius: 8px; }
.content-card blockquote { margin: 1.5rem 0; padding: .8rem 1.4rem; border-left: 5px solid var(--sun); background: var(--sand); border-radius: 0 10px 10px 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; }
.content-card table:not(#jevents table) { border-collapse: collapse; width: 100%; }
.content-card table:not(#jevents table) th { background: var(--teal); color: #fff; text-align: left; }
.content-card table:not(#jevents table) th, .content-card table:not(#jevents table) td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.content-card table:not(#jevents table) tr:nth-child(even) td { background: var(--sand); }

/* Formulare */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
	width: 100%; max-width: 100%; padding: .65rem .85rem; border: 1.5px solid #b9c4c1; border-radius: 10px; background: #fff; font: inherit; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(235, 169, 63, .55); border-color: var(--sun-d); }
label { font-weight: 600; }
button, input[type="submit"], .btn-primary, .button { padding: .7rem 1.4rem; border: 0; border-radius: 999px; background: var(--teal); color: #fff; font: 700 1rem var(--sans); cursor: pointer; text-decoration: none; }
button:hover, input[type="submit"]:hover, .btn-primary:hover { background: var(--teal-d); color: #fff; }
.alert, #system-message-container joomla-alert { border-radius: 10px; }
.content-card fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 1rem; }

/* Footer */
.site-footer { background: var(--teal-d); color: rgba(255, 255, 255, .85); padding-top: clamp(2.5rem, 6vw, 4rem); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--sun); text-decoration: underline; }
.site-footer .btn-sun, .site-footer .btn-sun:hover { color: #2a1c00; text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 2rem 3rem; padding-bottom: 2rem; }
.f-brand strong { font: 700 1.3rem/1.3 var(--serif); color: #fff; }
.f-brand p, .f-extra p { margin: .6rem 0 0; font-size: .96rem; }
.site-footer h2 { margin: 0 0 .7rem; font: 700 .85rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sun); }
.site-footer ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.site-footer li { padding: .15rem 0; break-inside: avoid; }
.credits { border-top: 1px solid rgba(255, 255, 255, .15); padding: 1rem 0 0; font-size: .88rem; }
.credits summary { cursor: pointer; font-weight: 600; color: #fff; }
.credits ul { columns: 1; margin-top: .6rem; }
.credits p { margin: .6rem 0 0; }
.copyright { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin: 0; padding: 1.2rem 0 1.6rem; font-size: .85rem; color: rgba(255, 255, 255, .65); }

/* Fehlerseite */
.error-box { padding: 6rem 0; text-align: center; }
.error-code { margin: 0; font: 700 clamp(5rem, 20vw, 9rem)/1 var(--serif); color: var(--sun); }
.error-box h1 { font-family: var(--serif); color: var(--teal-d); }
.component-only { padding: 1rem; }

/* Responsive */
@media (max-width: 1100px) {
	.nav-toggle { display: inline-flex; }
	.main-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 14px 24px rgba(18, 53, 50, .15); max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .3s ease, visibility .3s; }
	.nav-open .main-nav { max-height: 80vh; visibility: visible; overflow-y: auto; }
	.main-nav ul { flex-direction: column; gap: 0; width: min(1180px, 100% - 2.5rem); margin: 0 auto; padding: .6rem 0 1rem; }
	.main-nav a { padding: .85rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.05rem; }
	.main-nav a::after { display: none; }
	.main-nav .is-active a { color: var(--rust); }
}
@media (max-width: 900px) {
	.upnext-list { grid-template-columns: 1fr; }
	.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.house-inner { grid-template-columns: 1fr; }
	.house-photo { aspect-ratio: 16 / 9; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.f-extra { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
	body { font-size: 1rem; }
	.wrap { width: min(1180px, 100% - 1.6rem); }
	.header-inner { min-height: 66px; gap: .6rem; }
	.brand img { height: 36px; }
	.nav-toggle .label { display: none; }
	.nav-toggle { padding: .6rem; }
	.hero { background-position: 70% 40%; padding-bottom: 6rem; }
	.hero .actions .btn { flex: 1 1 100%; text-align: center; }
	.upnext .wrap { padding: 1.1rem; }
	.tiles { grid-template-columns: 1fr; }
	.tile a { aspect-ratio: 16 / 10; }
	.footer-grid { grid-template-columns: 1fr; }
	.site-footer ul { columns: 1; }
	.copyright { flex-direction: column; }
	.content-card { padding: 1.2rem; border-radius: 10px; }
	.page-head { padding-bottom: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
