/* Join Section */
.join-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #0a0a1a 50%, #1a1a2e 100%);
    position: relative;
    overflow: hidden;
}

.join-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(64, 224, 208, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(138, 43, 226, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

.join-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.step-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(64, 224, 208, 0.12), rgba(138, 43, 226, 0.12));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.step-card:hover::before {
    opacity: 1;
}

.step-card:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: rgba(64, 224, 208, 0.5);
    box-shadow: 0 20px 40px rgba(64, 224, 208, 0.35);
}

.step-number {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 1;
}

.step-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.step-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #40e0d0, #20b2aa);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.step-card:hover .step-title::after {
    width: 60px;
}

.step-desc {
    font-size: 1rem;
    color: #cccccc;
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 1;
}

.join-cta {
    text-align: center;
    position: relative;
    z-index: 1;
}

.join-cta .btn {
    font-size: 1.3rem;
    padding: 20px 40px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #40e0d0, #20b2aa);
    box-shadow: 0 10px 30px rgba(64, 224, 208, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.join-cta .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.join-cta .btn:hover::before {
    width: 400px;
    height: 400px;
}

.join-cta .btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(64, 224, 208, 0.7);
}

/* Step Animation */
.step-card {
    opacity: 0;
    transform: translateY(50px);
    animation: stepSlideIn 0.8s ease-out forwards;
}

.step-card:nth-child(1) {
    animation-delay: 0.1s;
}

.step-card:nth-child(2) {
    animation-delay: 0.3s;
}

.step-card:nth-child(3) {
    animation-delay: 0.5s;
}

.step-card:nth-child(4) {
    animation-delay: 0.7s;
}

@keyframes stepSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Animation for Steps */
.step-card:nth-child(1) {
    animation: stepSlideIn 0.8s ease-out forwards, stepFloat1 4s ease-in-out forwards 1.5s;
}

.step-card:nth-child(2) {
    animation: stepSlideIn 0.8s ease-out forwards, stepFloat2 4s ease-in-out forwards 2s;
}

.step-card:nth-child(3) {
    animation: stepSlideIn 0.8s ease-out forwards, stepFloat3 4s ease-in-out forwards 2.5s;
}

.step-card:nth-child(4) {
    animation: stepSlideIn 0.8s ease-out forwards, stepFloat4 4s ease-in-out forwards 3s;
}

@keyframes stepFloat1 {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes stepFloat2 {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes stepFloat3 {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes stepFloat4 {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Connection Lines (Desktop only) */
@media (min-width: 769px) {
    .join-steps {
        position: relative;
    }

    .join-steps::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent 10%, #40e0d0 25%, #20b2aa 50%, #8a2be2 75%, transparent 90%);
        z-index: 0;
        opacity: 0.6;
    }

    .step-card {
        position: relative;
        z-index: 1;
    }
}

/* Step-specific hover effects */
.step-card:nth-child(1):hover {
    box-shadow: 0 20px 40px rgba(64, 224, 208, 0.45);
}

.step-card:nth-child(2):hover {
    box-shadow: 0 20px 40px rgba(138, 43, 226, 0.45);
}

.step-card:nth-child(3):hover {
    box-shadow: 0 20px 40px rgba(75, 0, 130, 0.45);
}

.step-card:nth-child(4):hover {
    box-shadow: 0 20px 40px rgba(0, 206, 209, 0.45);
}

/* CTA Animation */
.join-cta {
    opacity: 0;
    transform: translateY(30px);
    animation: ctaSlideIn 0.8s ease-out 1s forwards;
}

@keyframes ctaSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .join-steps {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .step-card {
        padding: 1.5rem;
    }

    .step-number {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .step-title {
        font-size: 1.2rem;
    }

    .step-desc {
        font-size: 0.95rem;
    }

    .join-cta .btn {
        font-size: 1.2rem;
        padding: 16px 32px;
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .step-card {
        padding: 1.2rem;
    }

    .step-number {
        font-size: 2rem;
    }

    .step-title {
        font-size: 1.1rem;
    }

    .step-desc {
        font-size: 0.9rem;
    }

    .join-cta .btn {
        font-size: 1.1rem;
        padding: 14px 28px;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .join-steps {
        gap: 2.5rem;
    }

    .step-card {
        padding: 2.5rem;
    }

    .step-number {
        font-size: 3.5rem;
    }

    .step-title {
        font-size: 1.4rem;
    }

    .step-desc {
        font-size: 1.1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .step-card,
    .join-cta {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .step-card:hover {
        transform: none;
    }
    
    .join-cta .btn:hover {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .step-card {
        border-color: rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.1);
    }
    
    .step-title {
        color: #ffffff;
    }
    
    .step-desc {
        color: #e0e0e0;
    }
}