* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f4f6f8;
    color: #1f2933;
    line-height: 1.6;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER */

.header {
    background: #111827;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
}

/* Ссылка в логотипе */
.logo a {
    color: inherit;       /* наследует цвет заголовка */
    text-decoration: none;
}

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

.nav a {
    margin-right: 20px;
    color: #e5e7eb;
}

.nav a:last-child {
    margin-right: 0;
}

.right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang a {
    font-size: 14px;
    color: #9ca3af;
}

/* Burger */

.burger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

/* Mobile menu */

.mobile-nav {
    display: none;
    flex-direction: column;
    background: #111827;
    padding: 16px 20px;
}

.mobile-nav a {
    color: #e5e7eb;
    padding: 10px 0;
}

.mobile-nav hr {
    border: none;
    border-top: 1px solid #374151;
    margin: 10px 0;
}

/* MAIN */

.posts-centered {
    max-width: 900px;
    margin: 40px auto 0;
}

/* POSTS */

.post-card {
    background: #fff;
    padding: 28px;
    border-radius: 14px;
    margin-bottom: 28px;
    transition: transform .2s, box-shadow .2s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.post-card h2 {
    margin-bottom: 12px;
    font-size: 24px;
}

.excerpt {
    color: #4b5563;
    margin-bottom: 16px;
}

.meta {
    font-size: 14px;
    color: #6b7280;
}

/* ARTICLE PAGE (для отдельной статьи) */

.post-article {
    max-width: 960px;
    margin: 40px auto;
    background: #fff;
    padding: 36px;
    border-radius: 14px;
}

/* Ссылка в заголовке статьи */
.post-article h1 a {
    color: inherit;       /* наследует цвет заголовка */
    text-decoration: none;
}

.post-article h1 a:hover {
    text-decoration: underline;
}

.post-article h1 {
    font-size: 32px;
    margin-bottom: 16px;
}

.post-content {
    font-size: 19px;
    line-height: 1.8;
    color: #1f2933;
}

.post-content p {
    margin-bottom: 16px;
}

.post-content h2,
.post-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
}

.post-content pre {
    background: #f4f4f5;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.post-content code {
    background: #f4f4f5;
    padding: 2px 6px;
    border-radius: 4px;
}

/* FOOTER */

.footer {
    background: #111827;
    color: #9ca3af;
    margin-top: 80px;
    padding: 20px 0;
    text-align: center;
}

/* MOBILE */

@media (max-width: 900px) {
    .nav {
        display: none;
    }

    .burger {
        display: block;
    }

    .mobile-nav {
        display: none;
    }
}

.mobile-nav.open {
    display: flex;
}
/* INPUT и TEXTAREA */
input,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;   /* светлая серая граница */
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
    color: #1f2933;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    margin-bottom: 16px;
    font-family: 'Inter', sans-serif;
}

/* Фокус */
input:focus,
textarea:focus {
    border-color: #2563eb;        /* синий акцент */
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Плейсхолдер */
input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

/* Размер textarea по умолчанию */
textarea {
    min-height: 120px;
    resize: vertical; /* можно менять высоту */
}

/* Кнопка отправки формы (пример) */
button,
input[type="submit"] {
    padding: 12px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover,
input[type="submit"]:hover {
    background: #1e40af; /* чуть темнее */
}
/* Ошибка */
input.error,
textarea.error {
    border-color: #ef4444; /* красная граница */
}

input.error:focus,
textarea.error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}
/* Сообщения под полем (опционально) */
.form-message {
    font-size: 14px;
    margin-top: -12px;
    margin-bottom: 12px;
}

.form-message.error {
    color: #ef4444;
}


/* Красный фон/блок — ошибка */
.bg-error {
    background-color: #fee2e2; /* светло-красный фон */
    color: #991b1b; /* темный красный текст */
    padding: 8px 12px;
    border-radius: 6px;
}

/* Зелёный фон/блок — успех */
.bg-success {
    background-color: #dcfce7; /* светло-зелёный фон */
    color: #166534; /* темный зеленый текст */
    padding: 8px 12px;
    border-radius: 6px;
}

/* Контейнер пагинации */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 40px 0;
    font-family: 'Inter', sans-serif;
}

/* Кнопки пагинации */
.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 16px;
    background: #fff;
    color: #2563eb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    min-width: 80px;
    text-align: center;
}

/* Hover для ссылок */
.pagination a:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* Текущая страница */
.pagination span.current {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    cursor: default;
}

