/* Общие блоки для всех концепций: видео, галерея-лайтбокс, страница статьи, уведомления.
   Цвета берутся из переменных концепции (--y, --text, --muted, --card, --line, --display). */

/* ---------- модальные окна ---------- */
.modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .25s; }
.modal.show { opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .86); }
.modal-card { position: relative; width: min(1000px, 100%); background: #0e0e10; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: var(--radius, 12px); overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,.8); }
.modal-x { position: absolute; top: 8px; right: 10px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.modal-x:hover { background: var(--y); color: #111; }
.video-frame { aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; display: block; }
.modal-lightbox .modal-card { width: min(1400px, 100%); background: transparent; border: 0; box-shadow: none; overflow: visible; }
.lightbox { margin: 0; display: grid; justify-items: center; gap: 12px; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.lightbox figcaption { color: #d6d6d9; font-size: 14px; text-align: center; min-height: 1.4em; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-60%); width: 48px; height: 64px; border: 0; border-radius: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 40px; line-height: 1; cursor: pointer; }
.lb-nav:hover { background: var(--y); color: #111; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }

/* ---------- подсказка для телефона ---------- */
.modal-phone .modal-card { width: min(420px, 100%); }
.phone-note { padding: 30px 24px 24px; display: grid; gap: 10px; }
.phone-note b { font: 800 22px/1.2 var(--display); }
.phone-note p { color: var(--muted); margin: 0; }
.phone-actions { display: grid; gap: 10px; margin-top: 8px; }
.phone-btn { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: var(--btn-radius, 10px); border: 0; background: var(--y); color: #111; font: 800 15px var(--sans, sans-serif); text-decoration: none; cursor: pointer; }
.phone-btn + .phone-btn { background: transparent; color: var(--text); border: 1px solid var(--line); }
.phone-link { text-align: center; color: var(--muted); font-size: 13.5px; padding: 6px; }

/* ---------- уведомления ---------- */
.toast-box { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 450; display: grid; gap: 8px; width: min(520px, calc(100% - 32px)); }
.toast { background: #1b1b1f; border: 1px solid var(--line, rgba(255,255,255,.12)); border-left: 4px solid var(--y); color: #f1f1f2; padding: 12px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 20px 40px rgba(0,0,0,.6); opacity: 0; transform: translateY(10px); transition: .3s; }
.toast.show { opacity: 1; transform: none; }

/* ---------- фон-видео в шапке ---------- */
.hero-video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- страница статьи и список ---------- */
.sub-main { padding: calc(var(--header-h, 0px) + 40px) 0 80px; }
.sub-wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 24px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 26px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--y); }
.crumbs b { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.post-head h1, .list-head h1, .post-empty h1 { font: 800 clamp(30px, 4.4vw, 48px)/1.08 var(--display); margin: 10px 0 0; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.post-chip { padding: 3px 10px; border-radius: 20px; background: color-mix(in srgb, var(--y) 14%, transparent); border: 1px solid color-mix(in srgb, var(--y) 45%, transparent); color: var(--y); font-size: 12px; font-weight: 700; }
.post-lead { margin-top: 14px; font-size: 19px; color: color-mix(in srgb, var(--text) 82%, transparent); line-height: 1.55; }
.post-cover { margin: 28px 0 8px; border-radius: var(--radius, 12px); overflow: hidden; border: 1px solid var(--line); }
.post-cover img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; display: block; }
.post-body { font-size: 17.5px; line-height: 1.75; color: color-mix(in srgb, var(--text) 90%, transparent); }
.post-body h2 { font: 800 26px/1.2 var(--display); margin: 36px 0 12px; color: var(--text); }
.post-body p { margin: 0 0 18px; }
.post-body ul { margin: 0 0 18px; padding-left: 22px; }
.post-body li { margin: 6px 0; }
.post-body li::marker { color: var(--y); }
.post-body a { color: var(--y); text-decoration: underline; text-underline-offset: 3px; }
.post-body strong { color: var(--text); }
.post-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding: 20px 22px; border-radius: var(--radius, 12px); border: 1px solid color-mix(in srgb, var(--y) 40%, transparent); background: color-mix(in srgb, var(--y) 7%, var(--card)); }
.post-cta b { display: block; font-size: 18px; }
.post-cta > div span { color: var(--muted); font-size: 14px; }
.post-cta-btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: var(--btn-radius, 10px); background: var(--y); color: #111 !important; font-weight: 800; text-decoration: none !important; }
.post-cta-btn svg { width: 20px; height: 20px; }
.post-cta-btn:hover { filter: brightness(1.08); }
.post-more { margin-top: 64px; }
.post-more h2 { font: 800 26px var(--display); margin: 0 0 18px; }
.list-head { margin-bottom: 30px; }
.list-head p { color: var(--muted); margin-top: 8px; font-size: 17px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-grid.big { grid-template-columns: repeat(2, 1fr); }
.post-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius, 12px); overflow: hidden; color: var(--text); transition: transform .25s, border-color .25s; }
.post-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--y) 50%, transparent); }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.post-card-body { display: grid; gap: 8px; padding: 16px 18px 20px; }
.post-card time { color: var(--muted); font-size: 12.5px; }
.post-card b { font-size: 17px; line-height: 1.35; }
.post-ex { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.post-empty { padding: 40px 0; color: var(--muted); }
@media (max-width: 760px) {
  .post-grid, .post-grid.big { grid-template-columns: 1fr; }
  .post-body { font-size: 16.5px; }
  .sub-wrap { padding: 0 16px; }
}
