/* ============================================
   HOW IT WORKS PAGE - Bio-Link.se
   All styles for /how-it-works page
   ============================================ */

/* ============================================
   1. CSS VARIABLES
   ============================================ */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gray-50: #f8f9fa;
    --gray-100: #e9ecef;
    --gray-600: #6c757d;
    --gray-900: #212529;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0,0,0,0.15);
    --shadow-xl: 0 2rem 4rem rgba(0,0,0,0.2);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

/* ============================================
   2. BASE STYLES
   ============================================ */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* ============================================
   3. NAVBAR ENHANCEMENTS
   ============================================ */
.navbar {
    backdrop-filter: blur(10px);
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary) !important;
    transition: transform 0.2s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
    left: 10%;
}

/* ============================================
   4. HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section h1 {
    font-weight: 800;
    margin-bottom: 1.5rem;
    position: relative;
}

.hero-section p.lead {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: rgba(255,255,255,0.95);
    margin-bottom: 2rem;
    position: relative;
}

/* ============================================
   5. STEP SECTIONS
   ============================================ */
.step-section {
    position: relative;
}

.step-section:nth-child(even) {
    background: var(--gray-50);
}

.step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

.step-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.step-description {
    font-size: 1.2rem;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* ============================================
   6. STEP IMAGES
   ============================================ */
.step-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 3px solid white;
}

.step-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.step-image-container:hover img {
    transform: scale(1.02);
}

/* ============================================
   7. TIMELINE CONNECTOR
   ============================================ */
.timeline-connector {
    position: relative;
    text-align: center;
    margin: 6rem 0;
    padding: 2rem 0;
}

.timeline-connector::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.timeline-dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: white;
    border: 4px solid var(--primary);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.timeline-dot::before {
    content: '↓';
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    }
}

/* ============================================
   8. FEATURE GRID
   ============================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.feature-item {
    background: white;
    padding: 1.5rem 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.feature-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-900);
}

/* ============================================
   9. MOCKUP CONTAINER
   ============================================ */
.mockup-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.mockup-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

/* ============================================
   10. THEME SELECTOR
   ============================================ */
.theme-selector {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.theme-option {
    flex: 1;
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--gray-100);
    background: white;
}

.theme-option:hover,
.theme-option.active {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.theme-preview {
    width: 100%;
    height: 60px;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.theme-light { 
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%); 
}

.theme-dark { 
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%); 
}

.theme-gradient { 
    background: var(--gradient-primary); 
}

/* ============================================
   11. SOCIAL GRID
   ============================================ */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.social-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-item:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-xl);
}

.social-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.social-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-900);
}

/* ============================================
   12. STATS SECTION
   ============================================ */
.stats-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-xl);
    margin: 3rem 0;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

/* ============================================
   13. CTA SECTION
   ============================================ */
.cta-section {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 4rem 0;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.3;
}

.cta-section h2 {
    color: white;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
}

.cta-section p {
    color: rgba(255,255,255,0.95);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    position: relative;
}

/* ============================================
   14. BUTTONS
   ============================================ */
.btn {
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: white;
    text-decoration: none;
}

.btn-light {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
    text-decoration: none;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    text-decoration: none;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ============================================
   15. ANIMATIONS
   ============================================ */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   16. RESPONSIVE DESIGN
   ============================================ */

/* Tablets (≤768px) */
@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .social-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .theme-selector {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .timeline-connector {
        display: none;
    }
}

/* Small Mobile (≤576px) */
@media (max-width: 576px) {
    .social-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   17. ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   18. PRINT STYLES
   ============================================ */
@media print {
    .navbar,
    .cta-section,
    footer {
        display: none;
    }
    
    .step-section {
        page-break-inside: avoid;
    }
}