/* ==========================================================================
   Тема artbalt — основной файл стилей.

   Часть 1 — точный перенос статического лендинга artbalt-site/styles.css
   (визуальный стиль сохранён: белый фон, тёмно-синий и голубой, контейнер 1180px).

   Часть 2 — дополнения для WordPress: навигация, мобильное меню, записи,
   контент Gutenberg, пагинация, логотип.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Часть 1. Исходные стили лендинга
   -------------------------------------------------------------------------- */

:root {
  --blue: #4A90D9;
  --blue-dark: #1A365D;
  --blue-deep: #102A4C;
  --blue-soft: #EDF6FF;
  --blue-pale: #F6FAFE;
  --text: #26374A;
  --muted: #64748B;
  --white: #FFFFFF;
  --border: #D8E6F3;
  --shadow: 0 18px 50px rgba(26, 54, 93, 0.09);
  --radius-lg: 28px;
  --radius-md: 20px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid rgba(74, 144, 217, 0.4);
  outline-offset: 4px;
  border-radius: 8px;
}

strong {
  color: var(--blue-dark);
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(216, 230, 243, 0.9);
}

.header-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0 10px;
  color: var(--blue-dark);
}

.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) 0 34%, var(--blue-dark) 34% 100%);
}

.brand-legal {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand-word {
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.brand-word-accent {
  color: var(--blue);
}

.section {
  padding: 96px 0;
}

.section--hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 88% 18%, rgba(74, 144, 217, 0.16), transparent 30%),
    linear-gradient(135deg, #F8FCFF 0%, #EEF6FF 48%, #FFFFFF 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
  gap: 48px;
  align-items: center;
}

.hero-content {
  max-width: 760px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--blue-dark);
  line-height: 1.15;
}

h1 {
  max-width: 820px;
  margin-bottom: 28px;
  font-size: clamp(2.6rem, 4.5vw, 4.7rem);
  letter-spacing: -0.05em;
  font-weight: 780;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 18px;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 650px;
  margin-bottom: 34px;
  color: #40566E;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.status-card {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border: 1px solid rgba(74, 144, 217, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(26, 54, 93, 0.08);
}

