/* ===== TAB SECTION HOLDER STYLES ===== */
.tab-section-holder {
    padding: 80px 0;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

/* Tab Navigation */
.tab-nav-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.tab-nav-buttons {
    display: flex;
    background: #ffffff;
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    gap: 8px;
}

.tab-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: transparent;
    border: none;
    border-radius: 42px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    font-weight: 500;
    min-width: 220px;
    justify-content: center;
}

.tab-nav-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tab-nav-btn.active {
    background: #2A41F1;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tab-number {
    font-size: 14px;
    font-weight: 700;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-nav-btn.active .tab-number {
    background: rgba(255, 255, 255, 0.3);
}

.tab-title {
    font-size: 16px;
    font-weight: 600;
}

/* Tab Images Container */
.tab-images-container {
    display: flex;
    gap: 20px;
    height: 400px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tab Image Items */
.tab-image-item {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

/* Default state - all images equal */
.tab-image-item {
    flex: 1;
}

/* When tab 1 is active (consultation) */
.tab-nav-btn[data-tab="consultation"].active ~ .space40 + .tab-images-container .tab-image-item[data-image="1"] {
    flex: 2.5; /* 60-70% space */
}

.tab-nav-btn[data-tab="consultation"].active ~ .space40 + .tab-images-container .tab-image-item[data-image="2"],
.tab-nav-btn[data-tab="consultation"].active ~ .space40 + .tab-images-container .tab-image-item[data-image="3"] {
    flex: 0.75; /* Squeezed */
}

/* When tab 2 is active (development) */
.tab-nav-btn[data-tab="development"].active ~ .space40 + .tab-images-container .tab-image-item[data-image="2"] {
    flex: 2.5; /* 60-70% space */
}

.tab-nav-btn[data-tab="development"].active ~ .space40 + .tab-images-container .tab-image-item[data-image="1"],
.tab-nav-btn[data-tab="development"].active ~ .space40 + .tab-images-container .tab-image-item[data-image="3"] {
    flex: 0.75; /* Squeezed */
}

/* When tab 3 is active (delivery) */
.tab-nav-btn[data-tab="delivery"].active ~ .space40 + .tab-images-container .tab-image-item[data-image="3"] {
    flex: 2.5; /* 60-70% space */
}

.tab-nav-btn[data-tab="delivery"].active ~ .space40 + .tab-images-container .tab-image-item[data-image="1"],
.tab-nav-btn[data-tab="delivery"].active ~ .space40 + .tab-images-container .tab-image-item[data-image="2"] {
    flex: 0.75; /* Squeezed */
}

/* Alternative approach using classes that we'll toggle with JavaScript */
.tab-images-container.consultation-active .tab-image-item[data-image="1"] {
    flex: 2.5 !important;
}

.tab-images-container.consultation-active .tab-image-item[data-image="2"],
.tab-images-container.consultation-active .tab-image-item[data-image="3"] {
    flex: 0.75 !important;
}

.tab-images-container.development-active .tab-image-item[data-image="2"] {
    flex: 2.5 !important;
}

.tab-images-container.development-active .tab-image-item[data-image="1"],
.tab-images-container.development-active .tab-image-item[data-image="3"] {
    flex: 0.75 !important;
}

.tab-images-container.delivery-active .tab-image-item[data-image="3"] {
    flex: 2.5 !important;
}

.tab-images-container.delivery-active .tab-image-item[data-image="1"],
.tab-images-container.delivery-active .tab-image-item[data-image="2"] {
    flex: 0.75 !important;
}

.image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.tab-image-item:hover .image-wrapper img {
    transform: scale(1.05);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    padding: 30px 25px 25px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.tab-image-item:hover .image-overlay,
.tab-image-item.active .image-overlay {
    transform: translateY(0);
}

.image-overlay h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.image-overlay p {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
    margin: 0;
}

/* Active state for images */
.tab-image-item.active {
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.tab-image-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(102, 126, 234, 0.05));
    z-index: 1;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .tab-nav-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .tab-nav-btn {
        min-width: auto;
        width: 100%;
    }
    
    .tab-images-container {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }
    
    .tab-image-item {
        height: 200px;
        flex: none !important;
    }
    
    /* Reset flex on mobile */
    .tab-images-container.consultation-active .tab-image-item,
    .tab-images-container.development-active .tab-image-item,
    .tab-images-container.delivery-active .tab-image-item {
        flex: none !important;
    }
}

@media (max-width: 768px) {
    .tab-section-holder {
        padding: 60px 0;
    }
    
    .tab-nav-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .tab-title {
        font-size: 14px;
    }
    
    .tab-number {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .tab-images-container {
        gap: 10px;
    }
    
    .tab-image-item {
        height: 180px;
    }
    
    .image-overlay {
        padding: 20px 15px 15px;
    }
    
    .image-overlay h4 {
        font-size: 16px;
    }
    
    .image-overlay p {
        font-size: 13px;
    }
}

/* Animation for smooth transitions */
@keyframes expandImage {
    from {
        flex: 1;
    }
    to {
        flex: 2.5;
    }
}

@keyframes squeezeImage {
    from {
        flex: 1;
    }
    to {
        flex: 0.75;
    }
}

/* Performance optimizations */
.tab-image-item {
    will-change: flex;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.image-wrapper img {
    will-change: transform;
}

.image-overlay {
    will-change: transform;
}

