/* =====================================================
   ELITE IT - REAL ATTENDANCE DEVICE GALLERY
   Scoped exclusively to the existing gallery
   ===================================================== */

#elite-real-device-images-v4 {
    width: 100% !important;
    max-width: 1280px !important;
    margin: 32px auto 0 !important;
    padding: 28px 18px !important;
    box-sizing: border-box !important;
}

#elite-real-device-images-v4 *,
#elite-real-device-images-v4 *::before,
#elite-real-device-images-v4 *::after {
    box-sizing: border-box !important;
}

#elite-real-device-images-v4 .erd-title {
    margin-bottom: 24px !important;
    text-align: center !important;
}

#elite-real-device-images-v4 .erd-title h3 {
    font-size: clamp(26px, 3vw, 38px) !important;
    line-height: 1.2 !important;
    margin: 10px 0 !important;
    color: #0b2452 !important;
}

#elite-real-device-images-v4 .erd-title p {
    max-width: 850px !important;
    margin: 0 auto !important;
    line-height: 1.65 !important;
    color: #60738e !important;
}

/* Four equal-size cards without stretching */

#elite-real-device-images-v4 .erd-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
    align-items: start !important;
    align-content: start !important;
    grid-auto-rows: auto !important;
    width: 100% !important;
}

/* Override inherited homepage card heights */

#elite-real-device-images-v4 .erd-grid > a {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;

    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;
    border: 1px solid #dce6f4 !important;
    border-radius: 16px !important;
    background: #ffffff !important;

    box-shadow: 0 8px 24px rgba(17,50,100,.08) !important;
    text-decoration: none !important;

    transition: transform .2s ease, box-shadow .2s ease;
}

#elite-real-device-images-v4 .erd-grid > a:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(17,50,100,.13) !important;
}

/* Product photographs: consistent actual display size */

#elite-real-device-images-v4 .erd-grid > a > img {
    display: block !important;
    width: 100% !important;

    height: 265px !important;
    min-height: 265px !important;
    max-height: 265px !important;

    margin: 0 !important;
    padding: 14px !important;

    object-fit: contain !important;
    object-position: center center !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: #f8fbff !important;
}

/* Product names below images */

#elite-real-device-images-v4 .erd-grid > a > strong {
    display: block !important;
    width: 100% !important;

    min-height: 54px !important;
    height: auto !important;

    padding: 17px 14px !important;
    margin: 0 !important;

    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
    color: #092451 !important;

    background: white !important;
}

/* Buttons */

#elite-real-device-images-v4 .erd-actions {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-top: 28px !important;
}

#elite-real-device-images-v4 .erd-actions a {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;

    min-height: 48px !important;
    padding: 14px 22px !important;

    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-decoration: none !important;

    color: white !important;
    background: linear-gradient(110deg,#087aff,#7429e8) !important;
}

/* Tablet */

@media (max-width: 1050px) {
    #elite-real-device-images-v4 .erd-grid {
        grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    }

    #elite-real-device-images-v4 .erd-grid > a > img {
        height: 290px !important;
        min-height: 290px !important;
        max-height: 290px !important;
    }
}

/* Mobile */

@media (max-width: 600px) {
    #elite-real-device-images-v4 {
        padding: 20px 10px !important;
    }

    #elite-real-device-images-v4 .erd-grid {
        grid-template-columns: repeat(2, minmax(0,1fr)) !important;
        gap: 10px !important;
    }

    #elite-real-device-images-v4 .erd-grid > a > img {
        height: 190px !important;
        min-height: 190px !important;
        max-height: 190px !important;
        padding: 8px !important;
    }

    #elite-real-device-images-v4 .erd-grid > a > strong {
        font-size: 12px !important;
        min-height: 52px !important;
        padding: 12px 9px !important;
    }

    #elite-real-device-images-v4 .erd-actions {
        flex-direction: column !important;
    }

    #elite-real-device-images-v4 .erd-actions a {
        width: 100% !important;
    }
}
