/*
Theme Name: Babooshka Child
Template: twentytwentyfive
Version: 1.1.4
*/

/* Общий контейнер */
.cat-layout {
    display: flex;
    gap: 32px;
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 16px;
    align-items: flex-start;
}

/* Сайдбар */
.cat-sidebar {
    flex: 0 0 260px;
    position: sticky;
    top: 24px;
}

.btn-add {
    display: block;
    padding: 12px 16px;
    background: #fdecec;
    color: #b30000;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 16px;
}
.btn-add:hover { background: #fbdada; }

.cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cat-list li { margin: 0; }
.cat-list a {
    display: block;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
}
.cat-list a:hover {
    background: #f4f4f4;
    color: #b30000;
}

/* Основная часть */
.cat-main { flex: 1; min-width: 0; }

.cat-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 24px;
}
.cat-header h1 {
    font-size: 24px;
    margin: 0 0 6px;
}
.cat-desc { color: #666; font-size: 14px; }

/* Карточка рассказа */
.story-card {
    padding: 24px 0;
    border-bottom: 1px solid #eee;
}
.story-card h2 {
    font-size: 22px;
    margin: 0 0 10px;
    line-height: 1.3;
}
.story-card h2 a {
    color: #1a1a1a;
    text-decoration: none;
}
.story-card h2 a:hover { color: #b30000; }

.story-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 12px;
}
.story-meta a { color: #777; text-decoration: none; }
.story-meta a:hover { color: #b30000; }

.story-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 14px;
}

.story-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: #888;
    flex-wrap: wrap;
}
.story-more {
    margin-left: auto;
    color: #b30000;
    text-decoration: none;
    font-weight: 600;
}
.story-more:hover { text-decoration: underline; }

/* Пагинация */
.cat-pagination { margin: 32px 0; text-align: center; }
.cat-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    background: #f4f4f4;
}
.cat-pagination .current {
    background: #b30000;
    color: #fff;
}

/* Адаптив */
@media (max-width: 860px) {
    .cat-layout {
        flex-direction: column;
        gap: 20px;
    }
    .cat-sidebar {
        flex: none;
        width: 100%;
        position: static;
    }
    .cat-list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .cat-list a {
        background: #f4f4f4;
        padding: 8px 12px;
        font-size: 14px;
    }
    .story-card h2 { font-size: 19px; }
    .story-more { margin-left: 0; }
}


.site-header * {
    box-sizing: border-box;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    width: 100%;
}

.site-header .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-header .site-logo a {
    display: flex;
    align-items: center;
    text-decoration: none !important;
}

.site-header .site-logo img {
    height: 60px;
    width: auto;
    display: block;
    max-width: none;
}

.site-header .header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-header .btn-top10 {
    display: inline-block;
    background: #b30000;
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none !important;
    white-space: nowrap;
    border: none;
}
.site-header .btn-top10:hover {
    background: #8a0000;
    color: #fff !important;
}

.site-header .header-search {
    display: flex;
    align-items: stretch;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
    margin: 0;
}
.site-header .header-search input[type="search"] {
    border: none;
    outline: none;
    background: transparent;
    padding: 10px 14px;
    font-size: 14px;
    width: 220px;
    color: #333;
    box-shadow: none;
}
.site-header .header-search input[type="search"]::placeholder {
    color: #999;
}
.site-header .header-search button {
    border: none;
    background: #333;
    color: #fff !important;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 0;
}
.site-header .header-search button:hover {
    background: #000;
}
.site-header .search-icon {
    font-size: 13px;
}

@media (max-width: 860px) {
    .site-header .header-inner { flex-wrap: wrap; gap: 12px; }
    .site-header .site-logo { flex: 1 0 auto; }
    .site-header .header-actions { flex: 1 0 100%; justify-content: space-between; }
    .site-header .header-search { flex: 1; }
    .site-header .header-search input[type="search"] { width: 100%; min-width: 0; }
}

@media (max-width: 480px) {
    .site-header .site-logo img { height: 44px; }
    .site-header .btn-top10 { padding: 8px 16px; font-size: 14px; }
    .site-header .header-search button .search-icon { display: none; }
}

.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
}

