/* ===================================================================
   mc.css — Impuls GmbH · Institut für Erziehungshilfe und Therapie
   ===================================================================
   Corporate Colors:
   --primary:     #143667  (Navy Blue)
   --akzent:      #c02826  (Rot)
   Design: Modern, einladend, zugänglich, warm
   =================================================================== */


/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f3f2f0; }
::-webkit-scrollbar-thumb { background: rgba(20, 54, 103, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
* { scrollbar-width: thin; scrollbar-color: rgba(20, 54, 103, 0.25) #f3f2f0; }


/* ===== GSAP REVEAL HELPERS ===== */
.ip-reveal   { opacity: 0; }
.ip-from-up  { opacity: 0; transform: translateY(32px); }
.ip-from-left { opacity: 0; transform: translateX(-28px); }
.ip-from-right { opacity: 0; transform: translateX(28px); }

/* After GSAP animation completes — locks final state, prevents jank */
.ip-animated {
    opacity: 1 !important;
    transform: none !important;
}


/* ===== PAGE WRAPPER ===== */
#page { position: relative; min-height: 100vh; }
section { position: relative; z-index: 10; }


/* ===== NAVIGATION ===== */
#mainNav {
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.nav-scrolled {
    background: #f3f2f0 !important;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

/* Scrolled state: dunkle Textfarben */
.nav-scrolled .nav-link { color: var(--primary); opacity: 0.75; }
.nav-scrolled .nav-link:hover { color: var(--primary); opacity: 1; }
.nav-scrolled .nav-active { color: var(--primary); opacity: 1; }
.nav-scrolled .nav-link::after { background: var(--akzent); }
.nav-scrolled .mburger b { background: var(--primary); }

/* Nav Dropdown */
.ip-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 260px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(14, 38, 73, 0.18);
    border: 1px solid rgba(20, 54, 103, 0.1);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 200;
}
.ip-dropdown-parent:hover .ip-dropdown,
.ip-dropdown-parent:focus-within .ip-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ip-dropdown a {
    display: block;
    padding: 0.6rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink) !important;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border-left: 2px solid transparent;
}
.ip-dropdown a:hover {
    background: var(--primary-soft);
    color: var(--primary) !important;
    border-left-color: var(--akzent);
}

/* Dropdown Kategorie-Label */
.ip-dropdown-cat {
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-light);
    border-top: 1px solid var(--line-soft);
    margin-top: 0.25rem;
}
.ip-dropdown-cat:first-child { border-top: none; margin-top: 0; }

/* Telefon-Link Default (transparent nav) */
.ip-nav-phone { color: rgba(255, 255, 255, 0.55); }
.ip-nav-phone:hover { color: rgba(255, 255, 255, 0.9); }

/* Scrolled: Telefon-Link & Mobile Phone */
.nav-scrolled .ip-nav-phone { color: rgba(20, 54, 103, 0.55) !important; }
.nav-scrolled .ip-nav-phone:hover { color: var(--primary) !important; }

/* Hamburger — weiß auf dunkelblauem Nav */
.mburger b { background: rgba(255, 255, 255, 0.85); }
.mburger--collapse.is-active b { background: var(--akzent); }


/* ===== MMENU — Impuls Dark-Navy Theme ===== */
#menu:not(.mm-menu) { display: none; }

.mm-menu {
    --mm-navbar-size:            60px;
    --mm-line-height:            24px;
    --mm-color-border:           rgba(255, 255, 255, 0.1);
    --mm-color-button:           rgba(255, 255, 255, 0.7);
    --mm-color-text:             rgba(255, 255, 255, 0.9);
    --mm-color-text-dimmed:      rgba(255, 255, 255, 0.45);
    --mm-color-background:       #0e2649;
    --mm-color-background-highlight: rgba(255, 255, 255, 0.05);
    --mm-color-background-emphasis: rgba(255, 255, 255, 0.08);
    --mm-shadow:                 0 0 30px rgba(0, 0, 0, 0.35);
    --mm-listitem-size:          54px;
    --mm-sidebar-expanded-size:  320px;
    background-color: #0e2649 !important;
}

.mm-menu .mm-navbar {
    background-color: #143667 !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}
.mm-menu .mm-panel { background-color: #0e2649 !important; }
.mm-menu .mm-listitem { border-bottom: 1px solid rgba(255,255,255,0.07) !important; }
.mm-menu .mm-listitem > a,
.mm-menu .mm-listitem > span {
    color: rgba(255,255,255,0.85) !important;
    font-size: 0.93rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}
.mm-menu .mm-listitem:hover {
    background-color: rgba(255,255,255,0.06) !important;
}
.mm-menu .mm-listitem.mm-active > a,
.mm-menu .mm-listitem.mm-active > span {
    color: #ffffff !important;
    font-weight: 700;
}
.mm-menu .mm-listitem.mm-active {
    background-color: rgba(192,40,38,0.12) !important;
    border-left: 3px solid var(--akzent) !important;
}

.mm-navbars_bottom .mm-navbar {
    background-color: #143667 !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    border-bottom: none !important;
}
.mm-navbars_top .mm-navbar { background-color: #143667 !important; }
.mm-navbar a, .mm-navbar button, .mm-navbar .mm-btn { color: rgba(255,255,255,0.7) !important; }
.mm-navbars_bottom .mm-navbar a, .mm-navbars_bottom .mm-navbar i { color: rgba(255,255,255,0.7) !important; }
.mm-btn_close { color: rgba(255,255,255,0.6) !important; }
.mm-navbar__title {
    color: #ffffff !important;
    background: transparent !important;
    font-family: 'Lora', serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em;
    font-weight: 700;
    font-size: 1rem;
}
.mm-menu_offcanvas { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.mm-logo-link { display: inline-block !important; line-height: 1 !important; padding: 12px 0 0 16px !important; }
.mm-navbar-logo { max-width: 160px !important; height: auto !important; max-height: 36px !important; }
.mm-navbar .mm-breadcrumbs { display: none !important; }
.mm-panel:after { display: none; }


/* ===== FOOTER ===== */
footer { position: relative; z-index: 10; }
footer a { transition: color 0.3s; }

.ip-footer {
    background: var(--primary-dark);
}


/* ===== SECTION WRAPPER ===== */
.ip-section { padding: 5.5rem 1.5rem; }
@media (min-width: 768px) { .ip-section { padding: 7.5rem 2rem; } }

.ip-section-sm { padding: 3.5rem 1.5rem; }
@media (min-width: 768px) { .ip-section-sm { padding: 5rem 2rem; } }

.ip-container { max-width: 1180px; margin: 0 auto; }
.ip-container-narrow { max-width: 800px; margin: 0 auto; }


/* ===== SECTION EYEBROW ===== */
.ip-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--akzent);
    margin-bottom: 0.75rem;
}
.ip-eyebrow::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--akzent);
    border-radius: 1px;
    opacity: 0.6;
}


/* ===== HERO ===== */
.ip-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 72px;
}

