/* ==========================================================================
   1. GRUNDEINSTELLUNGEN & VARIABLEN
   ========================================================================== */
:root {
    --primary-color: #C00021;       /* Ihr Rot */
    --primary-hover: #A0001C; 
    --brand-navy: #002962;          /* Ihr Dunkelblau */
    --text-color: #00043A; 
    --brand-icon-bg: #FFE5E5; 
    --secondary-color: #6c757d; 
    --brand-green: #25D366;         /* WhatsApp */
    --brand-green-hover: #1ebd57;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important; /* Verhindert horizontales Scrollen global */
    font-display: swap;
}

body {
    background-color: #f8f9fa;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
}

/* Verhindert, dass Bootstrap Rows das Layout verbreitern */
.row {
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ==========================================================================
   2. BOOTSTRAP OVERRIDES & TYPOGRAFIE
   ========================================================================== */
h1, h2, h3, h4, h5, h6 { color: var(--text-color); }

.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.bg-brand-navy { background-color: var(--brand-navy) !important; color: #ffffff; }

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 50px;
    padding: 0.6rem 1.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(192, 0, 33, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Forms */
.form-control::placeholder { color: #999; opacity: 1; }
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(192, 0, 33, 0.25);
    background-color: #fff;
}

/* Utilities */
.border-dashed { border-style: dashed !important; }
.letter-spacing-1 { letter-spacing: 1px; }
.letter-spacing-2 { letter-spacing: 2px; }
.object-fit-cover { object-fit: cover; }
.hover-white:hover { color: #ffffff !important; text-decoration: underline !important; transition: color 0.2s ease; }
.transition-hover { transition: opacity 0.2s ease; }
.transition-hover:hover { opacity: 0.8; }


/* ==========================================================================
   3. NAVBAR (MODERN & GLASSMORPHISM)
   ========================================================================== */
.modern-navbar {
    transition: all 0.4s ease;
    padding: 1rem 0;
    background: transparent;
}
.modern-navbar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: -1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
}
.modern-navbar.scrolled { padding: 0.6rem 0; }
.modern-navbar.scrolled::before {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Logo */
.nav-logo { height: 60px; width: auto; transition: height 0.3s ease; }
.modern-navbar.scrolled .nav-logo { height: 50px; }
@media (max-width: 400px) { .nav-logo { height: 45px; } }

/* Links */
.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--brand-navy) !important;
    font-size: 1.05rem;
    padding: 0.5rem 1rem !important;
    position: relative;
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* Unterstrich-Animation (Nur Desktop) */
@media (min-width: 992px) {
    .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        width: 0; height: 2px;
        bottom: 5px; left: 50%;
        background-color: var(--primary-color);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }
    .navbar-nav .nav-link:hover::after { width: 25px; }
    
    /* Offcanvas Reset Desktop */
    .offcanvas {
        position: static !important;
        z-index: auto !important;
        transform: none !important;
        visibility: visible !important;
        height: auto !important;
        background: transparent !important;
        display: flex !important;
        flex-grow: 1;
        align-items: center;
    }
    .offcanvas-header { display: none; }
    .offcanvas-body {
        display: flex;
        flex-grow: 1;
        justify-content: space-between;
        padding: 0;
        overflow: visible;
    }
    .nav-link { font-size: 1.1rem !important; }
}

/* Mobile Menü (Popup Style) */
@media (max-width: 991px) {
    .mobile-popup-menu {
        position: fixed !important;
        width: 100% !important;
        height: 100vh !important;
        top: 0; left: 0;
        background-color: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
        z-index: 2147483647 !important; 
        border: none !important;
        display: flex;
        flex-direction: column;
    }
    .mobile-popup-menu .offcanvas-body {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 40px 20px;
    }
    .mobile-popup-menu .nav-link {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
        color: var(--brand-navy) !important;
        margin-bottom: 10px;
    }
    .mobile-popup-menu .dropdown-menu {
        display: block;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        text-align: center !important;
        margin-top: 0;
        padding: 0;
    }
    .mobile-popup-menu .btn-primary {
        width: 100%;
        max-width: 300px;
        margin-top: 20px;
    }
    .offcanvas-backdrop { z-index: 10590 !important; background-color: rgba(0,0,0,0.5); }
    
    /* Promo Bild auf Mobile kleiner */
    .object-fit-cover { position: relative !important; height: 250px !important; }
}

/* Hamburger Icon */
.navbar-toggler { border: none; padding: 0; z-index: 10601; }
@media (max-width: 576px) { .navbar-toggler { margin-right: 10px !important; } }

.hamburger-icon { width: 30px; height: 20px; position: relative; cursor: pointer; display: inline-block; }
.hamburger-icon span {
    display: block; position: absolute; height: 3px; width: 100%;
    background: var(--brand-navy); border-radius: 3px;
    transition: .25s ease-in-out;
}
.hamburger-icon span:nth-child(1) { top: 0px; }
.hamburger-icon span:nth-child(2) { top: 9px; }
.hamburger-icon span:nth-child(3) { top: 18px; }


/* ==========================================================================
   4. HERO & HEADER
   ========================================================================== */
.hero-section {
    position: relative;
    background: var(--brand-navy);
    padding: 180px 0 100px 0;
    color: white;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    margin-bottom: 3rem;
    overflow: hidden;
}
.hero-bg-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center; z-index: 0;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0, 41, 98, 0.8), rgba(0, 41, 98, 0.6));
    z-index: 1; pointer-events: none;
}
.hero-title {
    font-size: 3.5rem; font-weight: 800; line-height: 1.2; 
    margin-bottom: 1.5rem; color: white;
}
.hero-subtitle {
    font-size: 1.25rem; font-weight: 400; opacity: 0.95; 
    max-width: 700px; margin: 0 auto 2.5rem auto; color: #e0e0e0;
}
@media (max-width: 768px) {
    .hero-section { padding-top: 130px; padding-bottom: 60px; clip-path: none; }
    .hero-title { font-size: 2.2rem; }
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-slide-up { animation: slideUpFade 0.3s ease forwards; }


/* ==========================================================================
   5. FEATURE CARDS & SERVICE TILES
   ========================================================================== */
.feature-card {
    background: #ffffff; border: none; border-radius: 16px; padding: 2.5rem 2rem;
    text-align: center; transition: all 0.4s ease; border-bottom: 4px solid transparent;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); height: 100%;
}
.feature-card:hover {
    transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-bottom-color: var(--primary-color);
}
.feature-icon-circle {
    width: 80px; height: 80px; background-color: #f8f9fa; color: var(--primary-color);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin: 0 auto 1.5rem auto; transition: all 0.3s ease;
}
.feature-card:hover .feature-icon-circle {
    background-color: var(--primary-color); color: #fff; transform: rotate(10deg) scale(1.1);
}
.feature-title { font-weight: 700; color: var(--brand-navy); font-size: 1.25rem; margin-bottom: 1rem; }

