/* ============================================================
   ФАЙЛ: style.css
   АВТОР: Ефимов Андрей Михайлович
   НАЗНАЧЕНИЕ: Единая таблица стилей всего сайта.
   ПОДКЛЮЧАЕТСЯ: через /partials/head-links.html на всех страницах.
   ЗАВИСИТ ОТ: разметки классов (.header, .nav, .card, .article-full).
   ОТ НЕГО ЗАВИСЯТ: все страницы сайта.
   ВАЖНО: шрифты — системный стек, отказ от Google Fonts.
   ТОЧКИ РАСШИРЕНИЯ: при переходе на сборщик — разбить на partials.
   ============================================================ */


/* ------------------------------------------------------------
   СЕКЦИЯ 1: БАЗОВЫЕ СБРОСЫ И КАРКАС
   ОТВЕЧАЕТ ЗА: единую геометрию, шрифт, фон, поведение скроллбара.
   ТОЧКИ ВХОДА: *, html, body, .container.
   ------------------------------------------------------------ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  overflow-y: scroll;    /* всегда показываем вертикальный скроллбар */
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans",
               "Helvetica Neue", Arial, sans-serif;
  background: #f5f7fa;
  color: #1e2a3a;
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }


/* ------------------------------------------------------------
   СЕКЦИЯ 2: ШАПКА И НАВИГАЦИЯ
   ОТВЕЧАЕТ ЗА: логотип, заголовок, меню, бургер, активную ссылку.
   ВЗАИМОДЕЙСТВУЕТ С: script.js (бургер, автоопределение active).
   ТОЧКИ ВХОДА: .header, .header-left, .burger, .nav, .nav a.active.
   ------------------------------------------------------------ */
