/* ==============================================
   LITVINKO FAMILY ASYLUM CASE WEBSITE
   Professional Bilingual Design System
   ============================================== */

/* ========== ROOT VARIABLES ========== */
:root {
    /* Colors - Professional Blue Theme */
    --primary-blue: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-blue: #60a5fa;
    --accent-gold: #f59e0b;
    --accent-red: #ef4444;
    
    /* Neutral Colors */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Courier New', monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ========== GLOBAL RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

/* ========== HEADER & NAVIGATION ========== */
.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    color: white;
    padding: var(--spacing-xl) var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.flag-icon {
    font-size: 1.8rem;
}

.subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: var(--spacing-xs);
    font-weight: 400;
}

.lang-switch {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.lang-switch:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.nav-tab {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    backdrop-filter: blur(10px);
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-tab.active {
    background: white;
    color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

/* ========== MAIN CONTAINER ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-lg);
}

/* ========== CARDS ========== */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.card-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* ========== SECTIONS ========== */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* ========== FAMILY GRID ========== */
.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.family-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.family-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.family-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-blue));
    border-radius: 50%;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
}

.family-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.family-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

.family-role {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

.family-info {
    text-align: left;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    font-size: 0.9rem;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.info-value {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* ========== EVENTS GRID ========== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.event-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-blue);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.event-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.event-number {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.event-date {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

.event-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
}

.event-victims {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.victim-badge {
    background: var(--bg-hover);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-dark);
    font-weight: 600;
}

/* ========== TIMELINE ========== */
.timeline {
    position: relative;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-2xl);
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: 45%;
    background: var(--bg-card);
    padding: var(--spacing-xl);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary-blue);
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

/* ========== BADGES & TAGS ========== */
.badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-critical {
    background: #fee2e2;
    color: #991b1b;
}

.badge-important {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

/* ========== BUTTONS ========== */
.btn {
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* ========== ALERTS ========== */
.alert {
    padding: var(--spacing-lg);
    border-radius: 12px;
    margin-bottom: var(--spacing-xl);
    border-left: 4px solid;
}

.alert-critical {
    background: #fee2e2;
    border-color: var(--accent-red);
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    border-color: var(--accent-gold);
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    border-color: var(--primary-blue);
    color: #1e40af;
}

/* ========== MOBILE SIDEBAR MENU ========== */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 2000;
    width: 50px;
    height: 50px;
    background: var(--primary-blue);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.mobile-menu-btn:hover {
    background: var(--primary-dark);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.mobile-lang-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary-blue);
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--primary-blue);
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1999;
    transition: left var(--transition-normal);
    overflow-y: auto;
    padding-top: 80px;
    display: none;
}

.mobile-sidebar.open {
    left: 0;
}

.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
    display: none;
}

.mobile-sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 25px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mobile-nav-item:hover {
    background: var(--bg-hover);
    padding-left: 30px;
}

.mobile-nav-item.active {
    background: var(--primary-blue);
    color: white;
}

.mobile-nav-item .nav-icon {
    font-size: 1.4rem;
    width: 30px;
    text-align: center;
}

.mobile-nav-item .nav-text {
    flex: 1;
}

.mobile-sidebar-header {
    position: fixed;
    top: 0;
    width: 280px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 20px 25px;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 60px;
    }
    
    .timeline-content {
        width: 100%;
    }
    
    .timeline-marker {
        left: 20px;
    }
}

@media (max-width: 768px) {
    /* Hide desktop header */
    .header {
        display: none !important;
    }
    
    /* Show mobile menu buttons */
    .mobile-menu-btn,
    .mobile-lang-btn {
        display: block !important;
    }
    
    /* Mobile sidebar - enable but keep hidden until .open */
    .mobile-sidebar {
        display: block;
        left: -280px;
    }
    
    .mobile-sidebar.open {
        left: 0;
    }
    
    /* Mobile overlay - enable but keep hidden until .open */
    .mobile-sidebar-overlay {
        display: block;
        opacity: 0;
        visibility: hidden;
    }
    
    .mobile-sidebar-overlay.open {
        opacity: 1;
        visibility: visible;
    }
    
    /* Adjust container for mobile */
    .container {
        padding: 80px var(--spacing-md) var(--spacing-lg);
    }
    
    .family-grid,
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .family-card,
    .event-card {
        cursor: pointer;
    }
}

@media (max-width: 480px) {
    .card {
        padding: var(--spacing-md);
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 80px var(--spacing-sm) var(--spacing-md);
    }
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: var(--spacing-md); }
.mt-2 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-md); }
.mb-2 { margin-bottom: var(--spacing-lg); }
.hidden { display: none; }
.flex { display: flex; }
.gap-1 { gap: var(--spacing-md); }
.gap-2 { gap: var(--spacing-lg); }
