/**
 * Cloud Certification Roadmap - How It Works Section Styles
 * 
 * This file contains styles for the How It Works section.
 */

/* How It Works Section */
.how-it-works {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.how-it-works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(0,102,204,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.5;
}

.how-it-works .container {
    position: relative;
    z-index: 1;
}

.how-it-works .section__title {
    color: #333;
    margin-bottom: 4rem;
    position: relative;
}

.how-it-works .section__title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #0066cc, #4d94ff);
    border-radius: 2px;
}

/* Steps Container */
.how-it-works__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Connection Lines for Desktop */
@media (min-width: 1024px) {
    .how-it-works__steps {
        grid-template-columns: repeat(5, 1fr);
        gap: 2rem;
    }
    
    .how-it-works__steps::before {
        content: '';
        position: absolute;
        top: 60px;
        left: 10%;
        right: 10%;
        height: 2px;
        background: linear-gradient(90deg, #0066cc, #4d94ff, #0066cc);
        z-index: 0;
    }
}

/* Individual Step */
.how-it-works__step {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.how-it-works__step:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.how-it-works__step:nth-child(odd) {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.how-it-works__step:nth-child(even) {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

/* Step Number */
.how-it-works__step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0066cc 0%, #4d94ff 100%);
    color: white;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.3);
    position: relative;
    z-index: 2;
}

.how-it-works__step-number::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, #0066cc, #4d94ff, #0066cc);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.how-it-works__step:hover .how-it-works__step-number::before {
    opacity: 1;
}

/* Step Title */
.how-it-works__step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* Step Description */
.how-it-works__step-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* Step Icons (Optional Enhancement) */
.how-it-works__step::after {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff9900, #ffb84d);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.how-it-works__step:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Step-specific styling */
.how-it-works__step:nth-child(1) .how-it-works__step-number {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    box-shadow: 0 8px 24px rgba(40, 167, 69, 0.3);
}

.how-it-works__step:nth-child(2) .how-it-works__step-number {
    background: linear-gradient(135deg, #17a2b8 0%, #20c9e7 100%);
    box-shadow: 0 8px 24px rgba(23, 162, 184, 0.3);
}

.how-it-works__step:nth-child(3) .how-it-works__step-number {
    background: linear-gradient(135deg, #0066cc 0%, #4d94ff 100%);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.3);
}

.how-it-works__step:nth-child(4) .how-it-works__step-number {
    background: linear-gradient(135deg, #9c27b0 0%, #ba68c8 100%);
    box-shadow: 0 8px 24px rgba(156, 39, 176, 0.3);
}

.how-it-works__step:nth-child(5) .how-it-works__step-number {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .how-it-works {
        padding: 3rem 0;
    }
    
    .how-it-works__steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .how-it-works__step {
        padding: 2rem 1.5rem;
    }
    
    .how-it-works__step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .how-it-works__step-title {
        font-size: 1.3rem;
    }
    
    .how-it-works__step-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .how-it-works__step {
        padding: 1.5rem 1rem;
    }
    
    .how-it-works__step-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .how-it-works__step-title {
        font-size: 1.2rem;
    }
    
    .how-it-works__step-description {
        font-size: 0.95rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .how-it-works {
        background: #ffffff;
    }
    
    .how-it-works__step {
        background: #ffffff;
        border: 3px solid #000000;
    }
    
    .how-it-works__step-number {
        background: #000000;
        color: #ffffff;
        border: 2px solid #ffffff;
    }
    
    .how-it-works__step-title {
        color: #000000;
    }
    
    .how-it-works__step-description {
        color: #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .how-it-works__step,
    .how-it-works__step-number,
    .how-it-works__step::after {
        transition: none;
    }
    
    .how-it-works__step:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .how-it-works {
        background: white;
        padding: 2rem 0;
    }
    
    .how-it-works__step {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .how-it-works__step-number {
        background: #333;
        box-shadow: none;
    }
}

/* Animation for step numbers */
@keyframes pulse {
    0% {
        box-shadow: 0 8px 24px rgba(0, 102, 204, 0.3);
    }
    50% {
        box-shadow: 0 8px 32px rgba(0, 102, 204, 0.5);
    }
    100% {
        box-shadow: 0 8px 24px rgba(0, 102, 204, 0.3);
    }
}

.how-it-works__step:hover .how-it-works__step-number {
    animation: pulse 2s infinite;
}

/* Focus states for accessibility */
.how-it-works__step:focus-within {
    outline: 3px solid #0066cc;
    outline-offset: 4px;
}

.how-it-works__step:focus-within .how-it-works__step-number {
    transform: scale(1.1);
}

/* Loading animation */
.how-it-works__step.loading {
    opacity: 0.7;
    pointer-events: none;
}

.how-it-works__step.loading .how-it-works__step-number {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Benefits Section */
.how-it-works__benefits {
    margin-top: 5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.how-it-works__benefit {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(0, 102, 204, 0.1);
    transition: all 0.3s ease;
}

.how-it-works__benefit:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.2);
}

.how-it-works__benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.how-it-works__benefit-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.how-it-works__benefit-text {
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
    margin: 0;
}

/* Responsive adjustments for benefits */
@media (max-width: 768px) {
    .how-it-works__benefits {
        margin-top: 3rem;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .how-it-works__benefit {
        padding: 1.5rem;
    }
    
    .how-it-works__benefit-icon {
        font-size: 2rem;
    }
    
    .how-it-works__benefit-title {
        font-size: 1.1rem;
    }
    
    .how-it-works__benefit-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .how-it-works__benefits {
        grid-template-columns: 1fr;
        margin-top: 2rem;
    }
    
    .how-it-works__benefit {
        padding: 1.25rem;
    }
}