/* Спільна оболонка сайту: шапка, меню, заголовки, футер, картки.
   Підключається в base.html, тому нові сторінки автоматично мають фірмовий вигляд. */

:root {
  --bg-color: #050103;
  --red-neon: #ff302a;
  --gold-text: #f2c57c;
  --text-muted: #9b8468;
  --section-border: rgba(242, 197, 124, 0.18);
  --panel-bg: rgba(255, 255, 255, 0.02);
}

.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("../img/ritual-mobile-price.webp") center/cover no-repeat;
  filter: brightness(0.36) contrast(1.12);
}

@media (min-width: 900px) {
  .site-body::before {
    background-image: url("../img/ritual-desktop-price.webp");
  }
}

/* ---------- Шапка ---------- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: rgba(5, 1, 3, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--section-border);
}

.brand {
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
  letter-spacing: 0.22em;
  color: var(--gold-text);
  text-decoration: none;
  white-space: nowrap;
}

.menu-toggle {
  padding: 0.45rem 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--gold-text);
  background: transparent;
  border: 1px solid rgba(255, 48, 42, 0.55);
  border-radius: 3px;
  cursor: pointer;
}

.nav-panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  display: none;
  flex-direction: column;
  padding: 0.5rem 1.1rem 1rem;
  background: rgba(5, 1, 3, 0.98);
  border-bottom: 1px solid var(--section-border);
}

.nav-panel.open {
  display: flex;
}

.nav-link {
  padding: 0.72rem 0.2rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--gold-text);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 197, 124, 0.08);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #ffe7b3;
}

.nav-link-current {
  color: var(--red-neon);
}

@media (min-width: 860px) {
  .menu-toggle { display: none; }

  .nav-panel {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.3rem 1.1rem;
    padding: 0;
    background: none;
    border: 0;
  }

  .nav-link {
    padding: 0.2rem 0;
    border: 0;
  }
}

/* ---------- Заголовок сторінки ---------- */
.page-header {
  padding: 2.4rem 1.2rem 1rem;
  text-align: center;
}

.page-title {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  letter-spacing: 0.06em;
  color: var(--gold-text);
  text-shadow: 0 0 24px rgba(255, 48, 42, 0.35);
}

.page-subtitle {
  margin: 0.6rem auto 0;
  max-width: 60ch;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.crumbs {
  padding: 0 1.2rem;
  margin: 1.1rem auto 0;
  max-width: 900px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.crumbs a { color: var(--gold-text); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Контент ---------- */
.shell {
  flex: 1;
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 0 1.2rem 3rem;
}

.prose {
  font-size: 1rem;
  line-height: 1.75;
  color: #e8d4b4;
}

.prose p { margin: 0 0 1rem; }

/* ---------- Акордеон статей ---------- */
.accordion { display: grid; gap: 0.8rem; margin-top: 1.6rem; }

.accordion-item {
  overflow: hidden;
  background: var(--panel-bg);
  border: 1px solid var(--section-border);
  border-radius: 6px;
}

.accordion-item[open] { border-color: rgba(255, 48, 42, 0.45); }

.accordion-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.15s ease;
}

.accordion-head::-webkit-details-marker { display: none; }
.accordion-head:hover { background: rgba(255, 48, 42, 0.07); }

.accordion-thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--section-border);
  background: #0b0305;
}

.accordion-thumb-placeholder {
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.accordion-title {
  flex: 1;
  font-family: "Cinzel", serif;
  font-size: 1rem;
  color: var(--gold-text);
}

.accordion-hint {
  flex: 0 0 auto;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--red-neon);
  transition: transform 0.2s ease;
}

.accordion-item[open] .accordion-hint { transform: rotate(45deg); }

.accordion-body {
  padding: 0 1rem 1.1rem;
  border-top: 1px solid var(--section-border);
}

/* ---------- Медіа ---------- */
/* flex замість grid: одне фото теж має стояти по центру, а не зліва. */
.media-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.7rem;
  margin: 1.4rem 0;
}

.media-grid img,
.media-grid video {
  flex: 0 1 clamp(240px, 32%, 320px);
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--section-border);
  background: #0b0305;
  display: block;
}

/* Одинець — більший і по центру. */
.media-grid > :only-child {
  flex: 0 1 min(520px, 100%);
  height: auto;
  max-height: 460px;
  object-fit: contain;
}

.embed-frame {
  position: relative;
  padding-top: 56.25%;
  margin: 1.1rem 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--section-border);
}

.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-text);
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 50, 42, 0.58);
  border-radius: 3px;
  box-shadow: 0 0 16px rgba(255, 0, 0, 0.24);
  transition: transform 0.12s ease-out, border-color 0.12s ease-out, color 0.12s ease-out;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  border-color: var(--red-neon);
  color: #ffe7b3;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-top: 1.6rem;
}

.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

/* ---------- Футер ---------- */
.site-footer {
  margin-top: auto;
  padding: 1.5rem 1rem 2.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: #7b6451;
  background: #050103;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

:focus-visible {
  outline: 2px solid var(--gold-text);
  outline-offset: 3px;
}