.ip-hero-bg {
    position: absolute;
    inset: -12%;
    background-size: cover;
    background-position: center 30%;
    will-change: transform;
}

.ip-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        155deg,
        rgba(14, 38, 73, 0.88) 0%,
        rgba(14, 38, 73, 0.72) 50%,
        rgba(10, 25, 50, 0.82) 100%
    );
}

/* Dezente geometrische Struktur im Hintergrund */
.ip-hero-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Crect x='39' y='0' width='1' height='80' fill='%23ffffff'/%3E%3Crect x='0' y='39' width='80' height='1' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: 80px 80px;
}

.ip-hero-content { position: relative; z-index: 2; width: 100%; }

/* Hero Reveal Animation (GSAP ersetzt diese, falls geladen) */
.ip-hero-reveal {
    opacity: 0;
    transform: translateY(28px);
    animation: ipReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes ipReveal { to { opacity: 1; transform: translateY(0); } }

/* Scroll-Indikator */
.ip-scroll-indicator {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    opacity: 0;
    animation: ipScrollShow 1s ease 3s forwards;
}
@keyframes ipScrollShow { to { opacity: 1; } }

.ip-scroll-line {
    width: 1px; height: 0; background: rgba(255, 255, 255, 0.35);
    animation: ipScrollLine 1.5s ease 2.4s forwards;
}
@keyframes ipScrollLine { to { height: 52px; } }


/* ===== PAGE HERO (Sub-Seiten) — Hintergrundbild mit Overlay ===== */
.ip-page-hero {
    position: relative;
    padding: 150px 0 72px;
    overflow: hidden;
    background: var(--primary);
}

/* Hintergrundbild — wird via inline-style gesetzt */
.ip-page-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 35%;
    opacity: 0.35;
}

