/* ========================================
   ЗМІННІ КОЛЬОРІВ ТА СТИЛІВ
   ======================================== */

:root {
  /* Фонові кольори */
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-card: #181818;
  
  /* Кольори тексту */
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  
  /* Акцентні кольори */
  --accent-blue: #0057b7;
  --accent-yellow: #ffd700;
  --accent-red: #ff3366;
  --accent-green: #00ff88;
  --accent-purple: #9d4edd;
  
  /* Радіуси та ефекти */
  --border-radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* ========================================
   БАЗОВІ СТИЛІ
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========================================
   ШАПКА САЙТУ - Вишиванка
   ======================================== */

.vyshyvanka-header {
  width: 100%;
  background: url('/assets/images/vyshyvanka-pattern.png') center/cover;
  padding: 1.5rem 0;
  position: relative;
  overflow: hidden;
}

.vyshyvanka-header::before {
  display: none; /* Прибрати CSS паттерн */
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.logo {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--bg-primary);
  text-shadow: 2px 2px 0 rgba(255,255,255,0.3);
  letter-spacing: -1px;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}
/* ========================================
   НАВІГАЦІЯ
   ======================================== */

.main-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  flex: 1;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-blue);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  transform: scaleX(1);
}

/* Різні кольори для кожного пункту меню */
.nav-menu li:nth-child(1) a::after { background: var(--accent-blue); }
.nav-menu li:nth-child(2) a::after { background: var(--accent-yellow); }
.nav-menu li:nth-child(3) a::after { background: var(--accent-red); }
.nav-menu li:nth-child(4) a::after { background: var(--accent-green); }
.nav-menu li:nth-child(5) a::after { background: var(--accent-purple); }
.nav-menu li:nth-child(6) a::after { background: var(--accent-blue); }

.nav-menu a:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Burger Menu для мобільних */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.burger-menu:hover {
  background: rgba(0, 87, 183, 0.22);
  border-color: var(--accent-blue);
}

.burger-line {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  margin: 0 auto;
}

/* ========================================
   СЛАЙДЕРИ РОЗДІЛІВ
   ======================================== */
.section-slider {
  padding: 4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}
.section-header {
  max-width: 1400px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-title {
  font-size: 2rem;
  font-weight: 700;
  position: relative;
  padding-left: 1.5rem;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 80%;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-yellow));
  border-radius: 3px;
}
.slider-controls {
  display: flex;
  gap: 1rem;
}
.slider-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.slider-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(0, 87, 183, 0.5);
}
/* === READ MORE CARD === */
.post-card.read-more-card {
  min-width: 160px;
  max-width: 160px;
  background: transparent;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: all 0.3s ease;
  align-self: center;
  height: 130px;
}

.post-card.read-more-card:hover {
  border-color: var(--accent-blue);
  background: rgba(0, 87, 183, 0.08);
  transform: scale(1.04) translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 87, 183, 0.2);
}

.read-more-link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none !important;
  color: var(--text-primary) !important;
}

.read-more-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 1rem;
}

.read-more-content i {
  font-size: 1.5rem;
  color: var(--accent-blue);
  transition: transform 0.3s ease;
}

.post-card.read-more-card:hover .read-more-content i {
  transform: translateX(5px);
}

.read-more-content h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  color: var(--text-primary);
}

.read-more-content p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  text-align: center;
}

.slider-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  overflow: hidden;
}
.slider-track {
  display: flex;
  gap: 2rem;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}



/* Позиціонування стрілок по боках */
.section-slider .slider-btn.prev {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(24, 24, 24, 0.95);
  backdrop-filter: blur(10px);
}

.section-slider .slider-btn.next {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(24, 24, 24, 0.95);
  backdrop-filter: blur(10px);
}

.section-slider .slider-btn.prev:hover,
.section-slider .slider-btn.next:hover {
  transform: translateY(-50%) scale(1.1);
}

