/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://xn--80aautttr.xn--p1ai/
 Description:  Дочерняя тема для GeneratePress
 Author:       Царицынская муза
 Template:     generatepress
 Version:      1.0.0
 Text Domain:  generatepress-child
*/

/* =============================================
   ФИРМЕННЫЕ ЦВЕТА
   ============================================= */

:root {
    --color-brand: #af8c2f;
}

/* =============================================
   ВЕРХНИЙ РЯД: СЛАЙДЕР + НОВОСТИ КУЛЬТУРЫ
   ============================================= */

/* Flex-строка, высота фиксирована */
.home-top-row {
    display: flex;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 48px;
}

/* Слайдер ~65% */
.home-slider-wrap {
    flex: 2 1 0;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.home-slider {
    position: relative;
    width: 100%;
    flex: 1;
    background: #111;
    overflow: hidden;
}

/* Слайд */
.home-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}

.home-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* Фоновое изображение */
.home-slide__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    transition: transform 6s ease;
}

.home-slide.is-active .home-slide__bg {
    transform: scale(1);
}

/* Затемнение */
.home-slide__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.25) 60%, transparent 100%);
}

/* Контент слайда */
.home-slide__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 32px;
    color: #fff;
}

.home-slide__cat {
    display: inline-block;
    background: var(--accent, #c0392b);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 3px 9px;
    border-radius: 3px;
    text-decoration: none;
    margin-bottom: 10px;
}

.home-slide__title {
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 10px;
}

.home-slide__title a {
    color: #fff;
    text-decoration: none;
}

.home-slide__title a:hover {
    text-decoration: underline;
}

.home-slide__excerpt {
    font-size: .9rem;
    line-height: 1.5;
    margin: 0 0 14px;
    opacity: .9;
}

.home-slide__btn {
    display: inline-block;
    padding: 7px 18px;
    border: 2px solid #fff;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 3px;
    transition: background .2s, color .2s;
}

.home-slide__btn:hover {
    background: #fff;
    color: #111;
}

/* Стрелки */
.home-slider-prev,
.home-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.4);
    border: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    width: 40px;
    height: 52px;
    cursor: pointer;
    border-radius: 3px;
    transition: background .2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-slider-prev { left: 10px; }
.home-slider-next { right: 10px; }

.home-slider-prev:hover,
.home-slider-next:hover {
    background: rgba(0,0,0,.7);
}

/* Точки */
.home-slider-dots {
    position: absolute;
    bottom: 14px;
    right: 18px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.home-slider-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}

.home-slider-dot.is-active {
    background: #fff;
    border-color: #fff;
}

/* =============================================
   БЛОК НОВОСТИ КУЛЬТУРЫ (~1/3)
   ============================================= */

.home-news-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    overflow: hidden;
}

.home-news-col__heading {
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0;
    padding: 14px 16px 12px;
    background: #d9c797;
}

.home-news-col__heading a {
    color: #fff;
    text-decoration: none;
}

.home-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-news-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}

.home-news-item:last-child {
    border-bottom: none;
}

.home-news-item:hover {
    background: #fafafa;
}

.home-news-item__thumb {
    flex-shrink: 0;
    display: block;
    width: 72px;
    height: 56px;
    overflow: hidden;
}

.home-news-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.home-news-item:hover .home-news-item__thumb img {
    transform: scale(1.07);
}

.home-news-item__body {
    flex: 1;
    min-width: 0;
}

.home-news-item__date {
    display: block;
    font-size: .68rem;
    color: #999;
    margin-bottom: 4px;
}

.home-news-item__title {
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-news-item__title a {
    color: #333;
    text-decoration: none;
}

.home-news-item__title a:hover {
    color: var(--accent, #c0392b);
}

.home-news-col__more {
    display: block;
    text-align: center;
    padding: 10px 14px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--accent, #c0392b);
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
    transition: background .15s;
}

.home-news-col__more:hover {
    background: #fdf0f0;
}

/* =============================================
   ОТБИВКА СЕКЦИЙ
   ============================================= */

.home-section-divider {
    display: flex;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
    gap: 14px;
}

.home-section-divider span {
    font-size: 1.15rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--color-brand);
}

.home-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-brand);
}