/* Warm-dunkler Overlay — freundlich, nicht zu hart */
.ip-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(10, 25, 55, 0.82) 0%,
        rgba(14, 38, 73, 0.70) 50%,
        rgba(8, 20, 45, 0.78) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Dezenter Akzent-Glow links unten */
.ip-page-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -40px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192, 40, 38, 0.12) 0%, transparent 60%);
    z-index: 1;
    pointer-events: none;
}

.ip-page-hero__inner,
.ip-page-hero-content { position: relative; z-index: 2; }

.ip-page-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    color: #ffffff;
    max-width: 680px;
    line-height: 1.12;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.ip-page-hero p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08rem;
    max-width: 580px;
    margin-top: 0.75rem;
    line-height: 1.7;
}

/* Akzentlinie */
.ip-page-hero-accent {
    display: block;
    width: 56px;
    height: 3px;
    background: var(--akzent);
    border-radius: 2px;
    margin-bottom: 1.25rem;
    opacity: 0.85;
}

.ip-page-hero-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: var(--cream-2);
    clip-path: ellipse(55% 100% at 50% 100%);
    z-index: 2;
}


/* ===== LEISTUNGS-KARTEN ===== */
.ip-leistung-card {
    background: var(--cream);
    border: 1px solid var(--line-soft);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(20, 54, 103, 0.07);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
}
.ip-leistung-card:hover {
    box-shadow: 0 8px 32px rgba(20, 54, 103, 0.14);
    transform: translateY(-4px);
    border-color: rgba(20, 54, 103, 0.2);
}

.ip-leistung-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.25rem;
    transition: background 0.3s, color 0.3s;
}
.ip-leistung-card:hover .ip-leistung-card__icon {
    background: var(--primary);
    color: #ffffff;
}

.ip-leistung-card__body {
    padding: 1.75rem 1.75rem 1.25rem;
    flex: 1;
}

.ip-leistung-card__footer {
    padding: 1rem 1.75rem 1.5rem;
    border-top: 1px solid var(--line-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ip-leistung-card__tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    opacity: 0.55;
}

.ip-leistung-card__arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: background 0.25s, color 0.25s, transform 0.25s;
}
.ip-leistung-card:hover .ip-leistung-card__arrow {
    background: var(--akzent);
    color: #ffffff;
    transform: translateX(3px);
}


/* ===== HIGHLIGHT / STAT KACHELN ===== */
.ip-highlight-tile {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    background: var(--cream);
    border: 1px solid var(--line-soft);
    transition: box-shadow 0.3s, transform 0.3s;
}
.ip-highlight-tile:hover {
    box-shadow: 0 6px 24px rgba(20, 54, 103, 0.1);
    transform: translateY(-3px);
}

