/* ===== CUSTOM CSS STYLES ===== */

/* Root Variables for Easy Customization */
:root {
    --primary-color: #af1b3f;     /* Tiefes Rot */
    --secondary-color: #473144;   /* Dunkles Lila/Braun */
    --accent-color: #df9b6d;      /* Warmes Orange */
    --dark-color: #473144;        /* Dunkles Lila/Braun */
    --light-color: #ccb69b;       /* Beige/Creme */
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --warm-gradient: linear-gradient(135deg, #af1b3f, #df9b6d);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
    background-color: #f8f6f3; /* Heller Hintergrund für besseren Kontrast */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--warm-gradient);
    border-radius: 4px;
}

/* Navigation Styles */
.navbar {
    background: rgba(239, 198, 155, 0.95) !important; /* #efc69b mit Transparenz */
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(71, 49, 68, 0.2);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--warm-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--warm-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.navbar-toggler {
    border: none;
    padding: 4px 8px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: var(--warm-gradient);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,0 1000,300 1000,1000 0,700"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(71, 49, 68, 0.3);
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
}

/* Custom Buttons */
.btn-custom {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--white);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-custom:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(175, 27, 63, 0.3);
}

.btn-outline-custom {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(175, 27, 63, 0.3);
}

/* Section Styling */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about-img {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(71, 49, 68, 0.15);
}

.about-img img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.about-img:hover img {
    transform: scale(1.1);
}

/* Services Section */
.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(71, 49, 68, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #f0e6d8;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(71, 49, 68, 0.2);
    border-color: var(--accent-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--warm-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: var(--white);
    font-size: 2rem;
    box-shadow: 0 5px 15px rgba(175, 27, 63, 0.3);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.service-card p {
    color: #5a5a5a;
}

/* Portfolio Section - KORRIGIERT */
.portfolio {
    background: #f8f9fa;
}

.portfolio-carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 80px; /* Platz für Navigation */
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 30px;
    cursor: pointer;
    aspect-ratio: 3 / 4; /* 3:4 Verhältnis für bessere Darstellung */
    max-width: 350px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(71, 49, 68, 0.1);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(71, 49, 68, 0.2);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(175, 27, 63, 0.9); /* #af1b3f mit Transparenz */
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 30px;
    text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.portfolio-overlay p {
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* Carousel Controls - KORRIGIERT */
.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(175, 27, 63, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    opacity: 0.8;
    z-index: 1000;
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--primary-color);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 20px;
    width: 20px;
    height: 20px;
}

/* Carousel Indicators (optional) */
.carousel-indicators {
    bottom: -60px;
}

.carousel-indicators [data-bs-target] {
    background-color: var(--primary-color);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, #af1b3f 0%, #473144 100%);
    color: var(--white);
}

.contact-form {
    background: rgba(255, 255, 255, 0.15);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-control {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--white);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--white);
    color: var(--white);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.contact-info {
    padding: 40px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--light-color);
    padding: 40px 0;
    text-align: center;
}

.social-links a {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: var(--warm-gradient);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    line-height: 50px;
    margin: 0 10px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(175, 27, 63, 0.3);
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(175, 27, 63, 0.4);
}

/* Skills Section */
.skill-item {
    margin-bottom: 25px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.skill-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--warm-gradient);
    border-radius: 5px;
    width: 0;
    transition: width 1s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .navbar-nav {
        background: var(--white);
        padding: 20px;
        border-radius: 10px;
        margin-top: 10px;
        box-shadow: 0 5px 25px rgba(71, 49, 68, 0.15);
    }

    /* Portfolio Mobile Anpassungen */
    .portfolio-carousel-container {
        padding: 0 60px;
    }
    
    .portfolio-item {
        max-width: 280px;
        aspect-ratio: 3 / 4;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .carousel-control-prev {
        left: 5px;
    }

    .carousel-control-next {
        right: 5px;
    }
}

@media (max-width: 576px) {
    .portfolio-carousel-container {
        padding: 0 50px;
    }
    
    .portfolio-item {
        max-width: 250px;
    }
}

/* Animation Classes */
.fade-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation 
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}*/

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Service References Carousel mit Bildern und Navigation */
.service-references {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    position: relative;
}

.service-references .carousel-indicators {
    bottom: -25px;
    margin-bottom: 0;
}

.service-references .carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ccb69b;
    border: none;
    margin: 0 3px;
}

