﻿/* Base / Resets */
* {
    box-sizing: border-box;
}

img, video {
    max-width: 100%;
    height: auto;
}

body {
    background-color: #f3f1ef;
    margin: 0;
    padding-bottom: 50px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400; /* regular */
    letter-spacing: 0.1px;
    font-size: 1.1rem;
    overflow-wrap: anywhere;
}

body, h1, h2, h3, h4, h5, h6 {
    color: #222;
}

/* Typography */
h1, h2, h3, h4, h5, h6, #mainNavbar {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700 !important; /* bold */
    letter-spacing: 1.5px;
    text-transform: uppercase !important;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
    line-height: 1.2;
}

.h2, h2 {
    text-transform: uppercase;
    font-size: clamp(0.5rem, 4vw, 1.1rem) !important;
    line-height: 1.2;
}

.cta {
    letter-spacing: 1.5px;
    font-family: 'Roboto Condensed', sans-serif;
}

.uc {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 1.75rem;
}

.logo-text .title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700 !important;
}

.logo-text .subtitle {
    font-family: 'Roboto', sans-serif;
    font-weight: 400 !important;
}

/* Navbar / Header */
.navbar {
    background-color: #f3f1ef;
    border-bottom: 2px solid #ccc;
    padding: 0.5rem 1rem;
}

    .navbar .container-fluid {
        display: flex;
        align-items: flex-end; /* final */
        justify-content: space-between;
        padding-bottom: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }

.navbar-toggler {
    margin-left: auto;
    padding: 0.25rem 0.75rem;
    font-size: 1.5rem;
    border: none;
    background: transparent;
    box-shadow: none;
    align-self: flex-end; /* final */
}

.navbar-nav {
    flex-wrap: wrap;
    margin-bottom: 3px;
}

    .navbar-nav .nav-link {
        font-weight: 700;
        text-transform: uppercase;
        font-size: 1rem;
        color: #222 !important;
        white-space: pre-wrap;
        padding-bottom: 0.25rem;
    }

.dropdown-menu {
    font-size: 1rem;
}

.logo {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

    .logo img {
        height: 60px;
    }

.logo-text {
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    margin-bottom: 6px !important; /* final */
}

    .logo-text .title,
    .logo-text .subtitle {
        white-space: nowrap;
        letter-spacing: 0;
    }

    .logo-text .title {
        font-weight: 700;
        font-size: 1.15rem;
        color: #222;
    }

    .logo-text .subtitle {
        font-size: 1rem;
        color: #222;
        letter-spacing: 1.5px;
    }

.header-image {
    width: 100%;
    height: clamp(20px, 5vw, 38px);
    min-height: 20px;
    object-fit: cover;
    object-position: left;
    display: block;
}

.masthead {
    z-index: 1030;
}

/* Hero */
.hero-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 260px);
    padding-top: 10px;
}

.hero-container {
    padding: 0;
}

.hero-logo {
    display: block;
    max-width: 180px;
    margin: 0 auto 30px;
}

.hero-headline {
    font-weight: 700 !important;
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
    color: #f6a823;
    text-transform: uppercase;
    line-height: 1.2 !important;
    font-family: 'Roboto Condensed', sans-serif;
    letter-spacing: 2px;
    margin-bottom: 3rem;
    text-align: center;
    padding: 0 15px;
}

.sp-headline {
    font-weight: 700 !important;
    font-size: clamp(2rem, 4vw, 2.5rem) !important;
    color: #f6a823;
    text-transform: uppercase;
    font-family: 'Roboto Condensed', sans-serif;
    letter-spacing: 2px;
}

/* Kachel / Grid / Background */
.kachel-bg {
    position: relative;
    background-image: url('../images/bg1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 4rem 0;
    overflow: hidden;
}

    .kachel-bg::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient( to bottom, rgba(243, 241, 239, 0.5) 0%, rgba(243, 241, 239, 0.3) 10%, rgba(243, 241, 239, 0.1) 20%, rgba(243, 241, 239, 0) 40% );
        z-index: 1;
    }

    .kachel-bg .hero-grid {
        position: relative;
        z-index: 2;
    }

