* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color, #DFCFAF);
    color: var(--text-color, #3D2E22);
    line-height: 1.75;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- WARMER BRAUNER HEADER --- */
.site-header {
    background-color: var(--primary-color, #8C6D46);
    padding: 18px 0;
    border-bottom: 5px solid var(--bg-color, #DFCFAF);
    box-shadow: 0 4px 0 0 var(--primary-color, #8C6D46);
    margin-bottom: 8px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
}

.brand img {
    height: 115px;
    width: auto;
    border-radius: 50%;
    background: #ffffff;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.header-top-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Hauptnavigation */
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #1E1A16;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.nav-item > a:hover,
.nav-item.active > a {
    background-color: rgba(255, 255, 255, 0.28);
    color: #000000;
}

/* Dropdown (Bootstrap-Override-sicher) */
.nav-item .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: #F7F1E5;
    border: none;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    z-index: 100;
}

.nav-item.has-dropdown:hover .dropdown-menu {
    display: block;
}

.nav-item .dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: #1E1A16;
    text-decoration: none;
    font-size: 0.92rem;
}

.nav-item .dropdown-menu a:hover {
    background-color: var(--bg-color, #DFCFAF);
    font-weight: 600;
}

/* Suche mit Lupe */
.header-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 4px 12px;
}

.header-search input {
    border: none;
    outline: none;
    background: transparent;
    width: 120px;
    font-size: 0.88rem;
    color: #1E1A16;
}

.header-search button {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--primary-color, #8C6D46);
    display: flex;
    align-items: center;
}

/* Social Links */
.header-social-row {
    display: flex;
    gap: 14px;
    padding-right: 45px;
    font-size: 0.85rem;
}

.header-social-row a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.92;
}

.header-social-row a:hover {
    text-decoration: underline;
    opacity: 1;
}

/* --- ROOTLINE / BREADCRUMB (ZENTRIERT) --- */
.breadcrumb-nav {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 10px 24px;
    font-size: 0.82rem;
    color: #5C4932;
}

.breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
}

.breadcrumb-list li + li::before {
    content: "›";
    margin-right: 6px;
    font-weight: bold;
}

.breadcrumb-list a {
    color: #5C4932;
    text-decoration: none;
}

/* --- HAUPTINHALT & TYPOGRAFIE (ZENTRIERT) --- */
.site-main {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 35px 24px 60px;
    min-height: 62vh;
}

.site-main h1,
.site-main h2,
.site-main h3 {
    color: #2B2016;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-main h1 {
    font-size: 2.1rem;
    margin-top: 0;
    margin-bottom: 0.35em;
}

.site-main h2 {
    font-size: 1.45rem;
    margin-bottom: 0.75em;
    color: #5C4932;
}

.site-main p {
    margin-bottom: 1.1rem;
    max-width: 68ch;
}

/* --- HERO-TEXT WEISS & LESBAR HALTEN --- */
.site-main .text-white h1,
.site-main .text-white h2,
.site-main .text-white h3,
.site-main .text-white p,
.site-main .text-white strong,
.frame-layout-2 h1,
.frame-layout-2 h2,
.frame-layout-2 p,
.frame-layout-2 strong {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

/* --- MODERNE TEXT-BILD-ELEMENTE (FLUID STYLED CONTENT) --- */
.frame {
    padding: 2rem 0;
}

.ce-textpic.ce-right .ce-gallery,
.ce-textpic.ce-left .ce-gallery {
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .ce-textpic.ce-intext.ce-right,
    .ce-textpic.ce-intext.ce-left {
        display: flex;
        align-items: center;
        gap: 2.5rem;
    }

    .ce-textpic.ce-intext.ce-right {
        flex-direction: row-reverse;
    }

    .ce-textpic.ce-intext .ce-gallery {
        flex: 0 0 38%;
        max-width: 38%;
        margin: 0;
    }

    .ce-textpic.ce-intext .ce-bodytext {
        flex: 1;
    }
}

/* Abgerundete Ecken & weicher Schatten für alle Inhaltsbilder */
.ce-textpic img,
.ce-image img,
figure.image img {
    width: 100%;
    height: auto;
    border-radius: 1.25rem;
    box-shadow: 0 12px 30px rgba(61, 46, 34, 0.14);
    object-fit: cover;
}

/* Abgesetzte Karte (im TYPO3 Backend unter Erscheinungsbild -> Layout 1 wählbar) */
.frame-layout-1 {
    background-color: #F7F1E5;
    border-radius: 1.5rem;
    padding: 2.25rem;
    margin: 1.5rem 0;
    box-shadow: 0 8px 24px rgba(61, 46, 34, 0.07);
}

/* --- CALL-TO-ACTION BUTTON --- */
.btn-cta,
.site-main a[href*="betreuungsanfrage"] {
    display: inline-block;
    margin-top: 14px;
    background-color: #D96B1B;
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(217, 107, 27, 0.25);
    transition: transform 0.15s ease, background-color 0.2s ease;
}

.btn-cta:hover,
.site-main a[href*="betreuungsanfrage"]:hover {
    background-color: #B85610;
    transform: translateY(-1px);
}

/* --- FOOTER --- */
.site-footer {
    background-color: var(--primary-color, #8C6D46);
    color: #ffffff;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-meta-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-meta-nav a {
    color: #ffffff;
    text-decoration: none;
}

.footer-meta-nav a:hover {
    text-decoration: underline;
}

.meta-separator {
    color: #DFCFAF;
    font-weight: bold;
}
