/* style.css */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 20px 0;
}

.container {
    max-width: 1000px; /* общая ширина страницы */
    margin: 0 auto;
    padding: 0 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* Поиск + кнопка */
.search-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#search-box {
    flex: 1;
    padding: 14px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    text-align: left;
    transition: border-color 0.3s;
}

#search-box:focus {
    border-color: #3498db;
}

.menu-toggle {
    width: 50px;
    background-color: #2ecc71; /* зелёный */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Мобильное меню */
.mobile-menu {
    display: none;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mobile-menu.active {
    display: block;
}

.menu-section {
    margin-bottom: 15px;
}

.menu-section h3 {
    margin: 10px 0 12px;
    color: #2c3e50;
    font-size: 18px;
}

.mobile-menu a {
    display: block;
    text-decoration: none;
    color: #3498db;
    padding: 6px 0;
    font-weight: 500;
    text-align: left;
}

.mobile-menu a:hover {
    text-decoration: underline;
}

.mobile-menu hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* Подсказки поиска */
#suggestions {
    border: 1px solid #ccc;
    border-top: none;
    background: white;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: #eaf7ff;
}

.suggestion-type {
    font-size: 14px;
    color: #7f8c8d;
    margin-left: 8px;
}

/* Результат */
#result {
    margin-top: 20px;
}

.loading-text {
    text-align: center;
    font-size: 18px;
}

/* Стили для отображения данных */
.parameter-container {
    position: relative;
    border: 2px solid #d3d3d3;
    border-radius: 15px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.circle {
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.big-circle {
    width: 120px;
    height: 120px;
    line-height: 120px;
    font-size: 36px;
}

.big-circle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.big-circle-label {
    margin-left: 20px;
    font-size: 18px;
    font-weight: bold;
}

.row {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.label {
    font-size: 16px;
    text-align: center;
    width: 60px;
    margin-top: 8px;
}

.label a {
    color: #333;
    text-decoration: none;
    display: block;
}

.label a:hover {
    text-decoration: underline;
}

.scale {
    width: 100%;
    height: 20px;
    background: linear-gradient(to right, #00FF00, #FFA500);
    margin-top: 20px;
    border-radius: 10px;
    position: relative;
}

/* Подвал */
footer {
    margin-top: 60px;
    padding: 30px 0;
    background-color: #f1f1f1;
    border-top: 1px solid #ddd;
}

@media (max-width: 762px) {
    .circle {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 20px;
        margin: 6px;
    }
    .label {
        font-size: 13px;
        width: 50px;
    }
    .big-circle {
        width: 100px;
        height: 100px;
        line-height: 100px;
        font-size: 30px;
    }
    .big-circle-label {
        font-size: 16px;
        margin-left: 12px;
    }
    .scale {
        height: 12px;
    }
    #search-box {
        font-size: 16px;
    }
}

.update-time {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10;
}

/* Блок стилей для статей и ссылок */
.article-container,
.similar-articles,
.button-container {
    max-width: 1000px;  /* одинаковая ширина для всех блоков */
    margin: 0 auto;
    padding: 30px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.article-container h1,
.article-container h2,
.article-container h3 {
    color: #0b3b6f;
}


.article-container h1 {
    margin-top: 5px;       /* чуть выше от верхнего края контейнера */
    margin-bottom: 25px;   /* больший отступ после заголовка перед текстом */
    background-color: #f0f8ff; /* лёгкий фон за буквами */
    padding: 4px 8px;      /* внутренний отступ фона */
    display: inline-block; /* чтобы фон ограничивал только текст */
    border-radius: 3px;    /* скругление углов фона */
}


.article-container h2 {
    font-size: 20px;
    margin-top: 22px;
    border-left: 4px solid #0b3b6f;
    padding-left: 12px;
}

.article-container p.lead {
    font-size: 16px;
    color: #222;
    margin-top: 6px;
}

.article-container .quote {
    background: #f5f9ff;
    padding: 12px;
    border-left: 4px solid #0b66b2;
    margin: 14px 0;
}

.article-container .small {
    font-size: 13px;
    color: #555;
}

.article-container .em {
    font-weight: 600;
}

.article-container .table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.article-container .table th,
.article-container .table td {
    border: 1px solid #e6e6e6;
    padding: 8px;
    text-align: left;
}

.article-container .center {
    text-align: center;
}

.article-container footer {
    margin-top: 28px;
    border-top: 1px solid #eee;
    padding-top: 10px;
    color: #666;
    font-size: 13px;
    text-align: center;
}

/* Похожие статьи */
.similar-articles h2 {
    margin-bottom: 15px;
}

.similar-articles ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.similar-articles ul li {
    margin-bottom: 8px;
}

.similar-articles ul li a {
    color: #3498db;
    text-decoration: none;
}

.similar-articles ul li a:hover {
    text-decoration: underline;
}

/* Кнопка каталога */
.button-container a.catalog-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2ecc71;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
}
.button-container a.catalog-button:hover {
    background-color: #27ae60;
}

/* Выделенные блоки для специфических статей */
.article-content .highlight-box {
    background-color: #f8f9fa;           /* светлый фон */
    border-left: 6px solid #3498db;      /* стандартный цвет */
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
    position: relative;
}

.article-content .highlight-box p {
    margin: 0 0 12px;
}

.article-content .highlight-box p:last-child {
    margin-bottom: 0;
}

.article-content .highlight-box::before {
    content: "ℹ️";                       /* иконка по умолчанию */
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 18px;
    opacity: 0.6;
}

/* Типы блока */
.article-content .highlight-box.warning { border-left-color: #e74c3c; }   /* красный */
.article-content .highlight-box.success { border-left-color: #2ecc71; }   /* зелёный */
.article-content .highlight-box.tip { border-left-color: #f39c12; }       /* оранжевый */

