/* ========================================
   DivaRoza — Стили для блога
   ======================================== */

/* ---------- БЛОГ — ГЛАВНАЯ ---------- */

/* Сетка блога — 3 колонки */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Карточка статьи */
.blog-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-dark);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Изображение в карточке */
.blog-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* Плейсхолдер для изображения */
.blog-card-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-light);
    font-size: 40px;
    color: var(--color-gray-light);
    width: 100%;
    height: 220px;
}

/* Контент карточки */
.blog-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-card-content h2 {
    font-size: 18px;
    line-height: 1.3;
    font-family: var(--font-heading);
}

.blog-card-content p {
    font-size: 14px;
    color: var(--color-gray);
    line-height: 1.5;
    font-family: var(--font-body);
}

/* Мета-данные карточки (дата, время чтения) */
.blog-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--color-gray-light);
    font-family: var(--font-body);
}

.blog-card-meta i {
    font-size: 14px;
    vertical-align: middle;
}

.blog-card-date {
    font-size: 12px;
    color: var(--color-gray-light);
    margin-top: auto;
}

/* Кнопка "Читать далее" */
.blog-card-read-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap var(--transition-fast);
    font-family: var(--font-body);
}

.blog-card-read-more:hover {
    gap: 10px;
}

/* Пагинация блога */
.blog-pagination {
    text-align: center;
    margin-top: 32px;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    gap: 6px;
}

.blog-pagination a,
.blog-pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    font-size: 14px;
    color: var(--color-dark);
    text-decoration: none;
    font-family: var(--font-body);
}

.blog-pagination a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.blog-pagination .current {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Сообщение "Нет постов" */
.no-posts {
    text-align: center;
    padding: 60px;
    font-size: 18px;
    color: var(--color-gray);
}

/* Основная обертка страницы блога */
main.site-main.blog-page {
    margin: 20px 0;
}

/* Шапка блога */
.blog-header {
    text-align: center;
    padding: 40px 0 20px;
    background: linear-gradient(170deg, #FFF5F5 0%, #FFEEF2 40%, #FDE8EC 100%);
    margin-bottom: 40px;
    border-radius: var(--radius-md);
}

.blog-title {
    font-size: 36px;
    font-family: var(--font-heading);
    margin-bottom: 12px;
}

.blog-subtitle {
    font-size: 16px;
    color: var(--color-gray);
    font-family: var(--font-body);
}

/* Ссылка-обертка карточки */
.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ===== АДАПТИВ БЛОГА ===== */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}


/* ========================================
   СТРАНИЦА СТАТЬИ
   ======================================== */
.single-post-page {
    padding: 0 0 64px;
}


/* ---------- HERO БЛОК ---------- */
.hero {
    position: relative;
    width: 100%;
    height: 440px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    animation: heroFadeUp 0.7s ease forwards;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__image {
    position: absolute;
    inset: 0;
}

.hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.hero:hover .hero__image img {
    transform: scale(1.04);
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.12) 0%,
        rgba(0, 0, 0, 0.22) 45%,
        rgba(0, 0, 0, 0.55) 100%
    );
    transition: background 0.35s ease;
    z-index: 1;
}

.hero:hover .hero__overlay {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.18) 0%,
        rgba(0, 0, 0, 0.28) 45%,
        rgba(0, 0, 0, 0.58) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 40px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: #fff;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.hero__badge a {
    color: #fff;
    text-decoration: none;
}

.hero__badge:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hero__title {
    max-width: 720px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 54px;
    line-height: 1.08;
    font-weight: 700;
    margin: 0 0 20px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.15);
}

/* Мета-информация в Hero */
.hero__meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    flex-wrap: wrap;
}

.hero__meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero__meta-item .ph {
    font-size: 18px;
    opacity: 0.8;
}

.hero__meta-divider {
    color: rgba(255, 255, 255, 0.3);
}

