/* Строгий официальный стиль для блога */

/* Базовые стили */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
}

/* Заголовки - ровно 2 строки */
h1 {
    font-size: 1.8em;
    color: #1a1a1a;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
    font-weight: 600;
    line-height: 1.4;
    min-height: 50px;
    max-height: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

h2 {
    font-size: 1.5em;
    color: #1a1a1a;
    margin: 30px 0 20px 0;
    font-weight: 600;
}

h3 {
    font-size: 1.2em;
    color: #333;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

h4, h5, h6 {
    font-size: 1em;
    color: #333;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

/* Текст */
p {
    margin: 0 0 15px 0;
    color: #444;
}

/* Ссылки */
a {
    color: #0066cc;
    text-decoration: underline;
    transition: color 0.2s ease;
}

a:hover {
    color: #004499;
    text-decoration: none;
}

/* Списки */
ul, ol {
    margin: 15px 0 15px 25px;
    padding: 0;
}

li {
    margin: 8px 0;
    color: #444;
}

/* Карточки статей - строгий стиль */
.info-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 25px;
    margin-bottom: 25px;
}

.info-card h2 {
    font-size: 1.4em;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
    font-weight: 600;
}

.step-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 25px;
    margin-bottom: 25px;
}

.step-number {
    display: inline-block;
    background: #333;
    color: #fff;
    width: 35px;
    height: 35px;
    text-align: center;
    line-height: 35px;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.step-title {
    font-size: 1.4em;
    color: #1a1a1a;
    margin-left: 10px;
    font-weight: 600;
    display: inline-block;
    vertical-align: middle;
}

.image-preview {
    float: left;
    margin: 0 20px 15px 0;
    max-width: 300px;
    border: 1px solid #ddd;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.step-description {
    overflow: hidden;
}

.step-description p {
    margin-bottom: 12px;
}

.step-description ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.note {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    margin-top: 15px;
}

.challenge-box {
    background: #ffebee;
    border-left: 4px solid #f44336;
    padding: 15px 20px;
    margin: 20px 0;
}

.challenge-box h3 {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #c62828;
    font-weight: 600;
}

.solution-box {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 15px 20px;
    margin: 20px 0;
}

.solution-box h3 {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #2e7d32;
    font-weight: 600;
}

.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 15px 0;
}

.info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin: 15px 0;
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .two-columns {
        grid-template-columns: 1fr;
    }
}

ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 8px;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #333;
    color: #fff;
    font-weight: 600;
}

table tr:hover {
    background: #f5f5f5;
}

/* Кнопки */
.button {
    display: inline-block;
    background: #333;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    transition: background 0.2s ease;
}

.button:hover {
    background: #555;
    text-decoration: none;
}

/* Навигация */
nav {
    background: #333;
    padding: 15px 20px;
    margin-bottom: 30px;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin-right: 20px;
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

/* Футер */
footer {
    background: #333;
    color: #ccc;
    padding: 20px;
    text-align: center;
    margin-top: 40px;
}

footer a {
    color: #fff;
}

/* Адаптивность */
@media (max-width: 768px) {
    .image-preview {
        float: none;
        display: block;
        max-width: 100%;
        margin: 0 0 20px 0;
    }
    
    h1 {
        font-size: 1.6em;
    }
    
    .step-title {
        font-size: 1.2em;
    }
    
    .container {
        padding: 15px;
    }
}

/* Блог пост */
.intro {
    background: #f0f0f0;
    padding: 15px;
    margin-bottom: 30px;
    border-left: 3px solid #333;
}

.previous-post {
    background: #f8f8f8;
    padding: 20px;
    margin: 30px 0;
    border-left: 4px solid #0066cc;
}

.results-box {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    margin: 30px 0;
}

/* Сильные элементы */
strong, b {
    font-weight: 600;
    color: #1a1a1a;
}

/* Код */
code {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

pre {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
}

pre code {
    border: none;
    padding: 0;
    background: none;
}

/* Разделители */
hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}