/* ===== Стили для страницы одной записи (single.php) ===== */

.story-single {
    padding-top: 8px;
}

.story-single .cat-header {
    border-bottom: none;
    margin-bottom: 8px;
    padding-bottom: 0;
}
.story-single .cat-header h1 {
    font-size: 28px;
    line-height: 1.3;
}

.story-thumb {
    margin: 16px 0 20px;
}
.story-thumb img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.story-content {
    font-size: 16px;
    line-height: 1.75;
    color: #222;
}
.story-content p {
    margin: 0 0 18px;
}
.story-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.story-content h2,
.story-content h3 {
    margin: 28px 0 12px;
    line-height: 1.3;
}
.story-content blockquote {
    margin: 20px 0;
    padding: 12px 20px;
    border-left: 3px solid #b30000;
    background: #fafafa;
    color: #555;
    font-style: italic;
}

/* Навигация между записями */
.story-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 32px 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
}
.story-nav a {
    color: #b30000;
    text-decoration: none;
    font-weight: 600;
}
.story-nav a:hover {
    text-decoration: underline;
}
.story-nav-next {
    text-align: right;
    margin-left: auto;
}

/* Блок комментариев */
.story-comments {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

@media (max-width: 860px) {
    .story-single .cat-header h1 { font-size: 22px; }
    .story-nav { flex-direction: column; gap: 8px; }
    .story-nav-next { text-align: left; margin-left: 0; }
}

/* ===== Карточный дизайн секций (переопределяет предыдущие правила .cat-header / .story-card) ===== */

.cat-header {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.cat-header h1 {
    color: #b30000;
    font-size: 26px;
    margin: 0;
}
.cat-desc {
    margin-top: 8px;
}

.story-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}

.story-meta .cat-tags a::before {
    content: "📁 ";
}
.story-meta .cat-tags a:first-child::before {
    content: "📁 ";
}
.story-meta .cat-tags a:not(:first-child)::before {
    content: "";
}

.story-more {
    text-decoration: none;
}
.story-more:hover {
    text-decoration: underline;
}

/* ===== Топ за месяц ===== */

.top-month {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}

.top-month-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
}
.top-month-header h2 {
    margin: 0;
    font-size: 20px;
    color: #b30000;
}
.top-month-sub {
    font-size: 13px;
    color: #999;
}

.top-month-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.top-month-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #eee;
    border-radius: 10px;
    text-decoration: none;
    color: #222;
    transition: border-color .15s ease, background .15s ease;
}
.top-month-card:hover {
    border-color: #b30000;
    background: #fdf7f7;
}
.top-month-card.is-featured {
    border-color: #b30000;
    box-shadow: 0 0 0 1px #b30000 inset;
}

.top-month-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.top-month-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: #222;
}

.top-month-rank {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    color: #b30000;
    border: 1px solid #f0c9c9;
    background: #fff5f5;
    white-space: nowrap;
}
.top-month-rank.rank-1 {
    background: #b30000;
    color: #fff;
    border-color: #b30000;
}

@media (max-width: 700px) {
    .top-month-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Лайк / Дизлайк ===== */

.vote-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #eee;
    background: #fff;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.vote-btn:hover {
    border-color: #b30000;
}
.vote-btn:disabled {
    opacity: .6;
    cursor: default;
}

.vote-like.is-active {
    background: #fdecec;
    border-color: #b30000;
    color: #b30000;
}
.vote-dislike.is-active {
    background: #eef1f4;
    border-color: #555;
    color: #333;
}

.vote-icon {
    font-size: 14px;
    line-height: 1;
}
.vote-count {
    font-weight: 600;
    min-width: 14px;
    text-align: left;
}

/* ===== Фикс выравнивания заголовка и мета-строки на странице записи ===== */

.story-single .cat-header {
    margin: 0;
    padding: 0 0 12px;
    border: none;
}
.story-single .cat-header h1 {
    margin: 0;
    padding: 0;
    text-indent: 0;
}

