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

:root {
    --button-color: #cc0000;
    --link-color: #cc0000;

    /* Кастомизируемые через панель (registry.json colors/fonts) — значения
       ниже дублируют дефолты реестра и переопределяются inc/slots.php. */
    --accent-color: #F4796C;
    --secondary-color: #183354;
    --heading-color: #183354;
    --text-color: #545E69;
    --heading-font-family: 'Manrope', sans-serif;

    /* Структурные токены вёрстки — не завязаны на кастомизацию. */
    --tg-paragraph-color: #545E69;
    --tg-icon-color: #6D757F;
    --tg-border-color: #DFDFDF;
    --tg-heading-font-weight: 700;
    --tg-body-line-height: 1.75;
    --tg-heading-line-height: 1.2;
    --tg-teal: #E8F1F1;
    --tg-cyan: #0dcaf0;
    --tg-white: #ffffff;
    --tg-black: #0C1622;
    --tg-gray: #D9D9D9;
    --tg-gray-two: #BACCE1;
    --tg-gray-three: #F9F9F7;
    --tg-teal-vivid: #34E6D8;
}

/* Hero: 1 крупная карточка + 3 средние справа + баннер под сеткой (5 последних записей) */
.gz-hero {
    padding: 40px 0;
}

.gz-badge {
    display: inline-block;
    background: var(--accent-color);
    color: var(--tg-white);
    font-family: var(--heading-font-family);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}

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

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

.gz-card--large {
    position: relative;
    min-height: 590px;
    border-radius: 12px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.gz-card__scrim {
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0) 75%);
}

.gz-card__title {
    font-family: var(--heading-font-family);
    font-weight: var(--tg-heading-font-weight);
    line-height: var(--tg-heading-line-height);
    color: var(--tg-white);
    font-size: 28px;
    margin: 10px 0 14px;
}

.gz-card__title--sm {
    font-size: 16px;
    margin: 12px 0 10px;
}

.gz-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 11px;
    letter-spacing: .3px;
    color: rgba(255,255,255,.85);
}

.gz-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gz-card--medium {
    background: var(--tg-black);
    border-radius: 10px;
    overflow: hidden;
}

.gz-card--medium .gz-card__image {
    position: relative;
    height: 130px;
    background-size: cover;
    background-position: center;
}

.gz-card--medium .gz-badge {
    position: absolute;
    left: 14px;
    bottom: -14px;
    margin-bottom: 0;
}

.gz-card--medium .gz-card__body {
    padding: 22px 16px 16px;
}

.gz-card--medium .gz-card__title {
    color: var(--tg-white);
}

.gz-card--medium .gz-card__meta {
    color: var(--tg-gray-two);
}

.gz-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    background: var(--tg-teal-vivid);
    border-radius: 14px;
    overflow: hidden;
}

.gz-banner__text {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 32px 40px;
}

.gz-banner__text h3 {
    font-family: var(--heading-font-family);
    font-weight: var(--tg-heading-font-weight);
    color: var(--heading-color);
    font-size: 24px;
    margin: 0;
}

.gz-banner__cta {
    display: inline-block;
    width: fit-content;
    background: var(--accent-color);
    color: var(--tg-white);
    font-family: var(--heading-font-family);
    font-weight: 700;
    font-size: 14px;
    padding: 10px 26px;
    border-radius: 30px;
}

.gz-banner__image {
    flex: 1 1 280px;
    min-height: 160px;
    background-size: cover;
    background-position: center;
}

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

    .gz-banner {
        flex-direction: column;
    }

    .gz-banner--blue {
        margin-bottom: 60px;
    }
}

/* Editors Choice: свайпер со стрелками, 9 случайных записей */
.gz-editors {
    padding: 50px 0;
}

.gz-editors__head,
.gz-bom__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.gz-popular {
    padding: 50px 0;
}

.gz-editors__title,
.gz-popular__title,
.gz-bom__title {
    font-family: var(--heading-font-family);
    font-weight: 800;
    font-size: 28px;
    color: var(--heading-color);
    margin: 0;
}