.hero__meta-avatar {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.hero__meta-author {
    font-weight: 500;
}

/* ===== АДАПТИВ HERO ===== */
@media (max-width: 1200px) {
    .hero {
        height: 380px;
    }
    .hero__title {
        font-size: 46px;
        max-width: 600px;
    }
}

@media (max-width: 992px) {
    .hero {
        height: 340px;
        border-radius: var(--radius-lg);
    }
    .hero__content {
        padding: 32px;
    }
    .hero__title {
        font-size: 38px;
        max-width: 100%;
        margin-bottom: 16px;
    }
    .hero__meta {
        font-size: 14px;
        gap: 14px;
    }
    .hero__badge {
        font-size: 12px;
        padding: 6px 14px;
        margin-bottom: 12px;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 300px;
        border-radius: var(--radius-md);
        margin-bottom: 32px;
    }
    .hero__content {
        padding: 24px;
    }
    .hero__title {
        font-size: 30px;
        margin-bottom: 14px;
    }
    .hero__badge {
        font-size: 11px;
        padding: 5px 12px;
        margin-bottom: 10px;
    }
    .hero__meta {
        font-size: 13px;
        gap: 10px;
        flex-wrap: wrap;
    }
    .hero__meta-divider {
        display: none;
    }
    .hero__meta-item .ph {
        font-size: 14px;
    }
    .hero__meta-avatar {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 280px;
        border-radius: var(--radius-sm);
        margin-bottom: 24px;
    }
    .hero__content {
        padding: 16px 18px;
    }
    .hero__title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    .hero__badge {
        font-size: 10px;
        padding: 4px 10px;
        margin-bottom: 8px;
    }
    .hero__meta {
        font-size: 12px;
        gap: 6px;
    }
    .hero__meta-item .ph {
        font-size: 12px;
    }
    .hero__meta-avatar {
        width: 20px;
        height: 20px;
    }
    .hero__meta-divider {
        display: none;
    }
}


/* ---------- ЛАЙАУТ СТАТЬИ ---------- */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    align-items: start;
    margin-top: 8px;
}

.post-content-col {
    min-width: 0;
}

/* ===== АДАПТИВ ЛАЙАУТА ===== */
@media (max-width: 992px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}


/* ---------- ОСНОВНОЙ КОНТЕНТ СТАТЬИ ---------- */
.post-content {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.8;
    color: #333;
}

.post-content h2 {
    font-family: 'Inter';
    font-size: 38px;
    font-weight: 700;
    margin: 48px 0 20px;
    color: var(--color-dark);
    scroll-margin-top: 80px;
}

.post-content h3 {
    font-family: 'Inter';
    font-size: 28px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--color-dark);
}

.post-content h4 {
    font-family: 'Inter';
    font-size: 22px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--color-dark);
}

.post-content p {
    margin-bottom: 20px;
    color: #444;
    font-family: var(--font-body);
}

.post-content ul,
.post-content ol {
    padding-left: 24px;
    margin-bottom: 20px;
    font-family: var(--font-body);
}

.post-content li {
    margin-bottom: 8px;
    color: #444;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 32px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.post-content blockquote {
    margin: 32px 0;
    padding: 24px 32px;
    background: var(--color-primary-light);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-sm);
    font-style: italic;
    color: var(--color-dark);
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* ===== АДАПТИВ КОНТЕНТА ===== */
@media (max-width: 992px) {
    .post-content h2 {
        font-size: 32px;
    }
    .post-content h3 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .post-content {
        font-size: 16px;
    }
    .post-content h2 {
        font-size: 28px;
    }
    .post-content h3 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .post-content {
        font-size: 15px;
    }
    .post-content h2 {
        font-size: 24px;
    }
}


/* ---------- БЛОК "СОВЕТ ФЛОРИСТА" ---------- */
.post-florist-tip {
    display: flex;
    gap: 20px;
    padding: 28px 32px;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF0F3 100%);
    border-radius: var(--radius-md);
    margin: 48px 0;
    border: 1px solid #FCE4EC;
}

.post-florist-tip-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.post-florist-tip-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-florist-tip-content {
    flex: 1;
}

.post-florist-tip-label {
    display: block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.post-florist-tip-quote {
    font-family: 'Inter';
    font-size: 20px;
    line-height: 1.6;
    color: var(--color-dark);
    margin: 0 0 8px;
    font-style: italic;
}

.post-florist-tip-author {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-gray);
}

/* ===== АДАПТИВ "СОВЕТ ФЛОРИСТА" ===== */
@media (max-width: 768px) {
    .post-florist-tip {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    .post-florist-tip-quote {
        font-size: 18px;
    }
    .post-florist-tip-avatar {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .post-florist-tip-quote {
        font-size: 16px;
    }
    .post-florist-tip-avatar {
        width: 40px;
        height: 40px;
    }
}


/* ---------- БЛОК "ЧЕК-ЛИСТ" ---------- */
.post-checklist {
    margin: 48px 0;
}

.post-checklist-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 600;
    color: var(--color-dark);
    margin: 0 0 20px;
}

.post-checklist-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.post-checklist-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--color-border);
    min-height: 120px;
    justify-content: center;
    transition: all var(--transition-base);
}