/* Service Tiles (Kacheln) */
.service-tile {
    position: relative; height: 400px; border-radius: 16px; overflow: hidden;
    color: white; background-color: var(--brand-navy);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); transition: all 0.4s ease; display: block;
}
.tile-bg {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover; background-position: center; transition: transform 0.6s ease; z-index: 1;
}
.tile-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 41, 98, 0.1) 0%, rgba(0, 41, 98, 0.6) 50%, rgba(0, 4, 58, 0.95) 100%);
    z-index: 2; transition: opacity 0.3s ease;
}
.tile-content {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 2.5rem;
    display: flex; flex-direction: column; justify-content: flex-end; height: 100%; z-index: 3;
}
.tile-title {
    font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; 
    color: white; text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.accent-line {
    width: 40px; height: 4px; background-color: var(--primary-color);
    margin-bottom: 1rem; border-radius: 2px; transition: width 0.3s ease;
}
.tile-text {
    font-size: 0.95rem; line-height: 1.6; color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0; opacity: 0; transform: translateY(20px);
    transition: all 0.4s ease; max-height: 0;
}
/* Hover Effekte */
.service-tile:hover { box-shadow: 0 20px 50px rgba(0,0,0,0.25); transform: translateY(-5px); }
.service-tile:hover .tile-bg { transform: scale(1.1); }
.service-tile:hover .accent-line { width: 80px; }
.service-tile:hover .tile-text { opacity: 1; transform: translateY(0); max-height: 100px; margin-bottom: 1rem; }

@media (max-width: 991px) {
    .service-tile { height: 350px; }
    .tile-text { opacity: 1; transform: translateY(0); max-height: none; margin-bottom: 1rem; }
}

/* Extras */
.icon-circle-bg {
    background-color: var(--brand-icon-bg); color: var(--primary-color); display: inline-block;
    padding: 1rem; border-radius: 50%; margin-bottom: 1rem; box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}
.btn-glow { transition: all 0.3s ease; }
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(192, 0, 33, 0.3) !important; }


/* ==========================================================================
   6. TESTIMONIALS (HORIZONTAL SCROLL)
   ========================================================================== */
.testimonial-scroll-wrapper {
    position: relative; width: 100%; overflow: hidden;
    margin-top: 80px; margin-bottom: 80px; padding: 30px 0;
}
.testimonial-track {
    display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 20px 0; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;
}
.testimonial-track::-webkit-scrollbar { display: none; }

.testimonial-card {
    flex: 0 0 350px; background: #ffffff; border: 1px solid rgba(0,0,0,0.05);
    border-radius: 16px; padding: 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    scroll-snap-align: center; display: flex; flex-direction: column; transition: all 0.3s ease;
    position: relative;
}
.testimonial-card:hover {
    transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}
.testimonial-card::before {
    content: '\201C'; position: absolute; top: 15px; right: 25px;
    font-size: 5rem; color: var(--brand-icon-bg); font-family: serif;
    line-height: 1; pointer-events: none; opacity: 0.4;
}
@media (max-width: 768px) {
    .testimonial-scroll-wrapper { margin-top: 50px; margin-bottom: 50px; }
    .testimonial-card { flex: 0 0 85%; scroll-snap-align: start; }
}


/* ==========================================================================
   7. FOOTER & MOBILE BUTTONS
   ========================================================================== */
@media (max-width: 991px) {
    footer { padding-bottom: 20px !important; }
}

/* --- MOBILE SIDE TABS (SQUARE & RIGHT) --- */
.floating-action-container {
    position: fixed;
    bottom: 20px; right: 0; z-index: 9999;
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 2px;
    animation: pulse-border-left 3s infinite;
}

/* Button Design */
.btn-float-square {
    width: 55px; height: 55px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: white; text-decoration: none;
    transition: transform 0.2s ease;
    box-shadow: -4px 4px 10px rgba(0,0,0,0.2);
    border-radius: 6px 0 0 6px; 
}
.btn-float-square:active { transform: translateX(5px); }

/* Farben */
.phone-square { background-color: var(--primary-color); font-size: 24px; }
.whatsapp-square { background-color: #25D366; }

/* Animation */
@keyframes pulse-border-left {
    0% { box-shadow: -4px 4px 10px rgba(0,0,0,0.2); }
    50% { box-shadow: -4px 4px 20px rgba(0,0,0,0.4); }
    100% { box-shadow: -4px 4px 10px rgba(0,0,0,0.2); }
}