/* ==========================================================================
   Renaissance Malschule – Layout, Komponenten, Animationen
   Farben kommen aus theme.json (Design-System „Kunst & Malschule Renaissance“).
   ========================================================================== */

:root {
	--rs-teal: var(--wp--preset--color--brand-teal, #00998b);
	--rs-magenta: var(--wp--preset--color--brand-magenta, #9e1981);
	--rs-red: var(--wp--preset--color--accent-red, #820707);
	--rs-ink: var(--wp--preset--color--ink, #0f0f16);
	--rs-body: var(--wp--preset--color--ink-body, #64646d);
	--rs-page: var(--wp--preset--color--surface-page, #f5f5f5);
	--rs-white: var(--wp--preset--color--surface-card, #ffffff);
	--rs-border: var(--wp--preset--color--border-card, #e9e9e9);
	--rs-hair: var(--wp--preset--color--border-hairline, #d5d5d5);
	--rs-dark: var(--wp--preset--color--footer-bg, #21202e);
	--rs-dark-2: var(--wp--preset--color--footer-bg-deep, #282737);
	--rs-ease: cubic-bezier(.2, .7, .2, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

/* ---------- Seitenrahmen ---------- */
.rs-main { margin-block: 0; }
.rs-main > .wp-block-post-content > .rs-section,
.rs-main > .wp-block-post-content > * + .rs-section,
.wp-block-post-content > .rs-section { margin-block: 0 !important; }
.rs-section { padding-block: 104px; }
.rs-white, .rs-hero { background: var(--rs-white); }
.rs-page { padding-block: 72px 104px; }

/* ---------- Kopfzeile ---------- */
.rs-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .94);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--rs-border);
	padding-block: 12px;
}
.admin-bar .rs-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .rs-header { top: 46px; } }
.rs-header .wp-block-site-logo img { height: 64px; width: auto; }
.rs-nav { gap: 6px 28px; }
.rs-nav .wp-block-navigation-item__content { color: #061018; text-decoration: none; position: relative; }
.rs-nav .wp-block-navigation-item:not(.rs-nav-cta) .wp-block-navigation-item__content::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
	background: var(--rs-red); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--rs-ease);
}
.rs-nav .wp-block-navigation-item:not(.rs-nav-cta) .wp-block-navigation-item__content:hover::after { transform: scaleX(1); }
.rs-nav .rs-nav-cta .wp-block-navigation-item__content { background: var(--rs-red); color: #fff; padding: 10px 18px; transition: background .2s; }
.rs-nav .rs-nav-cta .wp-block-navigation-item__content:hover { background: var(--rs-ink); color: #fff; }

/* ---------- Typo-Bausteine ---------- */
.rs-eyebrow {
	margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--rs-red);
}
.rs-eyebrow::after { content: ""; display: block; width: 30px; height: 4px; margin-top: 10px; background: var(--rs-red); transform-origin: left; }
.rs-eyebrow-magenta { color: var(--rs-magenta); }
.rs-eyebrow-magenta::after { display: none; }
.rs-eyebrow-ink { color: var(--rs-ink); }
.rs-eyebrow-ink::after { background: var(--rs-ink); }
.rs-lead { font-size: 18px; line-height: 1.7; max-width: 540px; }
.rs-label { margin-bottom: 4px; font-weight: 700; color: var(--rs-ink); }
.rs-intro { max-width: 820px; }
.rs-intro > * + * { margin-top: 16px; }
.rs-head { gap: 24px; }

/* ---------- Spalten & Raster ---------- */
.rs-split { gap: 64px; align-items: center; }
.rs-split-end { align-items: flex-end; }
.rs-cards, .rs-grid { gap: 24px; }
.rs-grid-tight { gap: 12px; margin-top: 24px; }
.rs-section > * + * { margin-top: 48px; }
.rs-offset { padding-top: 48px; }
.rs-duo { gap: 12px; }

/* ---------- Bilder ---------- */
.wp-block-image.rs-ratio-43 img, .wp-block-image.rs-ratio-34 img, .wp-block-image.rs-ratio-11 img { width: 100%; object-fit: cover; display: block; }
.wp-block-image.rs-ratio-43 img { aspect-ratio: 4 / 3; }
.wp-block-image.rs-ratio-34 img { aspect-ratio: 3 / 4; }
.wp-block-image.rs-ratio-11 img { aspect-ratio: 1 / 1; }
.wp-block-image { margin: 0; overflow: hidden; }

/* Hero */
.rs-hero-text > * + * { margin-top: 24px; }
.rs-hero-media { position: relative; padding: 0 24px 24px 0; }
.rs-hero-media::before { content: ""; position: absolute; right: 0; bottom: 0; width: 70%; height: 75%; background: var(--rs-teal); }
.rs-hero-media .wp-block-image { position: relative; }

/* ---------- Buttons ---------- */
.wp-block-button .wp-block-button__link { transition: background .2s, color .2s; }
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent; color: var(--rs-ink); border: 1px solid var(--rs-ink); padding: 12px 22px;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--rs-ink); color: #fff; }
.rs-btn-arrow .wp-block-button__link { position: relative; padding-right: 72px; }
.rs-btn-arrow .wp-block-button__link::after {
	content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 48px; background-color: var(--rs-red);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16' width='8' height='13'%3E%3Cpath d='M2 2l6 6-6 6' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: center; background-size: 8px 13px;
	transition: width .3s var(--rs-ease), background-position .3s var(--rs-ease);
}
.rs-btn-arrow .wp-block-button__link:hover::after { width: 60px; background-position: 60% center; }

/* ---------- Programmschwerpunkte ---------- */
.rs-tiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rs-tiles li { margin: 0; padding: 14px 16px; background: var(--rs-white); border: 1px solid var(--rs-border); color: var(--rs-ink); font-weight: 600; font-size: 15px; }

/* ---------- Dunkler Abschnitt ---------- */
.rs-dark { background: var(--rs-dark); color: #d5d5d5; }
.rs-dark h2, .rs-dark h3 { color: #fff; }
.rs-dark h2 { font-size: clamp(36px, 4vw, 48px); }
.rs-card { background: var(--rs-dark-2); padding-bottom: 24px; transition: transform .35s var(--rs-ease), background .35s; }
.rs-card > *:not(.wp-block-image) { padding-inline: 22px; }
.rs-card h3 { margin: 20px 0 4px; font-size: 20px; }
.rs-card h3 a { color: #fff; text-decoration: none; }
.rs-card p { margin: 0; color: #d5d5d5; }
.rs-card:hover { transform: translateY(-6px); background: #33324a; }

/* ---------- Kinderatelier ---------- */
.rs-plain h3 { margin: 16px 0 8px; }
.rs-plain p { margin: 0; }
.rs-callout { gap: 16px 32px; align-items: center; padding: 28px 32px; background: var(--rs-page); }
.rs-callout p { margin: 0; color: var(--rs-ink); font-size: 17px; max-width: 760px; }
.rs-callout-white { background: var(--rs-white); border: 1px solid var(--rs-border); }
.rs-callout-white p { font-size: 16px; }

/* ---------- Kurskarten ---------- */
.rs-course { display: flex; flex-direction: column; background: var(--rs-white); border: 1px solid var(--rs-border); overflow: hidden; transition: transform .35s var(--rs-ease), border-color .35s; }
.rs-course > *:not(.wp-block-image) { margin-inline: 26px; }
.rs-course .rs-banner img { display: block; width: 100%; height: 120px; object-fit: cover; }
.rs-course h3 { margin-top: 26px; margin-bottom: 0; }
.rs-subtitle { margin: 4px 0 14px; font-size: 15px; font-weight: 600; color: var(--rs-magenta); }
.rs-course ul { margin: 0 0 14px; padding-left: 18px; font-size: 15px; }
.rs-meta { margin-top: auto; margin-bottom: 26px; padding-top: 14px; border-top: 1px solid var(--rs-border); font-size: 14px; color: var(--rs-ink); }
.rs-course:hover { transform: translateY(-6px); border-color: var(--rs-teal); }

.rs-captioned { position: relative; }
.rs-captioned img { display: block; width: 100%; height: 220px; object-fit: cover; }
.rs-captioned figcaption { position: absolute; left: 0; bottom: 0; margin: 0; background: var(--rs-white); padding: 8px 14px; font-size: 13px; font-weight: 700; color: var(--rs-ink); }

/* ---------- Preistabelle ---------- */
.rs-table { overflow-x: auto; background: var(--rs-white); border: 1px solid var(--rs-border); margin: 0; }
.rs-table table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 14px; }
.rs-table th { text-align: left; font-size: 12.25px; letter-spacing: 1px; text-transform: uppercase; color: var(--rs-body); font-weight: 600; padding: 14px 16px; border: 0; border-bottom: 2px solid var(--rs-ink); }
.rs-table td { padding: 14px 16px; border: 0; border-bottom: 1px solid var(--rs-border); color: var(--rs-ink); vertical-align: top; }
.rs-table tbody tr:last-child td { border-bottom: 0; }
.rs-table tbody tr { transition: background .2s; }
.rs-table tbody tr:hover { background: var(--rs-page); }
.rs-notes { font-size: 14px; gap: 24px; }

/* ---------- Teilnahmebedingungen (Aufklapper) ---------- */
.rs-accordion { margin-top: 8px !important; }
.rs-accordion .wp-block-details { border-top: 1px solid var(--rs-hair); margin: 0; }
.rs-accordion .wp-block-details:last-child { border-bottom: 1px solid var(--rs-hair); }
.rs-accordion summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 700; font-size: 17.5px; color: var(--rs-ink); display: flex; justify-content: space-between; align-items: center; transition: color .2s; }
.rs-accordion summary::-webkit-details-marker { display: none; }
.rs-accordion summary::after { content: "+"; font-weight: 400; font-size: 24px; color: var(--rs-red); transition: transform .3s; }
.rs-accordion details[open] summary::after { content: "–"; transform: rotate(180deg); }
.rs-accordion summary:hover { color: var(--rs-red); }
.rs-accordion details > p { max-width: 900px; margin: 0 0 16px; }
.rs-accordion details > p:last-child { margin-bottom: 24px; }

/* ---------- Galerie ---------- */
.rs-gallery.wp-block-gallery.has-nested-images { gap: 12px; }
.rs-gallery.wp-block-gallery.has-nested-images figure.wp-block-image img { height: 260px; object-fit: cover; transition: transform .6s var(--rs-ease), filter .4s; }
.rs-gallery.wp-block-gallery.has-nested-images figure.wp-block-image:hover img { transform: scale(1.04); filter: saturate(1.15); }

/* ---------- Kontakt ---------- */
.rs-teal { background: var(--rs-teal); color: var(--rs-ink); }
.rs-teal h2 { font-size: clamp(32px, 3.6vw, 44px); }
.rs-teal a { color: var(--rs-ink); }
.rs-teal .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--rs-ink); color: #fff; }
.rs-glass {
	background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .55);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	padding: 36px; color: var(--rs-ink); align-self: stretch;
}
.rs-glass p { margin: 0 0 12px; font-size: 15px; }
.rs-glass .wp-block-separator { border: 0; border-top: 1px solid rgba(15, 15, 22, .25); margin: 20px 0; opacity: 1; }
.rs-hours { line-height: 1.9; }

/* ---------- Fußzeile ---------- */
.rs-footer { background: var(--rs-dark); color: #d5d5d5; padding-top: 72px; font-size: 14px; margin-top: 0; }
.rs-footer a { color: #d5d5d5; }
.rs-footer a:hover { color: #fff; }
.rs-footer-cols { gap: 40px; }
.rs-footer-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #fff; }
.rs-footer-name { font-size: 18px; }
.rs-footer-glass { padding: 16px 18px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); line-height: 1.9; }
.rs-footer-links { line-height: 2; }
.rs-footer-bottom { margin-top: 56px; padding-block: 22px; border-top: 1px solid #3a3948; font-size: 13px; }
.rs-footer-bottom p { margin: 0; }

/* ---------- Responsiv ---------- */
@media (max-width: 781px) {
	.rs-section { padding-block: 72px; }
	.rs-split { gap: 40px; }
	.rs-offset { padding-top: 24px; }
	.rs-tiles { grid-template-columns: 1fr; }
	.rs-gallery.wp-block-gallery.has-nested-images figure.wp-block-image img { height: 200px; }
}

/* ==========================================================================
   Animationen
   ========================================================================== */
@keyframes rsFadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes rsFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rsSlideBlock { from { transform: translate(40px, 40px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rsKenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes rsBarGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rsHeaderDrop { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rsPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(130, 7, 7, .45); } 50% { box-shadow: 0 0 0 10px rgba(130, 7, 7, 0); } }

@media (prefers-reduced-motion: no-preference) {
	.rs-header { animation: rsHeaderDrop .6s var(--rs-ease) both; }
	.rs-hero-text > * { animation: rsFadeUp .8s var(--rs-ease) both; }
	.rs-hero-text > *:nth-child(1) { animation-delay: .15s; }
	.rs-hero-text > *:nth-child(2) { animation-delay: .3s; }
	.rs-hero-text > *:nth-child(3) { animation-delay: .45s; }
	.rs-hero-text > *:nth-child(4) { animation-delay: .6s; }
	.rs-hero-text > *:nth-child(5) { animation-delay: .75s; }
	.rs-hero-media { overflow: hidden; }
	.rs-hero-media::before { animation: rsSlideBlock 1s .5s var(--rs-ease) both; }
	.rs-hero-media img { animation: rsFadeIn 1s .3s both, rsKenburns 9s .3s ease-out both; }
	.rs-nav .rs-nav-cta .wp-block-navigation-item__content { animation: rsPulse 2.6s 1.5s ease-in-out 3; }
	.rs-card img, .rs-course img, .rs-plain img, .rs-captioned img { transition: transform .6s var(--rs-ease); }
	.rs-card:hover img, .rs-course:hover img, .rs-plain:hover img, .rs-captioned:hover img { transform: scale(1.06); }
}

/* Beim Scrollen hereingleiten (aktuelle Browser; ältere zeigen alles sofort) */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.rs-section h2, .rs-section h3, .rs-card, .rs-plain, .rs-course, .rs-captioned, .rs-table,
		.rs-accordion .wp-block-details, .rs-gallery figure, .rs-tiles li, .rs-duo .wp-block-image,
		.rs-callout, .rs-glass, .rs-footer-cols > .wp-block-column {
			animation: rsFadeUp linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 40%;
		}
		.rs-cards > *:nth-child(3n+2), .rs-grid > *:nth-child(3n+2), .rs-footer-cols > *:nth-child(2) { animation-range: entry 8% entry 48%; }
		.rs-cards > *:nth-child(3n), .rs-grid > *:nth-child(3n), .rs-footer-cols > *:nth-child(3) { animation-range: entry 16% entry 56%; }
		.rs-gallery figure:nth-child(4n+2) { animation-range: entry 6% entry 46%; }
		.rs-gallery figure:nth-child(4n+3) { animation-range: entry 12% entry 52%; }
		.rs-gallery figure:nth-child(4n) { animation-range: entry 18% entry 58%; }
		.rs-section .rs-eyebrow::after { animation: rsBarGrow linear both; animation-timeline: view(); animation-range: entry 20% entry 60%; }
	}
}

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