/* Адаптивність для мобільних */
@media (max-width: 768px) {
  .section-slider {
    padding: 2rem 0;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .slider-controls {
    width: 100%;
    justify-content: space-between;
  }
  
  .section-slider .slider-btn.prev,
  .section-slider .slider-btn.next {
    display: none; /* Ховаємо стрілки на мобільних, бо є свайп */
  }
  
  .slider-wrapper {
    padding: 0 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .slider-wrapper::-webkit-scrollbar {
    display: none;
  }
  
  .slider-track {
    transition: none; /* Вимикаємо transition для нативного свайпу */
  }
  
  .post-card {
    scroll-snap-align: start;
  }
  
  .slider-more-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   КАРТКИ ПОСТІВ У СЛАЙДЕРАХ
   ======================================== */

.post-card {
  min-width: 350px;
  max-width: 350px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  position: relative;
}

.post-card:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}

.post-card a {
  text-decoration: none;
  color: inherit;
}

.post-image {
  width: 100%;
  height: 197px;
  object-fit: cover;
  transition: all 0.3s ease;
}

.post-card:hover .post-image {
  filter: brightness(0.7);
}

.post-content {
  padding: 1.5rem;
}

.post-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.post-card:hover .post-excerpt {
  max-height: 100px;
  opacity: 1;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.post-date,
.post-comments {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ========================================
   СЕКЦІЯ ОСТАННІХ СТАТЕЙ
   ======================================== */

.latest-posts {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.latest-posts-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.latest-posts-title::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-yellow));
  border-radius: 2px;
}

.latest-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.latest-item {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  text-align: left;
  position: relative;
  cursor: pointer;
}

/* Клікабельна обгортка для всієї картки */
.latest-item > a.item-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Заголовок і посилання всередині — над overlay */
.latest-item .latest-content {
  position: relative;
  z-index: 2;
}

.latest-item .latest-content a {
  position: relative;
  z-index: 2;
}

.latest-item:hover {
  transform: translateX(10px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}

.latest-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.latest-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.latest-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.latest-content h3 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.latest-content h3 a:hover {
  color: var(--accent-blue);
}

.latest-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.latest-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Кнопка "Показати більше" */
.load-more-btn {
  display: inline-block;
  margin: 3rem auto 0;
  padding: 1rem 3rem;
  text-decoration: none;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-yellow));
  color: var(--bg-primary);
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.load-more-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--glow);
}

/* ========================================
   ФУТЕР
   ======================================== */

.main-footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 3rem;
  align-items: center;
}

.footer-info {
  text-align: left;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--accent-blue);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 87, 183, 0.4);
}

/* ========================================
   СТОРІНКА ПОСТА
   ======================================== */

.post-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
}

.post-main {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.post-header {
  padding: 2rem 3rem 0.5rem;
}

.post-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 87, 183, 0.3);
  max-width: 900px;
}

.post-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 0;
  display: block;
}

.post-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  padding: 1.25rem 3rem 3rem;
  max-width: 100%;
  box-sizing: border-box;
}

.post-body h2 {
  font-size: 2rem;
  margin: 2.5rem 0 1.5rem;
  color: var(--text-primary);
  padding-left: 1.5rem;
  border-left: 4px solid var(--accent-blue);
}

.post-body h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
  padding-left: 1rem;
  border-left: 3px solid var(--accent-yellow);
}

.post-body p {
  margin-bottom: 1.5rem;
   text-align: justify;
}

.post-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ========================================
   SIDEBAR
   ======================================== */

