/* Основные сбросы */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* Контейнер страницы */
.page-container {
    min-height: 100vh;
    position: relative;
}

/* Сайдбар - навигация (на мобильных устройствах будет внизу) */
.sidebar {
    width: 70px;
    background: linear-gradient(180deg, var(--mo03-blue) 0%, var(--mo03-dark-blue) 100%);
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

@media (min-width: 769px) {
    .page-container {
        display: flex;
    }

    .sidebar {
        position: fixed;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 60px;
        flex-direction: row;
        padding: 0;
        bottom: 0;
        top: auto;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    }

    .logo-container {
        display: none;
    }

    .menu {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 0 10px;
        height: 100%;
    }

    .menu-item {
        width: 45px;
        height: 45px;
    }

    .menu-icon {
        font-size: 1.4em;
        margin-bottom: 3px;
    }

    .menu-text {
        font-size: 0.6em;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content-wrapper {
        margin-left: 0;
        margin-bottom: 60px;
        width: 100%;
    }

    .main-content {
        padding: 15px;
        padding-bottom: 70px;
    }

    .header-with-logo {
        padding: 20px 15px;
        margin-bottom: 25px;
    }

    .header-content h1 {
        font-size: 1.6em;
    }

    .welcome-text {
        font-size: 0.95em;
    }

    .centered-section h2 {
        font-size: 1.4em;
    }

    .download-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .download-card {
        min-height: 240px;
        padding: 20px;
    }

    .download-card h3 {
        font-size: 1.1em;
        min-height: 2.5em;
    }

    .download-btn {
        max-width: 160px;
        padding: 8px 16px;
    }

    .installation-steps {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .step {
        padding: 18px;
    }
}

/* Основной контент */
.main-content-wrapper {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

@media (min-width: 769px) {
    .main-content-wrapper {
        margin-left: 70px;
        width: calc(100% - 70px);
    }
}

.logo-container {
    padding: 10px 0 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.menu {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
}

.menu-item:hover {
    background: rgba(227, 0, 15, 0.7);
    transform: scale(1.05);
}

.menu-item.active {
    background: rgba(227, 0, 15, 0.9);
    box-shadow: 0 2px 8px rgba(227, 0, 15, 0.3);
}


.menu-text {
    font-size: 0.65em;
    font-weight: 500;
    text-align: center;
    line-height: 1;
}

.sidebar-footer {
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: white;
    width: 100%;
}

.version {
    font-size: 0.7em;
    color: #cbd5e0;
    transform: rotate(-90deg);
    white-space: nowrap;
    margin: 15px 0;
}

/* Основной контент */
.main-content-wrapper {
    flex: 1;
    margin-left: 70px;
    width: calc(100vw - 70px);
    min-height: 100vh;
    overflow-x: hidden;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Заголовок */
.header-with-logo {
    margin-bottom: 40px;
    padding: 25px;
    background: linear-gradient(135deg, var(--mo03-blue) 0%, var(--mo03-dark-blue) 100%);
    border-radius: 12px;
    border: 1px solid #0d6efd;
    text-align: center;
    box-shadow: 0 4px 12px rgba(11, 86, 155, 0.15);
}

.header-content h1 {
    margin: 0;
    color: #ffffff;
    font-size: 2.2em;
    font-weight: bold;
}

.welcome-text {
    margin: 8px 0 0 0;
    color: #e0f2ff;
    font-size: 1.1em;
}

/* Секции */
.centered-section {
    text-align: center;
    margin-bottom: 40px;
}

.centered-section h2 {
    color: var(--mo03-blue);
    font-size: 1.8em;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--mo03-red);
    padding-bottom: 8px;
    display: inline-block;
}

.section-subtitle {
    color: #495057;
    font-size: 1em;
    margin-bottom: 25px;
}

/* Карточки загрузок */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.download-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid var(--mo03-blue);
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.download-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(227, 0, 15, 0.25);
    border-color: var(--mo03-red);
}

.download-icon {
    font-size: 2.8em;
    margin-bottom: 12px;
    height: 55px;
}

.download-card h3 {
    margin: 8px 0;
    color: #ffffff;
    font-size: 1.2em;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-card p {
    color: #cbd5e0;
    margin-bottom: 15px;
    font-size: 0.85em;
    flex: 1;
}

.button-container {
    margin-top: auto;
    padding-top: 10px;
}

.download-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--mo03-red) 0%, #c1000c 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    max-width: 180px;
    box-sizing: border-box;
    font-size: 0.9em;
}

.download-btn:hover {
    background: linear-gradient(135deg, #c1000c 0%, var(--mo03-red) 100%);
    box-shadow: 0 4px 10px rgba(227, 0, 15, 0.3);
    transform: translateY(-1px);
}

/* Инструкции */
.installation-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.step {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 2px solid var(--mo03-blue);
    border-radius: 10px;
    padding: 20px;
    text-align: left;
    transition: all 0.3s ease;
    color: #ffffff;
}

.step:hover {
    border-color: var(--mo03-red);
}

.step h3 {
    color: #ffffff;
    margin-bottom: 12px;
    text-align: center;
    border-bottom: 1px solid var(--mo03-red);
    padding-bottom: 8px;
    font-size: 1.1em;
}

.step ul {
    color: #cbd5e0;
    padding-left: 18px;
    font-size: 0.9em;
}

.step li {
    margin-bottom: 6px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 60px;
        flex-direction: row;
        padding: 0;
        bottom: 0;
        top: auto;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    }

    .logo-container {
        display: none;
    }

    .menu {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 0 10px;
        height: 100%;
    }

    .menu-item {
        width: 45px;
        height: 45px;
    }

    .menu-icon {
        font-size: 1.4em;
        margin-bottom: 3px;
    }

    .menu-text {
        font-size: 0.6em;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content-wrapper {
        margin-left: 0;
        margin-bottom: 60px;
        width: 100%;
    }

    .main-content {
        padding: 15px;
        padding-bottom: 70px;
    }

    .header-with-logo {
        padding: 20px 15px;
        margin-bottom: 25px;
    }

    .header-content h1 {
        font-size: 1.6em;
    }

    .welcome-text {
        font-size: 0.95em;
    }

    .centered-section h2 {
        font-size: 1.4em;
    }

    .download-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .download-card {
        min-height: 240px;
        padding: 20px;
    }

    .download-card h3 {
        font-size: 1.1em;
        min-height: 2.5em;
    }

    .download-btn {
        max-width: 160px;
        padding: 8px 16px;
    }

    .installation-steps {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .step {
        padding: 18px;
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 60px;
    }

    .main-content-wrapper {
        margin-left: 60px;
        width: calc(100% - 60px);
    }

    .main-content {
        padding: 15px;
    }

    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-content h1 {
        font-size: 1.9em;
    }
}

/* Большие экраны */
@media (min-width: 1200px) {
    .main-content {
        padding: 20px 40px;
    }
}

/* Печать */
@media print {
    .sidebar {
        display: none;
    }
    
    .main-content-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    .download-btn {
        background: #333 !important;
        color: white !important;
    }
}