/* HOW IT WORKS - ENTERPRISE AI REDESIGN */

.how-it-works {
    position: relative;
    padding: 6rem 2rem;
    /* Changed from solid black to a rich, deep blue gradient */
    background: linear-gradient(180deg, #040b17 0%, #0a1733 50%, #040b17 100%);
    overflow: hidden;
}

/* Background glow effect */
.how-it-works::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(0, 230, 255, 0.08) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.how-it-works .container {
    position: relative;
    z-index: 1;
    max-width: 1300px;
    margin: 0 auto;
}

.how-it-works h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    margin-bottom: 4rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* We hide the old arrows to use a cleaner, modern grid layout */
.step-arrow {
    display: none !important;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Changed to 3 columns for 9 perfectly symmetrical cards (3x3) */
    gap: 2.5rem; /* Slightly larger gap to breathe better in 3 columns */
}

.step {
    /* Slightly lighter/richer blue for the cards to stand out from the background */
    background: rgba(13, 28, 64, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Hover effects */
.step:hover {
    transform: translateY(-10px);
    /* Vibrant deep blue on hover */
    background: rgba(18, 40, 85, 0.85);
    border-color: rgba(0, 230, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 230, 255, 0.08);
}

/* Top cyan glow on hover */
.step::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00e6ff, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.step:hover::after {
    opacity: 1;
}

/* Image container */
.step-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%) brightness(0.8) contrast(1.2);
    transition: all 0.5s ease;
}

.step:hover .step-image img {
    filter: grayscale(0%) brightness(1) contrast(1);
    transform: scale(1.05);
}

/* Content styling */
.step-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.step-content h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 8px;
    line-height: 1.2;
}

/* Highlight the title span */
.step-content h3 span {
    color: #00e6ff;
    text-shadow: 0 0 10px rgba(0, 230, 255, 0.3);
}

.step-content p {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    color: #a0aec0;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .steps-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .steps-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .how-it-works { padding: 4rem 1.5rem; }
    .how-it-works h2 { font-size: 2rem; margin-bottom: 3rem; }
}

@media (max-width: 600px) {
    .steps-container {
        grid-template-columns: 1fr;
    }
    .step { padding: 1.2rem; }
}