.post-sidebar {
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

.sidebar-section {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.sidebar-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.sidebar-post {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.sidebar-post:hover {
  transform: translateX(5px);
}

.sidebar-post img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidebar-post h4 {
  font-size: 0.95rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.sidebar-post h4 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.sidebar-post:hover h4,
.sidebar-post:hover h4 a {
  color: var(--accent-blue);
}

/* ========================================
   КНОПКИ ШЕРИНГУ
   ======================================== */

.share-section {
  margin: 0;
  padding: 2.5rem 3rem;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.share-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.share-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.share-btn.telegram { background: #0088cc; }
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #000000; }

.share-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 0 25px currentColor;
}

/* ========================================
   МЕТА-ІНФОРМАЦІЯ ПОСТА
   ======================================== */

.post-footer-meta {
  display: flex;
  justify-content: space-between;
  padding: 2rem 3rem;
  background: rgba(255, 255, 255, 0.03);
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-left,
.meta-right {
  display: flex;
  gap: 2rem;
  align-items: center;
  color: var(--text-secondary);
}

/* ========================================
   СЕКЦІЯ КОМЕНТАРІВ
   ======================================== */

.comments-section {
  margin: 0;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: 700;
}

.comment-form {
  margin-bottom: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px rgba(0, 87, 183, 0.3);
}

.submit-btn {
  width: 100%;
  padding: 1.2rem;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-yellow));
  color: var(--bg-primary);
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: scale(1.02);
  box-shadow: var(--glow);
}

/* ========================================
   НАВІГАЦІЯ МІЖ ПОСТАМИ
   ======================================== */

.post-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  margin: 0;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn {
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.nav-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(0, 87, 183, 0.5);
}

.nav-btn.home {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-yellow));
  color: var(--bg-primary);
  border: none;
}

.nav-btn.home:hover {
  transform: translateY(-3px) scale(1.05);
}

/* ========================================
   ПОПУЛЯРНІ / ЧИТАЙТЕ ТАКОЖ
   ======================================== */

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

.popular-posts {
  margin: 0;
  padding: 2rem 3rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.popular-header {
  margin-bottom: 1.5rem;
}

.popular-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.popular-controls {
  display: none;
}

.popular-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.popular-list .latest-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 0;
}

.popular-list .latest-item .latest-image {
  width: 120px;
  height: 80px;
  object-fit: cover;
}

.popular-list .latest-item .latest-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.popular-list .latest-item .latest-content h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-list .latest-item .latest-content p {
  display: none;
}

.popular-list .latest-item .latest-meta {
  font-size: 0.75rem;
  gap: 1rem;
}

/* ========================================
   СТОРІНКИ КАТЕГОРІЙ
   ======================================== */

.category-header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
  text-align: center;
}

.category-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 87, 183, 0.3);
}

.category-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.posts-list {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ──────────────────────────────────────────
   POSTS-LIST: картка з фіксованою картинкою
   ────────────────────────────────────────── */

/* Обгортка картинки — фіксований розмір, overflow:hidden для обрізки */
.posts-list .latest-item .latest-image-wrap {
  width: 300px;
  height: 213px;
  flex-shrink: 0;
  overflow: hidden;
}

/* Картинка заповнює обгортку повністю */
.posts-list .latest-item .latest-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Анімація hover: підйом + підсвічування заголовку */
.posts-list .latest-item {
  background: var(--bg-card);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.posts-list .latest-item:hover {
  transform: translateY(-4px) scale(1.012);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
}

.posts-list .latest-item:hover .latest-content h3 a {
  color: var(--accent-yellow);
}

/* Мобільна адаптація */
@media (max-width: 768px) {
  .posts-list .latest-item {
    grid-template-columns: 1fr;
  }
  .posts-list .latest-item .latest-image-wrap {
    width: 100%;
    height: 200px;
  }
}

/* ========================================
   ПАГІНАЦІЯ
   ======================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.page-btn {
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-weight: 600;
}

.page-btn:hover,
.page-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .pagination {
    gap: 0.35rem;
  }
  .page-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
  }
}

/* ========================================
   МЕДІА В ПОСТАХ
   ======================================== */

.post-body img,
.post-body video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: var(--border-radius);
  cursor: pointer;
}

/* iframe окремо — НЕ height:auto, бо тоді висота стає 0 */
.post-body iframe {
  max-width: 100%;
  display: block;
  margin: 2rem auto;
  border-radius: var(--border-radius);
}

/* Responsive відео-обгортка — правильний спосіб вставляти YouTube */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 = 9/16 * 100 */
  height: 0;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin: 2rem auto;
}
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: none;
  border-radius: var(--border-radius);
  margin: 0;
}

