/* How It Works Page - Dark Animated Design */

/* Full page dark background */
body.page-id-1235,
body.page-slug-how-it-works {
    background: #0a0a1a !important;
    margin: 0;
    padding: 0;
}

body.page-id-1235 .site-main,
body.page-slug-how-it-works .site-main {
    background: transparent !important;
}

/* Hide old duplicate footer section on How It Works page */
body.page-id-1235 #site-footer,
body.page-slug-how-it-works #site-footer {
    display: none !important;
}

.hiw-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    z-index: 10;
}

/* Animated Background */
.hiw-bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hiw-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: floatOrb 20s ease-in-out infinite;
}

.hiw-orb-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.hiw-orb-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    bottom: -150px;
    right: -150px;
    animation-delay: -7s;
}

.hiw-orb-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 30px) scale(0.95); }
    75% { transform: translate(40px, 40px) scale(1.05); }
}

/* Grid Pattern Overlay */
.hiw-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
}

/* Floating Particles */
.hiw-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.hiw-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(102, 126, 234, 0.5);
    border-radius: 50%;
    animation: floatParticle 15s infinite;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Hero Section */
.hiw-hero {
    text-align: center;
    padding: 100px 0 80px;
    position: relative;
    z-index: 10;
}

.hiw-hero-badge {
    display: inline-block;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: #a5b4fc;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out;
}

.hiw-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem) !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    margin-bottom: 20px !important;
    color: #fff !important;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hiw-hero-title span {
    background: linear-gradient(135deg, #667eea 0%, #a855f7 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hiw-hero-subtitle {
    font-size: 1.25rem !important;
    color: #94a3b8 !important;
    max-width: 600px;
    margin: 0 auto !important;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Steps Container */
.hiw-steps-container {
    position: relative;
    padding: 40px 0;
    z-index: 10;
}

/* Timeline Line */
.hiw-timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom,
        rgba(102, 126, 234, 0) 0%,
        rgba(102, 126, 234, 0.5) 10%,
        rgba(168, 85, 247, 0.5) 50%,
        rgba(240, 147, 251, 0.5) 90%,
        rgba(240, 147, 251, 0) 100%
    );
    transform: translateX(-50%);
}

@media (max-width: 768px) {
    .hiw-timeline-line {
        left: 30px;
    }
}

/* Step */
.hiw-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 80px;
    position: relative;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation only when JS adds animate class */
.hiw-step.animate-ready {
    opacity: 0;
    transform: translateY(50px);
}

.hiw-step.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.hiw-step:nth-child(odd) {
    justify-content: flex-start;
    padding-right: calc(50% + 50px);
}

.hiw-step:nth-child(even) {
    justify-content: flex-end;
    padding-left: calc(50% + 50px);
}

@media (max-width: 768px) {
    .hiw-step,
    .hiw-step:nth-child(odd),
    .hiw-step:nth-child(even) {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 80px;
        padding-right: 0;
    }
}

/* Step Number */
.hiw-step-number {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
    z-index: 5;
}

.hiw-step-number::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.3); opacity: 0.1; }
}

@media (max-width: 768px) {
    .hiw-step-number {
        left: 0;
        transform: translateX(0);
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Step Card */
.hiw-step-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 35px;
    max-width: 450px;
    transition: all 0.4s ease;
}

.hiw-step-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .hiw-step-card {
        max-width: 100%;
        padding: 25px;
    }
}

.hiw-step-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

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

.hiw-step-card h3 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
    color: #fff !important;
}

.hiw-step-card p {
    color: #94a3b8 !important;
    font-size: 1rem !important;
    line-height: 1.7 !important;
    margin: 0 !important;
}

/* Link Preview (Step 2) */
.hiw-link-preview {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #a5b4fc;
    overflow-x: auto;
}

.hiw-link-preview span {
    color: #f093fb;
    font-weight: 600;
}

/* Share Options (Step 3) */
.hiw-share-options {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.hiw-share-option {
    flex: 1;
    min-width: 130px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.hiw-share-option:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
    border-color: rgba(102, 126, 234, 0.4);
    transform: scale(1.05);
}

.hiw-share-option-icon {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
}

.hiw-share-option-title {
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    margin-bottom: 5px;
}

.hiw-share-option-desc {
    font-size: 12px;
    color: #94a3b8;
}

/* Sections Grid (Step 4) */
.hiw-sections-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.hiw-section-tag {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #a5b4fc;
    transition: all 0.3s ease;
}

.hiw-section-tag:hover {
    background: rgba(102, 126, 234, 0.3);
    transform: scale(1.05);
}

/* Dashboard Preview (Step 5) */
.hiw-dashboard-preview {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 10px;
}

.hiw-dashboard-stat {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.hiw-dashboard-stat-number {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hiw-dashboard-stat-label {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Export Options (Step 6) */
.hiw-export-options {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.hiw-export-option {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    color: #a5b4fc;
    transition: all 0.3s ease;
}

.hiw-export-option:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

/* CTA Section */
.hiw-cta-section {
    text-align: center;
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

.hiw-cta-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 32px;
    padding: 60px 40px;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.hiw-cta-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: conic-gradient(from 0deg, transparent, rgba(102, 126, 234, 0.1), transparent 30%);
    animation: rotateCta 10s linear infinite;
}

@keyframes rotateCta {
    100% { transform: rotate(360deg); }
}

.hiw-cta-card > * {
    position: relative;
    z-index: 1;
}

.hiw-cta-card h2 {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    margin-bottom: 15px !important;
    color: #fff !important;
}

.hiw-cta-card p {
    color: #94a3b8 !important;
    font-size: 1.1rem !important;
    margin-bottom: 30px !important;
}

.hiw-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.hiw-cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.5);
    color: white !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hiw-hero {
        padding: 60px 0 50px;
    }

    .hiw-hero-title {
        font-size: 2rem !important;
    }

    .hiw-hero-subtitle {
        font-size: 1rem !important;
    }

    .hiw-step {
        margin-bottom: 60px;
    }

    .hiw-dashboard-preview {
        flex-direction: column;
    }

    .hiw-cta-card {
        padding: 40px 25px;
    }

    .hiw-cta-card h2 {
        font-size: 1.8rem !important;
    }
}
