/* SafetyHelp Modern SPA Styles */
/* assets/css/modern-spa.css */

/* Custom Properties */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1e40af;
    --color-secondary: #64748b;
    --color-accent: #f59e0b;
    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
    
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-2xl: 1.5rem;
    
    --transition-fast: all 0.15s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

/* Enhanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Enhanced Component Styles */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-pulse-hover:hover {
    animation: pulse 1s infinite;
}

/* Enhanced Pathway Cards */
.pathway-card {
    position: relative;
    overflow: hidden;
}

.pathway-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.pathway-card:hover::before {
    left: 100%;
}

/* Enhanced Timeline */
.timeline-item {
    position: relative;
    cursor: pointer;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--color-primary);
    transition: height 0.3s ease;
}

.timeline-item:hover::before {
    height: 100%;
}

.timeline-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Enhanced Feature Cards */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::after {
    transform: scaleX(1);
}

/* Enhanced Navigation */
.nav-link {
    position: relative;
    transition: var(--transition-normal);
}

.nav-link:hover {
    transform: translateY(-1px);
}

/* Enhanced Buttons */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: width 0.3s ease, height 0.3s ease;
    transform: translate(-50%, -50%);
}

.btn-enhanced:hover::before {
    width: 300px;
    height: 300px;
}

/* Enhanced Ecosystem Section */
.ecosystem-link {
    position: relative;
    transition: var(--transition-normal);
}

.ecosystem-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ecosystem-link:hover::before {
    opacity: 1;
}

.ecosystem-link:hover {
    transform: translateY(-3px) scale(1.02);
}

/* Loading States */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-slate-200);
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .pathway-card {
        margin-bottom: 1rem;
    }
    
    .timeline-scroll {
        animation-duration: 40s;
    }
    
    .comparison-grid {
        gap: 1rem;
    }
}

/* Focus States for Accessibility */
.focus-enhanced:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--border-radius-md);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .pathway-card,
    .feature-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--color-slate-300);
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #000000;
        --color-secondary: #666666;
        --color-slate-600: #000000;
        --color-slate-900: #000000;
    }
    
    .pathway-card,
    .feature-card {
        border: 2px solid #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .timeline-scroll {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --color-slate-50: #0f172a;
        --color-slate-100: #1e293b;
        --color-slate-200: #334155;
        --color-slate-300: #475569;
        --color-slate-400: #64748b;
        --color-slate-500: #94a3b8;
        --color-slate-600: #cbd5e1;
        --color-slate-700: #e2e8f0;
        --color-slate-800: #f1f5f9;
        --color-slate-900: #f8fafc;
    }
    
    body {
        background-color: var(--color-slate-50);
        color: var(--color-slate-900);
    }
    
    .feature-card,
    .pathway-card,
    .timeline-item {
        background-color: var(--color-slate-100);
        border-color: var(--color-slate-300);
    }
}

/* Enhanced Utilities */
.text-shadow-sm {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.text-shadow-md {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(8px);
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Spacing */
.space-y-responsive > * + * {
    margin-top: clamp(0.5rem, 2vw, 1.5rem);
}

.space-x-responsive > * + * {
    margin-left: clamp(0.5rem, 2vw, 1.5rem);
}

/* Enhanced Typography */
.text-responsive {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.heading-responsive {
    font-size: clamp(1.5rem, 4vw, 3rem);
    line-height: 1.2;
}
