/* ==========================================================
   Adler Rund ums Haus – zentrales Stylesheet
   ========================================================== */

:root {
    --adler-primary: #1e88e5;      /* Blau – frisch & vertrauenswürdig */
    --adler-primary-dark: #1565c0;
    --adler-accent: #4fc3f7;       /* Helles Blau – Akzente */
    --adler-link: #42a5f5;         /* Helleres Blau – Textlinks */
    --adler-dark: #16222e;         /* Dunkelblau-Anthrazit */
    --adler-light: #f2f6fb;
    --adler-muted: #5c6b78;
    /* Höhe des Seitenheaders: Brand-Icon (2.4rem) + Brand-Padding (2×0.3125rem) + Navbar-Padding (2×0.5rem) */
    --header-height: calc(2.4rem + 0.625rem + 1rem);
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #23303c;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--adler-link); }
a:hover { color: var(--adler-primary); }

.btn-primary {
    --bs-btn-bg: var(--adler-primary);
    --bs-btn-border-color: var(--adler-primary);
    --bs-btn-hover-bg: var(--adler-primary-dark);
    --bs-btn-hover-border-color: var(--adler-primary-dark);
    --bs-btn-active-bg: var(--adler-primary-dark);
    --bs-btn-active-border-color: var(--adler-primary-dark);
}

/* ---------- KI-Kennzeichnung (Art. 50 KI-VO) ---------- */
.ai-img { position: relative; }
.ai-badge {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    z-index: 2;
    background: rgba(15, 24, 33, 0.65);
    color: rgba(255, 255, 255, 0.92);
    padding: 0.15rem 0.55rem;
    border-radius: 0.4rem;
    font-size: 0.68rem;
    line-height: 1.3;
    pointer-events: none;
    backdrop-filter: blur(2px);
}
.hero > .ai-badge { right: 1rem; bottom: 1rem; }

/* ---------- Navigation ---------- */
#mainNav {
    background: var(--adler-dark);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    min-height: var(--header-height);
}
#mainNav .navbar-brand .brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.6rem;
    background: var(--adler-primary);
    color: #fff;
    font-size: 1.2rem;
}
#mainNav .nav-link {
    font-weight: 500;
    padding-inline: 0.9rem;
}
#mainNav .nav-link.active,
#mainNav .nav-link:hover {
    color: #90caf9;
}

/* ---------- Hero ---------- */
.hero {
    min-height: 78vh;
    position: relative;
    background: url("../../images/hero.webp") center/cover no-repeat;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(18, 28, 40, 0.95) 0%, rgba(18, 28, 40, 0.85) 35%, rgba(18, 28, 40, 0.45) 70%, rgba(18, 28, 40, 0.05) 100%);
}
.hero-badge {
    background: rgba(79, 195, 247, 0.18);
    border: 1px solid var(--adler-accent);
    color: #bbdefb;
    padding: 0.35rem 0.9rem;
    border-radius: 2rem;
    font-size: 0.9rem;
}
.text-white-75 { color: rgba(255, 255, 255, 0.8); }

/* ---------- Sektionen ---------- */
.section-padding { padding: 5.5rem 0; }
.bg-light-section { background: var(--adler-light); }
.bg-dark-section { background: var(--adler-dark); }

.section-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--adler-accent);
    margin-bottom: 0.5rem;
}
.section-title {
    font-weight: 700;
    margin-bottom: 1rem;
}
.section-subtitle {
    max-width: 620px;
    color: var(--adler-muted);
}
.bg-dark-section .section-subtitle { color: rgba(255, 255, 255, 0.7); }

.usp-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
}
.usp-item i {
    color: var(--adler-accent);
    font-size: 1.25rem;
}

/* ---------- Karten (Leistungen) ---------- */
.service-card {
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.75rem rgba(21, 101, 192, 0.18) !important;
}
.service-card .card-img-top {
    height: 160px;
    object-fit: cover;
}
.service-icon {
    /* ragt ins Kartenbild – muss über dem positionierten .ai-img-Wrapper liegen */
    position: relative;
    z-index: 3;
    width: 3rem;
    height: 3rem;
    margin-top: -2.6rem;
    margin-bottom: 0.75rem;
    border-radius: 0.8rem;
    background: var(--adler-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.reference-kunde {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--adler-primary);
}
.more-link {
    display: block;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--adler-muted);
}
.service-card[role="button"],
.testimonial[role="button"] {
    cursor: pointer;
}
.service-card:hover .more-link,
.testimonial:hover .more-link {
    color: var(--adler-primary);
}

