.hr-service{
  background-color: #fff;
  background-image: url('https://www.diydesignconstruction.com/public/DIYDESIGNCONSTRUCTION/themeaB9xY12z/assets/images/backgrounds/service-h1-bg.webp');
  background-size: cover;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px 120px;
    padding: 50px 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    position: relative;
    width: 400px;
    height: 600px; /* Adjust height as needed */
    background-color: #111111f2; /* The black background shown on hover */
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px; /* Optional: slight curve to edges */
}

/* --- Normal State: Background Image --- */
.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: opacity 0.4s ease-in-out;
}

/* Dark gradient overlay so the white text is readable against the image */
.card-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
}

/* --- Content Wrapper --- */
.card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 35px 30px;
    box-sizing: border-box;
}

/* --- Top Number (Hidden initially) --- */
.card-number {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease-in-out;
}

/* --- Bottom Title --- */
.card-title {
    color: #ffffff;
    font-size: 35px; /* Adjust based on your preference */
    line-height: 1.1;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
    transition: transform 0.4s ease-in-out;
    bottom: 30px;
    position: absolute;
}

/* =========================================
   HOVER EFFECTS
   ========================================= */

/* 1. Fade out the background image */
.service-card:hover .card-bg {
    opacity: 0.2;
}

/* 2. Fade in and slide down the number */
.service-card:hover .card-number {
    opacity: 1;
    transform: translateY(0);
}

/* Optional: Slightly lift the text up when hovered for a premium feel */
.service-card:hover .card-title {
    transform: translateY(-5px);
}
@media(max-width:767.98px){
    .service-card {
        width: 100%;
    }
}