/* Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #ffffff;
    color: #1e293b;
    line-height: 1.5;
    padding: 20px;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
}

/* Шапка */
.header {
    padding: 24px 0 16px;
    border-bottom: 1px solid #edf0f4;
    margin-bottom: 24px;
}

.header h1 {
    font-weight: 400;
    font-size: 28px;
    color: #1e293b;
    margin-bottom: 4px;
}

.header p {
    color: #64748b;
    font-size: 14px;
    font-weight: 300;
}

/* Навигация по картам */
.card-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    border-bottom: 1px solid #edf0f4;
    padding-bottom: 12px;
}

.card-nav-item {
    padding: 6px 16px;
    color: #5b6778;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    transition: all 0.1s ease;
}

.card-nav-item:hover {
    color: #1e293b;
    border-bottom-color: #94a3b8;
}

.card-nav-item.active {
    color: #1e293b;
    border-bottom-color: #1e293b;
    font-weight: 500;
}

/* Карточка карты */
.card {
    background: white;
    border: 1px solid #edf0f4;
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #edf0f4;
    background: #fafbfc;
}

.card-number {
    font-size: 24px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 4px;
}

.card-title {
    font-size: 18px;
    color: #5b6778;
    font-weight: 400;
}

.card-meta {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    color: #64748b;
    font-size: 13px;
}

/* Таблица */
.table-container {
    border: 1px solid #edf0f4;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

th {
    text-align: left;
    padding: 16px 20px;
    background: #fafbfc;
    color: #5b6778;
    font-weight: 500;
    font-size: 13px;
    border-bottom: 1px solid #edf0f4;
}

td {
    padding: 20px;
    border-bottom: 1px solid #edf0f4;
    vertical-align: top;
}

/* Ширина колонок */
/* .col-number { width: 5%; }*/
.col-purpose { width: 10%; }
.col-purpose.hidden { display: none; }
.col-pollution { width: 12%; }
.col-pollution.hidden { display: none; }
.col-metal { width: 12%; }
.col-decor { width: 4%; text-align: center; }
.col-decor.hidden { display: none; }
.col-components { width: 27%; }
.col-mode { width: 17%; }
.col-notes { width: 23%; }

/* Компоненты */
.composition-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px dashed #edf0f4;
    gap: 20px;
}

.composition-item:last-child {
    border-bottom: none;
}

.composition-name {
    color: #1e293b;
    flex: 1;
    font-size: 13px;
}

.composition-quantity {
    color: #2b5797;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    white-space: normal;
    text-align: right;
}

/* Режимы */
.mode-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.mode-label {
    color: #8a97aa;
    min-width: 40px;
    font-size: 11px;
}

.mode-value {
    font-family: 'JetBrains Mono', monospace;
    color: #1e293b;
}

/* Бейджи */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    border: 1px solid #edf0f4;
    background: #fafbfc;
    color: #5b6778;
}

