/*
Theme Name: AppikaStore
Theme URI: https://appikastore.ru/
Author: AppikaStore
Description: Тема-каталог мобильных приложений и игр для Android. Типы записей «Приложения» и «Игры», категории с иконками, блог, настраиваемые блоки главной страницы.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: appikastore
Tags: catalog, custom-post-types, custom-colors, custom-menu, translation-ready
*/

/* =========================================================
   1. Токены
   ========================================================= */
:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg-dark: #0a1028;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-white: #ffffff;
  --border: #e2e8f0;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-size-hero-h1: clamp(30px, 4vw, 44px);
  --font-size-hero-p: 18px;
  --font-size-h2: 20px;
  --font-size-h3: 15px;
  --font-size-body: 14px;
  --font-size-sm: 13px;
  --font-size-xs: 11px;
  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-normal: 1.4;
  --lh-relaxed: 1.5;
  --ls-tight: -0.02em;
  --container: 1200px;
  --gutter: 20px;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* =========================================================
   2. Базовые стили
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; }
a { color: var(--primary); }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4, h5, h6 { font-weight: var(--font-weight-bold); color: var(--text-main); line-height: var(--lh-snug); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: #fff; color: var(--text-main); padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* =========================================================
   3. Раскладка
   ========================================================= */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.site-main { display: block; }
.section { margin: 16px 0; }
.section:first-child { margin-top: 20px; }

.panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.section-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.section-title { margin: 0; font-size: var(--font-size-h2); font-weight: var(--font-weight-bold); }
.link-more {
  color: var(--primary); text-decoration: none; font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium); display: inline-flex; align-items: center; gap: 6px;
  transition: color .2s;
}
.link-more:hover { color: var(--primary-hover); }
.link-more svg { flex-shrink: 0; }

.empty-note {
  margin: 0; padding: 24px; text-align: center;
  color: var(--text-muted); font-size: var(--font-size-body);
  background: var(--bg-main); border-radius: var(--radius-md);
}

/* =========================================================
   4. Кнопки
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: #fff; border: none; cursor: pointer;
  border-radius: var(--radius-md); padding: 12px 24px;
  font-weight: var(--font-weight-semibold); font-size: var(--font-size-body);
  line-height: var(--lh-normal); text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn--gradient { background: linear-gradient(135deg, #4f46e5 0%, var(--primary) 100%); box-shadow: 0 4px 16px rgba(59, 130, 246, .4); }
.btn--gradient:hover { background: linear-gradient(135deg, #4338ca 0%, var(--primary-hover) 100%); box-shadow: 0 6px 20px rgba(59, 130, 246, .5); }
.btn--lg { padding: 14px 32px; font-size: 16px; }
.btn--round { border-radius: 999px; padding: 12px 28px; }
.btn--sm { padding: 8px 16px; font-size: var(--font-size-sm); }
.btn--ghost { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); }
.btn--ghost:hover { background: rgba(255, 255, 255, .18); }

/* =========================================================
   5. Шапка
   ========================================================= */
.site-header {
  background: var(--bg-dark); color: var(--text-white);
  position: sticky; top: 0; z-index: 100;
}
.site-header__inner {
  max-width: var(--container); margin: 0 auto; padding: 16px var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-white); flex-shrink: 0; }
.site-brand img { height: 36px; width: auto; display: block; }
.site-brand__text { font-size: 19px; font-weight: var(--font-weight-bold); letter-spacing: var(--ls-tight); }

.main-nav ul { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  color: var(--text-white); text-decoration: none; font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium); opacity: .9; transition: opacity .2s;
}
.main-nav a:hover { opacity: 1; }
.main-nav .current-menu-item > a { opacity: 1; }
.main-nav .sub-menu { display: none; }

.header-tools { display: flex; align-items: center; gap: 20px; margin-left: auto; }

