/* ══════════════════════════════════════════
   ОБЩИЙ ХЕРО-БЛОК ДЛЯ СТРАНИЦ ЛЕНДИНГА
   Единый стиль для всех страниц сообщества "Полный Стек"
   ══════════════════════════════════════════ */

/* Основной херо-блок */
.ps-hero {
  position: relative;
  padding: 48px 0 40px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg,
    rgba(76,175,80, 0.08) 0%,
    transparent 100%);
  border-radius: 16px;
  margin-bottom: 32px;
}

.ps-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%,
    rgba(var(--md-primary-fg-color--rgb, 76,175,80), 0.08) 0%,
    transparent 70%);
  pointer-events: none;
}

.ps-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.ps-hero__sub {
  font-size: 1.05rem;
  opacity: 0.75;
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* ── Декоративные иконки — асимметрично внизу ── */
.hero-deco {
  position: absolute;
  font-size: 3.2rem;
  opacity: 0.07;
  pointer-events: none;
  animation: sway 8s ease-in-out infinite;
}

/* Все иконки смещены в нижнюю зону, без симметрии */
.hero-deco--1 { bottom: 18px; left:  7%;  font-size: 2.8rem; animation-duration: 9s;  animation-delay: 0s; }
.hero-deco--2 { bottom: 32px; left: 28%;  font-size: 4rem;   animation-duration: 12s; animation-delay: 1.5s; animation-direction: reverse; }
.hero-deco--3 { bottom:  8px; right: 18%; font-size: 2.4rem; animation-duration: 10s; animation-delay: 0.7s; }
.hero-deco--4 { bottom: 24px; right:  5%; font-size: 3.5rem; animation-duration: 8s;  animation-delay: 2.2s; animation-direction: reverse; }

@keyframes sway {
  0%, 100% { transform: rotate(-6deg) scale(1); }
  50%       { transform: rotate(6deg)  scale(1.05); }
}

/* Теги */
.ps-tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.ps-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--md-code-bg-color, #f0f0f0);
  color: var(--md-default-fg-color, #333);
  letter-spacing: 0.02em;
}

/* Статистика */
.ps-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 24px 0 32px;
}

.ps-stat {
  text-align: center;
  min-width: 110px;
}

.ps-stat__num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--md-primary-fg-color, #4caf50);
  line-height: 1;
}

.ps-stat__label {
  display: block;
  font-size: 0.78rem;
  opacity: 0.65;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* CTA кнопки */
.ps-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.ps-btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: opacity 0.2s, transform 0.15s;
}

.ps-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.ps-btn--primary {
  background: var(--md-primary-fg-color, #4caf50);
  color: #fff !important;
}

.ps-btn--outline {
  border: 2px solid var(--md-primary-fg-color, #4caf50);
  color: var(--md-primary-fg-color, #4caf50) !important;
  background: transparent;
}

/* Адаптивность */
@media (max-width: 768px) {
  .ps-hero {
    padding: 32px 0 28px;
    margin-bottom: 24px;
  }
  
  .ps-hero__title {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }
  
  .ps-hero__sub {
    font-size: 0.95rem;
    padding: 0 16px;
  }
  
  .ps-hero__badge {
    padding: 5px 14px;
    font-size: 0.7rem;
    margin-bottom: 16px;
  }
  
  .ps-hero__slogan {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }
  
  .ps-hero__meta {
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
  }
  
  .ps-hero__meta-item {
    font-size: 0.8rem;
  }
  
  .ps-hero__meta-icon {
    font-size: 1.1rem;
  }
  
  .ps-stats {
    gap: 16px;
    padding: 20px 0 24px;
  }
  
  .ps-stat {
    min-width: 90px;
  }
  
  .ps-stat__num {
    font-size: 1.6rem;
  }
  
  .ps-cta-row {
    justify-content: center;
  }
  
  .ps-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* Дополнительные стили для Дебаг Кемпа и других страниц */
.ps-hero__badge {
  display: inline-block;
  padding: 6px 18px;
  background: linear-gradient(135deg, #4caf50, #66bb6a);
  color: #fff;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(76,175,80,0.3);
}

.ps-hero__slogan {
  font-size: 1.3rem;
  font-weight: 600;
  font-style: italic;
  opacity: 0.75;
  margin-bottom: 12px;
  color: var(--md-primary-fg-color, #4caf50);
}

.ps-hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--md-default-fg-color--lightest, #e0e0e0);
}

.ps-hero__meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.ps-hero__meta-icon {
  font-size: 1.3rem;
}

/* Совместимость с существующими классами */
.labs-hero,
.calendar-hero,
.about-hero,
.debugcamp-hero {
  position: relative;
  padding: 48px 0 40px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg,
    rgba(76,175,80, 0.08) 0%,
    transparent 100%);
  border-radius: 16px;
  margin-bottom: 32px;
}

.labs-hero::before,
.calendar-hero::before,
.about-hero::before,
.debugcamp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%,
    rgba(var(--md-primary-fg-color--rgb, 76,175,80), 0.08) 0%,
    transparent 70%);
  pointer-events: none;
}

.labs-hero__title,
.calendar-hero__title,
.about-hero__title,
.debugcamp-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.labs-hero__sub,
.calendar-hero__sub,
.about-hero__sub,
.debugcamp-hero__sub {
  font-size: 1.05rem;
  opacity: 0.75;
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* Для обратной совместимости */
.labs-stats,
.calendar-stats,
.about-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 24px 0 32px;
}

.labs-stat,
.calendar-stat,
.about-stat {
  text-align: center;
  min-width: 110px;
}

.labs-stat__num,
.calendar-stat__num,
.about-stat__num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--md-primary-fg-color, #4caf50);
  line-height: 1;
}

.labs-stat__label,
.calendar-stat__label,
.about-stat__label {
  display: block;
  font-size: 0.78rem;
  opacity: 0.65;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.labs-cta-row,
.calendar-cta-row,
.about-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.labs-btn,
.calendar-btn,
.about-btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: opacity 0.2s, transform 0.15s;
}

.labs-btn:hover,
.calendar-btn:hover,
.about-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.labs-btn--primary,
.calendar-btn--primary,
.about-btn--primary {
  background: var(--md-primary-fg-color, #4caf50);
  color: #fff !important;
}

.labs-btn--outline,
.calendar-btn--outline,
.about-btn--outline {
  border: 2px solid var(--md-primary-fg-color, #4caf50);
  color: var(--md-primary-fg-color, #4caf50) !important;
  background: transparent;
}

/* Медиа внутри херо-блока — только прямые потомки */
.ps-hero > img,
.ps-hero > video {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  display: block;
}

.ps-hero > iframe {
  width: 100%;
  max-height: 320px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: block;
  border: none;
}

/* Видео в обёртке — пропорции сохраняются */
.ps-hero .hero-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 42%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.ps-hero .hero-video-wrap iframe,
.ps-hero .hero-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  margin: 0;
  border: none;
}

/* Видео ДебагКемпа */
.dc-video {
  position: relative;
  width: 100%;
  padding-bottom: 42%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.dc-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.dc-video {
  position: relative;
  width: 100%;
  padding-bottom: 42%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.dc-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Медиа внутри херо-блока — только прямые потомки */
.ps-hero > img,
.ps-hero > video {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  display: block;
}

/* iframe напрямую в херо (без обёртки) — тоже ограничиваем */
.ps-hero > iframe {
  width: 100%;
  max-height: 320px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: block;
  border: none;
}