.hero-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 860px;
    margin: 0 auto;
    text-align: left;
}

.hero-tile {
    max-width: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

    .hero-tile:hover, .kachel:hover {
        transform: scale(1.03);
    }

.hero-subtitle {
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #222;
    background: rgba(255, 255, 255, 0.75);
    padding: 0;
    display: inline-block;
}

/* Kacheln / Content-Boxen */
.kachelhl {
    margin: 0 0 0.5rem 0;
    line-height: 1.6;
    display: block;
    text-align: left;
    letter-spacing: 1.5px;
}

.kachelhl-bg {
    display: inline;
    background: rgba(255, 255, 255, 0.75);
    padding: 0.25rem;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    hyphens: auto;
    hyphenate-limit-chars: auto 3;
    hyphenate-limit-lines: 4;
}

.kachelpagehl {
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    background: rgba(255, 255, 255, 0.75);
    padding: 0;
    margin: 0;
    line-height: 1.1;
    position: relative;
    margin-top:20px;
}

.kachelcont {
    background-color: #e6dfd0;
    background-size: cover;
    background-position: center;
    padding: 3rem 2rem 3rem 0;
}

.kachel {
    display: flex;
}

    .kachel > a, .hero-tile > a {
        text-decoration: none !important;
    }

    .kachel a {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        flex: 1;
    }

    .kachel img {
        max-width: min(100%, 360px);
        display: block;
        margin-top: auto;
    }

/* Content Boxen & Layout-Feintuning */
.content-box {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 320px; /* final */
    background-size: cover;
    background-position: center bottom;
}

    .content-box > .row {
        margin-top: auto;
    }

.row.align-items-end {
    align-items: stretch;
}
/* gleiche Spaltenhöhe */

.bcont {
    background-color: #f3f1ef;
    padding: 1rem 0;
}

/* E3 */
.e3img {
    background-size: cover;
    background-position: center;
    padding: 0 0 3em 0    
}

.e3hlcont {
    background: rgba(255, 255, 255, 0.85);
    display: inline-block;
    padding: 0.3rem 0.6rem;    
}

.e3h {
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}

/* Kleinere Headlines */
h3.h3small {
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
}

/* Mosaic Overlay */
.mosaic-wrap {
    position: relative;
}

.mosaic-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    padding: 1rem 1.25rem;
    pointer-events: none;
}

    .mosaic-overlay .hero-logo {
        max-width: 220px;
        height: auto;
        margin: 0 auto 0.75rem;
        display: block;
    }

    .mosaic-overlay .hero-headline {
        display: inline-block;
        background: rgba(255,255,255,0.75);
        padding: .25rem .5rem;
        border-radius: 4px;
    }

/* Link-Kacheln */
.link-kachel-lg .link-label {
    font-size: 1.15rem;
}

/* Diverse Headlines */
.hero-small {
    color: #f5a623;
    font-weight: bold;
    font-size: clamp(2rem, 4vw, 2.5rem) !important; /* final */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.2 !important;
    font-family: 'Roboto Condensed', sans-serif;
}

.h1main {
    display: inline-block !important;
    background: rgba(255, 255, 255, 0.75) !important;
    padding: 0.25rem 0.5rem !important;
}

.zitatgr {
    padding: 1rem 0;
}

.h1mainoutercontainer {
    background-color: #e6dfd0;
    padding-top: 1em;
    padding-bottom: 1em;
}

.e2h1container {
    padding: 1rem 0 1rem 0;
}

/* Kontakt */
.contact-block {
    max-width: 480px;
}

    .contact-block div {
        display: flex;
        gap: 0.3rem 0.6rem;
        margin-bottom: 0rem;
        line-height: 1.4;
    }

    .contact-block .label {
        width: 60px;
        font-weight: normal;
        flex-basis: 60px;
        flex-shrink: 0;
    }

