/* css/pages/blog.css */

:root {
    --color-primary:   #C22225;
    --color-secondary: #1D3557;
    --color-dark:      #232020;
    --color-light:     #F8F8F8;
    --color-gray:      #4D4D4D;
    --border-radius:   8px;
    --transition:      all 0.3s ease;
}

.section-padding { padding: 80px 0; }

/* ── Хлібні крихти ── */
.breadcrumbs { padding: 16px 0; background: #f8f9fa; border-bottom: 1px solid #e9ecef; }
.breadcrumbs__list { display: flex; list-style: none; flex-wrap: wrap; gap: 4px; }
.breadcrumbs__item:not(:last-child)::after { content: '/'; margin: 0 8px; color: var(--color-gray); }
.breadcrumbs__link { color: var(--color-gray); text-decoration: none; transition: var(--transition); }
.breadcrumbs__link:hover { color: var(--color-primary); }
.breadcrumbs__item.active { color: var(--color-dark); font-weight: 500; }

.section-heading {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 24px;
    line-height: 1.2;
}
.section-heading.center { text-align: center; }

/* ════════════════════ HERO (список статей) ════════════════════ */
.blog-hero {
    background: linear-gradient(135deg, var(--color-dark) 0%, #1a1a2e 50%, var(--color-secondary) 100%);
    padding: 90px 0 80px;
    position: relative;
    overflow: hidden;
    color: #fff;
}
.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 60%, rgba(194,34,37,0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(29,53,87,0.3) 0%, transparent 50%);
    pointer-events: none;
}
.blog-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
.blog-hero__content { position: relative; z-index: 1; max-width: 700px; }
.blog-hero__label {
    display: inline-block;
    background: rgba(194,34,37,0.2);
    border: 1px solid rgba(194,34,37,0.5);
    color: #ff9a9a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
}
.blog-hero__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 20px;
}
.blog-hero__text {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    max-width: 560px;
}

/* ════════════════════ СІТКА СТАТЕЙ ════════════════════ */
.blog-section { background: var(--color-light); }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
    border-color: transparent;
}

.blog-card__img {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #eee;
}
.blog-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.blog-card:hover .blog-card__img img { transform: scale(1.05); }
.blog-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(194,34,37,0.25);
    background: linear-gradient(135deg, #f3f4f6, #e9ecef);
}
.blog-card__category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
}

.blog-card__body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-card__meta {
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--color-gray);
    margin-bottom: 10px;
}
.blog-card__meta i { margin-right: 4px; }
.blog-card__title {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 10px;
}
.blog-card__title a {
    color: var(--color-dark);
    text-decoration: none;
    transition: var(--transition);
}
.blog-card__title a:hover { color: var(--color-primary); }
.blog-card__excerpt {
    font-size: 0.9rem;
    color: var(--color-gray);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}
.blog-card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}
.blog-card__more:hover { gap: 10px; }

/* Порожній стан */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-gray);
}
.blog-empty i { font-size: 3rem; color: #dee2e6; display: block; margin-bottom: 20px; }
.blog-empty h2 { margin-bottom: 12px; color: var(--color-dark); }
.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }

/* ════════════════════ ОКРЕМА СТАТТЯ ════════════════════ */
.post-header {
    background: linear-gradient(135deg, var(--color-dark) 0%, #1a1a2e 50%, var(--color-secondary) 100%);
    padding: 60px 0 50px;
    color: #fff;
}
.post-header__category {
    display: inline-block;
    background: rgba(194,34,37,0.2);
    border: 1px solid rgba(194,34,37,0.5);
    color: #ff9a9a;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
}
.post-header__title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    max-width: 800px;
    margin-bottom: 20px;
}
.post-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.65);
}
.post-header__meta i { margin-right: 6px; color: var(--color-primary); }

.post-section { background: #fff; }
.post-layout {
    display: flex;
    justify-content: center;
}
.post-content {
    max-width: 760px;
    width: 100%;
}
.post-content__cover {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 32px;
    display: block;
}
.post-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 36px 0 16px;
}
.post-content p {
    font-size: 1.02rem;
    line-height: 1.85;
    color: var(--color-gray);
    margin-bottom: 18px;
}
.post-content ul {
    margin: 0 0 20px;
    padding-left: 20px;
}
.post-content ul li {
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--color-gray);
    margin-bottom: 8px;
}