.post-checklist-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.post-checklist-icon {
    font-size: 28px;
}

.post-checklist-label {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-dark);
}

/* ===== АДАПТИВ "ЧЕК-ЛИСТ" ===== */
@media (max-width: 992px) {
    .post-checklist-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .post-checklist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .post-checklist-item {
        min-height: 100px;
        padding: 14px 8px;
    }
}

@media (max-width: 480px) {
    .post-checklist-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .post-checklist-item {
        min-height: 80px;
        padding: 12px 6px;
    }
}


/* ---------- БЛОК "СРАВНЕНИЕ" ---------- */
.post-comparison {
    margin: 48px 0;
}

.post-comparison-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 600;
    color: var(--color-dark);
    margin: 0 0 20px;
}

.post-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.post-comparison-col {
    padding: 28px;
    border-radius: var(--radius-lg);
}

.post-comparison-good {
    background: #F3FFF4;
    border: 1px solid rgba(66, 185, 109, 0.15);
}

.post-comparison-bad {
    background: #FFF3F5;
    border: 1px solid rgba(230, 91, 107, 0.15);
}

.post-comparison-status {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.post-comparison-col h4 {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--color-dark);
}

.post-comparison-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-comparison-list li {
    font-family: var(--font-body);
    padding: 4px 0;
    font-size: 15px;
    color: #505050;
}

/* ===== АДАПТИВ "СРАВНЕНИЕ" ===== */
@media (max-width: 768px) {
    .post-comparison-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .post-comparison-col {
        padding: 20px;
    }
}


/* ---------- БЛОК "FAQ" (АККОРДЕОН) ---------- */
.post-faq {
    margin: 48px 0;
}

.post-faq-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 600;
    color: var(--color-dark);
    margin: 0 0 20px;
}

.post-faq-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    overflow: hidden;
    transition: all var(--transition-base);
}

.post-faq-item:hover {
    border-color: var(--color-primary);
}

.post-faq-item.active {
    border-color: var(--color-primary);
}

.post-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    height: 64px;
    background: var(--color-white);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-dark);
    text-align: left;
    transition: all var(--transition-fast);
}

.post-faq-question:hover {
    background: var(--color-primary-light);
}

.post-faq-question .ph {
    font-size: 18px;
    transition: transform var(--transition-base);
    color: var(--color-gray);
}

.post-faq-item.active .post-faq-question .ph {
    transform: rotate(180deg);
}

.post-faq-answer {
    display: none;
    padding: 20px 20px;
    background: var(--color-white);
    animation: faqSlideDown 0.25s ease forwards;
}

@keyframes faqSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-faq-answer p {
    font-family: var(--font-body);
    margin: 0;
    font-size: 16px;
    color: #505050;
    line-height: 1.7;
}

.post-faq-item.active .post-faq-answer {
    display: block;
}

/* ===== АДАПТИВ "FAQ" ===== */
@media (max-width: 480px) {
    .post-faq-question {
        font-size: 14px;
        padding: 12px 16px;
        height: 56px;
    }
    .post-faq-answer p {
        font-size: 14px;
    }
}


/* ---------- БЛОК "CTA" ---------- */
.post-cta {
    margin: 48px 0;
}

.post-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 32px 40px;
    height: 280px;
    background: linear-gradient(135deg, #FFF7F8 0%, #FFF1F4 100%);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(231, 63, 114, 0.08);
    overflow: hidden;
    position: relative;
}

.post-cta-content {
    flex: 1;
    z-index: 2;
}

.post-cta-badge {
    display: inline-block;
    padding: 4px 14px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.post-cta-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0 0 12px;
}

.post-cta-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.post-cta-features li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-gray);
}

.post-cta-features li .ph {
    color: var(--color-green);
    font-size: 16px;
}

.post-cta-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.post-cta-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    z-index: 2;
}