.ip-highlight-tile__num {
    font-family: 'Lora', serif;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.ip-highlight-tile__num span {
    color: var(--akzent);
    font-size: 0.65em;
}


/* ===== TESTIMONIAL / ZITAT-BLOCK ===== */
.ip-quote {
    position: relative;
    padding: 2.5rem 2.5rem 2rem;
    background: var(--primary);
    border-radius: 1.25rem;
    color: rgba(255, 255, 255, 0.88);
}

.ip-quote::before {
    content: '\201C';
    position: absolute;
    top: 0.5rem;
    left: 1.5rem;
    font-family: 'Lora', serif;
    font-size: 6rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.ip-quote p {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    line-height: 1.65;
    position: relative;
    z-index: 1;
}

.ip-quote__source {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1.25rem;
}

.ip-quote__source strong { color: var(--akzent); font-style: normal; }


/* ===== CTA SECTION ===== */
.ip-cta-section {
    background: var(--primary);
    position: relative;
    overflow: hidden;
}

.ip-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.ip-cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(192, 40, 38, 0.06);
    pointer-events: none;
}


/* ===== CONTACT CARD ===== */
.ip-contact-card {
    background: var(--cream);
    border: 1px solid var(--line-soft);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 14px rgba(20, 54, 103, 0.06);
    transition: box-shadow 0.3s;
}
.ip-contact-card:hover { box-shadow: 0 6px 24px rgba(20, 54, 103, 0.11); }

.ip-contact-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1rem;
}


/* ===== WERT-KARTE (Leitbild) ===== */
.ip-value-card {
    padding: 1.75rem;
    border-radius: 1rem;
    border-left: 4px solid var(--primary);
    background: var(--cream);
    border-top: 1px solid var(--line-soft);
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    transition: border-left-color 0.3s, box-shadow 0.3s;
}
.ip-value-card:hover {
    border-left-color: var(--akzent);
    box-shadow: 0 4px 20px rgba(20, 54, 103, 0.09);
}


/* ===== TEAM CARD ===== */
.ip-team-card {
    background: var(--cream);
    border: 1px solid var(--line-soft);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(20, 54, 103, 0.06);
    transition: box-shadow 0.3s, transform 0.3s;
}
.ip-team-card:hover {
    box-shadow: 0 6px 24px rgba(20, 54, 103, 0.11);
    transform: translateY(-3px);
}

.ip-team-card__img {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--primary-soft);
}
.ip-team-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.ip-team-card:hover .ip-team-card__img img {
    transform: scale(1.05);
}

.ip-team-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
}


/* ===== JOB / STELLE CARD ===== */
.ip-job-card {
    background: var(--cream);
    border: 1px solid var(--line-soft);
    border-radius: 1rem;
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 2px 12px rgba(20, 54, 103, 0.05);
    transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
    text-decoration: none !important;
}
.ip-job-card:hover {
    box-shadow: 0 6px 28px rgba(20, 54, 103, 0.12);
    border-color: rgba(20, 54, 103, 0.2);
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .ip-job-card {
        flex-direction: row;
        align-items: center;
    }
}

.ip-job-card__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2em 0.75em;
    border-radius: 50px;
    background: var(--akzent-soft);
    color: var(--akzent);
    border: 1px solid rgba(192, 40, 38, 0.2);
}


/* ===== ACCORDION / FAQ ===== */
.ip-accordion-item {
    border-bottom: 1px solid var(--line);
}

.ip-accordion-trigger {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    transition: color 0.2s;
}
.ip-accordion-trigger:hover { color: var(--primary); }

.ip-accordion-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    transition: background 0.25s, transform 0.3s;
}
.ip-accordion-trigger[aria-expanded="true"] .ip-accordion-icon {
    background: var(--primary);
    color: #ffffff;
    transform: rotate(45deg);
}

.ip-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ip-accordion-content p {
    padding: 0 0 1.25rem;
    font-size: 0.9rem;
    color: var(--ink-muted);
    line-height: 1.75;
    margin: 0;
}


