/* Фоны страниц. Подключается ПОСЛЕ style.css и pages.css.
   Картинка фона — на body через фиксированный слой, у каждой страницы своя (images/bg/). */

body {
  position: relative;
  --bg-img: none;
  --bg-pos: center;
  --bg-pos-m: center;
}

body.page-home      { --bg-img: url("../images/bg/bg-home.webp");      --bg-pos-m: 50% 50%; }
body.page-menu      { --bg-img: url("../images/bg/bg-menu.webp");      --bg-pos-m: 100% 50%; }
body.page-promos    { --bg-img: url("../images/bg/bg-promos.webp");    --bg-pos-m: 0% 50%; }
body.page-delivery  { --bg-img: url("../images/bg/bg-delivery.webp");  --bg-pos-m: 0% 50%; }
body.page-about     { --bg-img: url("../images/bg/bg-about.webp");     --bg-pos-m: 0% 50%; }
body.page-contacts  { --bg-img: url("../images/bg/bg-contacts.webp");  --bg-pos-m: 0% 50%; }

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background: var(--bg-img) var(--bg-pos) / cover no-repeat;
}

/* лёгкое затемнение, чтобы текст читался поверх специй */
body::after {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(13, 13, 13, 0.1), rgba(13, 13, 13, 0.45) 100%);
}

/* Герой больше не рисует свой фон — виден фон страницы */
.hero {
  background: none;
}
.hero::before,
.hero::after { display: none; }

.hero-media img {
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 138, 31, 0.12);
}

/* Шапка и подвал прозрачнее */
.header-wrap {
  background: linear-gradient(rgba(13, 13, 13, 0.82) 55%, rgba(13, 13, 13, 0));
}

.header-bar { background: rgba(14, 14, 14, 0.78); }

#site-footer {
  background: linear-gradient(180deg, rgba(13, 13, 13, 0), rgba(13, 13, 13, 0.72) 40%);
  border-top-color: rgba(255, 255, 255, 0.06);
}

/* Тёмные карточки — чуть прозрачные, фон просвечивает */
.menu-card,
.hit-card,
.order-card,
.info-card,
.panel {
  background: rgba(20, 20, 20, 0.8);
}

.features li { background: rgba(18, 18, 18, 0.78); }

.tabs button,
.carousel-nav button { background: rgba(22, 22, 22, 0.85); }

.tabs button[aria-selected="true"] { background: var(--accent); }

.map-embed { background: rgba(20, 20, 20, 0.8); }

/* Телефон: показываем ту сторону фона, где лежит блюдо */
@media (max-width: 799px) {
  body::before { background-position: var(--bg-pos-m); }
  body::after {
    background: linear-gradient(180deg, rgba(13, 13, 13, 0.3), rgba(13, 13, 13, 0.55));
  }
}
