.fits-together-section {
    padding: 80px 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.fits-together-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.fits-together-header {
    text-align: center;
    margin-bottom: 60px;
}

.fits-together-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    font-family: inherit;
}

.fits-together-span {
    display: inline-block;
    margin-right: 0.5rem;
}

.fits-together-main {
    display: inline-block;
}

/* Grid Layout for Desktop - Max 5 items per row */
.fits-together-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: start;
    justify-content: center;
    max-width: 100%;
    position: relative;
}

/* Ensure max 5 items per row */
@media (min-width: 1200px) {
    .fits-together-steps {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .fits-together-steps {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .fits-together-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 479px) {
    .fits-together-steps {
        grid-template-columns: 1fr;
    }
}

.fits-together-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
}

/* Add arrow after each step except the last in each row */
.fits-together-step:not(:last-child)::after {
    content: '›';
    position: absolute;
    top: 50%;
    right: -25px;
    transform: translateY(-50%);
    font-size: 2.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    z-index: 10;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    line-height: 1;
    font-family: Arial, sans-serif;
}

/* Hide arrow for last item in each row */
@media (min-width: 1200px) {
    .fits-together-step:nth-child(5n)::after {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .fits-together-step:nth-child(4n)::after {
        display: none;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .fits-together-step:nth-child(2n)::after {
        display: none;
    }
}

@media (max-width: 479px) {
    .fits-together-step::after {
        display: none;
    }
}

/* Step Card - New unique class to avoid conflicts */
.fits-step-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.fits-step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.fits-step-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.fits-step-icon-image {
    width: 40px !important;
    height: 40px !important;
    object-fit: contain;
    border-radius: 0;
}

.fits-step-info {
    width: 100%;
}

.fits-step-number {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.fits-step-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
    font-family: inherit;
}

.fits-step-subtitle {
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.4;
    opacity: 0.9;
}

.fits-step-arrow {
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    margin-top: 15px;
    
    /* Show arrows in grid layout using CSS pseudo-elements */
    display: none; /* Keep hidden as we're using CSS pseudo-elements */
}

.step-arrow-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.fits-together-step:hover .step-arrow-icon {
    transform: translateX(3px);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .fits-step-card {
        padding: 20px 15px;
    }
    
    .fits-together-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 1200px) {
    .fits-step-card {
        padding: 18px 12px;
    }
    
    .fits-together-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 1024px) {
    .fits-step-card {
        padding: 15px 10px;
    }
    
    .fits-together-title {
        font-size: 2rem;
    }
    
    .fits-step-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .fits-step-icon-image {
        width: 30px !important;
        height: 30px !important;
    }
}

@media (max-width: 768px) {
    .fits-together-section {
        padding: 60px 15px;
    }
    
    .fits-step-card {
        padding: 25px 20px;
    }
    
    .fits-together-title {
        font-size: 2rem;
    }
    
    .fits-together-header {
        margin-bottom: 40px;
    }
    
    .fits-step-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .fits-step-icon-image {
        width: 40px !important;
        height: 40px !important;
    }
}

@media (max-width: 480px) {
    .fits-together-section {
        padding: 40px 10px;
    }
    
    .fits-together-title {
        font-size: 1.75rem;
    }
    
    .fits-step-card {
        padding: 20px 15px;
    }
    
    .fits-step-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .fits-step-icon-image {
        width: 30px !important;
        height: 30px !important;
    }
}

/* Animation for steps appearing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fits-step-card {
    animation: fadeInUp 0.6s ease-out;
}

.fits-together-step:nth-child(1) .fits-step-card {
    animation-delay: 0.1s;
}

.fits-together-step:nth-child(2) .fits-step-card {
    animation-delay: 0.2s;
}

.fits-together-step:nth-child(3) .fits-step-card {
    animation-delay: 0.3s;
}

.fits-together-step:nth-child(4) .fits-step-card {
    animation-delay: 0.4s;
}

.fits-together-step:nth-child(5) .fits-step-card {
    animation-delay: 0.5s;
}

.fits-together-step:nth-child(6) .fits-step-card {
    animation-delay: 0.6s;
}

.fits-together-step:nth-child(7) .fits-step-card {
    animation-delay: 0.7s;
}

.fits-together-step:nth-child(8) .fits-step-card {
    animation-delay: 0.8s;
}

.fits-together-step:nth-child(9) .fits-step-card {
    animation-delay: 0.9s;
}

.fits-together-step:nth-child(10) .fits-step-card {
    animation-delay: 1.0s;
}

/* Gradient overlay for better text readability when using background images */
.fits-together-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
    pointer-events: none;
}