/* =============================================
   ЛЕНТА ПОСТОВ
   ============================================= */

/* =============================================
   ЛЕНТА ПОСТОВ
   ============================================= */

.home-feed {
    padding-top: 8px;
    padding-bottom: 20px;
}

.home-feed__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}

/* Карточка поста */
.home-card {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}

.home-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.13);
    transform: translateY(-3px);
}

.home-card__thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.home-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.home-card:hover .home-card__thumb img {
    transform: scale(1.05);
}

.home-card__body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.home-card__cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--accent, #c0392b);
    text-decoration: none;
    margin-bottom: 6px;
    display: inline-block;
}

.home-card__title {
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 7px;
}

.home-card__title a {
    text-decoration: none;
    color: inherit;
}

.home-card__title a:hover {
    color: var(--accent, #c0392b);
}

.home-card__meta {
    font-size: .78rem;
    color: #999;
    margin-bottom: 8px;
}

.home-card__excerpt {
    font-size: .88rem;
    line-height: 1.55;
    color: #555;
    margin: 0;
}

/* Пагинация */
.home-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.home-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #444;
    font-size: .9rem;
    transition: background .15s, color .15s, border-color .15s;
}

.home-pagination .page-numbers.current,
.home-pagination .page-numbers:hover {
    background: var(--accent, #c0392b);
    border-color: var(--accent, #c0392b);
    color: #fff;
}

/* =============================================
   ВИНЬЕТКА — ГЛАВНАЯ СТРАНИЦА
   ============================================= */

/* Золотой виньетка-фон по краям страницы */
body.page-template-page-home-php {
    position: relative;
    background-image:
        radial-gradient(ellipse at 6% 32%, rgba(201,168,76,.13) 0%, transparent 42%),
        radial-gradient(ellipse at 94% 32%, rgba(201,168,76,.09) 0%, transparent 38%);
}


/* =============================================
   ШАПКА: ЛОГОТИП + БАННЕРЫ
   ============================================= */

.inside-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 16px;
}

.header-banners {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header-banners img {
    display: block;
    height: 92px;
    width: auto;
    object-fit: contain;
}

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

    .header-banners {
        flex-direction: column;
        align-items: center;
    }
}

/* =============================================
   АРХИВЫ / РУБРИКИ — 2 КОЛОНКИ
   ============================================= */

.archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.archive-grid .post {
    margin: 0;
}

/* Заголовки статей в сетке архива */
.archive-grid .entry-title {
    font-size: 1.3rem;
}

/* Название рубрики / архива */
.archive .page-header .page-title,
.category .page-header .page-title {
    font-size: 1.5rem;
}

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

/* =============================================
   МЕНЮ ПОД ХЕДЕРОМ
   ============================================= */

.nav-below-header .main-navigation {
    border-top: 1px solid rgba(0, 0, 0, .1);
    margin-bottom: 36px;
}

/* =============================================
   САЙДБАР / ВИДЖЕТЫ
   ============================================= */

.widget-area .widget {
    padding: 20px;
}

.recent-comment__author {
    color: var(--color-brand);
    font-size: 16px;
    line-height: 1.2;
}

/* =============================================
   ФУТЕР: КНОПКА АВТОРИЗАЦИИ
   ============================================= */

.footer-login-btn {
    display: inline-block;
    padding: 3px 12px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 3px;
    font-size: .78rem;
    color: inherit;
    text-decoration: none;
    opacity: .7;
    transition: opacity .2s, border-color .2s;
}

.footer-login-btn:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, .7);
}

/* =============================================
   ЛАЙТБОКС
   ============================================= */

.entry-content img {
    cursor: zoom-in;
}

.lb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    pointer-events: none;
    visibility: hidden;
    transition: background .35s ease, visibility 0s .35s;
}

