/* ============================================
   HERO SECTION — сторінка Blog (нова версія)
   ============================================ */

.blog-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 50px 70px;
  position: relative;
  z-index: 1;
}

/* Full-bleed фон hero-секції (тягнеться на всю ширину вікна,
   незалежно від max-width контентного блоку) */
.blog-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 95% 0%, rgba(108, 79, 217, 0.18) 0%, rgba(108, 79, 217, 0) 25%),
    radial-gradient(circle at 2% 100%, rgba(108, 79, 217, 0.12) 0%, rgba(108, 79, 217, 0) 25%),
    linear-gradient(135deg, #F3EFFC 0%, #E8E0FB 45%, #DCD1F7 100%);
  z-index: -2;
  pointer-events: none;
}

/* Ліва колонка: фото зверху, текст знизу */
.blog-hero-left {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.blog-hero-image {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 24px;
  height: 320px;
}

.blog-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Картинка заповнює контейнер без порожніх смуг */
  display: block;
}
.blog-hero-title {
  font-size: 40px;
  line-height: 1.15;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 16px;
}

.blog-hero-description {
  font-size: 16px;
  line-height: 1.6;
  color: #6b7280;
  margin: 0;
  max-width: 480px;
}

/* Права колонка: віджет останніх постів */
.blog-hero-sidebar {
  background: #ffffff;
  border: 1px solid #ece9f7;
  border-radius: 16px;
  padding: 28px 26px;
  box-shadow: 0 6px 28px rgba(91, 77, 219, 0.07);
  position: relative;
  z-index: 1;
}

.blog-hero-sidebar-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b4ddb;
  margin: 0 0 20px;
}

.blog-hero-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-hero-post-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #f0eefc;
}

.blog-hero-post-item:last-child {
  border-bottom: none;
}

.blog-hero-post-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f3fd;
}

.blog-hero-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-hero-post-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-hero-post-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #1a1a2e;
  text-decoration: none;
  line-height: 1.4;
}

.blog-hero-post-title:hover {
  color: #5b4ddb;
}

.blog-hero-post-date {
  font-size: 12px;
  color: #9b93e0;
}

.blog-hero-loading {
  color: #9b93e0;
  font-size: 14px;
}

@media (max-width: 900px) {
  .blog-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 20px 48px;
  }

  .blog-hero-title {
    font-size: 30px;
  }
}
/* 1. Align the text to the bottom in line with the widget */
.blog-hero-left {
    height: 100%; /* Ensures the left column stretches to match the sidebar's height */
}

.blog-hero-title {
    margin-top: auto; /* This forces the title (and the description below it) to the very bottom of the flex container */
}

/* 2. Make the photo slightly higher than the widget */
.blog-hero-sidebar {
    margin-top: 40px; /* Pushes the widget down, making the image on the left appear higher. Adjust this value as needed. */
}

/* 3. Make the widget and the posts slightly larger */
.blog-hero-post-item {
    padding: 20px 0; /* Increased from 14px to give posts more vertical breathing room */
    gap: 20px; /* Increased from 14px to add more space between the thumbnail and the text */
}

/* Optional: Increase the size of the thumbnails and text inside the widget */
.blog-hero-post-item img, 
.blog-hero-post-item svg {
    width: 75px; /* Adjust based on your current thumbnail size to make them larger */
    height: 75px; 
}

.blog-hero-post-item a {
    font-size: 1.1rem; /* Slightly increases the font size of the post titles */
}
/* Відступ головного контейнера над hero-секцією */
.page-container.top-offset {
    padding-top: 20px !important;
    margin-top: 0 !important;
}

/* Симетричні відступи зверху і знизу hero-секції, щоб фото
   не "прилипало" до хедера, а низ не виглядав задовгим */
.blog-hero {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
}
/* 1. Покращуємо читабельність тексту зліва */
.blog-hero-title {
    color: #0f172a; /* Робимо заголовок глибшим темним кольором для контрасту */
    letter-spacing: -0.5px; /* Легке ущільнення букв для сучасного вигляду */
}