.search-form { position: relative; display: flex; align-items: center; }
.search-form svg { position: absolute; left: 14px; pointer-events: none; color: rgba(255, 255, 255, .7); }
.search-form input[type="search"] {
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px; padding: 8px 16px 8px 38px; color: var(--text-white);
  font-size: var(--font-size-body); outline: none; width: 220px;
}
.search-form input[type="search"]::placeholder { color: rgba(255, 255, 255, .55); }
.search-form input[type="search"]:focus { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .1); }
.search-form button { position: absolute; opacity: 0; width: 0; height: 0; padding: 0; border: 0; }

.lang-switch {
  background: transparent; border: none; color: var(--text-white);
  display: flex; align-items: center; gap: 6px; font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium); cursor: pointer; padding: 4px;
}

.nav-toggle {
  display: none; background: transparent; border: none; color: var(--text-white);
  padding: 6px; cursor: pointer; margin-left: auto;
}

/* =========================================================
   6. Герой
   ========================================================= */
.hero {
  background: radial-gradient(circle at 80% 50%, #132a63 0%, #081026 70%);
  border-radius: var(--radius-lg); padding: 48px 40px; color: var(--text-white);
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 40px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}
.hero__content { flex: 1 1 500px; max-width: 620px; position: relative; z-index: 2; }
.hero__title {
  font-size: var(--font-size-hero-h1); font-weight: var(--font-weight-bold);
  line-height: var(--lh-tight); letter-spacing: var(--ls-tight);
  margin: 0 0 16px; color: var(--text-white);
}
.hero__lead {
  font-size: var(--font-size-hero-p); line-height: var(--lh-normal);
  color: rgba(255, 255, 255, .8); margin: 0 0 32px;
}
.hero__cta { margin-bottom: 40px; }
.hero__features { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.hero__visual { flex: 1 1 380px; display: flex; justify-content: center; align-items: center; position: relative; z-index: 2; }
.hero__visual img { width: 100%; max-width: 480px; height: auto; object-fit: contain; border-radius: var(--radius-lg); }

.feature {
  background: rgba(255, 255, 255, .06); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius-md);
  padding: 14px; display: flex; gap: 12px; align-items: flex-start;
}
.feature__icon { padding: 8px; border-radius: var(--radius-sm); display: flex; flex-shrink: 0; }
.feature__title {
  display: block; font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold);
  color: var(--text-white); margin-bottom: 4px; line-height: var(--lh-snug);
}
.feature__text { display: block; font-size: var(--font-size-xs); color: rgba(255, 255, 255, .6); line-height: var(--lh-snug); }

/* =========================================================
   7. Карточки приложений
   ========================================================= */
.rating {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--font-size-xs); color: var(--text-muted); font-weight: var(--font-weight-medium);
}
.rating svg { flex-shrink: 0; }

.apps-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr);
  gap: 12px; overflow-x: auto; scroll-snap-type: x proximity;
  padding-bottom: 6px; scrollbar-width: thin;
}
.apps-row > * { scroll-snap-align: start; }
.apps-row::-webkit-scrollbar { height: 6px; }
.apps-row::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }

