/* ========================================
   CSS Переменные и сброс стилей
   ======================================== */
:root {
    --primary-color: #1a365d;
    --primary-light: #2c5282;
    --accent-color: #c5a065;
    --accent-hover: #d4af7a;
    --text-dark: #1a202c;
    --text-light: #718096;
    --text-muted: #a0aec0;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --bg-gradient: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    
    --added-color: #48bb78;
    --added-bg: #f0fff4;
    --removed-color: #f56565;
    --removed-bg: #fff5f5;
    --changed-color: #ed8936;
    --changed-bg: #fffaf0;
    
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Типографика
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.25rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

/* ========================================
   Header
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    overflow: hidden;
}

/* Карусель */
.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.85) 0%, rgba(44, 82, 130, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 4rem 0;
}

.hero-title {
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-title .highlight {
    color: var(--accent-color);
    display: block;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
    z-index: 2;
}

/* Точки навигации карусели */
.hero-dots {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 2;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-dot:hover {
    border-color: rgba(255, 255, 255, 0.8);
}

.hero-dot.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.2);
}

.scroll-arrow {
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ========================================
   Кнопки
   ======================================== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Секции
   ======================================== */
.section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

/* ========================================
   About Section
   ======================================== */
.about {
    background: var(--bg-white);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.about-card {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.about-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.omsk-info {
    background: var(--bg-gradient);
    padding: 3rem;
    border-radius: 20px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.omsk-info::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.omsk-badge {
    display: inline-block;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.omsk-info h3 {
    margin-bottom: 1rem;
    color: white;
}

.omsk-info p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   Charter Section (Таблица)
   ======================================== */
.charter {
    background: var(--bg-light);
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.added { background: var(--added-color); }
.legend-color.removed { background: var(--removed-color); }
.legend-color.changed { background: var(--changed-color); }

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--text-muted);
    background: transparent;
    border-radius: 25px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-light);
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    background: var(--bg-white);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1.25rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.comparison-table th:first-child {
    border-radius: 15px 0 0 0;
}

.comparison-table th:last-child {
    border-radius: 0 15px 0 0;
}

.comparison-table tbody tr {
    transition: var(--transition);
}

.comparison-table tbody tr:hover {
    background: var(--bg-light);
}

.comparison-table mark {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.change-row.added mark {
    background: var(--added-bg);
    color: var(--added-color);
}

.change-row.removed mark {
    background: var(--removed-bg);
    color: var(--removed-color);
}

.change-row.changed mark {
    background: var(--changed-bg);
    color: var(--changed-color);
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.added {
    background: var(--added-bg);
    color: var(--added-color);
}

.badge.removed {
    background: var(--removed-bg);
    color: var(--removed-color);
}

.badge.changed {
    background: var(--changed-bg);
    color: var(--changed-color);
}

.old-version {
    color: var(--text-muted);
}

.new-version {
    color: var(--text-dark);
    font-weight: 500;
}

/* ========================================
   Guide Section (Памятка)
   ======================================== */
.guide {
    background: var(--bg-white);
}

.guide-steps {
    max-width: 900px;
    margin: 0 auto 4rem;
}

.step {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    border-radius: 15px;
    background: var(--bg-light);
    transition: var(--transition);
}

.step:hover {
    box-shadow: var(--shadow-md);
}

.step-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    opacity: 0.5;
    line-height: 1;
}

.step-content h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.step-list {
    list-style: none;
    margin-top: 1rem;
}

.step-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.step-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background: var(--bg-gradient);
    padding: 2rem;
    border-radius: 15px;
    color: white;
}

.contact-card h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.contact-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-info h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-developer h4,
.footer-nav h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.developer-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.telegram-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    padding: 0.75rem 1.5rem;
    background: #229ED9;
    border-radius: 50px;
    transition: var(--transition);
}

.telegram-link:hover {
    background: #1b8ac0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(34, 158, 217, 0.4);
}

.telegram-icon {
    font-size: 1.25rem;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-nav a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.85rem;
}

/* ========================================
   Адаптивность
   ======================================== */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow-md);
    }

    .nav.active {
        display: flex;
    }

    .nav-link {
        padding: 0.75rem 2rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-dots {
        bottom: 3.5rem;
    }

    .hero-dot {
        width: 10px;
        height: 10px;
    }

    .section {
        padding: 3rem 0;
    }

    .table-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .step {
        flex-direction: column;
        gap: 1rem;
    }

    .step-number {
        font-size: 2rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .omsk-info {
        padding: 2rem 1.5rem;
    }

    .contact-cards {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .legend {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-buttons {
        width: 100%;
        justify-content: center;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
    }

    .hero-scroll {
        display: none;
    }

    .btn {
        padding: 0.875rem 2rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   Анимации при скролле
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
