/* Featured Images Carousel Styles */

.featured-carousel-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.featured-carousel-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(118, 75, 162, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.featured-carousel-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.featured-carousel-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.featured-carousel-header p {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* Carousel Wrapper */
.featured-carousel-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 4rem;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.carousel-track {
    display: flex;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-item-card {
    flex: 0 0 33.333%;
    padding: 1rem;
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
}

.before-after-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    contain: layout style paint;
}

.carousel-item-card:hover .before-after-container {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.before-section,
.after-section {
    position: relative;
    overflow: hidden;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}

.before-section {
    border-right: 2px solid #e2e8f0;
}

.label-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.before-after-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.before-section:hover .before-after-image,
.after-section:hover .before-after-image {
    transform: scale(1.08);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    padding: 1.5rem;
    color: white;
    text-align: center;
    border-radius: 0 0 16px 16px;
    z-index: 5;
    width: 100%;
    box-sizing: border-box;
}

.upgrade-type-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    text-transform: capitalize;
}

.property-address {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0.4rem 0 0 0;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.carousel-prompt {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0.3rem 0 0 0;
    line-height: 1.4;
    font-style: italic;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.carousel-description {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0.3rem 0 0 0;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.category-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.4rem;
}

.category-badge.category-interior {
    background: rgba(236, 72, 153, 0.2);
    color: #ec4899;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.category-badge.category-exterior {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Navigation Buttons */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: #667eea;
    font-size: 1.2rem;
}

.carousel-nav-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.carousel-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

/* Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator-dot:hover {
    background: #94a3b8;
    transform: scale(1.2);
}

.indicator-dot.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.featured-carousel-loading,
.featured-carousel-empty,
.featured-carousel-error {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.featured-carousel-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .featured-carousel-wrapper {
        padding: 0 3rem;
    }
    
    .carousel-item-card {
        flex: 0 0 50%;
    }
}

@media (max-width: 768px) {
    .featured-carousel-section {
        padding: 2rem 0;
    }

    .featured-carousel-header h2 {
        font-size: 2rem;
    }

    .featured-carousel-header p {
        font-size: 1rem;
    }

    .featured-carousel-wrapper {
        padding: 0 3rem;
    }

    .carousel-item-card {
        flex: 0 0 100%;
        padding: 0.75rem;
    }

    .before-after-container {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .before-section {
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
    }

    .before-section,
    .after-section {
        min-height: 280px;
    }

    .carousel-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .carousel-prev {
        left: -0.5rem;
    }

    .carousel-next {
        right: -0.5rem;
    }
}

@media (max-width: 480px) {
    .featured-carousel-header h2 {
        font-size: 1.5rem;
    }

    .featured-carousel-wrapper {
        padding: 0 2.5rem;
    }

    .before-section,
    .after-section {
        min-height: 220px;
    }

    .label-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.8rem;
    }

    .upgrade-type-badge {
        font-size: 0.75rem;
        padding: 0.3rem 1rem;
    }

    .carousel-caption {
        padding: 1rem;
    }
}