/* ===== LEGAL / IMPRESSUM / DATENSCHUTZ ===== */
.ip-legal-content { max-width: 760px; margin: 0 auto; }
.ip-legal-content h2 {
    font-size: 1.4rem;
    margin: 2.5rem 0 0.6rem;
    color: var(--primary);
}
.ip-legal-content h3 {
    font-size: 1.1rem;
    margin: 1.75rem 0 0.4rem;
    color: var(--ink);
}
.ip-legal-content p {
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--ink-muted);
    margin-bottom: 1rem;
}
.ip-legal-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.ip-legal-content ul {
    padding-left: 1.5rem;
    color: var(--ink-muted);
    font-size: 0.92rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}


/* ===== BACK TO TOP ===== */
#backToTop {
    background: rgba(20, 54, 103, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(20, 54, 103, 0.18);
    color: var(--primary);
}
#backToTop:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}



/* ===== BREADCRUMBS ===== */
.ip-breadcrumbs,
.ip-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}
.ip-breadcrumbs a,
.ip-breadcrumb a { color: rgba(255, 255, 255, 0.6); text-decoration: none; transition: color 0.2s; }
.ip-breadcrumbs a:hover,
.ip-breadcrumb a:hover { color: rgba(255, 255, 255, 0.9); }
.ip-breadcrumbs .sep,
.ip-breadcrumb span { opacity: 0.5; }


/* ===== PARAGRAPHEN-BADGE (SGB) ===== */
.ip-para-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.2em 0.7em;
    border-radius: 4px;
    background: rgba(20, 54, 103, 0.08);
    color: var(--primary);
    border: 1px solid rgba(20, 54, 103, 0.15);
    text-transform: none;
}


/* ===== INOBHUTNAHME / NOTFALL BANNER ===== */
.ip-emergency-bar {
    background: var(--akzent);
    color: #ffffff;
    text-align: center;
    padding: 0.6rem 1.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.ip-emergency-bar a { color: #ffffff; font-weight: 700; text-decoration: underline; }


/* ===== FOCUS STATES — Accessibility ===== */
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--akzent);
    outline-offset: 3px;
    border-radius: 3px;
}


/* ===== UTILITY ===== */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* Warm-Background Abschnitt */
.ip-section-warm {
    background: var(--cream-warm);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

/* Primär-Hintergrund Abschnitt (dunkelblau) */
.ip-section-primary {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.88);
}
.ip-section-primary h1,
.ip-section-primary h2,
.ip-section-primary h3 {
    color: #ffffff;
}

/* Gradient divider */
.ip-gradient-top {
    background: linear-gradient(to bottom, var(--cream-2) 0%, var(--cream) 100%);
}


/* ===== THERAPY CARDS (page: therapien) ===== */
.ip-therapy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}
.ip-therapy-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--line);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(20,54,103,0.06);
    transition: box-shadow 0.25s, transform 0.25s;
}
.ip-therapy-card:hover {
    box-shadow: 0 8px 30px rgba(20,54,103,0.13);
    transform: translateY(-4px);
}
.ip-therapy-card__img-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.ip-therapy-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.ip-therapy-card:hover .ip-therapy-card__img-wrap img {
    transform: scale(1.04);
}
.ip-therapy-card__badge {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25em 0.7em;
    border-radius: 4px;
    letter-spacing: 0.04em;
}
.ip-therapy-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.ip-therapy-card__body h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin: 0.4rem 0 0.75rem;
}
.ip-therapy-card__body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* Approach items (therapien approach section) */
.ip-approach-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    border-left: 3px solid var(--akzent);
}
.ip-approach-item__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--akzent);
    font-size: 1rem;
}
.ip-approach-item strong {
    color: #fff;
    font-size: 0.95rem;
    display: block;
}

/* Stat pill (therapien page) */
.ip-stat-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.85);
}

/* ===== DETAIL HERO (Einrichtungen, Therapie-Detail) — Hintergrundbild ===== */
.ip-detail-hero {
    position: relative;
    padding: 150px 0 72px;
    overflow: hidden;
    background: var(--primary);
}

/* Hintergrundbild */
.ip-detail-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 35%;
    opacity: 0.35;
}