.lb-overlay.lb-active {
    background: rgba(0, 0, 0, .88);
    pointer-events: auto;
    cursor: zoom-out;
    visibility: visible;
    transition: background .35s ease, visibility 0s 0s;
}

.lb-wrap {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
}

.lb-img {
    display: block;
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    transform: scale(.82);
    opacity: 0;
    transition: transform .35s cubic-bezier(.22,.61,.36,1), opacity .35s ease;
    cursor: zoom-out;
    border-radius: 2px;
}

.lb-overlay.lb-active .lb-img {
    transform: scale(1);
    opacity: 1;
}

.lb-caption {
    display: none;
    margin: 0;
    padding: 10px 14px;
    background: rgba(0, 0, 0, .55);
    color: #f0f0f0;
    font-size: .85rem;
    line-height: 1.45;
    text-align: center;
    opacity: 0;
    transition: opacity .35s ease;
}

.lb-caption--visible {
    display: block;
}

.lb-overlay.lb-active .lb-caption--visible {
    opacity: 1;
}

.lb-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .35s ease, background .2s;
}

.lb-overlay.lb-active .lb-close {
    opacity: 1;
}

.lb-close:hover {
    background: rgba(255, 255, 255, .35);
}

/* =============================================
   АДАПТИВ
   ============================================= */

/* Планшет — правый сайдбар уходит вниз, home-top-row становится колонкой */
@media (max-width: 1024px) {
    /* GeneratePress: правый сайдбар под основной контент + отступы от краёв */
    .site-content {
        flex-direction: column;
        padding-left: 15px;
        padding-right: 15px;
    }

    .container .site-content .content-area {
        width: auto;
    }

    .is-left-sidebar.sidebar,
    .is-right-sidebar.sidebar {
        width: auto;
        order: initial;
    }

    .home-top-row {
        flex-direction: column;
        height: auto;
    }

    .home-slider-wrap {
        flex: none;
        height: 320px;
    }

    /* fix: flex: 1 1 0 + overflow:hidden в колонке = нулевая высота */
    .home-news-col {
        flex: 0 0 auto;
    }

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

/* Мобильный */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .header-banners {
        width: 100%;
    }

    .header-banners img {
        width: 100%;
        height: auto;
    }

    .home-slider-wrap {
        height: 240px;
    }

    .home-slide__content {
        padding: 16px 14px;
    }

    .home-slider-prev,
    .home-slider-next {
        display: none;
    }

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

/* Когда сайдбар есть — лента в 3 колонки (content-area 75%) */
.right-sidebar .home-feed__grid,
.left-sidebar .home-feed__grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Планшет и мобильный: перебиваем правило выше — 2 колонки */
@media (max-width: 1024px) {
    .right-sidebar .home-feed__grid,
    .left-sidebar .home-feed__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================================
   ЗАГОЛОВОК ОТДЕЛЬНОЙ ЗАПИСИ
   ============================================= */

.single .entry-title {
    font-size: 35px;
}

@media (max-width: 480px) {
    .single .entry-title {
        font-size: 30px;
    }
}

/* =============================================
   БЛОК "ЧИТАЙТЕ ТАКЖЕ"
   ============================================= */

.also-read {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 3px solid var(--color-brand);
}

.also-read__heading {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #888;
    margin: 0 0 18px;
}

.also-read__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.also-read__card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, border-color .2s;
}

.also-read__card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.1);
    border-color: var(--color-brand);
    color: inherit;
}

.also-read__thumb {
    flex: 0 0 120px;
    overflow: hidden;
}

.also-read__thumb img {
    display: block;
    width: 120px;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.also-read__card:hover .also-read__thumb img {
    transform: scale(1.05);
}

.also-read__body {
    padding: 14px 16px;
    display: flex;
    align-items: center;
}

.also-read__title {
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.45;
    color: #222;
}

.also-read__card:hover .also-read__title {
    color: #9a7c3a;
}

@media (max-width: 600px) {
    .also-read__grid {
        grid-template-columns: 1fr;
    }
}