.story-meta {
    margin: 0 0 16px;
}
.story-meta .cat-tags {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ===== Читаемость текста записи ===== */
/* Контент часто идёт одиночными переносами строк (<br>) без пустой строки
   между репликами — из-за этого текст выглядит слитным. Правило ниже
   принудительно даёт видимый отступ после каждого переноса строки,
   независимо от того, размечен текст через <p> или через <br>. */

.story-content {
    font-size: 17px;
    line-height: 1.9;
    color: #222;
}

.story-content br {
    content: "";
    display: block;
    margin-bottom: 14px;
}

.story-content p {
    margin: 0 0 20px;
}
.story-content p:last-child {
    margin-bottom: 0;
}

/* ===== Топ-10 (страница /top-10/) ===== */

.top10-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.top10-item {
    display: flex;
    gap: 18px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 20px;
}

.top10-rank {
    flex-shrink: 0;
    width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.top10-rank-icon {
    font-size: 26px;
    line-height: 1;
}
.top10-rank-num {
    font-size: 13px;
    font-weight: 700;
    color: #b30000;
    background: #fff5f5;
    border: 1px solid #f0c9c9;
    border-radius: 6px;
    padding: 2px 8px;
}
.top10-rank.rank-1 .top10-rank-num {
    background: #b30000;
    color: #fff;
    border-color: #b30000;
}

.top10-body {
    flex: 1;
    min-width: 0;
}

.top10-title {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.3;
}
.top10-title a {
    color: #1a1a1a;
    text-decoration: none;
}
.top10-title a:hover {
    color: #b30000;
}

.top10-item .story-meta {
    margin: 0 0 10px;
}
.top10-item .story-excerpt {
    margin-bottom: 14px;
}
.top10-item .story-footer {
    font-size: 13px;
}

@media (max-width: 600px) {
    .top10-item {
        flex-direction: column;
        gap: 10px;
    }
    .top10-rank {
        flex-direction: row;
        width: auto;
        justify-content: flex-start;
    }
}

/* ===== 404 ===== */

.error-404-card {
    text-align: center;
    padding: 60px 32px;
}
.error-404-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.error-404-title {
    margin: 0 0 10px;
    font-size: 26px;
    color: #b30000;
}
.error-404-text {
    color: #666;
    font-size: 15px;
    max-width: 420px;
    margin: 0 auto 24px;
    line-height: 1.6;
}
.error-404-search {
    max-width: 360px;
    margin: 0 auto 20px;
}
.error-404-home {
    display: inline-block;
}

/* ===== Layout: сайдбар + контент ===== */

.cat-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cat-sidebar {
    flex: 0 0 260px;
    min-width: 0;
}

.cat-main {
    flex: 1;
    min-width: 0;
}

/* Список рубрик на десктопе */
.cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cat-list li {
    margin: 0 0 2px;
}
.cat-list a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}
.cat-list a:hover {
    background: #f5f5f5;
    color: #b30000;
}

.btn-add {
    display: block;
    text-align: center;
    background: #fdecec;
    color: #b30000 !important;
    font-weight: 700;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none !important;
    margin-bottom: 16px;
}
.btn-add:hover {
    background: #fbdcdc;
}

/* Мобильный выпадающий список — скрыт на десктопе */
.cat-select-wrap {
    display: none;
}
.cat-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 15px;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23999'%3E%3Cpath d='M5.5 7.5l4.5 4.5 4.5-4.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 36px;
}

/* ===== Мобильный режим: список -> выпадающий список, сайдбар вниз ===== */
@media (max-width: 860px) {
    .cat-layout {
        flex-direction: column;
        padding: 16px;
    }

    .cat-main {
        order: 1;
        width: 100%;
    }

    .cat-sidebar {
        order: 2;
        width: 100%;
        flex: none;
        margin-top: 8px;
    }

    .cat-sidebar .btn-add {
        margin-bottom: 12px;
    }

    /* Прячем "пилюли"/список ссылок на мобильном */
    .cat-sidebar .cat-list {
        display: none;
    }

    /* Показываем обычный select вместо них */
    .cat-sidebar .cat-select-wrap {
        display: block;
    }
}

/* ===== Сайдбар: рамка + крупнее и жирнее шрифт (десктоп/планшет) ===== */

.cat-sidebar {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 16px;
}

.cat-list a {
    font-size: 15px;
    font-weight: 600;
}

