﻿/* =========================================================
   C5 Website Styles
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #F8FAFC;
    --text: #0F172A;
    --text-muted: #64748B;
    --primary: #1F538D;
    --primary-hover: #153D6B;
    --success: #1F6E43;
    --success-hover: #155232;
    --warning: #F59E0B;
    --danger: #B91C1C;
    --card-bg: #FFFFFF;
    --border: #E2E8F0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-top: 72px; 
}

section[id] {
    scroll-margin-top: 90px; 
}

a { text-decoration: none; color: var(--primary); }
a:hover { color: var(--primary-hover); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header (Фиксированная шапка) --- */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
    z-index: 1001;
}
.logo img { 
    height: 40px; 
    width: 40px; 
    object-fit: contain;
    border-radius: 8px; 
    box-shadow: var(--shadow); 
}
.logo span {
    font-weight: 700;
    font-size: 22px;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}
.desktop-nav a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 15px;
}
.desktop-nav a:hover, .desktop-nav a.active { color: var(--primary); }

.header-desktop-btn { margin-left: 24px; }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text);
    z-index: 1001;
    padding: 0;
    line-height: 1;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    flex-direction: column;
    padding: 24px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border);
    gap: 16px;
    z-index: 999;
}
.mobile-nav.active { display: flex; }
.mobile-nav a {
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.mobile-nav .btn {
    border-bottom: none;
    text-align: center;
    margin-top: 8px;
    padding: 14px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: var(--success-hover); color: white; }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #D97706; color: white; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* --- Hero --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 0;
    gap: 60px;
}
.hero-text { flex: 1; max-width: 540px; }
.hero-text h1 { font-size: 48px; line-height: 1.15; margin-bottom: 24px; letter-spacing: -1px; }
.hero-text p { font-size: 18px; color: var(--text-muted); margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-meta { margin-top: 24px; font-size: 13px; color: var(--text-muted); display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image { flex: 1.2; width: 100%; }
.mockup-window {
    background: #E2E8F0;
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow-lg);
    position: relative;
}
.mockup-window::before {
    content: ''; display: block; height: 24px; margin-bottom: 8px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="10"><circle cx="5" cy="5" r="4" fill="%23EF4444"/><circle cx="15" cy="5" r="4" fill="%23F59E0B"/><circle cx="25" cy="5" r="4" fill="%2310B981"/></svg>') no-repeat left center;
}

/* --- Hero Slider --- */
.hero-slider {
    display: grid;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 6px;
    overflow: hidden;
    background: #E2E8F0;
}
.hero-slider img {
    grid-area: 1 / 1 / 2 / 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: block;
}
.hero-slider img.active { opacity: 1; }

/* --- Sections --- */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 36px; margin-bottom: 16px; letter-spacing: -0.5px; }
.section-header p { font-size: 18px; color: var(--text-muted); max-width: 700px; margin: 0 auto; }

/* --- Features Grid --- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card h3 { font-size: 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.card p { color: var(--text-muted); font-size: 15px; }
.card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 20px;
    background: #E0F2FE; color: var(--primary);
}

/* --- Screenshots --- */
.screenshot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.screenshot-item {
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); cursor: zoom-in;
    border: 1px solid var(--border); background: var(--card-bg);
    transition: transform 0.2s;
}
.screenshot-item:hover { transform: scale(1.02); }
.screenshot-item img { width: 100%; display: block; }

/* Lightbox */
.lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); z-index: 2000;
    display: none; align-items: center; justify-content: center;
    padding: 20px; cursor: zoom-out;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 95%; max-height: 95%; border-radius: 8px; box-shadow: 0 0 40px rgba(0,0,0,0.5); }

