.services_image_container {
    position: relative;
    max-width: 100%;
    max-height: 400px;
    overflow: hidden;
    background-image: url('img/services_header.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.services_image_container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.overlay_text {
    color: white;
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Animations */
.overlay_text .text1 {
    font-size: clamp(1.2rem, 3vw, 2rem);
    /* Optional: increase slightly */
}

.overlay_text .text2 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    /* Optional: increase for punch */
}

@media (max-width: 768px) {
  .services_image_container {
    background-attachment: scroll; /* Prevents jank on mobile */
  }
}



.services_image_container.in-view .overlay_text {
    opacity: 1;
    transform: translateY(0);
}

.services_image_container.in-view .text1 {
    opacity: 1;
    transform: translateY(0);
}

.services_image_container.in-view .text2 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}


.services_main {
    background-color: #dadada;
}

.services {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.service-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 60px;
    gap: 30px;

    /* Reveal effect */
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-row.reverse {
    flex-direction: row-reverse;
}

.service-row.in-view {
    opacity: 1;
    transform: translateY(0);
}


.service-image {
    flex: 1 1 45%;
    min-width: 300px;
}

.service-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    max-height: 300px;
    object-fit: cover;
}

.service-image img:hover {
    transform: scale(1.03);
}

.service-content {
    flex: 1 1 50%;
    min-width: 300px;
    padding: 10px;
}

.service-content h3 {
    font-size: 2.8rem;
    color: #01396f;
    margin-bottom: 15px;
    font-weight: bolder;
}

.service-content ul {
    padding-left: 20px;
    list-style-type: disc;
    color: #333;
    font-size: 1.8rem;
    text-align: justify;
}

/* Responsive */
@media (max-width: 768px) {

    .service-row,
    .service-row.reverse {
        flex-direction: column;
    }

    .service-image,
    .service-content {
        flex: 1 1 100%;
    }
}

.brands {
    padding: 40px 20px;
    background-color: #f0f4f8;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding-left: 10%;
    padding-right: 10%;
}

/* Brands Title */
.brands h1 {
    font-size: 2.8em;
    font-weight: 700;
    color: #030052;
    margin-bottom: 30px;
}

/* Dynamic Flex Grid */
.projects-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* Brand Items */
.projects-item {
    flex: 1 1 150px;
    max-width: 180px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.projects-item img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    padding: 10px;
}

/* Hover Effect */
.projects-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* At 1200px and above - exactly 5 items per row */
@media (min-width: 1200px) {
    .projects-row {
        justify-content: flex-start;
        /* optional, so items align nicely */
        gap: 20px;
    }

    .projects-item {
        flex: 0 0 calc((100% - 4 * 20px) / 5);
        /* 5 items per row with 4 gaps */
        max-width: none;
        /* override max-width */
    }
}