.gz-editors__arrows {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.gz-editors__arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(244, 121, 108, .35);
    background: var(--tg-white);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.gz-editors__arrow:hover {
    background: var(--accent-color);
    color: var(--tg-white);
}

/* Slick навешивает на кастомные prevArrow/nextArrow свой абсолютный
   позиционинг (как для стрелок поверх слайдера) — отменяем его, кнопки
   должны остаться в потоке шапки блока. */
.gz-editors__arrow.slick-arrow {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}

.gz-editors__arrow.slick-arrow::before {
    content: none !important;
}

.gz-editors__arrow.slick-disabled {
    opacity: .35;
    cursor: default;
}

.gz-editors__rule,
.gz-popular__rule,
.gz-bom__rule {
    position: relative;
    height: 2px;
    background: var(--tg-border-color);
    margin-bottom: 30px;
}

.gz-editors__rule::before,
.gz-popular__rule::before,
.gz-bom__rule::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1px;
    width: 48px;
    height: 4px;
    border-radius: 2px;
    background: var(--accent-color);
}

.gz-editors-slider {
    margin: 0 -10px;
}

.gz-editors-slider .slick-slide {
    outline: none;
}

.gz-editors-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 10px;
}

.gz-editors-item__image {
    display: block;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
}

.gz-badge--muted {
    background: var(--tg-gray-three);
    color: var(--text-color);
}

.gz-editors-item__title {
    font-family: var(--heading-font-family);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
    margin: 8px 0;
}

.gz-editors-item__title a {
    color: var(--heading-color);
    text-decoration: none;
}

.gz-editors-item__title a:hover {
    color: var(--accent-color);
}

.gz-editors-item__date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    letter-spacing: .3px;
    color: var(--tg-icon-color);
}

/* Popular: строки списка (текст слева, картинка справа) */
.gz-popular-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid var(--tg-border-color);
}

.gz-popular-row:first-child {
    padding-top: 0;
}

.gz-popular-row:last-child {
    border-bottom: none;
}

.gz-popular-row__title {
    font-family: var(--heading-font-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.35;
    margin: 8px 0;
}

.gz-popular-row__title a {
    color: var(--heading-color);
    text-decoration: none;
}

.gz-popular-row__title a:hover {
    color: var(--accent-color);
}

.gz-popular-row__date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    letter-spacing: .3px;
    color: var(--tg-icon-color);
}

.gz-popular-row__image {
    display: block;
    width: 140px;
    height: 96px;
    flex-shrink: 0;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}

/* Синий вариант баннера (используется в блоке "Популярное") */
.gz-banner--blue {
    background: var(--tg-cyan);
}

/* Сайдбар: "Горячие категории" + "Популярные записи" */
.gz-sidebar-block {
    margin-bottom: 40px;
}

.gz-sidebar__title {
    font-family: var(--heading-font-family);
    font-weight: 800;
    font-size: 20px;
    color: var(--heading-color);
    margin: 0;
}

.gz-sidebar__rule {
    position: relative;
    height: 2px;
    background: var(--tg-border-color);
    margin: 10px 0 20px;
}

.gz-sidebar__rule::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1px;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--accent-color);
}

.gz-hotcat {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 16px;
    margin-bottom: 14px;
    border-radius: 10px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: var(--tg-white);
    text-decoration: none;
}

.gz-hotcat:last-child {
    margin-bottom: 0;
}

.gz-hotcat::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(12, 22, 34, .6);
}

.gz-hotcat__name,
.gz-hotcat__arrow {
    position: relative;
    z-index: 1;
}

.gz-hotcat__name {
    font-family: var(--heading-font-family);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .4px;
}

.gz-hotcat:hover {
    color: var(--tg-white);
}

.gz-hotcat:hover .gz-hotcat__arrow {
    color: var(--accent-color);
}

.gz-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gz-tags a {
    display: inline-block;
    background: var(--tg-gray-three);
    color: var(--text-color);
    font-size: 12px !important;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 20px;
    text-decoration: none;
}

.gz-tags a:hover {
    background: var(--accent-color);
    color: var(--tg-white);
}

