/*
Theme Name: KRU Blog
Theme URI: https://kru-web.ru
Author: WP Site Manager
Description: Тема блога «Bloggar» с реестром слотов и CSS-переменными для кастомизации.
Version: 1.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: kru-blog
*/

:root {
    --button-color: #2F5FDD;
    --link-color: #2F5FDD;
    --accent-color: #2F5FDD;
    --accent-color-soft: #EAF0FE;
}

body {
    font-family: "Nunito Sans", sans-serif;
    color: #777777;
    background-color: #fff;
    font-size: 1rem;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Nunito Sans", sans-serif;
    color: #14213D;
}

a {
    transition: color .2s ease;
}

/* ==================== Header ==================== */
.bl-header {
    border-bottom: 1px solid #F0F1F3;
}

.bl-navbar {
    padding: 18px 0;
    position: relative;
}

.bl-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.bl-brand__logo {
    width: auto;
    height: 100px;
    object-fit: contain;
}

.bl-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bl-nav .nav-link {
    padding: 8px 16px !important;
    font-weight: 600;
    color: #14213D;
    position: relative;
}

.bl-nav .nav-link.active,
.bl-nav .nav-link:hover {
    color: var(--accent-color);
}

.bl-nav .nav-link.active::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -2px;
    height: 2px;
    background: var(--accent-color);
}

.bl-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bl-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #14213D;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.bl-icon-btn:hover {
    background: var(--accent-color-soft);
    color: var(--accent-color);
}

#kru_nav_toggle {
    display: none;
}

@media (max-width: 991px) {
    #kru_nav_toggle {
        display: flex;
    }
}

.bl-search-box {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid #F0F1F3;
    box-shadow: 0 12px 24px rgba(20, 33, 61, .08);
    padding: 16px 0;
    z-index: 20;
}

.bl-search-box.show {
    display: block;
}

.bl-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #E5E7EB;
    border-radius: 30px;
    padding: 6px 8px 6px 20px;
}

.bl-search-form input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
}

.bl-search-form button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--accent-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 991px) {
    .bl-nav-collapse {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 16px;
    }

    .bl-nav-collapse.show {
        display: block;
    }

    .bl-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .bl-nav .nav-link.active::after {
        display: none;
    }
}

/* ==================== Badge ==================== */
.bl-badge {
    display: inline-block;
    background: var(--accent-color-soft);
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2px;
    padding: 6px 14px;
    border-radius: 20px;
}

/* ==================== Hero (4 последних статьи) ==================== */
.bl-hero {
    padding: 40px 0;
}

.bl-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.bl-card:hover {
    color: inherit;
    text-decoration: none;
}

.bl-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #777777;
}

.bl-card__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 4px;
}

.bl-card__dot {
    opacity: .6;
}

.bl-card--large,
.bl-card--wide {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.bl-card--large {
    min-height: 590px;
}

.bl-card--wide {
    min-height: 278px;
}

.bl-card--large::before,
.bl-card--wide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 15, 30, .8), rgba(10, 15, 30, 0) 65%);
}

.bl-card--large .bl-card__scrim,
.bl-card--wide .bl-card__scrim {
    position: relative;
    width: 100%;
    padding: 28px;
}

.bl-card--large .bl-card__title {
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    margin: 12px 0 10px;
}

.bl-card--wide .bl-card__title--sm {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    margin: 10px 0;
}

.bl-card__excerpt {
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
    margin: 0 0 14px;
}

.bl-card--large .bl-card__meta,
.bl-card--wide .bl-card__meta {
    color: rgba(255, 255, 255, .85);
}

.bl-card--small {
    display: block;
}

.bl-card--small .bl-card__image {
    position: relative;
    height: 130px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 0 0 0 14px;
}

.bl-card--small .bl-card__image .bl-badge {
    position: relative;
    top: 14px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(20, 33, 61, .12);
}

.bl-card--small .bl-card__body {
    padding: 22px 4px 0;
}

.bl-card--small .bl-card__title--xs {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 8px;
    color: #14213D;
}

@media (max-width: 767px) {
    .bl-card--large {
        min-height: 380px;
    }

    .bl-card--wide {
        min-height: 220px;
    }
}

/* ==================== Breaking News (свайпер с автопрокруткой) ==================== */
.bl-breaking {
    padding: 0 0 40px;
}

.bl-breaking__label {
    margin-top: 60px;
    display: inline-block;
    position: relative;
    z-index: 1;
    background: var(--accent-color);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 22px;
    border-radius: 8px 8px 0 0;
    margin-bottom: -1px;
}

.bl-breaking__box {
    background: #F6F7FB;
    border-radius: 0 12px 12px 12px;
    padding: 0 12px;
}

.bl-breaking-slider {
    margin: 0 -12px;
}

.bl-breaking-slider .slick-slide {
    outline: none;
}

.bl-breaking-item {
    border-right: 1px solid #E7E7EF;
}

.bl-breaking-item__link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.bl-breaking-item__image {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}

.bl-breaking-item__date {
    font-size: 14px;
    color: #9AA0AB;
    margin-bottom: 8px;
}

.bl-breaking-item__title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    color: #14213D;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 575px) {
    .bl-breaking-item {
        border-right: none;
        border-bottom: 1px solid #E7E7EF;
    }
}

/* ==================== Секция «Популярное» ==================== */
.bl-section-title {
    margin-bottom: 30px;
}

