/* =========================================
   1. Глобальные настройки страницы
   ========================================= */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    max-width: 820px;
    margin: 20px auto;
    padding: 0 20px;
    color: #222;
    line-height: 1.55;
}

a { color: #0055aa; }

/* =========================================
   2. Типографика (Заголовки и текст)
   ========================================= */
h1 { color: #0055aa; border-bottom: 2px solid #0055aa; padding-bottom: 6px; }
h2 { color: #0055aa; margin-top: 28px; border-left: 4px solid #0055aa; padding-left: 10px; }
h3 { color: #333; margin-top: 18px; }
ul { margin: 6px 0 6px 24px; }
ol { margin: 6px 0 6px 24px; }
li { margin: 6px 0 6px 24px; }

/* =========================================
   3. Таблицы
   ========================================= */
table { border-collapse: collapse; width: 100%; margin: 12px 0; }
th, td { border: 0px solid #999; padding: 6px 10px; vertical-align: top; }
th { background: #eef3ff; text-align: left; }

/* =========================================
   4. Специальные блоки (Заметки, предупреждения)
   ========================================= */
.note { background: #fff8e1; border-left: 4px solid #f0a000; padding: 10px 14px; margin: 14px 0; }
.warn { background: #ffe8e8; border-left: 4px solid #c00; padding: 10px 14px; margin: 14px 0; }
.ok { background: #e8ffe8; border-left: 4px solid #0a0; padding: 10px 14px; margin: 14px 0; }

/* =========================================
   5. Служебные элементы
   ========================================= */
code { background: #f3f3f3; padding: 1px 5px; font-family: Consolas, monospace; font-size: 0.95em; }

/* Старый футер страницы (текстовый) */
.footer { margin-top: 40px; padding-top: 10px; border-top: 1px solid #ccc; font-size: 0.9em; color: #666; }

/* =========================================
   6. Стили для защиты email от спама
   ========================================= */
.email-link {
    color: #0088cc;
    text-decoration: underline;
    cursor: pointer;
    font-family: Arial, sans-serif;
}
.no-js-fallback {
    display: none;
}

/* =========================================
   7. Новый серый футер (с кнопкой)
   ========================================= */
.footer-bar {
    position: relative;
    width: 100%;
    height: 60px;  /* Высота полосы */
    background-color: #0055aa; /* Цвет фона полосы */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;  /* 20px отступ внутр.справа/слева  */
    box-sizing: border-box;
    margin-top: 30px; /* 30px отступ внеш. сверху  */
}

.footer-content {
    text-align: left;
    color: #ffffff;
    font-size: 12px;
    font-family: Consolas, monospace;
    white-space: nowrap;
}

.sponsor-btn {
    border: 2px solid rgb(0, 85, 170);
    padding: 5px 15px;
    background-color: #0055aa;
    color: #ffffff;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 11px;
    font-weight: 400;
    text-decoration: none;
    border-radius: 3px;
    white-space: nowrap;
    line-height: 1;
}

.sponsor-btn:hover {
    background-color: #0066cc;
    border-color: #0066cc;
}

/* =========================================
   8. Настройки для печати
   ========================================= */
@media print {
    body { max-width: 100%; margin: 0; }
    h1, h2 { page-break-after: avoid; }
    .note, .warn, .ok { page-break-inside: avoid; }
}

/* =========================================
   9. Настройки просмотров и скачивания
   ========================================= */

.dl-minimal {
    font-family: "Segoe UI", Arial, sans-serif;
}
.dl-min-link {
    color: #0055aa;
    text-decoration: none;
}
.dl-min-num {
    font-weight: 700;
    color: #ff55aa;
}

/* =========================================
   10. Настройки окна каталога
   ========================================= */
.grid-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        max-width: 512px; /* 940px */
        text-align: center;
        margin: 0 auto;
    }
.card {
        text-align: center;
    }
.card a {
    color: #000;
    text-decoration: none;
    display: block;
}
.card a:hover {
    text-decoration: underline;
}
.card img {
        max-width: 256px; /* 100% */
        height: auto;
        max-height: 256px;  /* 300px */
        object-fit: contain;
        display: block;
        border: 1px solid #eee;
    }
.card .caption {
        margin-top: 12px;
        font-size: 16px;
        line-height: 1.4;
        color: #333;
    }