/* ===== Feature Carousel Section ===== */
.features-carousel-section {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    overflow: hidden;
}

.features-carousel-container {
    max-width: 1200px;
    margin: 0 auto;
}

.carousel-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

/* Circular Image Carousel */
.carousel-images {
    position: relative;
    height: 400px;
    perspective: 1000px;
}

.carousel-image-item {
    position: absolute;
    width: 320px;
    height: 320px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.carousel-image-item.active {
    z-index: 10;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.carousel-image-item.prev {
    z-index: 5;
    transform: translate(-130%, -70%) scale(0.7) rotateY(25deg);
    opacity: 0.7;
}

.carousel-image-item.next {
    z-index: 5;
    transform: translate(30%, -70%) scale(0.7) rotateY(-25deg);
    opacity: 0.7;
}

.carousel-image-item.hidden {
    z-index: 1;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    pointer-events: none;
}

.carousel-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.carousel-image-item .feature-illustration {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* SVG Feature Illustrations */
.feature-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gradient-start, #667eea) 0%, var(--gradient-end, #764ba2) 100%);
}

.feature-illustration svg {
    width: 60%;
    height: 60%;
    fill: white;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Feature illustrations colors */
.carousel-image-item[data-feature="blocks"] .feature-illustration {
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
}

.carousel-image-item[data-feature="languages"] .feature-illustration {
    --gradient-start: #f59e0b;
    --gradient-end: #d97706;
}

.carousel-image-item[data-feature="hardware"] .feature-illustration {
    --gradient-start: #10b981;
    --gradient-end: #059669;
}

.carousel-image-item[data-feature="wiring"] .feature-illustration {
    --gradient-start: #3b82f6;
    --gradient-end: #1d4ed8;
}

.carousel-image-item[data-feature="upload"] .feature-illustration {
    --gradient-start: #ec4899;
    --gradient-end: #be185d;
}

.carousel-image-item[data-feature="ai"] .feature-illustration {
    --gradient-start: #8b5cf6;
    --gradient-end: #6d28d9;
}

/* Carousel Content */
.carousel-content {
    padding-right: 2rem;
}

.carousel-content h3 {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1rem;
    transition: all 0.5s ease;
}

.carousel-content p {
    font-size: 1.15rem;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 2rem;
    transition: all 0.5s ease;
}

/* Carousel Navigation */
.carousel-nav {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #1f2937;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: #667eea;
    transform: scale(1.1);
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scale(1.2);
}

/* ===== Hardware Carousel Section ===== */
.hardware-carousel-section {
    padding: 6rem 2rem;
    background: white;
}

.hardware-carousel-container {
    max-width: 1200px;
    margin: 0 auto;
}

.hardware-carousel-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

/* Hardware specific styles */
.hardware-carousel-images {
    position: relative;
    height: 350px;
    perspective: 1000px;
}

.hardware-image-item {
    position: absolute;
    width: 280px;
    height: 280px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: white;
}

.hardware-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.hardware-image-item.active {
    z-index: 10;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.hardware-image-item.prev {
    z-index: 5;
    transform: translate(-120%, -65%) scale(0.75) rotateY(20deg);
    opacity: 0.8;
}

.hardware-image-item.next {
    z-index: 5;
    transform: translate(20%, -65%) scale(0.75) rotateY(-20deg);
    opacity: 0.8;
}

.hardware-image-item.hidden {
    z-index: 1;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    pointer-events: none;
}

/* Hardware Illustrations */
.hardware-illustration {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hardware-illustration::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--hw-gradient-start, #f0fdf4) 0%, var(--hw-gradient-end, #dcfce7) 100%);
}

.hardware-illustration svg {
    position: relative;
    z-index: 1;
    width: 65%;
    height: 65%;
}

/* Hardware colors */
.hardware-image-item[data-hardware="desktop"] .hardware-illustration {
    --hw-gradient-start: #eff6ff;
    --hw-gradient-end: #dbeafe;
}

.hardware-image-item[data-hardware="arduino"] .hardware-illustration {
    --hw-gradient-start: #ecfdf5;
    --hw-gradient-end: #d1fae5;
}

.hardware-image-item[data-hardware="esp32"] .hardware-illustration {
    --hw-gradient-start: #fefce8;
    --hw-gradient-end: #fef3c7;
}

/* Hardware Content */
.hardware-content {
    padding-left: 2rem;
}

.hardware-content h3 {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1rem;
}

.hardware-content p {
    font-size: 1.15rem;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.hardware-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hardware-features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 1rem;
    color: #374151;
}

.hardware-features-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Responsive Styles */
@media (max-width: 968px) {
    .carousel-wrapper,
    .hardware-carousel-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .carousel-images,
    .hardware-carousel-images {
        height: 320px;
    }
    
    .carousel-image-item {
        width: 240px;
        height: 240px;
    }
    
    .hardware-image-item {
        width: 220px;
        height: 220px;
    }
    
    .carousel-content,
    .hardware-content {
        padding: 0 1rem;
        text-align: center;
    }
    
    .carousel-nav,
    .carousel-dots {
        justify-content: center;
    }
    
    .hardware-carousel-wrapper {
        flex-direction: column-reverse;
    }
}

@media (max-width: 600px) {
    .carousel-image-item {
        width: 200px;
        height: 200px;
    }
    
    .carousel-image-item.prev {
        transform: translate(-110%, -60%) scale(0.6) rotateY(25deg);
    }
    
    .carousel-image-item.next {
        transform: translate(10%, -60%) scale(0.6) rotateY(-25deg);
    }
    
    .hardware-image-item {
        width: 180px;
        height: 180px;
    }
    
    .carousel-content h3,
    .hardware-content h3 {
        font-size: 1.5rem;
    }
    
    .carousel-content p,
    .hardware-content p {
        font-size: 1rem;
    }
}

/* Animation for content fade */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-content.animating h3,
.carousel-content.animating p,
.hardware-content.animating h3,
.hardware-content.animating p {
    animation: fadeInUp 0.5s ease forwards;
}
