/* === GLOBAL VARIABLES === */
:root {
  --sidebar-h: 360px; /* ← регулируй здесь общую высоту блока (слайдер = 100%) */
}

/* === HEADER WIDGET ZONE (2 SIDEBARS + SLIDER) === */
.header-widgets {
  background: transparent;
  padding: 1.5rem 0;
  border-bottom: 1px solid #e2e2e2;
}

.header-widgets-flex {
  display: flex;
  align-items: flex-start; /* прижаты к верху */
  justify-content: space-between;
  gap: 1rem;
  min-width: 1420px;
  margin: 0 auto;
}

/* Сайдбары */
.header-left,
.header-right {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  height: var(--sidebar-h);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  overflow: auto;
}

/* Центральный блок со слайдером */
.header-center {
  flex: 3;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  padding: 0;
  height: var(--sidebar-h);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.widget {
  width: 100%;
}

/* === HEADER SLIDER === */
.header-slider {
  position: relative;
  width: 100%;
  height: 100%; /* ← тянется на всю высоту .header-center */
  overflow: hidden;
  border-radius: 10px;
}

/* Слайды */
.header-slider .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.header-slider .slide.active {
  opacity: 1;
  z-index: 2;
}

/* Затемнение поверх изображения */
.header-slider .slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 20%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}

/* Заголовок */
.header-slider .slide-title {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(40px);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  text-shadow: 0 3px 8px rgba(0,0,0,0.5);
  opacity: 0;
  transition: all 0.8s ease;
  z-index: 3;
  text-align: center;
}

.header-slider .slide.active .slide-title {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.header-slider .slide-title a {
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid rgba(255,255,255,0.4);
  padding-bottom: 2px;
  transition: border-color 0.3s;
}
.header-slider .slide-title a:hover {
  border-color: #0abdc6;
}

/* Нет постов */
.header-slider .no-posts {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-weight: 500;
  background: #f2f2f2;
}

/* === ADAPTIVE === */
@media (max-width: 1200px) {
  :root { --sidebar-h: 280px; } /* уменьшаем общую высоту */
  .header-widgets-flex {
    flex-direction: column;
    min-width: auto;
  }
  .header-left,
  .header-right,
  .header-center {
    width: 100%;
    height: auto;
  }
  .header-slider {
    height: 260px;
  }
}

@media (max-width: 768px) {
  :root { --sidebar-h: 200px; }
  .header-slider {
    height: 200px;
  }
  .header-slider .slide-title {
    font-size: 1.1rem;
    bottom: 10px;
  }
}