/* Feature Carousel Styles */
.feature-carousel-section {
    padding: 60px 0;
    background-color: var(--current-page-background, #ffffff);
    overflow-x: hidden; /* Horizontales Scrollen verhindern */
}

.feature-carousel-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
}

.feature-carousel-heading {
    font-size: 48px;
    font-weight: 600;
    color: var(--current-section-header-color, #1d1d1f);
    margin-bottom: 50px;
    text-align: left;
    padding-left: 0;
    box-sizing: border-box;
    transition: color 0.3s ease;
}

@media (max-width: 1440px) {
    .feature-carousel-heading {
        font-size: 40px;
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .feature-carousel-heading {
        font-size: 32px;
        margin-bottom: 30px;
        padding-left: 0;
    }
    
    .feature-carousel-section .container {
        padding: 0 15px;
    }
}

.feature-carousel-container {
    margin: 40px 0;
    position: relative;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    /* Kein overflow:hidden, damit Kacheln nicht versteckt werden */
}

/* Wrapper entfernt */

/* Card Container */
.feature-slides-container {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: nowrap;
    padding-left: 0;
    padding-right: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    width: auto;
    overflow: visible;
    max-width: 100%;
    box-sizing: border-box;
    transform: translateZ(0); /* Hardware-Beschleunigung für smoothes Sliding */
    will-change: transform !important;
    backface-visibility: hidden; /* Zusätzliche Optimierung für smooth transitions */
    perspective: 1000px; /* 3D-Hardware-Beschleunigung */
}

/* Card Design */
.feature-card {
    width: 320px; /* Etwas schmaler für bessere Sichtbarkeit auf 13,6-Zoll-Displays */
    height: 540px;
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
    position: relative;
    flex-shrink: 0;
    z-index: 1;
    background-color: var(--current-card-background, #f5f5f5);
}

/* Spezielle Klasse für Kacheln mit Hintergrundbild */
.feature-card-with-bg {
    position: relative;
}

.feature-card-with-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.25) 20%, transparent 35%);
    border-radius: 24px;
    z-index: 1;
    pointer-events: none;
}

.feature-card-with-bg .feature-tag,
.feature-card-with-bg .feature-title,
.feature-card-with-bg .feature-description {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    position: relative;
    z-index: 2;
}

/* Spezielle Klasse für Kacheln mit Hintergrundbild und schwarzer Schrift */
.feature-card-with-bg.black-text .feature-tag,
.feature-card-with-bg.black-text .feature-title,
.feature-card-with-bg.black-text .feature-description {
    color: #000000 !important;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
}

.feature-card:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-tag {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-align: left;
    color: var(--current-section-header-text, #666);
    transition: color 0.3s ease;
}

.feature-title {
    font-size: 20px;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 16px;
    text-align: left;
    color: var(--current-card-text, #1d1d1f);
    transition: color 0.3s ease;
}

.feature-description {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 24px;
    text-align: left;
    color: var(--current-section-header-text, #666);
    transition: color 0.3s ease;
}

/* Plus Button */
.feature-plus-button {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--current-card-text, #404040);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: var(--current-card-background, #ffffff);
    z-index: 2;
}

/* Modal Popup Styles */
.feature-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* Volle Viewport-Breite */
    height: 100vh; /* Volle Viewport-Höhe */
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
    pointer-events: all;
    touch-action: none; /* Verhindert Touch-Scrolling */
}

.feature-modal.active {
    display: flex;
}

.feature-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: 95vh;
    background: var(--current-card-background, linear-gradient(135deg, #f5f5f7 0%, #ffffff 100%));
    border-radius: 24px 24px 0 0;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    color: #1d1d1f;
    animation: modalFadeIn 0.3s ease-out;
    margin-bottom: 0;
    align-self: flex-end;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    /* Wichtig für den fixierten X-Button */
    padding-top: 60px;
    scroll-behavior: auto !important;
}

.feature-modal-close {
    position: sticky;
    top: 20px;
    float: right;
    margin-top: -40px;
    margin-right: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1010;
}

.feature-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Klasse für den Body, wenn das Modal geöffnet ist */
body.modal-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
    height: 100%;
    top: 0;
    left: 0;
}

.feature-modal-header {
    padding-bottom: 15px;
    margin-bottom: 20px;
    position: relative;
}

.feature-modal-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--current-card-text, #1d1d1f);
    transition: color 0.3s ease;
}

.feature-modal-subtitle {
    font-size: 16px;
    color: var(--current-section-header-text, #666);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.feature-modal-body {
    flex: 1;
    overflow-y: auto;
    color: var(--current-card-text, #1d1d1f);
}

.feature-modal-paragraph {
    margin-bottom: 20px;
    background-color: var(--current-card-background, #ffffff);
    border-radius: 12px;
    padding: 15px;
    transition: background-color 0.3s ease;
}

.feature-modal-paragraph p {
    margin: 0;
    line-height: 1.6;
    color: var(--current-section-header-text, #666);
    transition: color 0.3s ease;
}

.feature-modal-image-box {
    height: 550px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding: 0;
    overflow: hidden;
}

.image-placeholder {
    color: #999;
    font-size: 18px;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed #ccc;
    border-radius: 8px;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

/* Spezielle Klasse für das zweite Bild, damit es vollständig sichtbar ist */
.modal-image-contain {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 16px;
}

/* Versteckt die Scrollbar für Chrome, Safari und Opera */
.feature-modal-body::-webkit-scrollbar {
    display: none;
}

/* Versteckt die Scrollbar für Chrome, Safari und Opera im Modal-Content */
.feature-modal-content::-webkit-scrollbar {
    display: none;
}

/* Modal Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-plus-button:hover {
    background-color: rgba(210, 210, 215, 0.4);
}

/* Controls Container */
.feature-carousel-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 0;
    padding-bottom: 30px;
}

/* Indicators */
.feature-carousel-indicators {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #d1d1d6;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    width: 24px;
    border-radius: 12px;
    background-color: #1d1d1f;
}

/* Navigation Buttons */
.feature-carousel-navigation {
    display: flex;
    gap: 10px;
    position: absolute;
    right: 40px;
    bottom: 30px;
    z-index: 10;
}

.nav-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(210, 210, 215, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.3s ease;
    color: #1d1d1f;
    font-weight: bold;
}

.nav-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-button:hover {
    background-color: rgba(210, 210, 215, 0.4);
}

/* Dark Mode für Navigation Buttons */
html.dark-mode .nav-button {
    background-color: rgba(50, 50, 55, 0.6);
    color: #ffffff;
}

html.dark-mode .nav-button:hover {
    background-color: rgba(50, 50, 55, 0.8);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .feature-card {
        width: 290px;
        height: 520px;
    }
    
    .feature-slides-container {
        gap: 16px;
    }
}

@media (max-width: 1024px) {
    .feature-card {
        width: 280px;
        height: 500px;
    }
    
    .feature-slides-container {
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .feature-card {
        width: 270px;
        height: 480px;
    }
    
    .feature-slides-container {
        padding-left: 15px; /* Kleinerer Abstand auf mobilen Geräten */
        padding-right: 15px;
    }
    
    .feature-tag {
        font-size: 13px;
    }
    
    .feature-title {
        font-size: 18px;
    }
}

@media (max-width: 640px) {
    .feature-card {
        width: 100%;
        height: 320px;
    }
    
    .feature-title {
        font-size: 20px;
    }
    
    .feature-tag {
        font-size: 14px;
    }
    
    .feature-carousel-section {
        padding: 40px 0;
    }
}