.post-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}
.post-back:hover { text-decoration: underline; }

/* FAQ-акордеон */
.post-faq {
    margin-top: 44px;
    padding-top: 36px;
    border-top: 1px solid #e9ecef;
}
.post-faq h2 { margin-top: 0; }
.post-faq__item {
    background: var(--color-light);
    border-radius: 10px;
    padding: 4px 20px;
    margin-bottom: 12px;
}
.post-faq__item summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 0;
    font-weight: 600;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.post-faq__item summary::-webkit-details-marker { display: none; }
.post-faq__item summary i { color: var(--color-primary); transition: transform 0.25s ease; flex-shrink: 0; }
.post-faq__item[open] summary i { transform: rotate(180deg); }
.post-faq__item p {
    margin: 0 0 16px;
    color: var(--color-gray);
}

/* Пов'язані статті */
.blog-related { background: var(--color-light); }

/* ════════════════════ CTA ════════════════════ */
.blog-cta { background: var(--color-primary); padding: 70px 0; }
.cta-block { text-align: center; }
.cta-block h2 { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 14px; }
.cta-block p  { font-size: 1.05rem; color: rgba(255,255,255,0.85); margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid #fff;
}
.btn-cta:hover { background: transparent; color: #fff; }

/* ════════════════════ АДАПТИВНІСТЬ ════════════════════ */
@media (max-width: 992px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .section-padding { padding: 56px 0; }
    .blog-hero { padding: 64px 0 56px; }
    .blog-grid { grid-template-columns: 1fr; }
    .post-header { padding: 44px 0 36px; }
    .cta-block h2 { font-size: 1.5rem; }
}

/* ════════════════════════════════════════════
   ТЕМНА ТЕМА
════════════════════════════════════════════ */

body.dark-theme .breadcrumbs {
    background: #0A1120;
    border-bottom-color: rgba(255,255,255,0.08);
}
body.dark-theme .breadcrumbs__link { color: rgba(255,255,255,0.55); }
body.dark-theme .breadcrumbs__link:hover { color: var(--color-primary); }
body.dark-theme .breadcrumbs__item:not(:last-child)::after { color: rgba(255,255,255,0.3); }
body.dark-theme .breadcrumbs__item.active { color: #fff; }

body.dark-theme .section-heading { color: #fff; }

/* Список статей */
body.dark-theme .blog-section { background: #0A1120; }
body.dark-theme .blog-card {
    background: rgba(30,41,59,0.5);
    border-color: rgba(255,255,255,0.08);
}
body.dark-theme .blog-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
body.dark-theme .blog-card__placeholder {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    color: rgba(194,34,37,0.4);
}
body.dark-theme .blog-card__meta { color: rgba(255,255,255,0.5); }
body.dark-theme .blog-card__title a { color: #fff; }
body.dark-theme .blog-card__excerpt { color: rgba(255,255,255,0.6); }

body.dark-theme .blog-empty { color: rgba(255,255,255,0.55); }
body.dark-theme .blog-empty i { color: rgba(255,255,255,0.15); }
body.dark-theme .blog-empty h2 { color: #fff; }

/* Окрема стаття */
body.dark-theme .post-section { background: #0F172A; }
body.dark-theme .post-content h2 { color: #fff; }
body.dark-theme .post-content p { color: rgba(255,255,255,0.65); }
body.dark-theme .post-content ul li { color: rgba(255,255,255,0.65); }

body.dark-theme .post-faq { border-top-color: rgba(255,255,255,0.1); }
body.dark-theme .post-faq__item { background: rgba(30,41,59,0.5); }
body.dark-theme .post-faq__item summary { color: #fff; }
body.dark-theme .post-faq__item p { color: rgba(255,255,255,0.6); }

body.dark-theme .blog-related { background: #0A1120; }

/* Hero, шапка статті, CTA вже на темному/кольоровому фоні з білим текстом — без змін */