/* ============================================
   БАЗОВЫЙ СБРОС И НАСТРОЙКИ
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background: #f0f2f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ============================================
   ВЕРТИКАЛЬНОЕ МЕНЮ (СВЕТЛАЯ ТЕМА)
   ============================================ */
.vertical-menu {
    width: 280px;
    min-height: 100vh;
    background: #e8e8e8;
    padding: 20px 20px 20px 20px;  /* Уменьшены отступы */
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    flex-shrink: 0;
    height: 100vh;  /* ← ФИКСИРОВАННАЯ ВЫСОТА = ВЫСОТЕ ЭКРАНА */
}

.language-selector {
    margin-bottom: 15px;  /* Уменьшен отступ */
    flex-shrink: 0;  /* Не сжимается */
}

.language-selector select {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 10px;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
}

.language-selector select:hover {
    border-color: #b8a88a;
    background-color: #f5f0eb;
}

.language-selector select:focus {
    outline: none;
    border-color: #b8a88a;
    box-shadow: 0 0 20px rgba(184, 168, 138, 0.3);
}

.language-selector select option {
    background: #ffffff;
    color: #333333;
    padding: 10px;
}

/* ============================================
   КНОПКИ НАВИГАЦИИ - ГЛАВНЫЙ БЛОК
   ============================================ */
.nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
}

/* Стили для полосы прокрутки */
.nav-buttons::-webkit-scrollbar {
    width: 6px;
}

.nav-buttons::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.nav-buttons::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.nav-buttons::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================================
   КНОПКИ
   ============================================ */
.nav-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: rgba(0,0,0,0.05);
    color: #555555;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    line-height: 1.4;
    min-height: 44px;
    display: flex;
    align-items: center;
    word-wrap: break-word;
    white-space: normal;
    flex-shrink: 0;
}

.nav-btn .btn-text {
    display: block;
    width: 100%;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.nav-btn .btn-number {
    display: inline-block;
    min-width: 28px;
    font-size: 12px;
    color: rgba(0,0,0,0.25);
    margin-right: 8px;
    font-weight: bold;
}

.nav-btn:hover {
    background: rgba(184, 168, 138, 0.2);
    color: #333333;
    transform: translateX(5px);
}

/* ============================================
   АКТИВНАЯ КНОПКА
   ============================================ */
.nav-btn.active {
    background: #c8c8c8 !important;
    color: #222222 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    transform: translateX(5px);
}

.nav-btn.active::before {
    content: '▸';
    position: absolute;
    left: -5px;
    color: #999999;
    font-size: 20px;
}

/* ============================================
   МОБИЛЬНАЯ ВЕРСИЯ
   ============================================ */
.mobile-language-selector {
    display: none;
    background: #e8e8e8;
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    align-items: center;
    gap: 12px;
}

.mobile-language-selector .mobile-brand {
    color: #333333;
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
}

.mobile-language-selector select {
    flex: 1;
    padding: 8px 12px;
    font-size: 15px;
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    min-width: 0;
}

.mobile-language-selector select:focus {
    outline: none;
    border-color: #b8a88a;
    box-shadow: 0 0 20px rgba(184, 168, 138, 0.2);
}

.mobile-language-selector select option {
    background: #ffffff;
    color: #333333;
    padding: 8px;
}

/* ============================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================ */
body {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 30px 40px 40px 40px;
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}

.main-content h1 {
    font-size: 28px;
    color: #1a1a2e;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.leftimg {
    float:left;
    margin: 7px 7px 7px 0;
}
.rightimg  {
    float: right;
    margin: 7px 0 7px 7px;
}

.columns-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    min-height: 0;
    height: calc(100vh - 120px);
}

.column-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
    min-height: 0;
}

.column-header {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a2e;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8e8e8;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.column-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
}

.column-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.column-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.column-table tr:last-child td {
    border-bottom: none;
}

.column-table tr:hover td {
    background: #f8f9fa;
}

.column-scroll::-webkit-scrollbar {
    width: 6px;
}

.column-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.column-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.column-scroll::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 1200px) {
    .columns-container {
        grid-template-columns: 1fr 1fr;
        height: calc(100vh - 120px);
    }
    .column-card:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .vertical-menu {
        display: none !important;
    }
    .mobile-language-selector {
        display: flex !important;
    }
    body {
        flex-direction: column;
    }
    .main-content {
        padding: 15px;
        min-height: calc(100vh - 60px);
        height: auto;
        overflow-y: auto;
    }
    .main-content h1 {
        font-size: 22px;
        margin-bottom: 15px;
        text-align: center;
    }
    .columns-container {
        grid-template-columns: 1fr;
        gap: 15px;
        height: auto;
        min-height: auto;
        display: flex;
        flex-direction: column;
    }
    .column-card {
        max-height: 300px;
        min-height: 200px;
        flex-shrink: 0;
    }
    .column-card:last-child {
        grid-column: span 1;
    }
    .column-header {
        font-size: 15px;
        padding-bottom: 10px;
    }
    .column-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
    .column-scroll {
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    .mobile-language-selector {
        display: flex !important;
        padding: 8px 16px;
    }
    .mobile-language-selector .mobile-brand {
        font-size: 16px;
    }
    .mobile-language-selector select {
        padding: 8px 12px;
        font-size: 14px;
    }
    .main-content {
        padding: 12px 15px;
        min-height: calc(100vh - 50px);
    }
    .main-content h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    .columns-container {
        grid-template-columns: 1fr 1fr;
        height: auto;
        gap: 12px;
    }
    .column-card:last-child {
        grid-column: span 2;
    }
    .column-card {
        max-height: 40vh;
        min-height: 120px;
        padding: 12px;
    }
}

@media (max-width: 400px) {
    .mobile-language-selector {
        padding: 8px 10px;
        gap: 8px;
    }
    .mobile-language-selector .mobile-brand {
        font-size: 14px;
    }
    .mobile-language-selector select {
        padding: 8px 10px;
        font-size: 13px;
        background-size: 14px;
        background-position: right 8px center;
    }
    .main-content {
        padding: 10px;
        min-height: calc(100vh - 50px);
    }
    .main-content h1 {
        font-size: 18px;
    }
    .column-card {
        max-height: 250px;
        min-height: 150px;
        padding: 12px;
    }
    .column-header {
        font-size: 13px;
        padding-bottom: 8px;
    }
    .column-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
}

@media (min-width: 1400px) {
    .columns-container {
        gap: 25px;
    }
    .column-table td {
        padding: 14px 12px;
        font-size: 15px;
    }
    .column-header {
        font-size: 18px;
    }
}