.service-container { display: flex; flex-wrap: wrap; gap: 20px; max-width: 100%; margin: 0 auto; box-sizing: border-box; padding: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .service-item { display: flex; text-decoration: none; width: calc(25% - 35px); background-color: rgb(164, 0, 0); border-radius: 12px; padding: 20px 10px; flex-direction: column; align-items: center; justify-content: space-evenly; color: #fff; text-align: center; cursor: pointer; transition: transform 0.2s; position: relative; z-index: 1; overflow: hidden; min-height: 120px; outline: none; } .service-item:hover { transform: scale(1.05); } .service-icon { font-size: 28px; margin-bottom: 10px; position: relative; z-index: 10; color: #fff; } .service-text { font-size: 18px; line-height: 1.2; position: relative; color: #fff !important; z-index: 10; } .hover-img { position: absolute; bottom: 0; right: 8px; width: 50px; height: 60px; border-radius: 0; object-fit: cover; top: 100%; opacity: 0; z-index: 5; transition: top 0.3s ease, opacity 0.3s ease; } .service-item:hover .hover-img { top: calc(100% - 50px); opacity: 0.3; } @media (max-width: 600px) { .service-container{ gap: 10px; padding: 10px; } .service-item { width: calc(45% - 10px); min-height: 100px; } .service-text { font-size: 13px; } }