/* ========== PRODUCTION LINES / CHIPS SECTION ========== */
.home-chips-section {
    position: relative;
    width: 100%;
    /* min-height: clamp(980px, 90vw, 1240px); */
    overflow: hidden;
    isolation: isolate;
    background: var(--c-bg-gradient);
}

/* Inner div should NOT have min-height */
.home-chips-section>div {
    position: relative;
    width: 100%;
    /* height: 100%;  */
    min-height: 0;
    /*  Prevent expansion */
}

/*  Desktop Background - Figma specs */
.home-chips-bg {
    position: absolute;
    width: 100vw !important;
    height: 100vh !important;
    top: 0 !important;
    /* left: 50% !important; */
    /* transform: translate(-50%) !important; */
    pointer-events: none;
    z-index: 2;
    margin-top: -15%;
}

.home-chips-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /*  Fills entire area */
    opacity: 0.9 !important;
}

/* Desktop Grid */
.home-chips-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: clamp(16px, 1.8vw, 24px);
    align-items: start;
    align-content: start;
    max-width: 1180px;
    margin-inline: auto;
    width: 100%;
}

/* Desktop Card */
.home-chips-card {
    position: relative;
    width: 100%;
    min-height: 352px;
    border-radius: 50px;
    padding: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.home-chips-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
}

.home-chips-card img {
    width: 351.24px;
    height: 217.66px;
    object-fit: cover;
    border-radius: 41px;
    opacity: 0.9;
    box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.25);
}

.home-chips-card h3 {
    margin: 16px 0 0;
    width: 100%;
    text-align: center;
    color: var(--c-text-primary);
    font-family: var(--font-arabic);
    font-weight: 400;
    font-size: 36px;
    line-height: 36px;
    background: var(--c-white);
    -webkit-background-clip: text;
    /* -webkit-text-fill-color: transparent; */
}

.home-chips-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 220.34px;
    height: 46.63px;
    border-radius: 50px;
    /* border: 1px solid rgba(255,255,255,0.45);
    background: linear-gradient(179.51deg, #FFFFFF -13.95%, rgba(255,255,255,0.23) 113.94%); */
    opacity: 0.95;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-arabic);
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    transition: all 0.3s ease;
}

.home-chips-more-btn:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.7);
}


/* ===== MOBILE ===== */
@media (max-width: 767.98px) {
    .home-chips-section {
        min-height: auto !important;
        height: 324px !important;
        overflow: visible !important;
    }

    .home-chips-section>div {
        height: 324px !important;
        min-height: 0 !important;
        padding-top: 24px !important;
        padding-left: clamp(12px, 4vw, 20px) !important;
        padding-right: clamp(12px, 4vw, 20px) !important;
        overflow: visible !important;
    }

    /*  Mobile Background - Figma: 308×308, left: 26px, opacity: 0.1 */
    .home-chips-bg {
        width: 308px !important;
        height: 308px !important;
        /* top: clamp(20px, 5vw, 40px) !important; */
        transform: none !important;
        z-index: 2 !important;
        margin: 0 auto;
    }

    .home-chips-bg img {
        opacity: 0.9 !important;
    }

    /* Vertical scroll container */
    .home-chips-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        scroll-snap-type: y mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        height: 236px !important;
        max-height: 236px !important;
        width: 100% !important;
        max-width: 100% !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    .home-chips-grid::-webkit-scrollbar {
        display: none !important;
    }

    /* Mobile card */
    .home-chips-card-mobile {
        flex: 0 0 auto !important;
        width: 127px !important;
        height: 98px !important;
        border-radius: 25px !important;
        scroll-snap-align: start !important;
        margin: 0 auto !important;
    }

    /* Hide desktop cards on mobile */
    .home-chips-card {
        display: none !important;
    }

    /* Hide "More" button on mobile */
    .home-chips-section a[href*="production-lines"]:last-child {
        display: none !important;
    }

    /* Bottom fade effect */
    .home-chips-grid::after {
        content: '';
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        height: 30px;
        background: linear-gradient(to bottom, transparent, rgba(1, 6, 29, 0.9));
        pointer-events: none;
        z-index: 1;
    }
}

/* END PRODUCTION LINES / CHIPS SECTION */