.header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; border-bottom: 4px solid #2b6f9c;
  padding-bottom: 15px; margin-bottom: 40px; position: relative;
}
.header-left { display: flex; align-items: center; gap: 20px; }
.header .icon { width: 48px; height: 48px; flex-shrink: 0; }
.header-text h1 {
  font-weight: 700; font-size: 1.4rem; color: #0b1a2b;
  letter-spacing: -0.5px; margin: 0;
}
.header-text .sub { font-weight: 300; font-size: 0.85rem; color: #4d6885; }

/* Бургер: только мобильные */
.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 5px; order: 2;
}
.burger span {
  display: block; width: 28px; height: 3px;
  background: #1a3a5c; border-radius: 2px; transition: all 0.3s ease;
}
.burger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* Навигация */
.nav { display: flex; gap: 18px; flex-wrap: wrap; order: 1; }
.nav a {
  font-weight: 400; font-size: 0.95rem; color: #1a3a5c;
  text-decoration: none; border-bottom: 2px solid transparent;
  padding-bottom: 4px; transition: border 0.2s;
}
.nav a:hover { border-bottom-color: #33ff33; }
.nav a.active { border-bottom-color: #33ff33; font-weight: 500; }


/* ------------------------------------------------------------
   СЕКЦИЯ 3: ОБЩИЕ ЭЛЕМЕНТЫ
   ОТВЕЧАЕТ ЗА: секции, заголовки, текст, кнопки, CTA.
   ТОЧКИ ВХОДА: section, h2, h3, h4, p, li, .text-block, .btn,
                .cta-block, .highlight-box, .hero-title, .hero-lead,
                .section-subtitle.
   ------------------------------------------------------------ */
section {
  margin-bottom: 60px; background: #ffffff; border-radius: 12px;
  padding: 40px 50px; box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
h2 {
  font-weight: 500; font-size: 1.8rem; color: #1a3a5c;
  border-left: 6px solid #2b6f9c; padding-left: 18px; margin-bottom: 25px;
}
h3 { font-weight: 500; font-size: 1.3rem; color: #2c3e50; margin: 20px 0 10px 0; }
h4 { font-weight: 500; font-size: 1.1rem; color: #1a3a5c; margin: 15px 0 5px 0; }
p, li { font-weight: 300; font-size: 1.05rem; color: #2d3f54; }
ul, ol { padding-left: 25px; margin-bottom: 18px; }
li { margin-bottom: 6px; text-align: justify; }
.text-block { text-align: justify; text-indent: 1.5em; margin-bottom: 0.8em; }

.hero-title { border-left: none; padding-left: 0; font-size: 2.4rem; margin-bottom: 25px; }
.hero-lead { font-size: 1.2rem; }
.section-subtitle {
  border-left: 6px solid #2b6f9c; padding-left: 18px;
  font-weight: 500; margin-bottom: 18px;
}

.highlight-box {
  background: #f0f6fc; border-left: 6px solid #2b6f9c;
  padding: 20px 28px; margin: 25px 0; border-radius: 0 8px 8px 0;
}
.highlight-box p { margin: 0; }

.btn {
  display: inline-block; background: #2b6f9c; color: #ffffff;
  padding: 12px 35px; font-weight: 500; font-size: 1.1rem;
  text-decoration: none; border-radius: 6px; transition: background 0.2s;
  border: none; cursor: pointer;
}
.btn:hover { background: #1f5479; }

.cta-block {
  margin: 30px 0 20px; padding: 20px 30px; background: #f5f9fe;
  border-radius: 8px; border-left: 4px solid #2b6f9c;
  font-weight: 400; font-size: 1.05rem; text-align: center; color: #1a3a5c;
}


/* ------------------------------------------------------------
   СЕКЦИЯ 4: СЕТКИ И КАРТОЧКИ
   ОТВЕЧАЕТ ЗА: услуги, кейсы, роли (about.html).
   ТОЧКИ ВХОДА: .grid-2/3/4, .card, .card .badge.
   ------------------------------------------------------------ */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 25px; margin-top: 15px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.card {
  background: #f8faff; border: 1px solid #dce5ef;
  border-radius: 8px; padding: 20px 22px;
}
.card h4 { margin-top: 0; }
.card p { font-size: 0.98rem; }
.card .badge {
  display: inline-block; background: #2b6f9c; color: #fff;
  font-size: 0.75rem; font-weight: 500; padding: 2px 10px;
  border-radius: 20px; margin-bottom: 8px;
}


/* ------------------------------------------------------------
   СЕКЦИЯ 5: ФУТЕР
   ОТВЕЧАЕТ ЗА: реквизиты, банковские данные, копирайт.
   ВЗАИМОДЕЙСТВУЕТ С: partials/footer.html.
   ТОЧКИ ВХОДА: .footer, .copyright.
   ------------------------------------------------------------ */
.footer {
  margin-top: 20px; padding-top: 20px; border-top: 1px solid #dce5ef;
  display: flex; flex-wrap: wrap; justify-content: space-between;
  font-size: 0.95rem; color: #1a3a5c;
}
.footer .left { line-height: 1.8; }
.footer .right { line-height: 1.8; text-align: right; }
.footer strong { font-weight: 500; }

.copyright {
  text-align: center; font-size: 0.8rem; color: #8a9bb0;
  margin-top: 20px; padding-top: 15px; border-top: 1px solid #e0e8f0;
}
.copyright a { color: #2b6f9c; text-decoration: none; }
.copyright a:hover { text-decoration: underline; }


/* ------------------------------------------------------------
   СЕКЦИЯ 6: КОНТАКТЫ
   ОТВЕЧАЕТ ЗА: страницу contacts.html.
   ТОЧКИ ВХОДА: .contacts-grid, .contacts-block, .contacts-line,
                .contacts-note, .contacts-requisites.
   ------------------------------------------------------------ */
.contacts-grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.contacts-block { min-width: 250px; flex: 1; }
.contacts-line { font-size: 1.2rem; font-weight: 500; }
.contacts-line a { color: #2b6f9c; text-decoration: none; }
.contacts-line a:hover { text-decoration: underline; }
.contacts-note { font-weight: 300; color: #4d6885; }
.contacts-requisites { font-size: 0.95rem; }


/* ------------------------------------------------------------
   СЕКЦИЯ 7: БЛОГ
   ОТВЕЧАЕТ ЗА: карточки статей, мета, пагинацию.
   ТОЧКИ ВХОДА: .blog-list, .blog-post, .post-title, .post-excerpt,
                .post-meta, .pagination.
   ------------------------------------------------------------ */
.blog-list { display: flex; flex-direction: column; gap: 25px; margin: 25px 0; }
.blog-post {
  display: flex; flex-direction: column; background: #f8faff;
  border: 1px solid #dce5ef; border-radius: 8px; padding: 18px 20px;
  transition: box-shadow 0.2s;
}
.blog-post:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.post-content { width: 100%; }
.post-content h3 { margin: 0 0 4px 0; font-weight: 500; font-size: 1.15rem; }
.post-title {
  color: #1a3a5c; text-decoration: none;
  border-bottom: 1px solid transparent; transition: border 0.2s;
}
.post-title:hover { border-bottom-color: #2b6f9c; }
.post-excerpt {
  margin: 0 0 8px 0; font-weight: 300; font-size: 0.98rem;
  color: #2d3f54; text-align: justify;
}
.post-meta { display: flex; gap: 15px; font-size: 0.85rem; color: #6a7e98; }
.post-meta .post-category {
  background: #e7eff7; padding: 0 10px; border-radius: 12px;
  color: #1a3a5c; font-weight: 400;
}
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.pagination .page {
  display: inline-block; padding: 6px 14px; border: 1px solid #dce5ef;
  border-radius: 4px; color: #1a3a5c; text-decoration: none;
  font-weight: 400; transition: all 0.2s;
}
.pagination .page:hover { background: #f0f6fc; }
.pagination .page.current { background: #2b6f9c; color: #fff; border-color: #2b6f9c; }
.pagination .page.next { border-color: #2b6f9c; }


/* ------------------------------------------------------------
   СЕКЦИЯ 8: СТИЛИ ПОЛНОЙ СТАТЬИ
   ОТВЕЧАЕТ ЗА: страницу статьи блога.
   ВЗАИМОДЕЙСТВУЕТ С: blog/article-template.html, script.js.
   ТОЧКИ ВХОДА: .article-full, .article-tools, .article-header,
                .article-meta, .article-body, .article-tags,
                .related-posts.
   ------------------------------------------------------------ */
.article-full {
  background: #ffffff; border-radius: 12px; padding: 40px 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05); position: relative;
}
.article-tools { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 20px; }
.article-tools .tool-btn {
  background: #f5f9fe; border: 1px solid #dce5ef; border-radius: 6px;
  padding: 8px 12px; cursor: pointer; transition: all 0.2s;
}
.article-tools .tool-btn:hover { background: #e7eff7; border-color: #2b6f9c; }
.article-tools .tool-btn svg { display: block; width: 22px; height: 22px; stroke: #1a3a5c; }
.article-header h1 {
  font-weight: 700; font-size: 2.2rem; color: #0b1a2b;
  letter-spacing: -0.5px; margin: 0 0 10px 0; line-height: 1.2;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.95rem;
  color: #4d6885; border-bottom: 1px solid #dce5ef;
  padding-bottom: 15px; margin-bottom: 25px;
}
.article-meta a { color: #2b6f9c; text-decoration: none; }
.article-meta a:hover { text-decoration: underline; }
.article-body h2 {
  font-weight: 500; font-size: 1.6rem; color: #1a3a5c;
  border-left: 6px solid #2b6f9c; padding-left: 18px; margin: 35px 0 15px 0;
}
.article-body h3 { font-weight: 500; font-size: 1.3rem; color: #2c3e50; margin: 25px 0 10px 0; }
.article-body p {
  font-weight: 300; font-size: 1.05rem; color: #2d3f54;
  margin-bottom: 15px; text-align: justify; text-indent: 1.5em;
}
.article-body ul, .article-body ol { padding-left: 25px; margin-bottom: 18px; }
.article-body li {
  font-weight: 300; font-size: 1.02rem; color: #2d3f54;
  margin-bottom: 6px; text-align: justify;
}
.article-body strong { font-weight: 500; color: #1a3a5c; }
.article-tags {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px;
  padding-top: 20px; border-top: 1px solid #dce5ef;
}
.article-tags .tag {
  background: #e7eff7; padding: 4px 14px; border-radius: 20px;
  font-size: 0.85rem; color: #1a3a5c; font-weight: 400;
}
.related-posts { margin-top: 30px; padding-top: 20px; border-top: 1px solid #dce5ef; }
.related-posts h3 { font-weight: 500; font-size: 1.2rem; color: #1a3a5c; margin-bottom: 12px; }
.related-posts ul { list-style: none; padding: 0; }
.related-posts ul li { margin-bottom: 8px; }
.related-posts ul li a {
  color: #2b6f9c; text-decoration: none;
  border-bottom: 1px solid transparent; transition: border 0.2s;
}
.related-posts ul li a:hover { border-bottom-color: #2b6f9c; }


/* ------------------------------------------------------------
   СЕКЦИЯ 9: АДАПТИВ (мобильные ≤ 768px)
   ОТВЕЧАЕТ ЗА: поведение на телефонах.
   ВЗАИМОДЕЙСТВУЕТ С: script.js (бургер).
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .container { padding: 20px 15px; }
  section { padding: 25px 20px; }

  .header { flex-direction: column; align-items: stretch; gap: 12px; }
  .header-left { flex: 1; order: 1; }
  .burger { display: flex; order: 2; }
  .nav {
    display: none; flex-direction: column; width: 100%;
    margin-top: 10px; gap: 10px; background: #ffffff;
    padding: 15px 20px; border-top: 1px solid #dce5ef; order: 3;
  }
  .nav.open { display: flex; }
  .nav a {
    font-size: 1rem; padding: 8px 0 8px 15px;
    border-bottom: none; border-left: 3px solid transparent;
  }
  .nav a.active { border-left-color: #33ff33; border-bottom: none; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .footer { flex-direction: column; text-align: center; }
  .footer .right { text-align: center; margin-top: 10px; }

  h2 { font-size: 1.5rem; }
  .hero-title { font-size: 1.7rem; }
  .hero-lead { font-size: 1.05rem; }

  .article-full { padding: 25px 20px; }
  .article-header h1 { font-size: 1.6rem; }
  .article-body h2 { font-size: 1.3rem; }
  .article-tools { justify-content: flex-start; }
}
/* ------------------------------------------------------------
   СЕКЦИЯ 10: КОММЕРЧЕСКОЕ ПРЕДЛОЖЕНИЕ
   ОТВЕЧАЕТ ЗА: страницу offer.html — тарифные карточки,
               ценники, примечание и юридическую оговорку.
   ВЗАИМОДЕЙСТВУЕТ С: offer.html.
   ТОЧКИ ВХОДА: .price-grid, .price-item, .price-amount,
                .price-note, .legal-note.
   ------------------------------------------------------------ */
.price-grid { margin: 20px 0 25px 0; }

.price-item {
  text-align: center;
}
.price-item h4 {
  margin-bottom: 8px;
}
.price-item ul {
  text-align: left;
  padding-left: 20px;
  margin-top: 10px;
}

.price-amount {
  font-weight: 700;
  font-size: 1.3rem;
  color: #0b1a2b;
  background: #e7eff7;
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  margin: 8px 0;
}

.price-note {
  font-size: 0.95rem;
  color: #4d6885;
  text-align: justify;
  text-indent: 1.5em;
  margin-top: 10px;
}

.legal-note {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #dce5ef;
  font-size: 0.95rem;
  color: #4d6885;
}
.legal-note p {
  text-align: justify;
  text-indent: 1.5em;
  margin: 0;
}