@media (max-width: 860px) {
    /* На мобильном сайдбар теперь просто селект — рамка карточки не нужна */
    .cat-sidebar {
        border: none;
        padding: 0;
        background: transparent;
    }
}

/* ===== Футер ===== */

.site-footer {
    background: #1a1a1a;
    color: #ccc;
    margin-top: 32px;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
}

.site-footer-copy {
    margin: 0;
    color: #999;
}

.site-footer-nav a {
    color: #ccc;
    text-decoration: none;
}
.site-footer-nav a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Скрыто визуально, но остаётся в DOM и продолжает работать (счётчик) */
.visually-hidden-counter {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Плашка подтверждения 18+ ===== */

body.age-gate-locked {
    overflow: hidden;
}

.age-gate {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.age-gate-box {
    background: #fff;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    padding: 36px 28px;
    text-align: center;
}

.age-gate-icon {
    font-size: 46px;
    margin-bottom: 12px;
    line-height: 1;
}

.age-gate-box h2 {
    margin: 0 0 12px;
    font-size: 20px;
    color: #b30000;
    line-height: 1.3;
}

.age-gate-box p {
    margin: 0 0 26px;
    color: #555;
    font-size: 14px;
    line-height: 1.55;
}

.age-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.age-gate-actions .btn-top10 {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    border: none;
    outline: none;
    background: #b30000 !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    padding: 13px 22px;
    border-radius: 999px;
    cursor: pointer;
    text-align: center;
    text-decoration: none !important;
}
.age-gate-actions .btn-top10:hover {
    background: #8a0000 !important;
}

.age-gate-leave {
    display: block;
    color: #999 !important;
    font-size: 13px;
    text-decoration: underline !important;
}
.age-gate-leave:hover {
    color: #666 !important;
}

/* ===== Опис рубрики (нижня секція) ===== */

.cat-full-desc-title {
    margin: 0 0 14px;
    font-size: 18px;
    color: #b30000;
}

.cat-desc-toggle {
    -webkit-appearance: none;
    appearance: none;
    display: inline-block;
    border: 1px solid #b30000;
    background: #fff;
    color: #b30000;
    font-weight: 700;
    font-size: 14px;
    padding: 9px 20px;
    border-radius: 999px;
    cursor: pointer;
    margin-bottom: 14px;
}
.cat-desc-toggle:hover {
    background: #fdecec;
}

.cat-desc-full-text {
    font-size: 15px;
    line-height: 1.75;
    color: #444;
}
.cat-desc-full-text p {
    margin: 0 0 16px;
}
.cat-desc-full-text p:last-child {
    margin-bottom: 0;
}

/* Короткий тизер под заголовком рубрики */
.cat-desc {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}
.cat-desc p {
    margin: 0;
}

/* ===== SEO-текст на главной (над футером) ===== */
 
.seo-text-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

/* ===== SEO-текст на главной (над футером)2 ===== */

  .welcome-block {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.7;
    color: #2b2b2b;
  }

  .welcome-block h1 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: #b3003c;
  }

  .welcome-block h2 {
    font-size: 1.4rem;
    margin-top: 28px;
    margin-bottom: 12px;
    color: #333;
  }

  .welcome-block .intro,
  .welcome-block .manifesto,
  .welcome-block .cta {
    font-size: 1.05rem;
    margin-bottom: 16px;
  }

  .features-list,
  .benefits-list {
    list-style: none;
    padding-left: 0;
  }

  .features-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .features-list .emoji {
    margin-right: 8px;
  }

  .benefits-list li {
    padding: 6px 0 6px 24px;
    position: relative;
  }

  .benefits-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #b3003c;
  }

  .age-warning {
    background: #fff4f4;
    border-left: 4px solid #b3003c;
    padding: 12px 16px;
    margin: 24px 0;
    font-size: 1rem;
    border-radius: 4px;
  }

  .cta {
    font-weight: 500;
    background: #fafafa;
    padding: 16px;
    border-radius: 6px;
  }

  @media (max-width: 600px) {
    .welcome-block h1 { font-size: 1.5rem; }
    .welcome-block h2 { font-size: 1.2rem; }
  }

 