/* ---------- Referenzen als Sprechblasen ---------- */
.testimonial-bubble {
    position: relative;
    background: var(--adler-light);
    border: 1px solid #dfe9f2;
    border-radius: 1.25rem;
    padding: 1.75rem 1.5rem 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* Sprechblasen-Zipfel, zeigt auf den Kunden darunter */
.testimonial-bubble::after {
    content: "";
    position: absolute;
    bottom: -14px;
    left: 2.2rem;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 18px 0 0;
    border-color: var(--adler-light) transparent transparent transparent;
    filter: drop-shadow(0 2px 0 #dfe9f2);
}
.testimonial:hover .testimonial-bubble {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.75rem rgba(21, 101, 192, 0.15);
}
.testimonial-quote-icon {
    position: absolute;
    top: 0.4rem;
    right: 1.1rem;
    font-size: 3rem;
    line-height: 1;
    color: rgba(30, 136, 229, 0.22);
}
.testimonial-text {
    font-style: italic;
    font-weight: 500;
}
.testimonial-short { color: var(--adler-muted); }
.testimonial-author {
    margin-top: 1.6rem;
    padding-left: 0.75rem;
}
.testimonial-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}
/* Fallback, wenn kein Foto hinterlegt ist */
.testimonial-avatar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--adler-primary);
    color: #fff;
    font-size: 1.7rem;
}

/* ---------- Offcanvas ---------- */
/* Breite über die Bootstrap-Variable setzen – Bootstraps Selektor
   .offcanvas.offcanvas-end ist spezifischer als eine einzelne Klasse */
.offcanvas-detail {
    --bs-offcanvas-width: 50vw;
}
@media (max-width: 991.98px) {
    .offcanvas-detail {
        --bs-offcanvas-width: min(520px, 100vw);
    }
}
.offcanvas-backdrop.show {
    opacity: 0.7;
}
.offcanvas-detail .offcanvas-header {
    background: var(--adler-dark);
    color: #fff;
    min-height: var(--header-height);
    padding: 0 1.5rem;
}
.offcanvas-detail .offcanvas-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}
.offcanvas-detail .offcanvas-body {
    padding: 1.5rem;
}
.offcanvas-detail .offcanvas-body > img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
}
.feature-list li {
    padding: 0.3rem 0;
}
.feature-list i { color: var(--adler-accent); }
.reference-quote {
    background: var(--adler-light);
    border-left: 4px solid var(--adler-primary);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    font-style: italic;
}
.reference-quote > i {
    color: var(--adler-primary);
    font-size: 1.5rem;
}
.offcanvas-cta {
    flex-shrink: 0;
    border-top: 1px solid #e3e9ee;
    padding: 1.25rem 1.5rem;
    background: #fff;
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.18);
}

/* ---------- Kontakt ---------- */
.contact-info-box {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    padding: 2rem;
    color: #fff;
}
.contact-owner {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
/* Freisteller des Inhabers: Kreis mit Farbverlauf, Kopf ragt oben heraus */
.contact-owner-figure {
    position: relative;
    width: 104px;
    height: 126px;
    flex-shrink: 0;
}
.contact-owner-figure::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--adler-primary), var(--adler-accent));
    border: 3px solid rgba(255, 255, 255, 0.25);
}
.contact-owner-clip {
    position: absolute;
    inset: 0;
    overflow: hidden;
    /* untere Rundung folgt der Kreiskontur, oben bleibt Platz für den Kopf */
    border-radius: 0 0 52px 52px;
}
.contact-owner-clip img {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 122px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}
.contact-info-box a { color: var(--adler-link); text-decoration: none; }
.contact-info-box a:hover { text-decoration: underline; }
.contact-list li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.contact-list li:last-child { margin-bottom: 0; }
.contact-list i {
    flex-shrink: 0;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.7rem;
    background: var(--adler-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.contact-form-box {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
}
/* Honeypot-Feld: für Menschen unsichtbar, für Bots ein normales Eingabefeld */
.hp-field {
    position: absolute !important;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Footer ---------- */
.site-footer {
    background: #0f1821;
    color: #fff;
}
.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.text-footer-muted { color: rgba(255, 255, 255, 0.65); }
.site-footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}
.site-footer a:hover { color: #fff; }
.footer-divider { border-color: rgba(255, 255, 255, 0.15); }

/* ---------- Unterseiten (Impressum / Datenschutz) ---------- */
.legal-page {
    padding: 4rem 0;
}
.legal-page h1 { margin-bottom: 2rem; }
.legal-page h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    .section-padding { padding: 3.5rem 0; }
    .hero { min-height: 65vh; }
}

html { scroll-behavior: smooth; }