.post-body img:hover {
  opacity: 0.9;
}

/* Lightbox для збільшення зображень */
.image-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.image-lightbox.active {
  display: flex;
  opacity: 1;
}

/* Фото */
.lb-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 160px);
  max-height: 90vh;
}
.lb-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
  width: auto !important;
  height: auto !important;
  display: block;
  transition: opacity 0.2s;
}

/* Кнопка закрити */
.lb-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10001;
}
.lb-close:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

/* Кнопки навігації */
.lb-prev,
.lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.4rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10001;
  user-select: none;
}
.lb-prev { left: 1.5rem; }
.lb-next { right: 1.5rem; }
.lb-prev:hover,
.lb-next:hover {
  background: var(--accent-yellow);
  color: #000;
  border-color: var(--accent-yellow);
  transform: translateY(-50%) scale(1.08);
}

/* Лічильник */
.lb-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.12);
  z-index: 10001;
}

@media (max-width: 600px) {
  .lb-img-wrap { max-width: 100vw; }
  .lb-prev { left: 0.5rem; width: 42px; height: 42px; font-size: 1.1rem; }
  .lb-next { right: 0.5rem; width: 42px; height: 42px; font-size: 1.1rem; }
}

/* ========================================
   КНОПКА ВГОРУ
   ======================================== */

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-yellow));
  border: none;
  border-radius: 50%;
  color: var(--bg-primary);
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 87, 183, 0.5);
}

/* ========================================
   ПОШУК
   ======================================== */

.search-container {
  position: relative;
  margin-left: auto;
}

.search-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 1rem;
  transition: all 0.3s ease;
}

.search-btn:hover {
  color: var(--accent-blue);
  transform: scale(1.1);
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-overlay.active {
  display: flex;
  opacity: 1;
}

.search-box {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--border-radius);
  max-width: 600px;
  width: 90%;
  box-shadow: var(--shadow);
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 1rem 3rem 1rem 1rem;
  background: var(--bg-secondary);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px rgba(0, 87, 183, 0.3);
}

.search-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.search-close:hover {
  color: var(--text-primary);
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
}

.search-results::-webkit-scrollbar {
  width: 8px;
}

.search-results::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb {
  background: var(--accent-blue);
  border-radius: 4px;
}

.search-result-item {
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
  color: var(--text-primary);
  text-decoration: none;
}

.search-result-item:hover {
  background: var(--bg-primary);
  transform: translateX(5px);
}

.search-result-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.search-result-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.search-no-results {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
  font-size: 1.1rem;
}

/* ========================================
   АНІМАЦІЇ
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

.post-card.fade-in {
  min-width: 350px;
  max-width: 350px;
  flex-shrink: 0;
}

/* ========================================
   АДАПТИВНІСТЬ ДЛЯ ПЛАНШЕТІВ
   ======================================== */

@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    position: static;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr auto 1fr;
  }
}

/* ========================================
   АДАПТИВНІСТЬ ДЛЯ МОБІЛЬНИХ
   ======================================== */

