/* ==========================================
   КОМПОНЕНТ: ШАПКА-БАББЛ И ПАРАЛЛАКС-БАННЕР
   ========================================== */

/* --- ПЕРЕМЕННЫЕ ПО УМОЛЧАНИЮ --- */
:root {
  --bg-page: #d2e3c8;
  --accent-yellow: #d4c33f;
  --text-dark: #111111;
  --container-width: 1140px;
}

/* --- ШАПКА-БАББЛ --- */
.header {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: var(--container-width);
  z-index: 100;

  /* Эффект матового стекла для шапки */
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 10px 25px;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- ТЕКСТ ЛОГОТИПА И ССЫЛОК (АДАПТИВНЫЕ ЦВЕТА) --- */

/* 1. По умолчанию (для светлых страниц БЕЗ баннера: 404, документы и т.д.) */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-dark, #111111);
  font-weight: 800;
  font-size: 1.1rem;
  transition: color 0.25s ease;
}

.logo__img {
  height: 40px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
  margin-left: 40px;
}

.nav__list {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav__link {
  text-decoration: none;
  color: var(--text-dark, #111111);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.nav__link:hover {
  color: #2e6013;
  opacity: 0.85;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-dark, #111111);
  transition: background-color 0.25s ease;
}

/* 2. Если на странице ЕСТЬ тёмный параллакс-баннер (Главная, Полезное, Дома) */
body:has(.hero-parallax) .logo,
body:has(.hero-parallax) .nav__link {
  color: #ffffff;
}

body:has(.hero-parallax) .nav__link:hover {
  color: var(--accent-yellow);
}

body:has(.hero-parallax) .nav-toggle span {
  background-color: #ffffff;
}

/* ==========================================
   КНОПКИ И ИХ АДАПТАЦИЯ (BTN-OUTLINE)
   ========================================== */

/* Базовый универсальный стиль кнопки */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.25s ease;
}

/* Кнопка в шапке на СВЕТЛЫХ страницах */
.header .btn-outline {
  background-color: transparent;
  color: var(--text-dark, #111111) !important;
  border: 2px solid var(--text-dark, #111111);
}

.header .btn-outline:hover {
  background-color: var(--text-dark, #111111);
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* Кнопка в шапке НА СТРАНИЦАХ С СЕКЦИЕЙ ПАРАЛЛАКСА */
body:has(.hero-parallax) .header .btn-outline {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body:has(.hero-parallax) .header .btn-outline:hover {
  background-color: #ffffff;
  color: var(--text-dark, #111111) !important;
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Кнопка в карточках (например, 404 ошибка) */
.error-card__actions .btn-outline {
  background-color: #ffffff;
  color: var(--text-dark, #111111) !important;
  border: 2px solid var(--text-dark, #111111);
}

.error-card__actions .btn-outline:hover {
  background-color: var(--text-dark, #111111);
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* --- СЕКЦИЯ ПАРАЛЛАКСА --- */
.hero-parallax {
  --bg-image: url('../assets/images/background.jpg');
  --overlay-color: rgba(0, 0, 0, 0.65);
  --hero-height: 100vh;

  position: relative;
  min-height: var(--hero-height);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 140px 20px 60px;
  color: #ffffff;
}

.hero-parallax__bg {
  position: absolute;
  top: -15%;
  left: 0;
  width: 100%;
  height: 130%;
  background-image: var(--bg-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
  will-change: transform;
}

.hero-parallax__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-color);
  z-index: 2;
}

.hero-parallax__content {
  position: relative;
  z-index: 3;
  max-width: 800px;
}

.hero-parallax__title {
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent-yellow);
  line-height: 1.1;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-parallax__subtitle {
  font-size: 1.2rem;
  margin-bottom: 35px;
  color: #ffffff;
}

/* --- АДАПТАЦИЯ ПОД МОБИЛЬНЫЕ УСТРОЙСТВА --- */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 25px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    margin-left: 0;
  }

  .nav--open {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  /* В выпадающем мобильном меню ссылки всегда белые */
  .nav--open .nav__link {
    color: #ffffff !important;
  }

  .nav__list {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .nav__btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .hero-parallax__title {
    font-size: 2.5rem;
  }
}

/* ==========================================
   КОМПОНЕНТ: МИНИМАЛИСТИЧНЫЙ ПОДВАЛ (FOOTER)
   ========================================== */

.footer {
  background-color: var(--bg-footer, #6d745f);
  color: var(--text-light, #ffffff);
  padding: 25px 0;
  width: 100%;
  margin-top: auto;
}

.footer__bottom {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  letter-spacing: 0.3px;
}