.post-cta-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== АДАПТИВ "CTA" ===== */
@media (max-width: 768px) {
    .post-cta-inner {
        flex-direction: column;
        height: auto;
        padding: 28px 24px;
        text-align: center;
    }
    .post-cta-features {
        justify-content: center;
    }
    .post-cta-buttons {
        justify-content: center;
    }
    .post-cta-image {
        width: 120px;
        height: 120px;
    }
    .post-cta-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .post-cta-inner {
        padding: 20px 16px;
    }
    .post-cta-image {
        width: 80px;
        height: 80px;
    }
    .post-cta-features {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .post-cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    .post-cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}


/* ---------- КАРТОЧКА АВТОРА ---------- */
.post-author-card {
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    height: 110px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    margin: 48px 0;
    align-items: center;
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.post-author-card:hover {
    box-shadow: var(--shadow-md);
}

.post-author-avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-white);
    box-shadow: var(--shadow-sm);
}

.post-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-author-info {
    flex: 1;
    min-width: 0;
}

.post-author-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0 0 2px;
}

.post-author-bio {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-gray);
    line-height: 1.5;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-author-link {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.post-author-link:hover {
    text-decoration: underline;
}

/* ===== АДАПТИВ "КАРТОЧКА АВТОРА" ===== */
@media (max-width: 768px) {
    .post-author-card {
        height: auto;
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .post-author-bio {
        white-space: normal;
    }
}


/* ---------- НАВИГАЦИЯ МЕЖДУ СТАТЬЯМИ ---------- */
.post-navigation-single {
    display: flex;
    justify-content: space-between;
    padding: 24px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin: 48px 0;
}

.post-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    max-width: 45%;
}

.post-nav-label {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-gray);
}

.post-nav-title {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    color: var(--color-dark);
}

.post-nav:hover .post-nav-title {
    color: var(--color-primary);
}

/* ===== АДАПТИВ НАВИГАЦИИ ===== */
@media (max-width: 768px) {
    .post-navigation-single {
        flex-direction: column;
        gap: 16px;
    }
    .post-nav {
        max-width: 100%;
    }
}


/* ========================================
   САЙДБАР — НОВАЯ ВЕРСИЯ
   ======================================== */

/* ---------- ОСНОВНОЙ САЙДБАР ---------- */
.sb-sidebar {
    position: relative;
    top: 0;
}

/* ---------- ВИДЖЕТЫ ---------- */
.sb-widget {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.sb-widget:last-child {
    margin-bottom: 0;
}

.sb-widget-title {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary-light);
    letter-spacing: 0.3px;
}

/* ---------- ОГЛАВЛЕНИЕ ---------- */
.sb-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sb-toc-item {
    margin-bottom: 4px;
}

.sb-toc-item:last-child {
    margin-bottom: 0;
}

.sb-toc-link {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-gray);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.sb-toc-link:hover {
    background: #FFF3F6;
    color: var(--color-primary);
}

.sb-toc-link.active {
    background: #FFF3F6;
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    font-weight: 600;
}

/* ---------- ПОСЛЕДНИЕ СТАТЬИ ---------- */
.sb-latest-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sb-latest-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}

.sb-latest-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sb-latest-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-dark);
    transition: color var(--transition-fast);
}

.sb-latest-link:hover {
    color: var(--color-primary);
}

.sb-latest-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-light);
}

.sb-latest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sb-latest-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.sb-latest-info {
    flex: 1;
    min-width: 0;
}

.sb-latest-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 2px;
}

.sb-latest-date {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--color-gray);
}

/* ---------- КАТЕГОРИИ ---------- */
.sb-cats-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sb-cats-item {
    margin-bottom: 4px;
}

.sb-cats-item:last-child {
    margin-bottom: 0;
}

.sb-cats-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    font-size: 14px;
    color: var(--color-gray);
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.sb-cats-link:hover {
    background: var(--color-light);
    color: var(--color-dark);
}

.sb-cats-link.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}

.sb-cats-count {
    font-size: 12px;
    color: var(--color-gray-light);
    background: var(--color-light);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
}

.sb-cats-link.active .sb-cats-count {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ---------- ПОПУЛЯРНЫЕ БУКЕТЫ ---------- */
.sb-products-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sb-products-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}

.sb-products-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sb-products-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-dark);
}

.sb-products-link:hover .sb-products-title {
    color: var(--color-primary);
}

.sb-products-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-light);
}

.sb-products-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sb-products-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sb-products-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--color-dark);
}