.blog-hero-description {
    font-size: 1.15rem; /* Трохи збільшуємо текст */
    color: #475569; /* Робимо колір приємнішим для очей (сіро-синій відтінок) */
    line-height: 1.7; /* Більше простору між рядками */
}

/* 2. Робимо віджет праворуч у вигляді сучасної "картки" */
.blog-hero-sidebar {
    background: #ffffff;
    border: 1px solid #f1f5f9; /* Дуже ніжна рамка */
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06); /* М'яка, об'ємна тінь */
    border-radius: 20px; /* Більш округлі та сучасні кути */
    padding: 30px; /* Додаємо "повітря" всередині віджета */
}

.blog-hero-sidebar h2 {
    color: #4338ca; /* Колір вашого бренду для заголовку віджета */
    font-weight: 700;
    margin-bottom: 25px;
    border-bottom: 2px solid #eef2ff;
    padding-bottom: 10px;
    display: inline-block;
}

/* 3. Додаємо інтерактивність (hover-ефекти) для постів у віджеті */
.blog-hero-post-item {
    transition: all 0.3s ease; /* Плавна анімація всіх змін */
    border-radius: 12px;
    padding: 12px !important; /* Додаємо внутрішній відступ для красивого фону при наведенні */
    border-bottom: 1px solid transparent !important; /* Прибираємо стандартну лінію знизу */
    margin-bottom: 8px;
}

/* Що відбувається, коли мишка наводиться на пост */
.blog-hero-post-item:hover {
    background-color: #f8fafc; /* Дуже світлий сіро-синій фон */
    transform: translateX(8px); /* Легке зміщення вправо */
    box-shadow: -4px 0 0 #4338ca; /* Кольорова лінія зліва при наведенні */
}

.blog-hero-post-item img {
    border-radius: 8px; /* Скругляємо кути мініатюр */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Легка тінь під картинками */
}

.blog-hero-post-item a {
    color: #1e293b;
    font-weight: 600;
    transition: color 0.2s ease;
}

.blog-hero-post-item:hover a {
    color: #4338ca; /* Текст стає фірмовим кольором при наведенні */
}
/* ==================================
   BLOG HUB HERO
================================== */

.blog-hub-hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 20px 80px;
    text-align: center;
}

.blog-label{
    display:inline-block;
    padding:8px 16px;
    border-radius:50px;
    background:#f3f0ff;
    color:#5f38ff;
    font-size:13px;
    font-weight:700;
    letter-spacing:1px;
    margin-bottom:25px;
}

.blog-hub-hero h1{
    font-size:64px;
    line-height:1.1;
    font-weight:800;
    color:#0f172a;
    margin-bottom:24px;
}

.hero-description{
    max-width:700px;
    margin:0 auto 35px;
    font-size:20px;
    line-height:1.8;
    color:#64748b;
}

.hero-buttons{
    display:flex;
    justify-content:center;
    gap:15px;
    margin-bottom:40px;
    flex-wrap:wrap;
}

.btn-primary{
    background:#5f38ff;
    color:#fff;
    padding:15px 30px;
    border-radius:10px;
    text-decoration:none;
    font-weight:700;
    transition:.3s;
}

.btn-primary:hover{
    transform:translateY(-3px);
}

.btn-secondary{
    background:#fff;
    border:1px solid #dbe3ef;
    color:#0f172a;
    padding:15px 30px;
    border-radius:10px;
    text-decoration:none;
    font-weight:700;
}

.blog-topics{
    display:flex;
    justify-content:center;
    gap:12px;
    flex-wrap:wrap;
}

.blog-topics span{
    padding:10px 18px;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:50px;
    font-size:14px;
    font-weight:600;
}
/* Фікс порожнечі між фото та текстом на планшетах */
@media (min-width: 768px) and (max-width: 1024px) {
    .blog-hero-left {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }

    .blog-hero-image {
        margin-bottom: 20px !important; /* Відступ між картинкою та заголовком */
        width: 100% !important;
    }

    h1.blog-hero-title {
        margin-top: 0 !important;
    }
}