
/* Service Card Container */
.modern-service-card {
    position: relative;
    height: 480px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    transform: translateY(0);
}

.modern-service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(37, 99, 235, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Background Image - Always Visible */
.modern-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.6s ease;
    filter: brightness(0.7) contrast(1.1);
}

.modern-service-card:hover .modern-card-bg {
    filter: brightness(0.4) contrast(1.2) blur(1px);
    transform: scale(1.05);
}

/* Gradient Overlay */
.modern-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.8) 100%
    );
    transition: all 0.4s ease;
}

.modern-service-card:hover .modern-card-overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(37, 99, 235, 0.3) 30%,
        rgba(0, 0, 0, 0.9) 100%
    );
}

/* Header Content - Always Visible */
.modern-card-header {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modern-card-title {
    color: white;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    max-width: 70%;
    transition: all 0.3s ease;
}

.modern-card-title a {
    color: inherit;
    text-decoration: none;
}

.modern-service-card:hover .modern-card-title {
    transform: translateY(-5px);
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

/* Icon Styling */
.modern-card-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modern-service-card:hover .modern-card-icon {
    background: rgba(37, 99, 235, 0.8);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

/* Description Panel - Slides up from bottom */
.modern-card-description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.8) 100%
    );
    backdrop-filter: blur(15px);
    padding: 40px 30px 30px;
    transform: translateY(100%);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Show description on hover */
.modern-service-card:hover .modern-card-description {
    transform: translateY(0);
}

.modern-card-description p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.2s;
}

.modern-service-card:hover .modern-card-description p {
    opacity: 1;
    transform: translateY(0);
}

/* Add a subtle border animation */
.modern-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(37, 99, 235, 0.5), 
        transparent, 
        rgba(37, 99, 235, 0.5)
    );
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-service-card:hover::before {
    opacity: 1;
}

/* Floating elements for extra visual appeal */
.modern-card-floating {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.8s ease;
}

.modern-card-floating:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.modern-card-floating:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 0.3s;
}

.modern-card-floating:nth-child(3) {
    bottom: 30%;
    left: 20%;
    animation-delay: 0.6s;
}

.modern-service-card:hover .modern-card-floating {
    opacity: 1;
    animation: float 3s ease-in-out infinite;
}

/* @keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
} */

/* Responsive Design */
@media (max-width: 768px) {
    .modern-service-card {
        height: 420px;
    }

    .modern-card-header {
        top: 20px;
        left: 20px;
        right: 20px;
    }

    .modern-card-title {
        font-size: 20px;
        max-width: 65%;
    }

    .modern-card-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .modern-card-description {
        padding: 30px 20px 20px;
    }
}

/* Touch device support */
@media (hover: none) and (pointer: coarse) {
    .modern-service-card.active .modern-card-bg {
        filter: brightness(0.4) contrast(1.2) blur(1px);
        transform: scale(1.05);
    }

    .modern-service-card.active .modern-card-overlay {
        background: linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(37, 99, 235, 0.3) 30%,
            rgba(0, 0, 0, 0.9) 100%
        );
    }

    .modern-service-card.active .modern-card-description {
        transform: translateY(0);
    }

    .modern-service-card.active .modern-card-description p {
        opacity: 1;
        transform: translateY(0);
    }

    .modern-service-card.active .modern-card-icon {
        background: rgba(37, 99, 235, 0.8);
        /* transform: rotate(10deg) scale(1.1); */
    }
}
