/* ================= OUR BUILDERS ================= */

.builders-section {
    padding: 100px 6%;
    background: #fffbe9;
    text-align: center;
}

.builders-heading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.builders-heading span {
    width: 80px;
    height: 2px;
    background: #d7a84f;
}

.builders-heading p {
    color: #d7a84f;
    font-weight: 800;
    letter-spacing: 2px;
}

.builders-section h2 {
    font-size: 42px;
    color: #123327;
    margin-bottom: 60px;
    font-weight: 900;
}

.builders-slider-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

.builders-slider {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 22px;
    flex: 1;
}

.builder-logo-card {
    height: 140px;
    background: white;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    border: 1px solid rgba(18, 51, 39, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
    transition: 0.45s ease;
    position: relative;
    overflow: hidden;
}

.builder-logo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.7),
        transparent
    );
    animation: logoShine 3s infinite;
}

.builder-logo-card:hover {
    transform: translateY(-10px) scale(1.04);
    box-shadow: 0 25px 55px rgba(18, 51, 39, 0.15);
}

.builder-logo-card img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    transition: 0.4s;
}

.builder-logo-card:hover img {
    filter: none;
    transform: scale(1.08);
}

.builder-nav {
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 50%;
    background: #123327;
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: 0.3s;
    flex-shrink: 0;
}

.builder-nav:hover {
    background: #d7a84f;
    color: #123327;
}

@keyframes logoShine {
    0% { left: -100%; }
    100% { left: 200%; }
}


/*============= RESPONSIVENESS ============*/

/* Tablet: 3 columns, bigger cards */
@media (max-width: 1024px) {
    .builders-slider {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .builder-logo-card {
        height: 170px;
        padding: 30px;
    }

    .builder-logo-card img {
        max-height: 95px;
    }
}

/* Small Tablet: 2 columns, larger cards */
@media (max-width: 768px) {
    .builders-section {
        padding: 80px 5%;
    }

    .builders-section h2 {
        font-size: 36px;
        margin-bottom: 40px;
    }

    .builders-slider-wrapper {
        gap: 16px;
    }

    .builders-slider {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .builder-logo-card {
        height: 160px;
        border-radius: 20px;
        padding: 28px;
    }

    .builder-logo-card img {
        max-height: 90px;
    }

    .builder-nav {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* Mobile: Horizontal scroll with snap — FEW BIG CARDS */
@media (max-width: 520px) {
    .builders-section {
        padding: 60px 0 60px 5%;
    }

    .builders-heading {
        padding-right: 5%;
    }

    .builders-heading span {
        width: 50px;
    }

    .builders-section h2 {
        font-size: 28px;
        margin-bottom: 32px;
        padding-right: 5%;
    }

    .builders-slider-wrapper {
        gap: 0;
        align-items: stretch;
    }

    /* CRITICAL FIX: Horizontal scroll with snap */
    .builders-slider {
        display: flex;
        grid-template-columns: none;
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding-right: 5%;
        padding-bottom: 12px; /* space for scrollbar */
        scrollbar-width: none;
    }

    .builders-slider::-webkit-scrollbar {
        display: none;
    }

    /* Each card takes ~75% of viewport width — BIG and visible */
    .builder-logo-card {
        flex: 0 0 auto;
        width: 78vw;
        max-width: 280px;
        height: 180px;
        border-radius: 18px;
        padding: 32px;
        scroll-snap-align: start;
    }

    .builder-logo-card img {
        max-height: 100px;
    }

    /* Nav buttons positioned at edges of scroll area */
    .builder-nav {
        display: none; /* Hide default nav, use scroll instead */
    }
}

/* Extra small: even bigger cards */
@media (max-width: 380px) {
    .builder-logo-card {
        width: 82vw;
        height: 170px;
        padding: 28px;
    }

    .builder-logo-card img {
        max-height: 85px;
    }
}