.bl-section-title h2 {
    font-size: 30px;
    font-weight: 800;
    margin: 0 0 12px;
}

.bl-section-title__bars {
    display: flex;
    gap: 6px;
}

.bl-section-title__bars span {
    display: block;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.bl-section-title__bars span:first-child {
    width: 50px;
}

.bl-section-title__bars span:last-child {
    width: 22px;
}

.bl-badge--solid {
    position: absolute;
    left: 16px;
    top: 16px;
    background: var(--accent-color);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .3px;
    border-radius: 4px;
}

.bl-pop-card {
    padding-bottom: 24px;
    border-bottom: 1px solid #EEEEF2;
}

.bl-pop-card__image {
    position: relative;
    display: block;
    height: 240px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    margin-bottom: 18px;
}

.bl-pop-card__title {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 12px;
}

.bl-pop-card__title a {
    color: #14213D;
    text-decoration: none;
}

.bl-pop-card__title a:hover {
    color: var(--accent-color);
}

.bl-pop-card .bl-card__meta {
    margin-bottom: 14px;
}

.bl-pop-card .bl-card__meta span:nth-child(2),
.bl-reco-card .bl-card__meta span:nth-child(2) {
    color: var(--accent-color);
}

.bl-pop-card__excerpt {
    font-size: 14px;
    margin: 0;
}

/* ==================== Секция «Рекомендуем» ==================== */
.bl-recommended {
    padding: 10px 0 50px;
}

.bl-reco-card__image {
    position: relative;
    display: block;
    height: 190px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    margin-bottom: 18px;
}

.bl-reco-card__title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 12px;
}

.bl-reco-card__title a {
    color: #14213D;
    text-decoration: none;
}

.bl-reco-card__title a:hover {
    color: var(--accent-color);
}

/* ==================== Сайдбар главной ==================== */
.bl-widget {
    background: #fff;
    margin-bottom: 30px;
}

.bl-widget__title {
    font-size: 20px;
    font-weight: 800;
    color: #14213D;
    margin: 0 0 12px;
}

.bl-widget__bar {
    position: relative;
    height: 3px;
    background: #EEEEF2;
    border-radius: 2px;
    margin-bottom: 8px;
}

.bl-widget__bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 42px;
    background: var(--accent-color);
    border-radius: 2px;
}

.bl-cat-list {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}

.bl-cat-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #EEEEF2;
}

.bl-cat-list li:first-child {
    padding-top: 0;
}

.bl-cat-list a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #14213D;
    font-weight: 600;
    text-decoration: none;
}

.bl-cat-list a:hover {
    color: var(--accent-color);
}

.bl-cat-list__chevron {
    color: #B7BAC5;
    font-size: 18px;
    line-height: 1;
}

.bl-cat-list__count {
    color: #9AA0AB;
    font-size: 14px;
}

.bl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.bl-tags a {
    display: inline-block;
    background: var(--accent-color-soft);
    color: var(--accent-color) !important;
    font-size: 13px !important;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
}

.bl-tags a:hover {
    background: var(--accent-color);
    color: #fff !important;
}

.bl-sidebar-banner img {
    width: 100%;
    border-radius: 10px;
}

/* ==================== Footer ==================== */
.bl-footer {
    background: #14213D;
    margin-top: 40px;
}

.bl-footer__title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

.bl-footer__copy {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
}

/* ==================== Комментарии ==================== */
#comments {
    margin-top: 40px;
    padding: 28px;
    background: #fff;
    border: 1px solid #EDEDED;
    border-radius: 12px;
}

#comments .kru-comments__title,
#comments .comment-reply-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
}

#comments .comment-reply-title small a {
    font-size: 13px;
    font-weight: 400;
    margin-left: 8px;
}

#comments .comment-list {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}

#comments .comment-list .comment-body {
    padding: 20px 0;
    border-bottom: 1px solid #F0F0F0;
}

#comments .comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 50px;
}

#comments .comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

#comments .comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

#comments .comment-author .avatar {
    border-radius: 50%;
}

#comments .comment-author .fn {
    font-weight: 700;
    font-style: normal;
    color: #222;
}

#comments .comment-author .says {
    display: none;
}

#comments .comment-metadata {
    font-size: 12px;
    color: #9AA0AB;
}

#comments .comment-metadata a {
    color: inherit;
}

#comments .comment-metadata .edit-link {
    margin-left: 8px;
}

#comments .comment-content p {
    margin: 0 0 8px;
    color: #555;
}

#comments .reply a {
    font-size: 13px;
    font-weight: 600;
    color: var(--button-color);
    text-decoration: none;
}

#comments .comment-notes {
    color: #8A8F98;
    font-size: 14px;
    margin-bottom: 20px;
}

#comments .comment-form-comment,
#comments .comment-form-author,
#comments .comment-form-email,
#comments .comment-form-cookies-consent,
#comments .form-submit {
    margin-bottom: 18px;
}

#comments .comment-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #222;
}

#comments .comment-form input[type="text"],
#comments .comment-form input[type="email"],
#comments .comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #E1E3E8;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}

#comments .comment-form input[type="text"]:focus,
#comments .comment-form input[type="email"]:focus,
#comments .comment-form textarea:focus {
    outline: none;
    border-color: var(--button-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .05);
}

#comments .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

#comments .comment-form-cookies-consent label {
    margin: 0;
    font-weight: 400;
}

#comments #submit {
    background: var(--button-color);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s ease;
}

#comments #submit:hover {
    opacity: .9;
}