.kimgmh {
    max-height: 324px;
}

.contacthl {
    height: 68px;
}   

/* Links */
.beratung-link, button[type=submit] {
    color: #ff6666;
    text-decoration: underline;
    transition: background-color 0.3s ease;
}

.beratung-link:hover, button[type=submit]:hover, .btn:hover {
    background-color: #ff6666 !important; 
    color: white !important;
}

button[type=submit], .btn:hover {
    background-color: transparent;
    border-color: #ff6666;
    text-decoration:none;
}

footer.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #e6dfd0;
    border-top: 1px solid #ccc;
    padding: 10px 10px;
    font-size: 13px;
    color: #555;
    z-index: 1000;
}

.footer-content {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.2rem;
    overflow-x: auto;
    white-space: nowrap;
}


@media (min-width: 767px) {

    footer.site-footer {
        padding: 10px 20px;
    }

    .footer-content {
        gap: 0.5rem;
    }
}


    footer a {
        color: #555;
        text-decoration: none;
    }

    /* Back to top */
    .back-to-top {
        position: fixed;
        right: calc(1rem + env(safe-area-inset-right));
        bottom: calc(2.75rem + env(safe-area-inset-bottom));
        z-index: 1040;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 18px rgba(0,0,0,.15);
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
        background-color: black !important;
        color: white !important;
        border-color: black !important;
        pointer-events: none;
    }

        .back-to-top.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
            pointer-events: auto;
        }

    /* Hamburger-Menü (aufgeklappt / animiert) */
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        background: #ffffff;
        box-shadow: 0 20px 40px rgba(0,0,0,0.08);
        border-radius: 0px; /* final */
        padding: 1.75rem 1.25rem;
        margin-top: 0.75rem;
        animation: slideFadeIn 0.25s ease-in-out;
    }

        .navbar-collapse.show .navbar-nav,
        .navbar-collapse.collapsing .navbar-nav {
            flex-direction: column;
            gap: 1rem;
        }

        .navbar-collapse.show .nav-link,
        .navbar-collapse.collapsing .nav-link {
            background-color: #f7f7f7;
            border: 1px solid transparent;
            padding: 0.85rem 1.25rem;
            font-size: 1.05rem;
            font-weight: 600;
            letter-spacing: 0.5px;
            color: #222 !important;
            border-radius: 0px; /* final */
            transition: all 0.2s ease;
        }

            .navbar-collapse.show .nav-link:hover,
            .navbar-collapse.collapsing .nav-link:hover {
                background-color: #ececec;
                border-color: #ddd;
            }

        .navbar-collapse.show .dropdown-menu,
        .navbar-collapse.collapsing .dropdown-menu {
            border: none;
            border-radius: 0px; /* final */
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
            padding: 0.5rem;
            margin-top: 0.5rem;
            background-color: #fff;
        }

        .navbar-collapse.show .dropdown-item,
        .navbar-collapse.collapsing .dropdown-item {
            padding: 0.75rem 1rem;
            border-radius: 0px; /* final */
            font-weight: 500;
            color: #333;
            transition: background-color 0.2s ease;
        }

            .navbar-collapse.show .dropdown-item:hover,
            .navbar-collapse.collapsing .dropdown-item:hover {
                background-color: #f0f0f0;
            }

    @keyframes slideFadeIn {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Utilities / A11y */
    .visually-hidden-focusable:not(:focus):not(:active) {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0,0,0,0);
        white-space: nowrap;
        border: 0;
    }

    .skip-link:focus {
        position: static;
        display: inline-block;
        padding: .5rem 1rem;
        background: #fff;
    }

    :focus-visible {
        outline: 3px solid #000;
        outline-offset: 3px;
    }

    .hp {
        position: absolute;
        left: -10000px;
        width: 1px;
        height: 1px;
        overflow: hidden;
    }

    select.form-control {
        appearance: auto;
    }

    /* Header image layering note */
    .header-image { /* intentionally left for z-index stacking over content if needed */
    }

    /* Component-specific tweaks */
    .navbar-expand-lg .navbar-collapse.show .dropdown-menu,
    .navbar-expand-lg .navbar-collapse.collapsing .dropdown-menu {
        box-shadow: none !important; /* Shadow aus */
    }

    /* Containers (breiter) */
    @media (min-width: 1400px) {
        .container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl {
            max-width: 1300px;
        }
    }

    @media (min-width: 1600px) {
        .container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl {
            max-width: 1500px;
        }
    }

    @media (min-width: 1800px) {
        .container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl {
            max-width: 1700px;
        }
    }

    /* Responsive helpers */
    .responsive-py-5 {
        padding-top: 1rem;
    }

    @media (max-height: 840px) {
        .responsive-py-5 {
            padding-top: 3rem !important;
            padding-bottom: 3rem !important;
        }

        .hero-logo {
            max-height: 60px;
        }
    }

    @media (min-width: 1200px) {
        .h2, h2 {
            font-size: 1.7rem;
        }
    }

    @media (min-width: 992px) {
        .mosaic-overlay .hero-logo {
            max-width: 260px;
            margin-bottom: 1rem;
        }
    }

    /* Down from tablets/phones */
    @media (max-width: 768px) {
        .logo img {
            height: 60px;
        }

        .hero-logo {
            max-width: 120px;
            margin-bottom: 20px;
        }

        .hero-headline {
            font-size: 1.8rem;
            margin-bottom: 2rem;
        }

        .hero-grid {
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .hero-tile {
            max-width: 100%;
        }

        .navbar-nav .nav-link {
            font-size: 0.85rem;
        }
    }

    @media (max-width: 600px) {
        .logo img {
            height: 50px;
        }
    }

    @media (max-width: 576px) {
        .h2, h2 {
            font-size: clamp(0.5rem, 3.5vw, 1.1rem) !important;
        }

        .logo {
            flex-shrink: 1;
            min-width: 0;
        }

        .logo-text .subtitle {
            font-size: 0.75rem;
            transform: translateY(2px);
        }

        .kachelhl {
            letter-spacing: 0.5px;
        }
    }

    @media (max-width: 416px) {
        .logo img {
            height: 42px;
        }
    }

    @media (max-width: 390px) {
        .logo img {
            height: 30px;
        }

        .logo-text .subtitle {
            font-size: 0.6rem;
        }
    }

    /* Motion prefs */
    @media (prefers-reduced-motion: reduce) {
        .back-to-top {
            transition: none;
        }
    }

    /* Misc (keine funktionale Änderung, nur Ordnung) */
    .headline-with-bgicon {
        display: flex;
        align-items: center;
        background-color: #fff;
        background-repeat: no-repeat;
        background-position: right center;
        background-size: auto 1em;
        padding: .6rem 3.5rem .6rem .8rem;
    }

    /* Hinweis: Dieser Selektor war im Original ohne führenden Punkt.
   Unverändert gelassen, um Verhalten NICHT zu verändern. */
    row.g-4.align-items-end {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch; /* Alle Kacheln gleich hoch */
    }


    .navbar-toggler {
        margin-bottom: 6px;
    }

    .vereinbaren {
        margin-bottom: 0.5rem;
        letter-spacing: 2px;
    }

    p, .st, .vereinbaren {
        hyphens: auto;
        overflow-wrap: break-word;
        hyphenate-limit-chars: auto 4;
    }




    /* Rand weg */
    #backToTop {
        border: none !important;
    }

        /* Fokus-/Aktiv-Kontur (box-shadow) weg */
        #backToTop:focus,
        #backToTop:focus-visible,
        #backToTop:active {
            outline: none !important;
            box-shadow: none !important;
        }



    #backToTop {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }


        #backToTop:focus-visible {
            box-shadow: 0 0 0 3px rgba(255,255,255,.6); /* zarter Ring */
            outline: 0;
        }



    .mb-x {
        padding-bottom: 24px;
    }

    .glossar-entry.container p {
        max-width: 800px;
    }