/*
 Theme Name:   Reboot Child
 Theme URI:    https://wpshop.ru/themes/reboot
 Description:  Дочерняя тема Reboot с кастомными блоками: автор, содержание, связанные статьи, кокон-перелинковка, кастомный футер, Feedback WP стили.
 Author:       Ulia
 Author URI:   https://example.com
 Template:     reboot
 Version:      1.1.1
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  reboot-child
*/

/* ==========================================================================
   БЕЙДЖ РЕЕСТРА НОПРИЗ/НОСТРОЙ
   ========================================================================== */

.author-inject__registry-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 5px 12px;
    color: #6050da;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.author-inject__registry-badge:hover {
    color: #634fe0;
    transform: translateY(-1px);
}

.author-inject__registry-icon {
    flex-shrink: 0;
}

.author-inject__registry-external {
    flex-shrink: 0;
    opacity: 0.7;
    margin-left: 2px;
}

/* Вариант для НОСТРОЙ (можно сделать другой цвет) */
.author-inject__registry-badge--nostroy {
    background: linear-gradient(135deg, #b7472a 0%, #d35400 100%);
}

.author-inject__registry-badge--nostroy:hover {
    background: linear-gradient(135deg, #d35400 0%, #b7472a 100%);
}

/* Мобильные */
@media (max-width: 480px) {
    .author-inject__registry-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* =====================================================
   1. БЛОК АВТОРА (внутри entry-meta, сверху)
   ===================================================== */

/* entry-meta: flex-wrap чтобы автор занял всю строку, мета — ниже */
.single-post .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Блок автора внутри entry-meta — на всю ширину */
.author-inject {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    flex-basis: 100%;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0;
}

.author-inject__avatar {
    flex-shrink: 0;
}

.author-inject__avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dee2e6;
}

.author-inject__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-inject__name {
    font-size: 17px;
    font-weight: 700;
    color: #212529;
    line-height: 1.3;
}

.author-inject__verified {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    color: #0d6efd;
    font-size: 15px;
}

.author-inject__role {
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.author-inject__desc {
    font-size: 13px;
    color: #495057;
    line-height: 1.4;
    margin-top: 2px;
}

/* Нижний блок автора (после статьи) — без рамки */
.author-inject--bottom {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 20px 0;
    margin-top: 30px;
    margin-bottom: 20px;
}


/* =====================================================
   3. БОКОВОЙ БЛОК "ДРУГИЕ СТАТЬИ"
   ===================================================== */
.sidebar-related {
    background: #f2f5f9;
    border-left: 3px solid #4d3bfe;
    border-radius: 0 12px 12px 0;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-related__title {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #4d3bfe;
}

.sidebar-related__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-related__item {
    margin-bottom: 16px;
}

.sidebar-related__item:last-child {
    margin-bottom: 0;
}

.sidebar-related__link {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.sidebar-related__link:hover {
    opacity: 0.8;
}

.sidebar-related__thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-related__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-related__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-related__link-title {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-related__date {
    font-size: 12px;
    color: #adb5bd;
}

/* =====================================================
   СТРАНИЦА АВТОРА — E-E-A-T
   Замените старые .ap-* стили на эти
   ===================================================== */

.ap { background: #fff; }

/* ═══════ HERO — визитка ═══════ */
.ap-hero {
    padding: 48px 20px 44px;
    position: relative;
    overflow: hidden;
}
.ap-hero::before {
    content: '';
    position: absolute; inset: 0;
}
.ap-hero__inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 32px;
    position: relative;
    z-index: 1;
}
.ap-hero__photo {
    width: 130px; height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.2);
    flex-shrink: 0;
    box-shadow: 0 8px 30px rgba(0,0,0,.3);
}
.ap-hero__name {
    font-size: 1.7em; font-weight: 800;
    color: #0c0c0c; margin: 0 0 4px;
}
.ap-hero__role {
    font-size: .95em; color: #64b5f6;
    margin: 0 0 16px; font-weight: 500;
}

/* Быстрые факты */
.ap-hero__facts {
    display: flex; gap: 24px;
    margin-bottom: 16px;
}
.ap-fact {
    display: flex; flex-direction: column;
}
.ap-fact__num {
    font-size: 1.4em; font-weight: 800; color: #0c0c0c;
    line-height: 1;
}
.ap-fact__label {
    font-size: .75em; color: rgb(0, 0, 0);
    margin-top: 2px;
}

/* Соцсети в hero */
.ap-hero__social { display: flex; gap: 8px; }
.ap-hero__social-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.7);
    transition: all .2s;
}
.ap-hero__social-btn:hover {
    background: #4d3bfe; color: #fff;
    transform: translateY(-2px);
}
.ap-hero__social-btn svg { width: 16px; height: 16px; }


/* ═══════ ОБЩИЕ ═══════ */
.ap-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.ap-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.1em; font-weight: 700;
    color: #1a1a1a; margin: 0 0 16px;
}


/* ═══════ ДВУХКОЛОНКА: Био + Сайдбар ═══════ */
.ap-two-col {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    padding: 36px 0 28px;
}

/* Биография */
.ap-bio__text {
    font-size: .93em; line-height: 1.75; color: #444;
}
.ap-bio__text p { margin: 0 0 12px; }
.ap-bio__text p:last-child { margin-bottom: 0; }

/* Сайдбар */
.ap-sidebar__block {
    background: #f2f5f9;
    border-left: 3px solid #4d3bfe;
    padding: 18px 18px;
    margin-bottom: 14px;
    border-radius: 0 6px 6px 0;
}
.ap-sidebar__title {
    display: flex; align-items: center; gap: 6px;
    font-size: .92em; font-weight: 700;
    color: #1a1a1a; margin: 0 0 10px;
}
.ap-sidebar__list {
    list-style: none; padding: 0; margin: 0;
}
.ap-sidebar__list li {
    position: relative;
    padding: 5px 0 5px 20px;
    font-size: .85em; color: #333;
    border-bottom: 1px solid rgba(0,0,0,.04);
    line-height: 1.5;
}
.ap-sidebar__list li:last-child { border-bottom: none; }
.ap-sidebar__list li::before {
    content: '✓';
    position: absolute; left: 0; top: 5px;
    color: #4d3bfe; font-weight: 700; font-size: .85em;
}

.ap-sidebar__badges {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.ap-sidebar__badge {
    display: inline-block;
    font-size: .78em; color: #4d3bfe;
    background: #fff;
    border: 1px solid #d8dce6;
    border-radius: 14px;
    padding: 4px 10px;
    font-weight: 500;
}


/* ═══════ ОПЫТ — карточки с нумерацией ═══════ */
.ap-exp {
    padding-bottom: 32px;
    border-bottom: 1px solid #e4e7ec;
}
.ap-exp__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.ap-exp__card {
    background: #f2f5f9;
    border-radius: 8px;
    padding: 18px 16px;
    position: relative;
    border: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.ap-exp__card:hover {
    border-color: #4d3bfe;
    box-shadow: 0 4px 12px rgba(77,59,254,.08);
}
.ap-exp__num {
    display: block;
    font-size: 1.8em; font-weight: 800;
    color: rgba(77,59,254,.12);
    line-height: 1; margin-bottom: 6px;
}
.ap-exp__card strong {
    display: block; font-size: .88em;
    color: #1a1a1a; margin-bottom: 4px;
}
.ap-exp__card p {
    font-size: .78em; color: #777;
    margin: 0; line-height: 1.5;
}


/* ═══════ ПУБЛИКАЦИИ — карточки ═══════ */
.ap-posts-section {
    background: transparent;
    padding: 36px 0 50px;
    margin-top: 32px;
}
.ap-posts-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.ap-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.ap-postcard {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .2s, transform .15s;
}
.ap-postcard:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.07);
    transform: translateY(-3px);
}

.ap-postcard__img-link {
    display: block; position: relative;
    overflow: hidden; aspect-ratio: 16 / 10;
}
.ap-postcard__img {
    width: 100% !important; height: 100% !important;
    object-fit: cover; display: block;
    transition: transform .3s;
}
.ap-postcard:hover .ap-postcard__img { transform: scale(1.04); }

.ap-postcard__cat {
    position: absolute; top: 10px; left: 10px;
    background: #4d3bfe; color: #fff;
    font-size: .68em; font-weight: 600;
    padding: 3px 9px; border-radius: 4px;
    text-transform: uppercase; letter-spacing: .03em;
}

.ap-postcard__body { padding: 12px 14px 14px; }
.ap-postcard__title {
    font-size: .88em; font-weight: 700;
    line-height: 1.35; margin: 0 0 6px;
}
.ap-postcard__title a { color: #1a1a1a; text-decoration: none; }
.ap-postcard__title a:hover { color: #4d3bfe; }

.ap-postcard__meta {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 6px;
}
.ap-postcard__views,
.ap-postcard__date {
    font-size: .74em; color: #999;
}
.ap-postcard__excerpt {
    font-size: .8em; line-height: 1.5;
    color: #777; margin: 0;
}

/* Пагинация */
.ap-pag { margin-top: 28px; text-align: center; }
.ap-pag .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px;
    border: 1px solid #e4e7ec; border-radius: 4px;
    font-size: .85em; font-weight: 500;
    color: #333; text-decoration: none;
    margin: 0 2px; transition: all .15s;
}
.ap-pag .page-numbers.current,
.ap-pag .page-numbers:hover {
    background: #4d3bfe; border-color: #4d3bfe; color: #fff;
}


/* ═══════ АДАПТИВ ═══════ */
@media (max-width: 1024px) {
    .ap-cards-grid { grid-template-columns: repeat(3, 1fr); }
    .ap-exp__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .ap-two-col { grid-template-columns: 1fr; }
    .ap-cards-grid { grid-template-columns: 1fr 1fr; }
    .ap-hero__inner { flex-direction: column; text-align: center; }
    .ap-hero__facts { justify-content: center; }
    .ap-hero__social { justify-content: center; }
    .ap-hero__photo { width: 100px; height: 100px; }
}
@media (max-width: 500px) {
    .ap-cards-grid { grid-template-columns: 1fr; }
    .ap-exp__grid { grid-template-columns: 1fr; }
    .ap-hero__name { font-size: 1.3em; }
    .ap-hero { padding: 32px 16px; }
}

.author-inject__avatar {
    flex-shrink: 0;
    text-decoration: none;
}

.author-inject__name-link {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s;
}

.author-inject__name-link:hover {
    color: #4d3bfe;
}

/* =====================================================
   KK STAR RATINGS — ПОЛНЫЙ ИСПРАВЛЕННЫЙ КОД
   Добавить в style.css
   ===================================================== */

/* =====================================================
   KK STAR RATINGS
   ===================================================== */

/* Контейнер */
.kk-star-ratings {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 12px !important;
    padding: 32px 24px !important;
    margin: 40px 0 !important;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(77, 59, 254, 0.1) !important;
    box-shadow: 0 4px 24px rgba(77, 59, 254, 0.08) !important;
}

/* Убираем float у всех элементов */
.kk-star-ratings *,
.kk-star-ratings *::before,
.kk-star-ratings *::after {
    float: none !important;
    box-sizing: border-box !important;
}

/* 1. Заголовок — ВСЕГДА сверху через ::before на контейнере */
.kk-star-ratings::before {
    content: "Была ли эта статья полезна?" !important;
    display: block !important;
    order: -1 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    margin-bottom: 4px !important;
}

/* Скрываем оригинальный .kksr-muted если он есть */
.kk-star-ratings .kksr-muted {
    display: none !important;
}

/* 2. Звёзды — посередине */
.kk-star-ratings .kksr-stars {
    order: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.kk-star-ratings .kksr-group {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.kk-star-ratings .kksr-star {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.2s ease !important;
    margin: 0 2px !important;
    padding: 0 !important;
}

.kk-star-ratings .kksr-star:hover {
    transform: scale(1.15) !important;
}

.kk-star-ratings .kksr-icon {
    display: inline-flex !important;
}

/* 3. Результат (5/5 - 2 голоса) — снизу */
.kk-star-ratings .kksr-legend {
    order: 1 !important;
    font-size: 14px !important;
    color: #6c757d !important;
    font-weight: 400 !important;
    margin-top: 4px !important;
}

/* Адаптив */
@media (max-width: 600px) {
    .kk-star-ratings {
        padding: 24px 16px !important;
        margin: 30px 0 !important;
    }
    
    .kk-star-ratings::before {
        font-size: 16px !important;
    }
}
/* =====================================================
   8. АДАПТИВНОСТЬ
   ===================================================== */
@media (max-width: 992px) {
    .custom-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .read-also__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ea-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .ea-header__photo {
        width: 80px;
        height: 80px;
    }

    .ea-header__stats {
        justify-content: center;
    }

    .ea-post-item__thumb {
        width: 60px;
        height: 45px;
    }

    .ea-social {
        justify-content: center;
    }

    .author-box-custom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .custom-footer__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .read-also__grid {
        grid-template-columns: 1fr;
    }

    .custom-footer__bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .sidebar-related__thumb {
        width: 60px;
        height: 45px;
    }
}