/* --- Tables --- */
.table-wrap { overflow-x: auto; background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 600px; }
th, td { padding: 16px 24px; border-bottom: 1px solid var(--border); }
th { background: #F1F5F9; font-weight: 600; color: var(--text-muted); font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
td { font-size: 15px; }
tr:last-child td { border-bottom: none; }
.check { color: var(--success); font-weight: bold; }
.cross { color: #CBD5E1; }

/* --- Release Notes --- */
.release-item {
    background: var(--card-bg); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 24px; margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.release-header { display: flex; justify-content: space-between; margin-bottom: 12px; align-items: center; flex-wrap: wrap; gap: 8px; }
.release-version { font-weight: 700; font-size: 18px; color: var(--primary); }
.release-date { font-size: 14px; color: var(--text-muted); }
.release-list { padding-left: 20px; color: var(--text-muted); font-size: 15px; }
.release-list li { margin-bottom: 6px; }

/* --- Footer --- */
footer { background: var(--card-bg); border-top: 1px solid var(--border); padding: 40px 0; margin-top: 80px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 14px; }
.footer-links { display: flex; gap: 24px; align-items: center; }

/* --- Utilities --- */
.text-center { text-align: center; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }

/* --- Mobile App Showcase --- */
.mobile-showcase {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.mobile-screenshot {
    width: 100%;
    max-width: 260px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 8px solid #1A202C;
    background: #1A202C;
    position: relative;
}
.mobile-screenshot::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 20px;
    background: #1A202C;
    border-radius: 12px;
    z-index: 10;
}
.mobile-screenshot img { width: 100%; display: block; border-radius: 20px; }

/* =========================================================
   Модальное окно "Файл временно недоступен"
   ========================================================= */
.download-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    z-index: 3000; padding: 20px;
    animation: fadeIn 0.2s ease;
}
.download-modal-overlay.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.download-modal {
    background: var(--card-bg); border-radius: var(--radius);
    padding: 40px 32px 32px; max-width: 460px; width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center; position: relative;
    animation: slideUp 0.25s ease; border: 1px solid var(--border);
}
.download-modal-icon { font-size: 56px; line-height: 1; margin-bottom: 16px; }
.download-modal h3 { font-size: 22px; margin-bottom: 12px; color: var(--text); font-weight: 700; }
.download-modal p { color: var(--text-muted); font-size: 15px; margin-bottom: 8px; line-height: 1.5; }
.download-modal-file {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    background: #F1F5F9; padding: 6px 14px; border-radius: 6px;
    font-size: 13px; color: var(--text-muted); display: inline-block;
    margin: 12px 0 16px; border: 1px solid var(--border); word-break: break-all;
}
.download-modal .btn { margin-top: 16px; min-width: 140px; }
.download-modal a { color: var(--primary); font-weight: 600; }

/* =========================================================
   АДАПТАЦИЯ ПОД МОБИЛЬНЫЕ УСТРОЙСТВА (Супер-компактная)
   ========================================================= */
@media (max-width: 992px) {
    .hero { flex-direction: column; text-align: center; padding: 30px 0; gap: 30px; }
    .hero-text { max-width: 100%; }
    .hero-text h1 { font-size: 32px; }
    .hero-actions { justify-content: center; }
    .hero-meta { justify-content: center; }
    .grid-3, .grid-4, .screenshot-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* Минимальные отступы по бокам */
    .container { padding: 0 10px; }
    
    body { padding-top: 54px; /* Уменьшили высоту шапки */ }
    section[id] { scroll-margin-top: 70px; }
    
    .desktop-nav, .header-desktop-btn {
        display: none !important;
    }
    .mobile-menu-btn {
        display: block;
        font-size: 24px;
    }
    
    /* Шапка */
    .header-inner { height: 54px; }
    .mobile-nav { top: 54px; }
    .logo img { height: 28px; width: 28px; }
    .logo span { font-size: 16px; }

    /* Тексты */
    .hero { text-align: left; padding: 16px 0; gap: 16px; }
    .hero-text h1 { font-size: 22px; line-height: 1.2; margin-bottom: 12px; letter-spacing: 0; }
    .hero-text p { font-size: 13px; margin-bottom: 16px; line-height: 1.5; }
    .hero-meta { font-size: 11px; gap: 10px; margin-top: 16px; }
    
    /* Секции */
    .section { padding: 24px 0; }
    .section-header { margin-bottom: 16px; }
    .section-header h2 { font-size: 20px; margin-bottom: 8px; }
    .section-header p { font-size: 13px; line-height: 1.4; }
    
    /* Кнопки */
    .hero-actions { flex-direction: column; width: 100%; gap: 6px; }
    .hero-actions .btn { width: 100%; margin-left: 0 !important; }
    .btn { padding: 10px 14px; font-size: 13px; border-radius: 6px; }
    
    /* Сетки и карточки */
    .grid { gap: 10px; }
    .grid-2, .grid-3, .grid-4, .screenshot-grid { grid-template-columns: 1fr; }
    .card { padding: 12px; border-radius: 8px; }
    .card h3 { font-size: 16px; margin-bottom: 6px; }
    .card p { font-size: 12px; line-height: 1.4; }
    .card-icon { width: 32px; height: 32px; font-size: 16px; margin-bottom: 8px; border-radius: 8px; }

    /* Мобильные макеты телефонов */
    .mobile-showcase { gap: 12px; margin-bottom: 16px; }
    .mobile-screenshot { max-width: 180px; border-width: 6px; border-radius: 20px; }
    .mobile-screenshot::before { width: 50px; height: 12px; top: 6px; border-radius: 8px; }
    .mobile-screenshot img { border-radius: 14px; }

    /* Таблицы и списки */
    th, td { padding: 8px 10px; font-size: 12px; }
    .release-item { padding: 12px; border-radius: 8px; }
    .release-header { margin-bottom: 8px; }
    .release-version { font-size: 15px; }
    .release-date { font-size: 12px; }
    .release-list { font-size: 12px; padding-left: 16px; }
    
    /* Футер */
    .footer-inner { flex-direction: column; gap: 12px; text-align: center; font-size: 12px; }
    .footer-links { flex-direction: column; gap: 8px; }
    
    /* Модальное окно */
    .download-modal { padding: 20px 12px; border-radius: 8px; }
    .download-modal-icon { font-size: 32px; margin-bottom: 8px; }
    .download-modal h3 { font-size: 16px; margin-bottom: 8px; }
    .download-modal p { font-size: 13px; }
    .download-modal-file { font-size: 11px; padding: 4px 10px; margin: 8px 0 12px; }
}