/* ===== How It Works Page Styles ===== */
.how-hero {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    padding: 4rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.how-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.how-hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.how-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #f1f5f9;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.how-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    min-width: 180px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(100, 116, 139, 0.3);
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.02em;
}

.stat-label {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* ===== Section Containers ===== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.system-overview,
.process-section,
.database-section,
.ethics-section,
.tech-specs {
    padding: 4rem 0;
}

.system-overview {
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.database-section {
    background: rgba(30, 41, 59, 0.3);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.ethics-section {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 41, 59, 0.4) 100%);
}

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    color: #f1f5f9;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* ===== Architecture Diagram ===== */
.architecture-diagram {
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.diagram-nodes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.diagram-node {
    flex: 1;
    min-width: 280px;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    transition: transform 0.3s ease;
}

.diagram-node:hover {
    transform: translateY(-4px);
    border-color: rgba(100, 116, 139, 0.4);
}

.node-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.node-title {
    font-size: 1.5rem;
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.node-description {
    color: #cbd5e1;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.diagram-arrow {
    font-size: 2rem;
    color: #60a5fa;
    opacity: 0.7;
}

.architecture-description {
    max-width: 800px;
    margin: 2rem auto 0;
    text-align: center;
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 1.0625rem;
}

/* ===== Process Steps ===== */
.process-steps {
    max-width: 900px;
    margin: 0 auto;
}

.process-step {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process-step:hover {
    transform: translateX(4px);
    border-color: rgba(100, 116, 139, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.process-step:last-child {
    margin-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.25rem;
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.step-description {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 1rem;
}

/* ===== Database Features ===== */
.database-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    padding: 2rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 14px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(100, 116, 139, 0.3);
}

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

.feature-title {
    font-size: 1.25rem;
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.9375rem;
}

/* ===== Update Crawler ===== */
.update-crawler {
    margin-top: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.7) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    border-left: 4px solid #3b82f6;
}

.update-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.update-title {
    font-size: 1.5rem;
    color: #f1f5f9;
    font-weight: 600;
    margin: 0;
}

.update-badge {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.375rem 1rem;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-radius: 9999px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.update-description {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 1.0625rem;
    margin: 0;
}

/* ===== Principles Grid ===== */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.principle-card {
    padding: 2rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.principle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.principle-card:hover {
    transform: translateY(-4px);
    border-color: rgba(100, 116, 139, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.principle-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.principle-title {
    font-size: 1.25rem;
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.principle-description {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.9375rem;
}

/* ===== Technical Specifications ===== */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.spec-card {
    padding: 2rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 14px;
    transition: transform 0.3s ease;
}

.spec-card:hover {
    transform: translateY(-4px);
    border-color: rgba(100, 116, 139, 0.3);
}

.spec-title {
    font-size: 1.25rem;
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.spec-content {
    color: #cbd5e1;
}

.spec-content p {
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.spec-content p:last-child {
    margin-bottom: 0;
}

.spec-content strong {
    color: #e2e8f0;
    font-weight: 600;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .how-hero {
        padding: 3rem 1rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .hero-stat {
        min-width: 100%;
        text-align: center;
    }
    
    .process-step {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .step-number {
        align-self: center;
    }
    
    .diagram-nodes {
        flex-direction: column;
    }
    
    .diagram-arrow {
        transform: rotate(90deg);
    }
    
    .database-features,
    .principles-grid,
    .specs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .update-crawler {
        padding: 1.5rem;
    }
    
    .system-overview,
    .process-section,
    .database-section,
    .ethics-section,
    .tech-specs {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .how-title {
        font-size: 1.75rem;
    }
    
    .how-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9375rem;
    }
    
    .architecture-diagram {
        padding: 1.5rem;
    }
    
    .diagram-node {
        min-width: 100%;
        padding: 1.5rem;
    }
    
    .process-step {
        padding: 1.25rem;
    }
    
    .feature-card,
    .principle-card,
    .spec-card {
        padding: 1.5rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .how-hero {
        background: white !important;
        border-bottom: 2px solid #e2e8f0 !important;
    }
    
    .how-title {
        color: #1e293b !important;
        background: none !important;
        -webkit-text-fill-color: #1e293b !important;
    }
    
    .how-subtitle,
    .section-subtitle {
        color: #475569 !important;
    }
    
    .hero-stat,
    .process-step,
    .feature-card,
    .principle-card,
    .spec-card,
    .update-crawler {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        break-inside: avoid;
    }
    
    .stat-number,
    .step-title,
    .node-title,
    .feature-title,
    .principle-title,
    .spec-title,
    .update-title {
        color: #1e293b !important;
    }
    
    .stat-label,
    .step-description,
    .node-description,
    .feature-description,
    .principle-description,
    .spec-content,
    .update-description {
        color: #475569 !important;
    }
    
    .step-number {
        background: #3b82f6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}