/* Warm-dunkler Overlay */
.ip-detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(10, 25, 55, 0.82) 0%,
        rgba(14, 38, 73, 0.70) 50%,
        rgba(8, 20, 45, 0.78) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Dezenter Akzent-Glow */
.ip-detail-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -40px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192, 40, 38, 0.12) 0%, transparent 60%);
    z-index: 1;
    pointer-events: none;
}

.ip-detail-hero__text {
    position: relative;
    z-index: 2;
}
.ip-detail-hero__text h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #ffffff;
    max-width: 680px;
    line-height: 1.14;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.ip-detail-hero__text p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
    max-width: 560px;
    margin-top: 0.75rem;
    line-height: 1.7;
}

/* Badges auf dunklem Hintergrund */
.ip-hero-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.25em 0.75em;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.ip-hero-badge--special {
    background: rgba(192, 40, 38, 0.6);
    color: #ffffff;
    border-color: rgba(192, 40, 38, 0.4);
}

/* Legacy support — alte Klasse mappt auf neue */
.ip-therapy-detail-hero { /* wird in den Seiten ersetzt */ }
.ip-therapy-detail-hero__bg { display: none; }
.ip-therapy-detail-hero__overlay { display: none; }
.ip-therapy-detail-hero__content { position: relative; z-index: 2; }
.ip-therapy-detail-hero__content h1 { color: var(--primary); }
.ip-therapy-detail-hero__content p { color: var(--ink); opacity: 0.7; }

/* Therapy content layout */
.ip-therapy-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 3rem;
    align-items: start;
}
@media (max-width: 900px) {
    .ip-therapy-content { grid-template-columns: 1fr; }
}
.ip-therapy-sidebar {
    background: var(--cream);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--line);
    position: sticky;
    top: 6rem;
}
.ip-therapy-sidebar h4 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--akzent);
}


/* ===== FEATURE CARDS (therapy sub-pages) ===== */
.ip-feature-card {
    background: var(--cream);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--line);
    transition: box-shadow 0.2s, transform 0.2s;
}
.ip-feature-card:hover {
    box-shadow: 0 4px 20px rgba(20,54,103,0.1);
    transform: translateY(-2px);
}
.ip-feature-card__icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 0.9rem;
}
.ip-feature-card h4 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.4rem;
}
.ip-feature-card p {
    font-size: 0.87rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}


/* ===== BENEFIT CARDS (jobs page) ===== */
.ip-benefit-card {
    background: var(--cream);
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--line);
    transition: box-shadow 0.2s, transform 0.2s;
}
.ip-benefit-card:hover {
    box-shadow: 0 6px 24px rgba(20,54,103,0.1);
    transform: translateY(-3px);
}
.ip-benefit-card__icon {
    width: 48px; height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.ip-benefit-card h4 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.ip-benefit-card p {
    font-size: 0.87rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

/* ===== JOB CARDS ===== */
.ip-job-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 1.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    transition: box-shadow 0.2s;
}
.ip-job-card:hover {
    box-shadow: 0 4px 20px rgba(20,54,103,0.1);
}
.ip-job-card__left { flex: 1; }
.ip-job-card__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.2em 0.75em;
    border-radius: 4px;
    background: rgba(192,40,38,0.1);
    color: var(--akzent);
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}
.ip-job-card h3 {
    font-size: 1.15rem;
    color: var(--primary);
    margin: 0 0 0.5rem;
}
.ip-job-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}
.ip-job-card__right { flex-shrink: 0; }
@media (max-width: 640px) {
    .ip-job-card { flex-direction: column; align-items: flex-start; }
}

/* Tags */
.ip-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2em 0.7em;
    border-radius: 4px;
    background: rgba(20,54,103,0.07);
    color: var(--primary);
    letter-spacing: 0.02em;
}

/* ===== PROCESS STEPS (jobs page) ===== */
.ip-process-step {
    background: rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    border: 1px solid rgba(255,255,255,0.12);
    text-align: center;
}
.ip-process-step__num {
    width: 52px; height: 52px;
    background: var(--akzent);
    color: #fff;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.ip-process-step h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.ip-process-step p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.72);
    line-height: 1.6;
    margin: 0;
}

