/* Контрастные правки поверх theme-1.css.
   Тема собрана под тёмный акцент, а фирменный оранжевый #FDAC53 светлый:
   белый текст на нём даёт контраст 1.9:1. Поэтому на оранжевых заливках
   текст тёмный, а ссылки на светлом фоне — #a95500, как на основном сайте. */

:root {
    --bs-link-color: #a95500;
    --bs-link-hover-color: #743900;
}

/* Сайдбар */
.header {
    color: #241202;
}

.header .blog-name,
.header .blog-name a,
.header .bio a,
.header .nav-item .nav-link {
    color: #241202;
}

/* Тема красит пункты меню в rgba(255,255,255,.8) селектором
   `.header .nav-item .nav-link` — на светлом оранжевом они пропадали. */
.header .nav-item .nav-link {
    opacity: 0.8;
}

.header .nav-item .nav-link:hover,
.header .nav-item .nav-link.active {
    color: #241202;
    opacity: 1;
}

.header hr {
    border-color: rgba(36, 18, 2, 0.25);
}

/* Кнопки и пагинация на оранжевой заливке */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.blog-nav .nav-link,
.blog-nav .nav-link:hover {
    color: #212529;
}

.btn-primary:hover {
    background: #fc8807;
    border-color: #fc8807;
}

/* Превью статьи: тема жёстко ограничивала картинку 150px, из-за чего
   схемы на миниатюрах превращались в кашу. */
.blog-list .post-thumb {
    max-width: 100%;
    width: 100%;
    border-radius: 6px;
}

/* Теги статьи над заголовком */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tag {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border: 1px solid rgba(253, 172, 83, 0.55);
    border-radius: 999px;
    background: rgba(253, 172, 83, 0.12);
    color: #a95500;
    font-size: 0.85rem;
    line-height: 1.5;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease,
        transform 0.2s ease;
}

.post-tag:hover,
.post-tag:focus {
    background: #fdac53;
    border-color: #fdac53;
    color: #241202;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Появление статей в списке и мягкая реакция на курсор. */
@keyframes blog-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.blog-list .item {
    animation: blog-fade-up 0.45s ease both;
}

/* Ступенчатая задержка: карточки проявляются одна за другой. */
.blog-list .item:nth-child(2) { animation-delay: 0.06s; }
.blog-list .item:nth-child(3) { animation-delay: 0.12s; }
.blog-list .item:nth-child(4) { animation-delay: 0.18s; }
.blog-list .item:nth-child(5) { animation-delay: 0.24s; }
.blog-list .item:nth-child(6) { animation-delay: 0.30s; }

.blog-list .post-thumb {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-list .item:hover .post-thumb {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(36, 18, 2, 0.18);
}

.blog-list .item .title a {
    background-image: linear-gradient(#fdac53, #fdac53);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 2px;
    transition: background-size 0.25s ease;
    text-decoration: none;
}

.blog-list .item .title a:hover {
    background-size: 100% 2px;
}

/* Уважаем системную настройку «меньше движения». */
@media (prefers-reduced-motion: reduce) {
    .blog-list .item,
    .blog-list .post-thumb,
    .blog-list .item .title a,
    .post-tag {
        animation: none;
        transition: none;
    }
}

/* Фон шапки: техно-сетка и тёплое свечение — та же графика, что на
   иллюстрациях к статьям. Только CSS, без внешних библиотек. */
.cta-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.cta-section > .container {
    position: relative;
    z-index: 1;
}

.cta-section::before {
    content: "";
    position: absolute;
    inset: -40px;
    background-image:
        linear-gradient(rgba(36, 18, 2, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(36, 18, 2, 0.07) 1px, transparent 1px);
    background-size: 36px 36px;
    animation: blog-grid-drift 30s linear infinite;
    z-index: 0;
}

.cta-section::after {
    content: "";
    position: absolute;
    top: -55%;
    left: 50%;
    width: 720px;
    height: 720px;
    margin-left: -360px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(253, 172, 83, 0.38) 0%,
        rgba(253, 172, 83, 0.12) 45%,
        transparent 70%
    );
    animation: blog-glow-float 16s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}

@keyframes blog-grid-drift {
    to {
        background-position: 36px 36px, 36px 36px;
    }
}

@keyframes blog-glow-float {
    from {
        transform: translate3d(-70px, -10px, 0) scale(1);
        opacity: 0.75;
    }
    to {
        transform: translate3d(70px, 20px, 0) scale(1.12);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cta-section::before,
    .cta-section::after {
        animation: none;
    }
}
