/* Kopf- und Fußbereich (dynamische Blöcke) */
.amed-innen { max-width: 1200px; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

header.wp-block-template-part { position: sticky; top: 0; z-index: 60; }
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 46px; } }
@media (max-width: 600px) { .admin-bar header.wp-block-template-part { top: 0; position: relative; } }

.amed-topbar { background: var(--wp--preset--color--petrol); color: #e6f1f0; font-size: .85rem; }
.amed-topbar .amed-innen { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; }
.amed-topbar p { margin: 0; padding-block: .35rem; }
.amed-sprachen ul { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.amed-sprachen a { color: #e6f1f0; text-decoration: none; text-transform: uppercase; font-weight: 600; font-size: .8rem; padding: .2rem .45rem; border-radius: 6px; }
.amed-sprachen .current-lang a, .amed-sprachen a:hover { background: rgba(255,255,255,.16); }

.amed-kopf { background: rgba(247,242,234,.94); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid rgba(15,76,92,.10); }
.amed-kopf .amed-innen { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.amed-logo { font-family: var(--wp--preset--font-family--serif); font-weight: 600; font-size: 1.6rem; letter-spacing: -.01em; color: var(--wp--preset--color--petrol) !important; text-decoration: none !important; white-space: nowrap; }
.amed-logo-akzent { color: var(--wp--preset--color--terrakotta); }

.amed-hauptnav { display: flex; align-items: center; gap: 1.4rem; }
.amed-menue { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.amed-menue > li { position: relative; }
.amed-menue a { display: block; padding: .55rem .7rem; color: var(--wp--preset--color--text); text-decoration: none; font-weight: 500; font-size: .98rem; border-radius: 8px; }
.amed-menue a:hover, .amed-menue .current-menu-item > a, .amed-menue .current-menu-ancestor > a { color: var(--wp--preset--color--tuerkis); }
.amed-menue .menu-item-has-children > a::after { content: ""; display: inline-block; width: .42em; height: .42em; margin-inline-start: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.2em) rotate(45deg); }
.amed-menue .sub-menu { position: absolute; inset-inline-start: 0; top: 100%; min-width: 260px; list-style: none; margin: 0; padding: .5rem; background: #fff; border: 1px solid rgba(15,76,92,.12); border-radius: 12px; box-shadow: 0 16px 36px rgba(15,76,92,.14); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
.amed-menue li:hover > .sub-menu, .amed-menue li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.amed-cta { display: inline-block; background: var(--wp--preset--color--terrakotta); color: #fff !important; text-decoration: none !important; font-weight: 600; padding: .7rem 1.3rem; border-radius: 999px; white-space: nowrap; }
.amed-cta:hover { background: var(--wp--preset--color--petrol); }

.amed-menue-knopf { display: none; align-items: center; gap: .6rem; background: none; border: 1px solid rgba(15,76,92,.25); border-radius: 999px; padding: .55rem 1rem; font: inherit; font-weight: 600; color: var(--wp--preset--color--petrol); cursor: pointer; }
.amed-burger, .amed-burger::before, .amed-burger::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s ease; }
.amed-burger::before, .amed-burger::after { content: ""; position: absolute; left: 0; }
.amed-burger::before { top: -6px; }
.amed-burger::after { top: 6px; }
.amed-menue-knopf[aria-expanded=true] .amed-burger { background: transparent; }
.amed-menue-knopf[aria-expanded=true] .amed-burger::before { transform: translateY(6px) rotate(45deg); }
.amed-menue-knopf[aria-expanded=true] .amed-burger::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
	.amed-menue-knopf { display: inline-flex; }
	.amed-hauptnav { display: none; position: absolute; inset-inline: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 1rem; background: var(--wp--preset--color--sand); border-bottom: 1px solid rgba(15,76,92,.12); padding: 1rem clamp(1rem, 4vw, 2.5rem) 1.5rem; max-height: calc(100vh - 120px); overflow-y: auto; box-shadow: 0 20px 30px rgba(15,76,92,.12); }
	.amed-hauptnav.ist-offen { display: flex; }
	.amed-kopf .amed-innen { position: relative; }
	.amed-kopf { position: relative; }
	.amed-menue { flex-direction: column; }
	.amed-menue a { padding: .7rem .2rem; border-bottom: 1px solid rgba(15,76,92,.08); border-radius: 0; }
	.amed-menue .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 1rem; min-width: 0; }
	.amed-menue .menu-item-has-children > a::after { display: none; }
	.amed-cta { text-align: center; }
	.amed-topbar p { font-size: .78rem; }
}
@media (max-width: 600px) { .amed-topbar p { display: none; } .amed-topbar .amed-innen { justify-content: flex-end; min-height: 32px; } }

/* Fußbereich */
.amed-fuss { background: var(--wp--preset--color--petrol); color: #d9e7e6; padding-block: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; font-size: .97rem; }
.amed-fuss-spalten { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 900px) { .amed-fuss-spalten { grid-template-columns: 1fr 1fr; } .amed-fuss-marke { grid-column: 1 / -1; } }
@media (max-width: 520px) { .amed-fuss-spalten { grid-template-columns: 1fr; } }
.amed-fuss .amed-logo { color: #fff !important; }
.amed-fuss .amed-logo-akzent { color: #f0b9a6; }
.amed-fuss-marke p { max-width: 42ch; margin-top: .9rem; }
.amed-fuss-titel { font-family: var(--wp--preset--font-family--sans); font-size: .82rem !important; text-transform: uppercase; letter-spacing: .12em; color: #fff !important; margin: .4rem 0 1rem; font-weight: 700; }
.amed-fuss ul { list-style: none; margin: 0; padding: 0; }
.amed-fuss li { margin-bottom: .5rem; }
.amed-fuss a { color: #d9e7e6; text-decoration: none; }
.amed-fuss a:hover { color: #fff; text-decoration: underline; }
.amed-fuss-unten { border-top: 1px solid rgba(255,255,255,.14); margin-top: clamp(2rem, 5vw, 3.5rem); padding-top: 1.2rem; display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; font-size: .85rem; color: #a9c3c3; }
.amed-fuss-unten p { margin: 0; max-width: 80ch; }

/* Inhaltsbereich: keine Lücke zwischen Kopf, Inhalt und Fuß */
.wp-site-blocks > * { margin-block-start: 0; }
main.amed-main { margin-block: 0; }
main.amed-main > .entry-content > .alignfull:first-child, main.amed-main > .wp-block-post-content > .alignfull:first-child { margin-block-start: 0; }
.wp-block-post-content > .alignfull:last-child { margin-block-end: 0; }

/* Flaggen im Sprachumschalter */
.amed-sprachen a { display: inline-flex; align-items: center; gap: .35rem; }
.amed-sprachen img { width: 18px !important; height: 12px !important; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }

/* Logo-Bildmarke im Kopfbereich */
.amed-kopf .amed-logo { display: inline-flex; align-items: center; gap: .6rem; }
.amed-logo-bild { width: 44px; height: 44px; display: block; flex: none; border-radius: 8px; }
@media (max-width: 600px) { .amed-logo-bild { width: 36px; height: 36px; } }
