/*
Theme Name: Афиша 37
Description: Лёгкая тема для afisha37.ru — куда сходить в Иванове. Главная — афиша (плагин «Афиша 37»): шапка, меню рубрик, подвал. Без сторонних шрифтов и библиотек.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Author: Афиша 37
License: GPL-2.0-or-later
Text Domain: afisha37
*/

:root {
  /* Цвета 168.ru: тёмно-синий и красный */
  --a37-navy: #1f2d47;
  --a37-navy-2: #2a3b5c;
  --a37-red: #ee2343;
  --a37-red-dark: #b21631;
  --a37-text: #1f2d48;
  --a37-muted: #636970;
  --a37-line: #adb6c3;
  --a37-soft: #eef0f3;
  --a37-soft-hover: #e0e5ec;
  --a37-soft-active: #d2d9e3;
  --a37-bg: #ffffff;
  --a37-page: #f6f7f9;
  --a37-focus: #0151e0;
  --a37-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --a37-width: 1200px;
  --a37-gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 var(--a37-font);
  color: var(--a37-text);
  background: var(--a37-page);
  overflow-wrap: break-word;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--a37-navy); }
a:hover { color: var(--a37-red-dark); }
:focus-visible { outline: 3px solid var(--a37-focus); outline-offset: 3px; }

.container { width: 100%; max-width: var(--a37-width); margin: 0 auto; padding: 0 var(--a37-gutter); }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  padding: 10px 14px; background: #fff; color: var(--a37-navy); border-radius: 3px;
}
.skip-link:focus { top: 8px; }
.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}

/* Шапка */
.site-header { background: var(--a37-navy); color: #fff; }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; color: #fff; text-decoration: none; min-width: 0; }
.brand:hover { color: #fff; }
.brand__name { font-size: 26px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.brand__name b { display: inline-block; margin-left: 2px; padding: 0 7px; background: var(--a37-red); border-radius: 3px; }
.brand__tagline { font-size: 15px; color: #c9d1de; }
.site-header__actions { display: flex; align-items: center; gap: 8px; }
.header-button, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 14px;
  font: 500 15px/1.2 var(--a37-font); border-radius: 3px; cursor: pointer; text-decoration: none;
}
.header-button { color: #fff; background: var(--a37-red); border: 1px solid var(--a37-red); }
.header-button:hover { color: #fff; background: var(--a37-red-dark); }
.nav-toggle { display: none; color: #fff; background: transparent; border: 1px solid #6c7a93; }
.nav-toggle:hover { border-color: #fff; }

.site-nav { background: var(--a37-navy-2); }
.site-nav__list { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 8px 0; }
.site-nav__list a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 3px;
  color: #fff; text-decoration: none; font-size: 15px;
}
.site-nav__list a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.site-nav__list a[aria-current], .site-nav__list .current-menu-item > a { background: var(--a37-red); }

/* Основное */
.site-main { background: var(--a37-bg); padding-top: 8px; padding-bottom: 40px; min-height: 50vh; }
@media (min-width: 1232px) {
  .site-main { border-left: 1px solid #e3e6eb; border-right: 1px solid #e3e6eb; padding-left: 24px; padding-right: 24px; }
}
.page-content { max-width: 850px; }
.page-content h1 { font-size: 30px; line-height: 1.2; margin: 18px 0 12px; }
.entry { padding: 14px 0; border-bottom: 1px solid #e3e6eb; }
.entry__title { font-size: 21px; margin: 0 0 6px; }
.entry__content { font-size: 17px; }
.entry__content > * { max-width: 100%; }
.nav-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.nav-links .page-numbers { padding: 8px 12px; border: 1px solid #bbc3ce; border-radius: 3px; text-decoration: none; }
.nav-links .current { background: var(--a37-red); border-color: var(--a37-red); color: #fff; }
.search-form { display: flex; gap: 8px; max-width: 520px; margin: 16px 0; }
.search-form label { flex: 1; min-width: 0; }
.search-form input[type=search] { width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; border: 1px solid #8c96a3; border-radius: 3px; }
.search-form input[type=submit] { min-height: 44px; padding: 8px 14px; font: inherit; border: 1px solid var(--a37-red); background: var(--a37-red); color: #fff; border-radius: 3px; cursor: pointer; }

/* Подвал */
.site-footer { background: var(--a37-navy); color: #c9d1de; padding: 28px 0 18px; font-size: 15px; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }
.site-footer__brand { font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__links li { margin: 0 0 8px; }
.site-footer__copy { margin-top: 18px; padding-top: 14px; border-top: 1px solid #3a4a68; font-size: 13px; }

@media (max-width: 767px) {
  :root { --a37-gutter: 12px; }
  .brand__name { font-size: 22px; }
  .brand__tagline { font-size: 13px; }
  .header-button { padding: 8px 10px; font-size: 14px; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .site-nav__list { padding: 6px 0 10px; }
  .site-nav__list a { font-size: 14px; padding: 8px 10px; }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .page-content h1 { font-size: 26px; }
}