.status-label {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-panel {
  position: relative;
  min-width: 0;
  padding: 34px;
  border: 1px solid rgba(74, 144, 217, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-panel::before {
  content: "";
  display: block;
  width: 54px;
  height: 6px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--blue-dark));
}

.hero-panel p:last-child {
  margin-bottom: 0;
}

.hero-decoration {
  position: absolute;
  border: 1px solid rgba(74, 144, 217, 0.15);
  transform: rotate(28deg);
}

.hero-decoration--one {
  width: 360px;
  height: 360px;
  right: -130px;
  top: -100px;
  border-radius: 84px;
}

.hero-decoration--two {
  width: 240px;
  height: 240px;
  right: 12%;
  bottom: -150px;
  border-radius: 60px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 46px;
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.text-card {
  width: 100%;
  padding: 34px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(26, 54, 93, 0.04);
}

.text-card--wide {
  grid-column: 1 / -1;
}

.text-card--accent {
  background: linear-gradient(145deg, var(--blue-dark), var(--blue-deep));
  border-color: transparent;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 44px rgba(26, 54, 93, 0.2);
}

.text-card--accent h3,
.text-card--accent strong {
  color: var(--white);
}

.text-card p:last-child {
  margin-bottom: 0;
}

.section--soft {
  background: var(--blue-pale);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.contact-card {
  min-height: 150px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(26, 54, 93, 0.05);
}

.contact-card--wide {
  grid-column: 1 / -1;
}

.contact-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-card a,
.contact-card p {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact-card a {
  width: fit-content;
  border-bottom: 1px solid rgba(74, 144, 217, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-card a:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.details-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}

.details-row {
  min-width: 0;
  padding: 26px 28px;
  border-bottom: 1px solid var(--border);
}

.details-row:nth-child(odd):not(.details-row--full) {
  border-right: 1px solid var(--border);
}

.details-row--full {
  grid-column: 1 / -1;
}

.details-row:last-child {
  border-bottom: 0;
}

.details-row dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.details-row dd {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1.06rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.site-footer {
  padding: 34px 0;
  background: var(--blue-deep);
  color: rgba(255, 255, 255, 0.8);
}

.site-footer strong {
  color: var(--white);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-contacts a {
  color: rgba(255, 255, 255, 0.82);
}

.footer-contacts a:hover {
  color: var(--white);
}

@media (max-width: 900px) {
  .section {
    padding: 78px 0;
  }

  .section--hero {
    min-height: auto;
    padding: 88px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero-panel {
    max-width: 680px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .header-inner {
    min-height: 82px;
  }

  .brand {
    gap: 9px;
  }

  .brand-legal {
    font-size: 0.62rem;
  }

  .brand-word {
    font-size: 1.35rem;
  }

  .section {
    padding: 64px 0;
  }

  .section--hero {
    padding: 72px 0;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 4.3rem);
  }

  .status-card {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    border-radius: 18px;
  }

  .story-grid,
  .contact-grid,
  .details-card {
    grid-template-columns: 1fr;
  }

  .text-card,
  .text-card--wide,
  .contact-card,
  .contact-card--wide,
  .details-row,
  .details-row--full {
    grid-column: auto;
  }

  .text-card,
  .hero-panel,
  .contact-card {
    padding: 26px;
  }

  .details-row {
    padding: 22px;
    border-right: 0 !important;
  }

  .details-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-contacts {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 460px) {
  .section-heading {
    margin-bottom: 34px;
  }

  .hero-decoration {
    opacity: 0.65;
  }

  .text-card,
  .hero-panel,
  .contact-card {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* --------------------------------------------------------------------------
   Часть 2. Дополнения темы для WordPress
   -------------------------------------------------------------------------- */

/* --- Доступность: screen-reader-text и skip-link ------------------------- */

.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;
}

.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  background-color: var(--blue-deep);
  color: var(--white);
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  height: auto;
  left: 8px;
  line-height: normal;
  padding: 12px 20px;
  text-decoration: none;
  top: 8px;
  width: auto;
  z-index: 100000;
  border-radius: 10px;
}

.skip-link:focus {
  clip: auto !important;
  clip-path: none;
  height: auto;
  width: auto;
}

/* --- Логотип, загруженный через админку ---------------------------------- */

.custom-logo-link {
  display: inline-flex;
  align-items: center;
  border-bottom: 0;
}

.custom-logo {
  max-height: 76px;
  width: auto;
  display: block;
}

/* --- Основная навигация --------------------------------------------------- */

.header-inner {
  justify-content: space-between;
  gap: 24px;
}

.site-nav {
  margin-left: auto;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: 10px 2px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current-menu-item > a:hover,
.nav-menu .current_page_item > a {
  color: var(--blue);
  border-bottom-color: rgba(74, 144, 217, 0.4);
}

.nav-menu .menu-item-has-children {
  position: relative;
}

.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: -14px;
  min-width: 240px;
  margin: 0;
  padding: 10px;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  flex-direction: column;
  gap: 0;
  display: none;
  z-index: 20;
}

.nav-menu .menu-item-has-children:hover > .sub-menu,
.nav-menu .menu-item-has-children:focus-within > .sub-menu {
  display: flex;
}

.nav-menu .sub-menu a {
  padding: 10px 14px;
  border-radius: 10px;
  border-bottom-color: transparent;
}

.nav-menu .sub-menu a:hover {
  background: var(--blue-pale);
}

/* --- Кнопка мобильного меню ------------------------------------------------ */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--blue-dark);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- Заголовки внутренних страниц ------------------------------------------ */

.page-title {
  max-width: none;
  margin-bottom: 10px;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  letter-spacing: -0.03em;
}

/* --- Метаданные записи и карточки в цикле ---------------------------------- */

.post-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-meta--secondary {
  color: var(--blue);
}

.post-title {
  margin-bottom: 14px;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.post-title a {
  color: var(--blue-dark);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.post-title a:hover {
  color: var(--blue);
  border-bottom-color: rgba(74, 144, 217, 0.4);
}

.entry-summary {
  color: var(--text);
  font-size: 1rem;
}

.entry-summary p {
  margin: 0;
}

/* --- Контент записи (Gutenberg) --------------------------------------------- */

.entry-content {
  font-size: 1.04rem;
}

.entry-content > * {
  max-width: 100%;
}

.entry-content p {
  margin: 0 0 1.2em;
}

.entry-content a {
  color: var(--blue-dark);
  border-bottom: 1px solid rgba(74, 144, 217, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.entry-content a:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.entry-content h2 {
  margin: 1.6em 0 0.6em;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.entry-content h3 {
  margin: 1.4em 0 0.5em;
  font-size: 1.35rem;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

.entry-content li {
  margin-bottom: 0.4em;
}

.entry-content blockquote {
  margin: 1.6em 0;
  padding: 18px 26px;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-md);
  background: var(--blue-pale);
  font-size: 1.05rem;
}

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.entry-content img {
  border-radius: var(--radius-md);
}

.entry-content table {
  width: 100%;
  margin: 0 0 1.4em;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.entry-content th,
.entry-content td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.entry-content th {
  background: var(--blue-pale);
  color: var(--blue-dark);
  font-weight: 700;
}

.entry-content figcaption,
.entry-content .wp-caption-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.entry-content .wp-block-quote cite {
  color: var(--muted);
  font-style: normal;
}

/* --- Изображение записи ------------------------------------------------------ */

.single-featured {
  margin: 0 0 34px;
}

.single-featured img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* --- Пагинация и навигация между записями ------------------------------------ */

.pagination,
.post-navigation,
.nav-links {
  margin-top: 34px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.nav-links a,
.nav-links .page-numbers {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 0.92rem;
  font-weight: 700;
  background: var(--white);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links .page-numbers:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.nav-links .page-numbers.current {
  background: var(--blue-dark);
  border-color: transparent;
  color: var(--white);
}

.nav-links .page-numbers.dots {
  border-color: transparent;
  background: transparent;
}

.post-navigation .nav-links {
  justify-content: space-between;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  display: inline-flex;
  max-width: 100%;
}

.post-navigation .nav-next {
  margin-left: auto;
  text-align: right;
}

.post-navigation a {
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  font-weight: 700;
  color: var(--blue-dark);
}

.post-navigation a:hover {
  color: var(--blue);
  border-color: var(--blue);
}

/* --- Кнопки и ссылки-действия -------------------------------------------------- */

.artbalt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--blue-dark);
  color: var(--white) !important;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  transition: background 0.2s ease;
}

.artbalt-btn:hover {
  background: var(--blue);
  color: var(--white);
}

.section-more {
  margin: 26px 0 0;
}

.section-more a:not(.artbalt-btn) {
  display: inline-block;
  padding: 6px 2px;
  color: var(--blue-dark);
  font-weight: 700;
  border-bottom: 2px solid rgba(74, 144, 217, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.section-more a:not(.artbalt-btn):hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* --- Ссылки на документы (PDF/JPG) ---------------------------------------------- */

.file-link {
  display: inline-block;
  color: var(--blue-dark);
  font-weight: 700;
  border-bottom: 1px solid rgba(74, 144, 217, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.file-link:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.document-links {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.document-links .document-link-item {
  margin: 0 0 8px;
}

/* --- Поиск ------------------------------------------------------------------------ */

.search-form {
  display: flex;
  gap: 10px;
  max-width: 520px;
}

.search-form .search-field {
  flex: 1;
  min-width: 0;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  color: var(--text);
  background: var(--white);
}

.search-form .search-submit {
  padding: 12px 24px;
  border: none;
  border-radius: 999px;
  background: var(--blue-dark);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.search-form .search-submit:hover {
  background: var(--blue);
}

/* --- Мобильное меню (добавления к медиазапросам) ---------------------------------- */

@media (max-width: 720px) {

  .site-nav {
    margin-left: auto;
    position: static;
  }

  .nav-toggle {
    display: inline-flex;
  }

  /* Без JS меню остаётся видимым и свёрстано колонкой. */
  body.has-js .site-nav .nav-menu {
    display: none;
  }

  body.has-js .site-nav.is-open .nav-menu {
    display: flex;
  }

  .site-nav.is-open {
    position: static;
  }

  .site-nav.is-open .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open .nav-menu a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--blue-pale);
  }

  .nav-menu .sub-menu {
    position: static;
    display: flex;
    min-width: 0;
    padding: 0 0 0 16px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .custom-logo {
    max-height: 60px;
  }
}