/* Переопределения поверх исходных стилей шаблона — не трогаем сжатый assets/css/styles.css,
   накладываем слой переменных сверху (подключается позже в functions.php). */
.btn-primary,
.btn-social:hover {
    background-color: var(--button-color) !important;
    border-color: var(--button-color) !important;
}

.text-primary {
    color: var(--button-color) !important;
}

a:hover,
.dropdown-item:hover {
    color: var(--link-color) !important;
}

.card__post__category {
    color: #fff !important;
}

.widget ul li {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.wrapper__footer {
    margin-top: 60px;
}

.bg__footer-dark {
    background-color: var(--secondary-color) !important;
}

.wrapper__footer-bottom .border-top-1 {
    border-top-color: rgba(255, 255, 255, .12) !important;
}

/* Страница рубрики/архива: крошки, H1, сетка карточек, пагинация */
.gz-archive {
    padding-bottom: 60px;
}

.gz-archive .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 10px;
}

.gz-archive .breadcrumb-item + .breadcrumb-item::before {
    content: '\00BB';
}

.gz-archive .breadcrumb-item.active {
    color: var(--accent-color);
}

.gz-archive__title {
    font-family: var(--heading-font-family);
    font-weight: 800;
    font-size: 30px;
    color: var(--heading-color);
    margin: 0 0 30px;
}

.gz-archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
}

.gz-pagination {
    margin-top: 34px;
}

.gz-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gz-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--tg-border-color);
    color: var(--heading-color);
    font-family: var(--heading-font-family);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.gz-pagination .page-numbers.current {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--tg-white);
}

.gz-pagination .page-numbers:not(.current):hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

@media (max-width: 767px) {
    .gz-archive-grid {
        grid-template-columns: 1fr;
    }
}

/* Кнопка-аутлайн ("Все записи", "Читать далее") */
.gz-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: var(--tg-white);
    border: 1px solid var(--tg-border-color);
    border-radius: 8px;
    padding: 10px 18px;
    font-family: var(--heading-font-family);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .3px;
    color: var(--heading-color);
    text-decoration: none;
}

.gz-btn-outline svg {
    color: var(--accent-color);
}

.gz-btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--heading-color);
    text-decoration: none;
}

/* Лучшее за месяц: крупный анонс + сетка из 3 карточек */
.gz-bom {
    padding: 50px 0;
}

.gz-bom-feature {
    display: flex;
    gap: 34px;
    margin-bottom: 40px;
}

.gz-bom-feature__image {
    display: block;
    flex: 0 0 42%;
    min-height: 320px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
}

.gz-bom-feature__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.gz-bom-feature__body .gz-badge,
.gz-bom-feature__body .gz-btn-outline {
    align-self: flex-start;
}

.gz-bom-feature__title {
    font-family: var(--heading-font-family);
    font-weight: 800;
    font-size: 26px;
    line-height: 1.25;
    margin: 14px 0;
}

.gz-bom-feature__title a {
    color: var(--heading-color);
    text-decoration: none;
}

.gz-bom-feature__title a:hover {
    color: var(--accent-color);
}

.gz-bom-feature__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 12px;
    letter-spacing: .3px;
    color: var(--tg-icon-color);
    margin-bottom: 16px;
}

.gz-bom-feature__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gz-bom-feature__excerpt {
    color: var(--tg-paragraph-color);
    line-height: var(--tg-body-line-height);
    margin-bottom: 22px;
}

.gz-bom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.gz-bom-card__image {
    position: relative;
    display: block;
    height: 190px;
    border-radius: 10px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    margin-bottom: 14px;
}

.gz-bom-card__image .gz-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    margin-bottom: 0;
}

.gz-bom-card__title {
    font-family: var(--heading-font-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.35;
    margin: 0 0 10px;
}

.gz-bom-card__title a {
    color: var(--heading-color);
    text-decoration: none;
}

.gz-bom-card__title a:hover {
    color: var(--accent-color);
}

.gz-bom-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 11px;
    color: var(--tg-icon-color);
}

.gz-bom-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 767px) {
    .gz-bom-feature {
        flex-direction: column;
    }

    .gz-bom-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== Комментарии ==================== */
#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;
}