@media (max-width: 768px) {
  /* Шапка */
  .logo {
    font-size: 2rem;
  }
  
  /* Навігація */
  .burger-menu {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-menu.active {
    max-height: 500px;
  }

  .nav-menu a::after {
    left: 1.5rem;
    right: 1.5rem;
  }
  
  .search-container {
    margin-left: 0;
    order: -1;
  }
  
  /* Заголовки */
  .section-title {
    font-size: 1.5rem;
  }
  
  .latest-posts-title {
    font-size: 2rem;
  }
  
  .category-title {
    font-size: 2.5rem;
  }
  
  /* Картки постів */
  .post-card,
  .post-card.fade-in {
    min-width: 280px;
    max-width: 280px;
  }
  
  .post-image {
    height: 158px;
  }
  
  /* Latest items */
  .latest-item {
    grid-template-columns: 1fr;
  }
  
  .latest-image {
    height: 200px;
  }
  
  /* Сторінка поста */
  .post-layout {
    padding: 2rem 1rem;
  }
  
  .post-header {
    padding: 2rem 1.5rem 1rem;
  }
  
  .post-header h1 {
    font-size: 1.75rem;
  }
  
  .post-main {
    padding: 0;
  }
  
  .post-body {
    font-size: 1rem;
    padding: 1.5rem;
  }
  
  .post-body h2 {
    font-size: 1.5rem;
  }
  
  .post-body h3 {
    font-size: 1.25rem;
  }
  
  .share-section,
  .post-footer-meta,
  .comments-section {
    padding: 1.5rem;
  }
  
  /* Навігація між постами */
  .post-navigation {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem;
  }
  
  .nav-btn {
    padding: 1rem;
    font-size: 0.9rem;
  }
  
  /* Популярні пости */
  .popular-posts {
    padding: 1.5rem;
  }
  
  .popular-title {
    font-size: 1.3rem;
  }

  .popular-list {
    flex-direction: column;
    overflow: visible;
  }

  .popular-list .latest-item {
    min-width: unset;
    max-width: 100%;
    grid-template-columns: 90px 1fr;
  }

  .popular-list .latest-item .latest-image {
    width: 90px;
    height: 60px;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .footer-info,
  .social-links {
    text-align: center;
    justify-content: center;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
  
  /* Кнопка вгору */
  .scroll-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
  
  /* Пошук */
  .search-box {
    padding: 1.5rem;
  }
  
  .search-input {
    font-size: 1rem;
  }
}

/* Дуже маленькі екрани */
@media (max-width: 480px) {
  .post-card,
  .post-card.fade-in {
    min-width: 250px;
    max-width: 250px;
  }

  .popular-list .latest-item {
    min-width: unset;
    max-width: 100%;
  }
  
  .post-image {
    height: 141px;
  }
  
  .section-slider {
    padding: 2rem 0;
  }
  
  .latest-posts {
    padding: 2rem 1rem;
  }
}

/* ========================================
   GISCUS КОМЕНТАРІ
   ======================================== */

.comments-note {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--accent-blue);
}

.comments-note i {
  margin-right: 0.4rem;
}

.giscus {
  margin-top: 1rem;
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 3rem 0;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--accent-yellow);
}

.breadcrumb-sep {
  color: var(--text-secondary);
  opacity: 0.4;
  font-size: 0.7rem;
}

.breadcrumb-current {
  color: var(--accent-yellow);
  font-weight: 500;
}

/* ========================================
   ПРОГРЕС-БАР ЧИТАННЯ
   ======================================== */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-yellow));
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ========================================
   HERO БЛОК
   ======================================== */

.hero-section {
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 500px;
  max-height: 800px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.05);
  transition: transform 8s ease;
  animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1.0); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.97) 0%,
    rgba(10, 10, 10, 0.6) 50%,
    rgba(10, 10, 10, 0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 3rem 4rem;
  animation: heroFadeUp 0.9s ease forwards;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-category {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  max-width: 800px;
}

.hero-excerpt {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  max-width: 620px;
}

.hero-meta {
  display: flex;
  gap: 1.2rem;
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  margin-bottom: 1.8rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--accent-yellow);
  color: #0f0f0f;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.hero-btn:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 215, 0, 0.4);
}

.hero-btn i {
  transition: transform 0.2s;
}

.hero-btn:hover i {
  transform: translateX(4px);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.4);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%       { transform: translateY(6px); opacity: 0.8; }
}

@media (max-width: 768px) {
  .hero-section {
    height: 70vh;
  }
  .hero-content {
    padding: 2rem 1.5rem;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .hero-scroll-hint {
    display: none;
  }
}


/* ========================================
   АНІМАЦІЇ ПРИ СКРОЛІ (Scroll Reveal)
   ======================================== */

/* Початковий стан — елементи невидимі */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

/* Коли елемент входить у viewport */
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Затримки для каскадного ефекту */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Вимикаємо fade-in анімацію в posts-list та popular-posts */
.posts-list .latest-item,
.popular-posts .latest-item {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}
