/* FeWo-Verwaltung – modernes Design für das Theme „Portfolio Lite“. Aktiv nur mit der Body-Klasse fewo-modern. */
body.fewo-modern #panel { display: flex; flex-direction: column; max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; float: none; }
body.fewo-modern #panel::before { content: ""; display: block; width: 100%; max-width: 1160px; align-self: center; aspect-ratio: 1204 / 184; margin: 0; background: #aaaaff url(site-banner.webp) center top / 100% 100% no-repeat; }
body.fewo-modern #masthead, body.fewo-modern #header.top-header { display: none !important; }
body.fewo-modern #panel > .side-header { display: block !important; float: none; width: 100%; max-width: 1160px; align-self: center; margin: -1px 0 26px; padding: 9px 12px 14px; background: #ccccff; border-radius: 0 0 18px 18px; position: static; height: auto; min-height: 0; box-sizing: border-box; }
body.fewo-modern #panel > .twelve.columns { float: none; width: 100%; margin: 0; padding: 0; position: static; }
body.fewo-modern #navigation { display: block !important; margin: 0; padding: 0; width: auto; float: none; }
body.fewo-modern #menu-menue { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0; padding: 0; text-align: center; }
body.fewo-modern #menu-menue > li { flex: 1 1 auto; margin: 0; padding: 0; float: none; width: auto; list-style: none; }
body.fewo-modern #menu-menue > li > a { display: block; padding: 9px 8px; border: 1px solid #fff; border-radius: 999px; background: #fff; color: #2b2b55; font-size: 14px; font-weight: 500; line-height: 1.2; letter-spacing: 0; white-space: nowrap; text-align: center; text-decoration: none; box-shadow: 0 1px 2px rgba(50, 50, 120, .14); transition: background .15s, transform .15s, box-shadow .15s; }
body.fewo-modern #menu-menue > li > a:hover, body.fewo-modern #menu-menue > li > a:focus { background: #f1f1ff; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(50, 50, 120, .2); }
body.fewo-modern #menu-menue > li.current-menu-item > a, body.fewo-modern #menu-menue > li.current_page_item > a { background: #2f6f62; border-color: #2f6f62; color: #fff; box-shadow: 0 3px 10px rgba(47, 111, 98, .35); }
body.fewo-modern .fewo-menubtn { display: none; }

