/*
Theme Name: Kaziik
Theme URI: https://igrovye-avtomaty-onlayn.netlify.app/
Author: Kaziik
Description: Тема для сайта «Казик» — игровые автоматы онлайн, бонусы, демо-режим. Красный градиент, аккордеоны, респонсив.
Version: 1.0.0
Requires at least: 6.0
Text Domain: kaziik
*/

/* ============ Базовое ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #222; background: #fff; line-height: 1.6; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
img { max-width: 100%; height: auto; }
a { color: #e3111f; text-decoration: none; }
a:hover { text-decoration: none; opacity: .85; }

/* ============ Шапка ============ */
.site-header { background: rgba(43, 7, 10, 0.82); color: #fff; padding: 5px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.logo { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: .5px; text-shadow: 0 2px 6px rgba(128,0,15,.55); }
.logo img { height: 28px; width: auto; display: block; }
.main-nav ul, .footer-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a { color: #fff; font-weight: 600; padding: 8px 12px; border-radius: 10px; }
.main-nav a:hover { background: rgba(255,255,255,.18); opacity: 1; }
.gbtn.header-btn { padding: 5px 13px; font-size: 14px; border-radius: 8px; }

/* ============ Hero ============ */
.hero {
  background: linear-gradient(180deg, rgba(168, 0, 15, 0.8) 0%, rgba(227, 17, 31, 0.7) 45%, rgba(255, 61, 46, 0.6) 100%),
              url('img/hero-bg.webp') center/cover no-repeat;
  color: #fff;
  padding: 56px 0 46px;
  text-align: center;
}
.hero h1 { margin: 0 0 12px; font-size: 42px; line-height: 1.15; text-shadow: 0 3px 12px rgba(80,0,8,.5); }
.hero-sub { max-width: 760px; margin: 0 auto 26px; font-size: 18px; opacity: .95; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============ Красные кнопки с бликом ============ */
.gbtn { position: relative; display: inline-block; overflow: hidden; padding: 14px 30px; border-radius: 12px;
  font-weight: 700; font-size: 17px; color: #fff; background: linear-gradient(180deg, #ff3d2e 0%, #e3111f 55%, #a8000f 100%);
  box-shadow: 0 6px 18px rgba(168,0,15,.45); text-decoration: none; transition: transform .15s ease, box-shadow .2s ease; }
.gbtn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(168,0,15,.55); color: #fff; opacity: 1; }
.gbtn::before { content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 40%; border-radius: 50%;
  background: rgba(255,255,255,.28); pointer-events: none; }
.gbtn::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(115deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg); animation: btn-shine 3.2s infinite; }
@keyframes btn-shine { 0% { left: -60%; } 35% { left: 130%; } 100% { left: 130%; } }
.btn-gold { background: linear-gradient(180deg, #ffd24a, #f0a500 60%, #c67f00); color: #3a2900; box-shadow: 0 6px 18px rgba(196,120,0,.4); }
.btn-gold::after { background: linear-gradient(115deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.5) 50%, rgba(255,255,255,0) 100%); }
.btn-line { background: transparent; border: 2px solid rgba(255,255,255,.85); box-shadow: none; }

/* ============ Секции и сетка карточек ============ */
.games, .about, .prose { padding: 44px 0; }
.games h2, .about h2 { text-align: center; font-size: 30px; margin: 0 0 26px; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid #f1dcd8; border-radius: 14px; padding: 18px;
  box-shadow: 0 4px 14px rgba(227,17,31,.08); transition: transform .15s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(227,17,31,.16); }
.card-title { margin: 0 0 8px; font-size: 18px; line-height: 1.35; }
.card-title a { color: #a8000f; }
.card-excerpt { margin: 0; font-size: 14px; color: #5b5b5b; }

/* Карточки игр (пропорциональные 256x344) */
.g-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.gc-link {
  display: flex; flex-direction: column; gap: 12px; color: inherit;
}
.gc-img {
  display: block; overflow: hidden; border-radius: 10px;
  width: 100%;
}
.gc-img img {
  width: 100%; height: auto; display: block; object-fit: contain;
  transition: transform .25s ease;
}
.gc-link:hover .gc-img img { transform: scale(1.06); }

/* Категории на главной */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.cat-card { border: 1px solid #f1dcd8; border-radius: 14px; padding: 18px; background: #fff;
  box-shadow: 0 4px 14px rgba(227,17,31,.07); }
.cat-name { font-size: 19px; font-weight: 800; color: #a8000f; margin-bottom: 4px; }
.cat-count { font-size: 13px; color: #8a8a8a; margin-bottom: 10px; }
.cat-links { list-style: none; margin: 0 0 10px; padding: 0; }
.cat-links li { padding: 5px 0; border-top: 1px dashed #f3e2de; }
.cat-links a { font-size: 14px; }
.cat-more { font-size: 14px; font-weight: 700; }
.cat-more summary { cursor: pointer; color: #a8000f; padding: 8px 0 0; }
.cat-more .cat-links { margin-top: 8px; }
.sections-intro { text-align: center; max-width: 640px; margin: 0 auto 18px; color: #5b5b5b; }
.sections-actions { text-align: center; margin: 0; }

/* ============ Контент страниц ============ */
.content-block { max-width: 860px; margin: 0 auto; }
.content-block p { margin: 0 0 1.1em; }
.content-block h2, .content-block h3, .content-block h4 { color: #a8000f; }

/* ============ Аккордеоны ============ */
.acc { border: 1px solid #f1dcd8; border-radius: 12px; margin: 0 0 12px; overflow: hidden;
  background: #fff; box-shadow: 0 2px 8px rgba(227,17,31,.06); }
.acc summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 17px; color: #a8000f;
  padding: 16px 20px; position: relative; user-select: none; background: linear-gradient(180deg, #fff7f5, #fff); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 700; color: #e3111f; transition: transform .2s ease; }
.acc[open] summary::after { content: "–"; }
.acc[open] summary { background: linear-gradient(180deg, #ffe9e6, #fff3f1); }
.acc-body { padding: 4px 20px 18px; }
.acc-body p { margin: 0 0 1em; }

/* ============ Футер ============ */
.site-footer { background: #2b070a; color: #f2ded9; padding: 8px 0; margin-top: 20px; font-size: 12px; line-height: 1.35; }
.site-footer a { color: #ff8d83; }
.footer-kazik { color: inherit; text-decoration: none; font-weight: 700; }
.footer-article { max-width: 860px; margin: 0; }
.footer-nav { margin-top: 4px; }
.footer-nav li + li::before { content: " · "; color: #8f4a44; }
.footer-nav a { color: #ffd4ce; }
.footer-bottom { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 5px; }
.footer-copy { opacity: .75; margin: 0; font-size: 11px; }
.site-stats {
  margin: 0; padding: 0; font-size: 12px; text-align: center;
  color: #ffd4ce; letter-spacing: .3px;
}
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #ff3d2e; box-shadow: 0 0 8px rgba(255,61,46,.7); margin-right: 7px;
  animation: live-pulse 1.4s ease-in-out infinite; vertical-align: baseline;
}
.live-text { font-weight: 700; color: #ff8d83; letter-spacing: .8px; }
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .25; transform: scale(.8); }
}

/* ============ Отзывы (карусель, во всю ширину) ============ */
.reviews { padding: 0 0 34px; overflow: hidden; }
.reviews h2 { text-align: center; font-size: 30px; margin: 0 0 26px; }
.rev-viewport { overflow: hidden; padding: 4px 0 12px; }
.rev-track { display: flex; width: max-content; will-change: transform; }
.rev-half { display: flex; }
.rev-card {
  flex: 0 0 340px; margin: 0 20px 0 0;
  background: #fff; border-left: 3px solid #e3111f; border-radius: 12px; padding: 18px;
  box-shadow: 0 4px 14px rgba(227,17,31,.08); border-top: 1px solid #f1dcd8; border-bottom: 1px solid #f1dcd8; border-right: 1px solid #f1dcd8;
}
.rev-text { font-style: italic; margin-bottom: 10px; font-size: .95rem; line-height: 1.5; }
.rev-author { color: #888; font-size: .88rem; }
.rev-stars {
  color: #ffd700; font-size: 17px; letter-spacing: 3px; margin-bottom: 8px; line-height: 1;
  text-shadow: 0 1px 2px rgba(180,128,0,.45);
}
@keyframes rev-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.rev-anim { animation: rev-scroll 46s linear infinite; }
.rev-anim:hover { animation-play-state: paused; }
@media (max-width: 720px) { .rev-card { flex: 0 0 300px; padding: 15px; } }
@media (max-width: 480px) { .rev-card { flex: 0 0 calc(72vw - 8px); margin-right: 12px; padding: 14px; } }

/* ============ Последние выигрыши (лента, во всю ширину) ============ */
.lwins { padding: 0 0 34px; overflow: hidden; }
.lwins h2 { text-align: center; font-size: 30px; margin: 0 0 26px; }
.lw-viewport { overflow: hidden; padding: 4px 0 12px; }
.lw-track { display: flex; width: max-content; will-change: transform; }
.lw-half { display: flex; }
.lw-card {
  flex: 0 0 300px; margin: 0 14px 0 0; display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #f1dcd8; border-left: 3px solid #e3111f;
  border-radius: 12px; padding: 10px 14px; box-shadow: 0 4px 14px rgba(227,17,31,.08);
  text-decoration: none; color: #222; transition: transform .2s, box-shadow .2s;
}
.lw-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(227,17,31,.16); }
.lw-img { flex: 0 0 54px; }
.lw-img img { width: 54px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.lw-info { display: flex; flex-direction: column; min-width: 0; }
.lw-win {
  align-self: flex-start; background: linear-gradient(180deg, #ffd24a, #f0a500 60%, #c67f00);
  color: #3a2900; font-weight: 700; font-size: .9rem; padding: 2px 9px; border-radius: 999px;
  margin-bottom: 5px; box-shadow: 0 2px 6px rgba(196,120,0,.35); white-space: nowrap;
}
.lw-title { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.lw-user { color: #888; font-size: .8rem; }
.lw-anim { animation: rev-scroll 46s linear infinite; }
.lw-anim:hover { animation-play-state: paused; }
@media (max-width: 720px) { .lw-card { flex: 0 0 280px; padding: 9px 12px; gap: 10px; } }
@media (max-width: 480px) {
  .lw-card { flex: 0 0 calc(72vw - 8px); margin-right: 12px; padding: 8px 11px; gap: 9px; }
  .lw-img, .lw-img img { width: 46px; height: 62px; }
  .lw-title { font-size: .9rem; }
  .lw-win { font-size: .84rem; }
}

/* ============ Адаптив (мобильные — делать всегда) ============ */
body { overflow-x: hidden; }

@media (max-width: 640px) {
  .hero { padding: 38px 0 32px; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 15px; }
  .header-inner { justify-content: space-between; text-align: left; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .gbtn { width: 100%; text-align: center; }
  .games, .about, .prose { padding: 30px 0; }
  .games h2, .about h2, .reviews h2 { font-size: 24px; }
  .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cat-grid { grid-template-columns: 1fr; gap: 14px; }
  .gc-link { gap: 8px; }
  .site-stats { font-size: 13px; }
}

@media (min-width: 641px) and (max-width: 820px) {
  .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}