.service-references .carousel-indicators button.active {
    background-color: var(--primary-color);
}

/* Navigations Controls */
.service-references .carousel-control-prev,
.service-references .carousel-control-next {
    width: 30px;
    height: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(175, 27, 63, 0.7);
    border-radius: 50%;
    opacity: 1;
    transition: 1;
}

.service-references:hover .carousel-control-prev,
.service-references:hover .carousel-control-next {
    opacity: 1;
}

.service-references .carousel-control-prev {
    left: 10px;
}

.service-references .carousel-control-next {
    right: 10px;
}

.service-references .carousel-control-prev-icon,
.service-references .carousel-control-next-icon {
    width: 15px;
    height: 15px;
}

.reference-item {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.reference-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.reference-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(255, 255, 255, 1));
    color: var(--dark-color);
    padding: 15px;
    transform: translateY(0);
    transition: transform 0.3s ease;
    backdrop-filter: blur(2px);
}

.reference-overlay h5 {
    margin: 0 0 5px 0;
    font-size: 0.9em;
    font-weight: 700;
    color: var(--dark-color);
}

.reference-overlay p {
    margin: 0;
    font-size: 0.8em;
    color: #333;
    font-weight: 500;
}

/* Anpassung der Service-Card Höhe für Bild-Karussell */
.service-card {
    min-height: 480px;
    display: flex;
    flex-direction: column;
}

.service-card p {
    flex-grow: 1;
}

/* Bessere Icons für die Services - alle gleich */
.service-icon i {
    color: var(--white);
}

/* Back to Top Button Anpassung */
#backToTop {
    background: var(--warm-gradient);
    border: none;
    box-shadow: 0 3px 15px rgba(175, 27, 63, 0.4);
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(175, 27, 63, 0.6);
}