/* Inhalt */
body.fewo-modern .content { display: block; padding: 0; }
body.fewo-modern .content > .eleven.columns, body.fewo-modern .content > .sixteen.columns { float: none; width: 100%; max-width: 1160px; margin: 0 auto; padding: 0; box-sizing: border-box; }
body.fewo-modern .post-area, body.fewo-modern .post-area.no-sidebar { padding: 0 !important; margin-top: 0; }
body.fewo-modern .content { padding: 0 !important; max-width: none; }
/* Verwaltung: volle Breite nutzen */
body.fewo-modern .content > .sixteen.columns:has(#fewo-app), body.fewo-modern .content > .eleven.columns:has(#fewo-app) { max-width: 1160px; }
body.fewo-modern h1.headline { font-size: 28px; font-weight: 600; color: #23234d; margin: 0 0 14px; padding: 0 4px; }
body.fewo-modern .wp-block-cover { border-radius: 18px; overflow: hidden; box-shadow: 0 8px 28px rgba(50, 50, 130, .18); }
body.fewo-modern .fewo.fewo-public .fewo-card { border-radius: 18px; box-shadow: 0 8px 28px rgba(50, 50, 130, .18); }
body.fewo-modern .article img { border-radius: 10px; }

/* Einheitliche Schrift in den Inhalten: Überschriften, Text, Links */
body.fewo-modern .article { color: #2b2b45; font-size: 16px; line-height: 1.65; }
body.fewo-modern .article .wp-block-cover, body.fewo-modern .article .wp-block-cover p, body.fewo-modern .article .wp-block-cover li { color: #2b2b45; }
body.fewo-modern .article h2 { font-size: 22px; font-weight: 600; line-height: 1.3; color: #23234d; margin: 1.5em 0 .5em; }
body.fewo-modern .article h3 { font-size: 18px; font-weight: 600; line-height: 1.3; color: #23234d; margin: 1.3em 0 .4em; }
body.fewo-modern .article .wp-block-cover__inner-container > h2:first-child, body.fewo-modern .article .wp-block-cover__inner-container > h3:first-child { margin-top: 0; }
body.fewo-modern .article p { margin: 0 0 .9em; }
body.fewo-modern .article a:not([class]), body.fewo-modern .fewo-map a { color: #2f6f62; font-weight: 600; text-decoration: none; }
body.fewo-modern .article a:not([class]):hover, body.fewo-modern .fewo-map a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.fewo-modern .article a:not([class]):hover, body.fewo-modern .fewo-map a:hover { color: #1f4f45; }
body.fewo-modern .article hr, body.fewo-modern .article .wp-block-separator { border: 0; border-top: 1px solid rgba(60, 60, 140, .22); margin: 1.6em 0; }
body.fewo-modern .footer, body.fewo-modern .footer-information, body.fewo-modern .footer-credits { display: none !important; }
body.fewo-modern .fewo-footer { max-width: 1160px; margin: 30px auto 0; padding: 14px 20px 26px; text-align: center; font-size: 13px; line-height: 1.6; color: #3c3c6e; }
body.fewo-modern .fewo-footer a { color: #23234d; text-decoration: underline; text-underline-offset: 2px; }
body.fewo-modern .fewo-footer a:hover { color: #2f6f62; }
body.fewo-modern .fewo-footer .fewo-gear { display: inline-block; vertical-align: -3px; line-height: 0; opacity: .7; }
body.fewo-modern .fewo-footer .fewo-gear:hover { opacity: 1; }
body.fewo-modern .fewo-footer .fewo-gear svg { width: 16px; height: 16px; fill: currentColor; }

/* Desktop: passen nicht alle Knöpfe in eine Reihe, verteilt das Skript sie auf gleich lange Reihen (--fewo-cols). */
@media (min-width: 821px) {
  body.fewo-modern #menu-menue.fewo-nav-measure { display: flex !important; flex-wrap: nowrap !important; }
  body.fewo-modern #menu-menue.fewo-nav-measure > li { flex: 0 0 auto !important; }
  body.fewo-modern.fewo-nav-grid #menu-menue { display: grid; grid-template-columns: repeat(var(--fewo-cols, 5), 1fr); gap: 7px; }
  html:not(.fewo-js) body.fewo-modern #menu-menue { flex-wrap: wrap; justify-content: center; }
  html:not(.fewo-js) body.fewo-modern #menu-menue > li { flex: 0 0 auto; }
}

/* Tablet hoch und Handy: Banner und Menü bleiben oben stehen, Menü klappt auf */
@media (max-width: 820px) {
  body.fewo-modern #panel { padding: 0 12px; }
  body.fewo-modern #panel::before { margin-top: 0; aspect-ratio: 1204 / 222; background-image: url(site-banner-mobile.webp); position: -webkit-sticky; position: sticky; top: 0; z-index: 61; }
  body.fewo-modern #panel > .side-header { position: -webkit-sticky !important; position: sticky !important; top: calc((100vw - 24px) * 222 / 1204 - 4px); z-index: 60; margin-bottom: 16px; padding: 6px 8px 10px; border-radius: 0 0 14px 14px; box-shadow: 0 8px 16px rgba(50, 50, 130, .2); }
  body.fewo-modern #menu-menue { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 6px; }
  body.fewo-modern #menu-menue > li { flex: 0 0 auto; }
  body.fewo-modern #menu-menue > li > a { padding: 9px 13px; }
  html.fewo-js body.fewo-modern .fewo-menubtn { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 4px 0 0; padding: 11px 16px; border: 1px solid #fff; border-radius: 12px; background: #fff; color: #2b2b55; font-size: 16px; font-weight: 600; line-height: 1.2; font-family: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(50, 50, 120, .14); -webkit-appearance: none; appearance: none; text-transform: none; letter-spacing: 0; height: auto; }
  html.fewo-js body.fewo-modern .fewo-menubtn .fewo-menubtn-cur { font-weight: 400; color: #2f6f62; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 12px; }
  html.fewo-js body.fewo-modern #menu-menue { display: none; }
  html.fewo-js body.fewo-modern.fewo-menu-open #menu-menue { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
  html.fewo-js body.fewo-modern.fewo-menu-open #menu-menue > li > a { padding: 12px 8px; border-radius: 10px; font-size: 15px; }
  body.fewo-modern h1.headline { font-size: 21px; margin-bottom: 10px; }
  body.fewo-modern .article { font-size: 15px; line-height: 1.6; }
  body.fewo-modern .article h2 { font-size: 19px; }
  body.fewo-modern .article h3 { font-size: 16.5px; }
  body.fewo-modern .article .has-medium-font-size, body.fewo-modern .article .has-large-font-size { font-size: 16px !important; }
  body.fewo-modern .article .wp-block-cover { padding: 18px 16px; min-height: 0; }
  body.fewo-modern .wp-block-cover, body.fewo-modern .fewo.fewo-public .fewo-card { border-radius: 14px; }
}
/* Angemeldet: feste WordPress-Leiste berücksichtigen */
@media (min-width: 601px) and (max-width: 782px) {
  body.fewo-modern.admin-bar #panel::before { top: 46px; }
  body.fewo-modern.admin-bar #panel > .side-header { top: calc((100vw - 24px) * 222 / 1204 + 42px); }
}
@media (min-width: 783px) and (max-width: 820px) {
  body.fewo-modern.admin-bar #panel::before { top: 32px; }
  body.fewo-modern.admin-bar #panel > .side-header { top: calc((100vw - 24px) * 222 / 1204 + 28px); }
}
/* Handy quer: zu wenig Höhe für einen festen Kopf */
@media (max-width: 820px) and (max-height: 480px) {
  body.fewo-modern #panel::before, body.fewo-modern #panel > .side-header { position: static !important; }
}
body.fewo-modern .fewo.fewo-public { max-width: 1160px; margin-left: auto; margin-right: auto; }

/* Sanftes Ein- und Ausblenden beim Seitenwechsel */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: fewo-page-out .7s ease both; }
::view-transition-new(root) { animation: fewo-page-in 1.3s ease .15s both; }
@keyframes fewo-page-out { to { opacity: 0; } }
@keyframes fewo-page-in { from { opacity: 0; } }
@supports not (view-transition-name: none) { body.fewo-modern #panel > .twelve.columns { animation: fewo-page-in 1.3s ease both; } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } body.fewo-modern #panel > .twelve.columns { animation: none; } }