/* ===== CONTACT PAGE ===== */
.ip-contact-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 3rem;
    align-items: start;
}
@media (max-width: 900px) {
    .ip-contact-grid { grid-template-columns: 1fr; }
}
.ip-contact-form-wrap {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--line);
    box-shadow: 0 2px 16px rgba(20,54,103,0.06);
}
.ip-form-group {
    margin-bottom: 1.25rem;
}
.ip-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.4rem;
}
.ip-form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.ip-form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(20,54,103,0.1);
}
textarea.ip-form-control {
    resize: vertical;
    min-height: 130px;
}
.ip-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 560px) {
    .ip-form-row { grid-template-columns: 1fr; }
}
.ip-contact-info-card {
    background: var(--primary);
    border-radius: 16px;
    padding: 2.5rem;
    color: rgba(255,255,255,0.85);
}
.ip-contact-info-card h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}
.ip-contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.ip-contact-info-item__icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--akzent);
    flex-shrink: 0;
    font-size: 0.95rem;
}
.ip-contact-info-item a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}
.ip-contact-info-item a:hover { color: #fff; }


/* ===== LOCATION PILL (kontakt page) ===== */
.ip-location-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
    transition: background 0.2s, box-shadow 0.2s;
}
.ip-location-pill:hover {
    background: #fff;
    box-shadow: 0 3px 12px rgba(20,54,103,0.1);
}
.ip-location-pill i {
    color: var(--akzent);
    font-size: 0.95rem;
}


/* ===== LEGAL CONTENT ===== */
.ip-legal-content {
    max-width: 800px;
    margin: 0 auto;
}
.ip-legal-content h2 {
    font-size: 1.4rem;
    color: var(--primary);
    margin: 2.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--line);
}
.ip-legal-content h2:first-child { margin-top: 0; }
.ip-legal-content h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin: 1.5rem 0 0.5rem;
}
.ip-legal-content p { margin-bottom: 1rem; color: var(--text-muted); line-height: 1.75; }
.ip-legal-content ul { margin: 0.5rem 0 1rem 1.5rem; color: var(--text-muted); }
.ip-legal-content ul li { margin-bottom: 0.3rem; line-height: 1.7; }
.ip-legal-content address { font-style: normal; line-height: 1.9; margin-bottom: 1rem; color: var(--text-muted); }
.ip-legal-content a { color: var(--primary); }
.ip-legal-content a:hover { text-decoration: underline; }
.ip-divider { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }

/* Page hero small variant */
.ip-page-hero--sm { min-height: 200px; }


/* ===== EINRICHTUNG CARDS (stationaere-erziehungshilfen) ===== */
.ip-einrichtung-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 1.75rem;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.25s, transform 0.25s;
}
.ip-einrichtung-card:hover {
    box-shadow: 0 6px 28px rgba(20,54,103,0.13);
    transform: translateY(-4px);
    color: var(--text);
}
.ip-einrichtung-card__badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.2em 0.75em;
    border-radius: 4px;
    background: rgba(20,54,103,0.08);
    color: var(--primary);
    border: 1px solid rgba(20,54,103,0.15);
    display: inline-block;
    margin-bottom: 0.75rem;
    width: fit-content;
}
.ip-einrichtung-card__badge--girls {
    background: rgba(192,40,38,0.08);
    color: var(--akzent);
    border-color: rgba(192,40,38,0.2);
}
.ip-einrichtung-card h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin: 0 0 0.5rem;
}
.ip-einrichtung-card p {
    font-size: 0.87rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
    margin: 0 0 1rem;
}
.ip-einrichtung-card__location {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.ip-einrichtung-card__location i { color: var(--akzent); margin-right: 0.3rem; }
.ip-einrichtung-card__link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
}
.ip-einrichtung-card:hover .ip-einrichtung-card__link { color: var(--akzent); }