/* Заблокированные кнопки (например, нет предыдущей) */
.pagination a.disabled {
    color: #9ca3af;
    border-color: #d1d5db;
    background: #f4f4f8;
    pointer-events: none;
}
.category-header {
    max-width: 960px;         /* совпадает с шириной статей */
    margin: 40px auto 24px;   /* сверху и снизу отступы */
    padding: 16px 20px;
    background: #e0f2fe;      /* светлый голубой фон */
    color: #0369a1;           /* темно-голубой текст */
    border-radius: 12px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}
.breadcrumb-wrapper {
    max-width: 960px;           /* совпадает с шириной контента */
    margin: 16px auto 32px;     /* отступ сверху и снизу */
    padding: 12px 20px;         /* внутренние отступы */
    background-color: #f3f4f6;   /* светло-серый фон */
    border-radius: 12px;         /* скругление */
    border: 1px solid #e5e7eb;  /* очень светлая граница, почти незаметная */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* лёгкая тень */
    font-size: 14px;
    color: #1f2933;             /* тёмный текст */
    display: inline-block;       /* ширина под контент */
}

/* Ссылки внутри breadcrumb */
.breadcrumb-wrapper a {
    color: #2563eb;             /* синий цвет ссылок */
    text-decoration: none;
}

.breadcrumb-wrapper a:hover {
    text-decoration: underline;
}

/* Разделитель */
.breadcrumb-wrapper span.separator {
    margin: 0 6px;
    color: #6b7280;             /* светло-серый разделитель */
}
.link-box {
    max-width: 960px;
    margin: 24px auto;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;     /* аккуратная рамка */
    border-radius: 12px;
}

.link-box-item {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.link-box-item a {
    color: #2563eb;
    font-size: 16px;
    text-decoration: none;
}

.link-box-item a:hover {
    text-decoration: underline;
}

.bb-toolbar {
  margin-bottom: 6px;
}
.bb-toolbar button {
  padding: 4px 8px;
  cursor: pointer;
}
.select-field {
    width: 100%;
    padding: 12px 44px 12px 16px; /* место под стрелку */
    font-size: 16px;
    font-family: 'Inter', sans-serif;

    color: #1f2933;
    background-color: #ffffff;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    appearance: none;        /* убираем стандартную стрелку */
    -webkit-appearance: none;
    -moz-appearance: none;

    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.select-wrapper {
    position: relative;
    max-width: 960px;
}

.select-wrapper::after {
    content: "▾";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #6b7280;
    pointer-events: none;
}
.select-field:hover {
    border-color: #9ca3af;
}

.select-field:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    outline: none;
}
.touch-links {
    max-width: 960px;
    margin: 32px auto;
    padding: 16px;
    background: #f3f4f6;
    border-radius: 16px;
}

.touch-link {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 20px;
    margin-bottom: 12px;

    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;

    font-size: 17px;
    font-weight: 600;

    color: #1f2933;
    text-decoration: none;

    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.touch-link:last-child {
    margin-bottom: 0;
}

.touch-link:hover {
    background: #f9fafb;
}

/* Тач-эффект */
.touch-link:active {
    transform: scale(0.97);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.12);
}

/* Стрелка справа */
.touch-link::after {
    content: "›";
    font-size: 22px;
    color: #9ca3af;
}
.tags {
    margin-top: 20px;
}

.tags strong {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.tag-button {
    display: inline-block;
    margin: 4px 6px 4px 0;
    padding: 6px 12px;
    font-size: 14px;
    color: #fff;
    background-color: #337ab7;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-button:hover {
    background-color: #23527c;
    transform: translateY(-2px);
}
.post-meta {
    margin: 15px 0;
    font-size: 14px;
    color: #555;
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* расстояние между элементами */
    align-items: center;
}

.post-meta .meta-item {
    display: inline-flex;
    align-items: center;
}

.post-meta .meta-item.date::before {
    content: "\1F4C5"; /* иконка календаря */
    margin-right: 5px;
}

.post-meta .meta-item.category::before {
    content: "\1F4D1"; /* иконка категории */
    margin-right: 5px;
}

.post-meta a {
    color: #337ab7;
    text-decoration: none;
    transition: color 0.3s;
}

.post-meta a:hover {
    color: #23527c;
}
.post-divider {
    border: none;
    height: 2px;
    background: linear-gradient(to right, #337ab7, #66c0f4);
    margin: 20px 0;
    border-radius: 1px;
}