.badge-metal { border-color: #dbeafe; background: #eff6ff; color: #1e4b8c; }
.badge-pollution { border-color: #fff3e2; background: #fff8f0; color: #9a5b1a; }

/* Примечания */
.notes-section {
    margin-top: 24px;
    border: 1px solid #edf0f4;
    padding: 24px;
    background: #fafbfc;
}

.notes-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #1e293b;
}

.note-item {
    padding: 12px 0;
    border-bottom: 1px solid #edf0f4;
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.note-item:last-child {
    border-bottom: none;
}

.note-number {
    color: #8a97aa;
    font-family: 'JetBrains Mono', monospace;
    min-width: 24px;
}

.note-text {
    color: #475569;
    line-height: 1.6;
}

/* Материалы */
.materials-section {
    margin-top: 24px;
    border: 1px solid #edf0f4;
    padding: 24px;
}

.materials-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.material-tag {
    padding: 6px 14px;
    border: 1px solid #edf0f4;
    font-size: 12px;
    color: #475569;
    background: white;
}

.material-tag:hover {
    border-color: #8a97aa;
}

/* Дополнительные указания */
.instructions {
    padding: 12px 16px;
    background: #fafbfc;
    border-left: 2px solid #8a97aa;
    font-size: 12px;
    color: #475569;
    line-height: 1.6;
}

/* Подвал */
.footer {
    margin-top: 48px;
    padding: 24px 0;
    text-align: center;
    color: #8a97aa;
    font-size: 12px;
    border-top: 1px solid #edf0f4;
}
.badge-decor {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    font-family: 'JetBrains Mono', monospace;
    text-transform: lowercase;
}
.badge-composition {
    background: #e8f0fe;
    color: #1e4b8c;
    border: 1px solid #bdd3f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 200;
    padding: 4px 1px;
    border-radius: 4px;
    display: inline-block;
    min-width: 70px;
    text-align: center;
}
.col-purpose {
    width: 12% !important;
    vertical-align: top !important;
    word-break: break-word !important;
    white-space: normal !important;
}

.col-purpose .badge-purpose {
    display: block !important;
    width: 100% !important;
    background: #f0f0f0 !important;
    color: #333 !important;
    border: 1px solid #ccc !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    padding: 8px 10px !important;
    word-break: break-word !important;
    white-space: normal !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    box-sizing: border-box !important;
}
.compositions-table th {
    position: sticky;
    top: 0;
    background: rgba(248, 250, 252, 0.85); /* полупрозрачный фон */
    backdrop-filter: blur(4px); /* эффект стекла */
    -webkit-backdrop-filter: blur(4px);
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03); /* очень лёгкая тень */
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

/* Лёгкое затемнение при прокрутке для читаемости */
.compositions-table th::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(42, 82, 152, 0.1), transparent);
}
.dropdown-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    border: 1px solid #e2e8f0;
}

.dropdown-group {
    position: relative;
}

.dropdown-button {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.dropdown-button:hover {
    background: #edf2f7;
    border-color: #94a3b8;
}

.dropdown-arrow {
    font-size: 10px;
    color: #64748b;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: white;
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 15px;
    color: #1e293b;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

.dropdown-item.active {
    background: #2a5298;
    color: white;
}

/* Стили для скролла в дропдауне */
.dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 0 8px 8px 0;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
/* Верхняя панель на всю ширину */
.gost-header {
    background: linear-gradient(135deg, #0b2b4a 0%, #14375c 100%);
    color: white;
    padding: 40px 0;
    margin: -20px -20px 30px -20px; /* растягиваем на всю ширину с учетом body padding */
    width: calc(100% + 40px); /* компенсируем padding body */
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.gost-header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.gost-header::before {
    content: 'ГОСТ';
    position: absolute;
    bottom: -20px;
    right: 5%;
    font-size: 180px;
    font-weight: 800;
    color: rgba(255,255,255,0.03);
    font-family: 'Inter', sans-serif;
    letter-spacing: 8px;
    white-space: nowrap;
    z-index: 1;
}

.gost-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
    z-index: 1;
}

.gost-number {
    font-size: 64px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    line-height: 1.1;
}

.gost-title {
    font-size: 24px;
    font-weight: 300;
    opacity: 0.9;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    max-width: 70%;
    line-height: 1.4;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .gost-header {
        padding: 30px 0;
        margin: -15px -10px 20px -10px;
        width: calc(100% + 20px);
    }
    
    .gost-number {
        font-size: 42px;
    }
    
    .gost-title {
        font-size: 18px;
        max-width: 100%;
    }
    
    .gost-header::before {
        font-size: 100px;
        bottom: -10px;
    }
}
/* Горизонтальные карточки примечаний */
.notes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.note-card {
    flex: 1 1 300px; /* минимальная ширина 300px, дальше растягиваются */
    min-width: 250px;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    position: relative;
    transition: all 0.2s;
}

.note-card:hover {
    border-color: #2a5298;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Если карточек мало - занимают всю ширину */
.notes-grid:has(.note-card:only-child) .note-card {
    max-width: 100%;
}

/* Для мобильных */
@media (max-width: 768px) {
    .notes-grid {
        flex-direction: column;
    }
    
    .note-card {
        max-width: 100%;
    }
}
/* Стили для навигации */
.card-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 50px;
}

.card-nav a {
    padding: 8px 20px;
    background: white;
    color: #2a5298;
    text-decoration: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.card-nav a:hover {
    background: #2a5298;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
}