/* --- ALTERNATING SERVICE BLOCKS --- */
.services-detail {
    padding: 0; /* Removes white space below the header */
}

.service-block {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    background: var(--light-bg);
    margin-bottom: 40px; /* Creates white space between blocks */
}

/* Removes extra margin after the final block */
.service-block:last-of-type {
    margin-bottom: 0;
}

.service-block-image, .service-block-content {
    flex: 1;
    min-width: 350px;
    padding: 80px 8%; /* Balanced padding for professional look */
}

.service-block-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    display: block;
    margin: 0 auto;
}

.service-block-content h2 {
    font-size: 2.8rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
    text-transform: uppercase;
}

.service-block-content p {
    font-size: 1.15rem;
    margin-bottom: 35px;
    line-height: 1.8;
    color: #444;
}

/* Logic for diagonal checkerboard pattern */
.service-block.reverse {
    flex-direction: row-reverse;
}

/* Fix for potential top padding alignment */
.sticky-header + .services-detail {
    margin-top: 0;
}

/* --- PROJECTS GALLERY / SLIDESHOW --- */
.projects-gallery {
    padding: 60px 5%;
    text-align: center;
    background: var(--white);
}

.gallery-scroll {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.gallery-item {
    flex: 0 0 350px; /* Width of each slide */
}

.gallery-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
}

.gallery-hint {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .service-block-image {
        padding: 20px 5% !important;
        order: -1; /* Ensures image stays on top when stacked */
    }
    .service-block-image img {
        max-height: 300px;
    }
    .service-block-content { 
        padding: 30px 5% !important;
        text-align: center;
    }
    .service-block-content h2 {
        font-size: 2rem;
    }
    .gallery-item {
        flex: 0 0 280px; /* Smaller slides for mobile screens */
    }
}