.sb-products-price {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
}

/* ---------- CTA В САЙДБАРЕ ---------- */
.sb-widget-cta {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.sb-cta-content {
    padding: 24px 20px;
}

.sb-cta-text {
    font-size: 14px;
    color: var(--color-gray);
    margin: 0 0 12px;
}

.sb-cta-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.sb-cta-features li {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-gray);
    padding: 4px 0;
}

.sb-cta-btn {
    width: 100%;
    text-align: center;
}


/* ========================================
   МОБИЛЬНЫЙ САЙДБАР
   ======================================== */

/* ---------- КНОПКА ОТКРЫТИЯ ---------- */
.sb-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(230, 84, 118, 0.35);
    transition: all var(--transition-base);
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 24px;
}

.sb-mobile-toggle:hover {
    transform: scale(1.05);
    background: var(--color-primary-hover);
}

/* ---------- ОВЕРЛЕЙ ---------- */
.sb-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.sb-mobile-overlay.sb-active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* ---------- САЙДБАР ---------- */
.sb-mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    z-index: 99999;
    background: var(--color-white);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
    padding: 0 20px 32px;
    pointer-events: none;
}

.sb-mobile-drawer.sb-open {
    right: 0;
    pointer-events: all;
}

/* ---------- ШАПКА ---------- */
.sb-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 16px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 16px;
    position: sticky;
    top: 0;
    background: var(--color-white);
    z-index: 10;
}

.sb-mobile-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
}

/* ---------- КНОПКА ЗАКРЫТИЯ ---------- */
.sb-mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-light);
    border: none;
    color: var(--color-dark);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.sb-mobile-close:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.sb-mobile-close svg {
    width: 20px;
    height: 20px;
}

/* ---------- КОНТЕНТ ---------- */
.sb-mobile-content .sb-widget {
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 24px;
    background: transparent;
    border-radius: 0;
}

.sb-mobile-content .sb-widget:last-child {
    margin-bottom: 0;
}

.sb-mobile-content .sb-widget-title {
    border-bottom: 2px solid var(--color-primary-light);
    padding-bottom: 10px;
    margin-bottom: 14px;
}

/* ===== АДАПТИВ МОБИЛЬНОГО САЙДБАРА ===== */
@media (max-width: 992px) {
    .sb-sidebar {
        display: none;
    }
    .sb-mobile-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .sb-mobile-drawer {
        max-width: 320px;
        padding: 0 16px 24px;
    }
    .sb-mobile-toggle {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .sb-mobile-drawer {
        max-width: 100%;
        padding: 0 16px 20px;
    }
    .sb-mobile-toggle {
        bottom: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    .sb-mobile-header {
        padding: 16px 0 12px;
    }
    .sb-mobile-title {
        font-size: 16px;
    }
    .sb-mobile-close {
        width: 36px;
        height: 36px;
    }
    .sb-mobile-close svg {
        width: 18px;
        height: 18px;
    }
    .sb-mobile-content .sb-widget {
        margin-bottom: 20px;
    }
}


/* ========================================
   ССЫЛКИ В ТЕКСТЕ СТАТЬИ — HOVER
   ======================================== */

.post-content a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all var(--transition-fast);
}

.post-content a:hover,
.post-content a:focus {
    color: var(--color-primary-hover);
    border-bottom-color: var(--color-primary);
}

/* Ссылки с иконкой 🔗 */
.post-content a .link-icon {
    display: inline-block;
    margin-right: 4px;
}

.post-content a[href^="/"]:hover .link-icon,
.post-content a[href^="https://divaroza.ru"]:hover .link-icon {
    transform: translateX(2px);
}

/* Общие ссылки в сайдбаре */
.sb-widget a {
    color: var(--color-dark);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.sb-widget a:hover,
.sb-widget a:focus {
    color: var(--color-primary);
}

/* Ссылки в карточках "Последние статьи" */
.sb-latest-link:hover .sb-latest-title {
    color: var(--color-primary);
}

/* Ссылки в категориях */
.sb-cats-link:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* Ссылки в популярных букетах */
.sb-products-link:hover .sb-products-title {
    color: var(--color-primary);
}

/* Ссылки в CTA */
.post-cta a.btn {
    border-bottom: none;
}

.post-cta a.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230, 84, 118, 0.35);
}

.page-numbers li {
    list-style: none;
}