/**
 * Modern Mentorship Platform Design System
 * Enhanced UI/UX for contemporary mentorship experience
 * Version: 2.0
 */

:root {
    /* Modern Color Palette */
    --primary-blue: #4F46E5;
    --primary-blue-dark: #4338CA;
    --primary-blue-light: #818CF8;
    --primary-blue-lighter: #EEF2FF;
    
    --secondary-purple: #7C3AED;
    --accent-green: #10B981;
    --accent-orange: #F59E0B;
    --accent-red: #EF4444;
    
    /* Neutral Colors */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Improvements */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    color: var(--gray-900);
    line-height: 1.6;
    background-color: var(--gray-50);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Modern Button Styles */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: var(--text-base);
    line-height: 1.5;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-modern-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-purple) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    color: white;
}

.btn-modern-secondary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--gray-200);
}

.btn-modern-secondary:hover {
    background: var(--gray-50);
    border-color: var(--primary-blue);
    transform: translateY(-1px);
}

.btn-modern-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-modern-outline:hover {
    background: var(--primary-blue);
    color: white;
}

/* Modern Card Styles */
.card-modern {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    padding: var(--spacing-xl);
    transition: all var(--transition-base);
}

.card-modern:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: var(--primary-blue-light);
}

.card-modern-featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Mentor Card Enhancements */
.mentor-card-modern {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--gray-100);
    position: relative;
}

.mentor-card-modern:hover {
    box-shadow: var(--shadow-2xl);
    transform: translateY(-8px);
}

.mentor-card-modern .mentor-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 240px;
    background: linear-gradient(135deg, var(--primary-blue-lighter) 0%, var(--gray-100) 100%);
}

.mentor-card-modern .mentor-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.mentor-card-modern:hover .mentor-image {
    transform: scale(1.05);
}

.mentor-card-modern .mentor-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.mentor-card-modern .mentor-content {
    padding: 1.5rem;
}

.mentor-card-modern .mentor-name {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.mentor-card-modern .mentor-title {
    font-size: var(--text-sm);
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.mentor-card-modern .mentor-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.mentor-card-modern .stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mentor-card-modern .stat-value {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--primary-blue);
}

.mentor-card-modern .stat-label {
    font-size: var(--text-xs);
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Modern Hero Section */
.hero-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 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="white" stroke-opacity="0.05" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)" /></svg>');
    opacity: 0.3;
}

.hero-modern-content {
    position: relative;
    z-index: 10;
}

.hero-modern h1 {
    font-size: var(--text-5xl);
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.hero-modern p {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
}

/* Modern Search Bar */
.search-bar-modern {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-modern {
    flex: 1;
    min-width: 200px;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: var(--text-base);
    transition: all var(--transition-base);
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="%239CA3AF"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /></svg>');
    background-repeat: no-repeat;
    background-position: 1rem center;
    background-size: 1.25rem;
}

.search-input-modern:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-select-modern {
    min-width: 160px;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
    font-size: var(--text-base);
    transition: all var(--transition-base);
    background-color: white;
}

.search-select-modern:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Modern Badge Styles */
.badge-modern {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    gap: 0.375rem;
}

.badge-modern-primary {
    background: var(--primary-blue-lighter);
    color: var(--primary-blue-dark);
}

.badge-modern-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-modern-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-modern-verified {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Modern Stats Card */
.stats-card-modern {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    transition: all var(--transition-base);
}

.stats-card-modern:hover {
    box-shadow: var(--shadow-lg);
}

.stats-card-modern .stats-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stats-card-modern .stats-icon.primary {
    background: var(--primary-blue-lighter);
    color: var(--primary-blue);
}

.stats-card-modern .stats-icon.success {
    background: #D1FAE5;
    color: var(--success);
}

.stats-card-modern .stats-icon.warning {
    background: #FEF3C7;
    color: var(--warning);
}

.stats-card-modern .stats-value {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.stats-card-modern .stats-label {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.stats-card-modern .stats-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--text-sm);
    margin-top: 0.5rem;
}

.stats-card-modern .stats-trend.up {
    color: var(--success);
}

.stats-card-modern .stats-trend.down {
    color: var(--error);
}

/* Modern Input Styles */
.input-modern {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    transition: all var(--transition-base);
    background-color: white;
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-modern-error {
    border-color: var(--error);
}

.input-modern-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Modern Avatar */
.avatar-modern {
    position: relative;
    display: inline-block;
}

.avatar-modern img {
    border-radius: var(--radius-full);
    border: 3px solid white;
    box-shadow: var(--shadow-md);
}

.avatar-modern .avatar-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-full);
    border: 2px solid white;
}

.avatar-modern .avatar-status.online {
    background: var(--success);
}

.avatar-modern .avatar-status.offline {
    background: var(--gray-400);
}

/* Modern Rating Display */
.rating-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-modern .stars {
    display: flex;
    gap: 0.125rem;
}

.rating-modern .star {
    color: #FBBF24;
    font-size: 1rem;
}

.rating-modern .rating-value {
    font-weight: 600;
    color: var(--gray-900);
}

.rating-modern .rating-count {
    color: var(--gray-500);
    font-size: var(--text-sm);
}

/* Modern Navigation */
.nav-modern {
    background: white;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.nav-modern .nav-link {
    padding: 1rem 1.25rem;
    color: var(--gray-700);
    font-weight: 500;
    transition: all var(--transition-fast);
    border-bottom: 3px solid transparent;
}

.nav-modern .nav-link:hover {
    color: var(--primary-blue);
    background: var(--gray-50);
}

.nav-modern .nav-link.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

/* Modern Alert/Notification */
.alert-modern {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.alert-modern-success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid var(--success);
}

.alert-modern-warning {
    background: #FEF3C7;
    color: #92400E;
    border-left: 4px solid var(--warning);
}

.alert-modern-error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid var(--error);
}

.alert-modern-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-left: 4px solid var(--info);
}

/* Loading States */
.skeleton-modern {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-modern h1 {
        font-size: var(--text-3xl);
    }
    
    .hero-modern p {
        font-size: var(--text-lg);
    }
    
    .search-bar-modern {
        flex-direction: column;
    }
    
    .search-input-modern,
    .search-select-modern {
        width: 100%;
    }
}

/* Accessibility Improvements */
.focus-visible:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #18181B;
        --gray-100: #27272A;
        --gray-900: #FAFAFA;
    }
}