.app-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px;
  background: var(--bg-main); border-radius: var(--radius-md);
  text-decoration: none; color: inherit; transition: background-color .2s, transform .2s;
}
.app-card:hover { background: #eef2f7; transform: translateY(-2px); }
.app-card__icon { width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0; object-fit: cover; background: #e5e7eb; }
.app-card__body { display: flex; flex-direction: column; min-height: 48px; min-width: 0; }
.app-card__title {
  font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold);
  color: var(--text-main); line-height: var(--lh-snug); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-card__meta { font-size: var(--font-size-xs); color: var(--text-muted); margin-top: 2px; }
.app-card .rating { margin-top: 2px; }

/* Категории */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-card {
  background: var(--bg-main); border-radius: var(--radius-md); padding: 10px 14px;
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit;
  transition: background-color .2s;
}
.cat-card:hover { background: #eef2f7; }
.cat-card__icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cat-card__name {
  font-size: var(--font-size-body); font-weight: var(--font-weight-medium); color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Игры */
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.game-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.game-card__cover {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-md);
  background: #e5e7eb; margin-bottom: 10px; transition: transform .2s, box-shadow .2s;
}
.game-card:hover .game-card__cover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, .12); }
.game-card__title {
  font-size: var(--font-size-body); font-weight: var(--font-weight-semibold);
  margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-card__genre {
  font-size: var(--font-size-xs); color: var(--text-muted); margin: 0 0 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Плитки приложений в витринах */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
@media (min-width: 1100px) { .tile-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 700px) and (max-width: 1099px) { .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile {
  background: var(--bg-main); border: 1px solid transparent; border-radius: var(--radius-md);
  padding: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  text-decoration: none; color: inherit; transition: background-color .2s, transform .2s, box-shadow .2s;
}
.tile:hover { background: #fff; border-color: var(--border); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, .07); }
.tile__icon { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: #e5e7eb; }
.tile__title {
  font-size: var(--font-size-body); font-weight: var(--font-weight-semibold); line-height: var(--lh-snug);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile__meta { font-size: var(--font-size-xs); color: var(--text-muted); }

/* Игры без интернета */
.offline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; }
.offline-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding-bottom: 12px; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s;
}
.offline-card:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .08); transform: translateY(-3px); }
.offline-card__cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #e5e7eb; display: block; }
.offline-card__title {
  font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold);
  line-height: var(--lh-snug); min-height: 34px; padding: 10px 10px 4px;
}
.offline-card .rating { padding: 0 10px; }

/* Приложения для жизни */
.life-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.life-card {
  background: var(--bg-main); border-radius: var(--radius-md); padding: 16px;
  display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit;
  transition: background-color .2s;
}
.life-card:hover { background: #eef2f7; }
.life-card__icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.life-card__title { display: block; margin: 0 0 4px; font-size: var(--font-size-h3); font-weight: var(--font-weight-semibold); }
.life-card__text { display: block; margin: 0; font-size: var(--font-size-sm); color: var(--text-muted); line-height: var(--lh-snug); }

/* =========================================================
   8. Промо-блок «VS»
   ========================================================= */
.promo {
  background: #f1f5f9; border-radius: var(--radius-lg); padding: 40px;
  display: flex; flex-wrap: wrap; gap: 40px; align-items: center;
}
.promo__text { flex: 1 1 380px; display: flex; flex-direction: column; gap: 16px; }
.promo__title { font-size: 28px; font-weight: var(--font-weight-bold); margin: 0; line-height: var(--lh-snug); }
.promo__text p { font-size: var(--font-size-body); line-height: var(--lh-relaxed); color: var(--text-muted); margin: 0; }
.promo__compare {
  flex: 1 1 500px; background: var(--border); border-radius: 20px; padding: 12px;
  display: flex; flex-wrap: wrap; position: relative; gap: 12px;
}
.compare-vs {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; background: var(--bg-dark); color: var(--text-white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: var(--font-weight-bold); font-size: var(--font-size-body); z-index: 2;
  border: 4px solid var(--border);
}
.compare-card { flex: 1 1 200px; border-radius: var(--radius-lg); padding: 24px 16px; display: flex; flex-direction: column; gap: 18px; }
.compare-card--bad { background: var(--bg-main); }
.compare-card--good { background: var(--bg-card); box-shadow: 0 4px 12px rgba(0, 0, 0, .04); }
.compare-card__title { font-size: var(--font-size-h3); font-weight: var(--font-weight-bold); text-align: center; margin: 0 0 8px; }
.compare-card--good .compare-card__head { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.compare-card--good .compare-card__title { margin: 0; }
.compare-item {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--font-size-sm); color: var(--text-main); font-weight: var(--font-weight-medium);
}
.compare-item svg { flex-shrink: 0; }

/* =========================================================
   9. Блог
   ========================================================= */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.post-card {
  background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-card); transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .09); transform: translateY(-3px); }
.post-card__cover { width: 100%; height: 180px; object-fit: cover; background: #e5e7eb; display: block; }
.post-card__body { padding: 20px 20px 12px; }
.post-card__title { font-size: 18px; font-weight: var(--font-weight-bold); margin: 0 0 10px; line-height: var(--lh-snug); }
.post-card__title a { color: var(--text-main); text-decoration: none; }
.post-card__title a:hover { color: var(--primary); }
.post-card__excerpt { font-size: var(--font-size-body); color: var(--text-muted); margin: 0; line-height: var(--lh-relaxed); }
.post-card__date { padding: 0 20px 20px; font-size: var(--font-size-sm); color: var(--text-muted); opacity: .8; }

/* =========================================================
   10. Нижний CTA
   ========================================================= */
.cta {
  background: linear-gradient(90deg, #0a1128 0%, #0d193a 50%, #09122a 100%);
  border-radius: var(--radius-lg); padding: 20px 32px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; overflow: hidden; min-height: 120px; flex-wrap: wrap; gap: 20px;
  box-shadow: 0 8px 24px rgba(10, 16, 40, .3);
}
.cta__text { flex: 1 1 320px; z-index: 2; }
.cta__title { margin: 0; color: var(--text-white); font-size: 22px; font-weight: var(--font-weight-bold); line-height: var(--lh-snug); }
.cta__title span { font-weight: var(--font-weight-semibold); opacity: .95; }
.cta__action { z-index: 2; flex-shrink: 0; }
.cta__visual { display: flex; align-items: center; justify-content: flex-end; z-index: 1; flex: 0 0 auto; margin-right: -12px; }
.cta__visual img { height: 130px; width: auto; object-fit: contain; }

/* =========================================================
   11. Подвал
   ========================================================= */
.site-footer { background: var(--bg-dark); color: var(--text-white); padding: 48px 0 24px; margin-top: 24px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand { flex: 1 1 220px; min-width: 200px; display: flex; flex-direction: column; gap: 16px; }
.footer-brand img { height: 36px; width: auto; max-width: 180px; }
.footer-brand__text { color: #94a3b8; font-size: var(--font-size-sm); line-height: var(--lh-relaxed); margin: 0; }
.footer-social { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; background: rgba(255, 255, 255, .08);
  border-radius: 50%; color: #fff; text-decoration: none; transition: background-color .2s;
}
.footer-social a:hover { background: rgba(255, 255, 255, .18); }

.footer-col { flex: 0 1 165px; min-width: 125px; display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { font-size: var(--font-size-h3); font-weight: var(--font-weight-semibold); color: #fff; margin: 0 0 4px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: #94a3b8; text-decoration: none; font-size: var(--font-size-sm); transition: color .2s; }
.footer-col a:hover { color: #fff; }

.footer-app {
  flex: 0 1 310px; min-width: 260px; background: #1a233d; border-radius: var(--radius-lg);
  padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.footer-app__body { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer-app__title { font-size: var(--font-size-h3); font-weight: var(--font-weight-bold); color: #fff; line-height: var(--lh-snug); }
.footer-app__text { font-size: var(--font-size-xs); color: #94a3b8; line-height: var(--lh-snug); }
.footer-app img { width: 88px; height: 88px; border-radius: var(--radius-md); flex-shrink: 0; object-fit: cover; }

.footer-bottom {
  max-width: var(--container); margin: 40px auto 0; padding: 20px var(--gutter) 0;
  border-top: 1px solid rgba(255, 255, 255, .05); text-align: center;
  color: #64748b; font-size: var(--font-size-sm);
}

/* =========================================================
   12. Внутренние страницы
   ========================================================= */
.page-head { margin-bottom: 20px; }
.page-head__title { margin: 0 0 8px; font-size: 28px; }
.page-head__desc { margin: 0; color: var(--text-muted); font-size: var(--font-size-body); line-height: var(--lh-relaxed); }

.breadcrumbs { font-size: var(--font-size-sm); color: var(--text-muted); margin-bottom: 12px; }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span + span::before { content: '/'; margin: 0 8px; opacity: .5; }

.entry-content { font-size: 15px; line-height: 1.65; color: #1e293b; }
.entry-content > * + * { margin-top: 1em; }
.entry-content h2 { font-size: 22px; margin-top: 1.6em; }
.entry-content h3 { font-size: 18px; margin-top: 1.4em; }
.entry-content img { border-radius: var(--radius-md); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .4em; }
.entry-content blockquote {
  margin: 1.4em 0; padding: 12px 20px; border-left: 3px solid var(--primary);
  background: var(--bg-main); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-muted);
}
.entry-content code { background: var(--bg-main); padding: 2px 6px; border-radius: 4px; font-size: .92em; }
.entry-content pre { background: var(--bg-dark); color: #e2e8f0; padding: 16px; border-radius: var(--radius-md); overflow-x: auto; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }

.entry-meta { font-size: var(--font-size-sm); color: var(--text-muted); margin-bottom: 20px; }
.entry-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 24px; }

/* Карточка приложения / игры */
.single-app__head { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 24px; }
.single-app__icon { width: 96px; height: 96px; border-radius: 20px; object-fit: cover; flex-shrink: 0; background: #e5e7eb; }
.single-app__info { flex: 1 1 320px; min-width: 0; }
.single-app__title { margin: 0 0 8px; font-size: 26px; }
.single-app__terms { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.term-chip {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  background: var(--bg-main); color: var(--text-muted); font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium); text-decoration: none;
}
.term-chip:hover { background: #eef2f7; color: var(--text-main); }
.single-app__facts { display: flex; flex-wrap: wrap; gap: 20px; margin: 16px 0; }
.fact__label { font-size: var(--font-size-xs); color: var(--text-muted); }
.fact__value { font-size: var(--font-size-body); font-weight: var(--font-weight-semibold); }
.single-app__cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 24px; background: #e5e7eb; }

/* Пагинация */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px;
  padding: 0 12px; border-radius: var(--radius-sm); background: var(--bg-card);
  color: var(--text-main); text-decoration: none; font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium); box-shadow: var(--shadow-card);
}
.pagination .page-numbers:hover { background: var(--bg-main); }
.pagination .page-numbers.current { background: var(--primary); color: #fff; }

/* Комментарии */
.comments-area { margin-top: 24px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin-bottom: 20px; }
.comment-body { background: var(--bg-main); border-radius: var(--radius-md); padding: 16px; }
.comment-meta { font-size: var(--font-size-sm); color: var(--text-muted); margin-bottom: 8px; }
.comment-form input[type="text"], .comment-form input[type="email"],
.comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: #fff; margin-top: 4px;
}
.comment-form p { margin-bottom: 12px; }

/* Ядро WordPress */
.alignleft { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.aligncenter { display: block; margin: 0 auto 20px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--font-size-sm); color: var(--text-muted); text-align: center; }
.sticky .post-card { outline: 2px solid var(--primary); }

/* =========================================================
   13. Адаптив
   ========================================================= */
@media (max-width: 1024px) {
  .hero { padding: 40px 28px; }
  .promo { padding: 28px; gap: 28px; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .header-tools { margin-left: 0; }
  .site-header__inner { flex-wrap: wrap; gap: 16px; }
  .main-nav, .header-tools { display: none; width: 100%; }
  .site-header.is-open .main-nav,
  .site-header.is-open .header-tools { display: flex; }
  .site-header.is-open .main-nav ul { flex-direction: column; align-items: flex-start; gap: 16px; }
  .site-header.is-open .header-tools { flex-direction: column; align-items: stretch; gap: 14px; padding-bottom: 8px; }
  .search-form input[type="search"] { width: 100%; }
  .lang-switch { align-self: flex-start; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 720px) {
  .panel { padding: 16px; }
  .hero { padding: 28px 20px; gap: 28px; }
  .hero__cta { margin-bottom: 28px; }
  .promo { padding: 20px; }
  .promo__title { font-size: 22px; }
  .promo__compare { padding: 10px; }
  .compare-vs { position: static; transform: none; margin: 0 auto; }
  .cta { padding: 20px; }
  .cta__visual { display: none; }
  .footer-app { flex: 1 1 100%; }
  .game-grid, .offline-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (max-width: 480px) {
  :root { --gutter: 14px; }
  .hero__title { font-size: 26px; }
  .hero__lead { font-size: 16px; }
  .section-title { font-size: 18px; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .game-grid, .offline-grid { grid-template-columns: 1fr 1fr; }
  .single-app__icon { width: 72px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