/* Impressum und Datenschutz Sections */
.bg-dark {
    background-color: var(--dark-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

/* Text Links in Contact Section */
.contact a.text-white:hover {
    color: var(--light-color) !important;
    text-decoration: underline;
}

/* Partner Logo Karussell */
.partners-carousel {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    z-index: 3;
}

.logos-slider {
    overflow: hidden;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logos-track {
    display: flex;
    animation: scroll 30s linear infinite;
    width: fit-content;
}

.logos-track:hover {
    animation-play-state: paused;
}

.logo-item {
    flex-shrink: 0;
    width: 150px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.logo-item:hover {
    transform: scale(1.05);
    background: var(--white);
    box-shadow: 0 5px 20px rgba(71, 49, 68, 0.2);
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.logo-item:hover img {
    filter: grayscale(0%);
    opacity: 0.2;
}

/* Dunkler Overlay beim Hover */
.logo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(71, 49, 68, 0.9);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
}

.logo-item:hover::before {
    opacity: 1;
}

/* Text Overlay auf dem Bild */
.logo-item::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    white-space: normal;
    max-width: 150px;
    line-height: 1.3;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 5px;
}

.logo-item:hover::after {
    opacity: 1;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    .partners-carousel {
        bottom: 20px;
    }
    
    .logo-item {
        width: 120px;
        height: 60px;
        margin: 0 15px;
    }
    
    .partners-carousel p {
        font-size: 0.9rem;
    }
    
    .logo-item::after {
        font-size: 0.7rem;
        max-width: 100px;
    }
}
/* Text Overlay auf dem Bild */
.logo-item::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    white-space: pre-line;
    max-width: 130px;
    line-height: 1.25;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 5px;
}

/* Fallback Animation Styles */
[data-aos] {
    /* Werden durch JavaScript gesetzt */
}

.aos-animate {
    opacity: 1 !important;
    transform: translate(0, 0) scale(1) !important;
}

/* Sicherstellen dass Elemente nach Animation sichtbar bleiben */
[data-aos].aos-animate {
    opacity: 1 !important;
    visibility: visible !important;
}
/* Custom Scroll Animations - AOS Replacement */
[data-aos] {
    /* Initial styles werden durch JavaScript gesetzt */
    transition: all 0.8s ease;
}

[data-aos].animated {
    opacity: 1 !important;
    transform: translate(0, 0) scale(1) !important;
}

/* Spezifische Animationen */
[data-aos="fade-up"].animated {
    transform: translateY(0) !important;
}

[data-aos="fade-down"].animated {
    transform: translateY(0) !important;
}

[data-aos="fade-left"].animated {
    transform: translateX(0) !important;
}

[data-aos="fade-right"].animated {
    transform: translateX(0) !important;
}

[data-aos="zoom-in"].animated {
    transform: scale(1) !important;
}

/* Performance Optimierungen */
[data-aos] {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* --- Consentmanager Breitenfix & generelles Anti-Overflow --- */

/* 100vw-Overflow bei sichtbarer Scrollbar verhindern */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Consentmanager-Container auf Viewport begrenzen */
#cmpbox,
.cmpbox,
[data-cmp-ui="modern"] .cmpl-modal,
[data-cmp-ui] .cmpl-container {
  box-sizing: border-box !important;
  max-width: 100vw !important;
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 auto !important;
  overflow-x: hidden !important;
}

/* Falls das Banner am oberen Rand als Bar läuft */
[data-cmp-ui] .cmpl-bar,
[data-cmp-ui="modern"] .cmpl-bar {
  max-width: 100vw !important;
  width: 100% !important;
  overflow-x: hidden !important;
}

/* Sicherheitshalber: Kopfzeile nie breiter als der Viewport */
.navbar {
  max-width: 100vw;
  overflow-x: clip;
}
/* Hero-Buttons: responsive Stack & Abstände */
.hero .hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px; /* Abstand zwischen den Buttons */
}

/* Auf kleinen Screens Buttons untereinander und 100% Breite */
@media (max-width: 576px) {
  .hero .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  .hero .hero-buttons .btn {
    width: 100%;
    max-width: 420px;   /* optional: begrenzt die Maximalbreite */
    padding: 12px 20px; /* etwas kompakter */
  }

  /* Überschrift minimal skalieren, damit’s luftiger wirkt */
  .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .hero p  { font-size: 1rem; }
}
/* --- Platz für das Logo-Karussell im Hero schaffen --- */
.hero {
  padding-bottom: 140px; /* genug Raum, damit nichts abgeschnitten wird */
}

/* Auf kleineren Screens etwas mehr Raum */
@media (max-width: 768px) {
  .hero { padding-bottom: 160px; }
}
@media (max-width: 576px) {
  .hero { padding-bottom: 180px; }
}
/* === HERO & LOGO-KARUSSELL: endgültiger Fix === */

/* Hero soll wachsen dürfen und unten Platz für das Karussell lassen */
.hero {
  height: auto !important;                 /* nicht starr */
  min-height: 100dvh;                      /* dynamische Viewport-Höhe (Mobile sicherer als 100vh) */
  padding-bottom: clamp(140px, 18vh, 220px); /* fester Puffer für das Karussell */
  overflow: hidden;                        /* dein dekorativer Background bleibt sauber */
}

/* Karussell wieder absolut innerhalb des Heros verankern */
.partners-carousel {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: max(24px, env(safe-area-inset-bottom)) !important; /* Platz über der Systemleiste */
  z-index: 3 !important;
  margin-top: 0 !important; /* rückgängig machen */
}


/* Optional: auf sehr kleinen Screens etwas mehr Luft */
@media (max-width: 576px) {
  .partners-carousel { margin-top: 32px; }
}
