.modern-cs-section {
    padding: 100px 20px 120px;
    background: linear-gradient(135deg, #050e1b 0%, #0B1F3A 100%);
    position: relative;
    overflow: hidden;
}

.modern-cs-section::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.modern-cs-header {
    text-align: center;
    margin-bottom: 70px;
}

.modern-cs-header h2 {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: 1.5px;
}

.modern-cs-header .subtitle {
    font-size: 18px;
    color: #00d4ff;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.modern-cs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
    max-width: 1480px;
    margin: 0 auto;
}

/* Glass Card */
.modern-cs-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.modern-cs-card:hover {
    transform: translateY(-20px);
    box-shadow: 0 40px 80px rgba(0, 212, 255, 0.25);
}

/* Glowing Border Pulse */
.modern-cs-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: linear-gradient(45deg, #00d4ff, #39edd1, #00d4ff);
    opacity: 0;
    z-index: -1;
    filter: blur(8px);
    transition: opacity 0.4s ease;
}

.modern-cs-card:hover::before {
    opacity: 0.65;
    animation: borderPulse 2.8s infinite ease-in-out;
}

@keyframes borderPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

/* Image Container */
.modern-cs-image {
    height: 280px;
    background-size: cover;
    background-position: right;
    position: relative;
    overflow: hidden;
    transition: transform 0.8s ease;
}

.modern-cs-card:hover .modern-cs-image {
    transform: scale(1.09);
}

/* Stronger & More Visible Flash Scan Effect */
.modern-cs-image::before {
    content: "";
    position: absolute;
    top: -180%;
    left: -120%;
    width: 70%;
    height: 450%;
    background: linear-gradient(
        135deg,
        transparent 25%,
        rgba(255, 255, 255, 0.98) 45%,     /* Very bright white flash */
        rgba(0, 212, 255, 0.95) 50%,       /* Strong cyan core */
        rgba(255, 255, 255, 0.85) 55%,
        transparent 75%
    );
    transform: skewX(-32deg);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

.modern-cs-card:hover .modern-cs-image::before {
    animation: flashSweep 1.1s ease-in-out forwards;   /* Balanced speed */
}

.modern-cs-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(5,14,27,0.95));
    z-index: 1;
}

/* Content */
.modern-cs-content {
    padding: 32px;
    position: relative;
    z-index: 3;
}

.modern-cs-content h3 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 14px;
    line-height: 1.2;
    letter-spacing: 0.8px;
    text-decoration: none;
    transition: color 0.4s ease;
}

.modern-cs-card:hover h3 {
    text-decoration: none;
    color: #00d4ff;
}

.modern-cs-content p {
    font-size: 15.5px;
    color: #fff;
    line-height: 1.65;
    text-decoration: none;
    opacity: 0.85;
    margin-bottom: 24px;
}

.modern-cs-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #00d4ff;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.4s ease;
}

.modern-cs-card:hover .modern-cs-btn {
    text-decoration: none;
    color: #fff;
    gap: 16px;
}

.modern-cs-btn .arrow {
    transition: transform 0.4s ease;
}

.modern-cs-card:hover .arrow {
    transform: translateX(8px);
}

/* Staggered Entrance */
.modern-cs-card {
    opacity: 0;
    transform: translateY(60px);
    animation: cardPop 0.9s forwards;
}

.modern-cs-card:nth-child(1) { animation-delay: 0.1s; }
.modern-cs-card:nth-child(2) { animation-delay: 0.2s; }
.modern-cs-card:nth-child(3) { animation-delay: 0.3s; }
.modern-cs-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardPop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Balanced Flash Sweep - Visible & Dramatic */
@keyframes flashSweep {
    0% {
        transform: translateX(-160%) skewX(-32deg);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    45% {
        transform: translateX(70%) skewX(-32deg);
    }
    100% {
        transform: translateX(210%) skewX(-32deg);
        opacity: 0;
    }
}

.modern-cs-btn:hover {
    text-decoration: none !important;
}

/* ================= MOBILE VIEW ================= */
@media (max-width: 768px) {
    .modern-cs-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .modern-cs-image {
        height: 240px;
    }
    
    .modern-cs-header h2 { 
        font-size: 36px;
        letter-spacing: 1px;
    }

    /* Flash Scan also works on mobile */
    .modern-cs-card:hover .modern-cs-image::before {
        animation: flashSweep 1.1s ease-in-out forwards;
    }

    .modern-cs-content {
        padding: 26px;
    }
    
    .modern-cs-content h3 {
        font-size: 23px;
        letter-spacing: 0.6px;
    }
    .modern-cs-btn:hover {
    text-decoration: none !important;
}
}