/* ============================================================
   Тема Sodeistvie — содействие62.рф
   Цветовая схема: синий #1a5276, серый #f4f6f8, белый #fff
   ============================================================ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #222;
  background: #f4f6f8;
}

a { color: #1a5276; text-decoration: none; }
a:hover { text-decoration: underline; color: #154360; }

img { max-width: 100%; height: auto; display: block; }

/* ── Layout ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  padding: 32px 0;
}

.main-column { min-width: 0; }

/* Screen-reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ── Header ── */
.site-header {
  background: #1a5276;
  color: #fff;
  padding: 16px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-logo-link { display: flex; align-items: center; flex-shrink: 0; }
.site-logo-img { height: 64px; width: auto; }

.logo-содействие {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.site-title-block { flex: 1; }

.site-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}
.site-title a { color: #fff; }
.site-title a:hover { text-decoration: none; color: #aed6f1; }

/* ── Navigation ── */
.main-nav {
  background: #154360;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-list {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
}

.nav-item > a {
  display: block;
  padding: 14px 18px;
  color: #d6eaf8;
  font-size: .95rem;
  font-weight: 500;
  transition: background .2s, color .2s;
}

.nav-item > a:hover,
.nav-item.active > a {
  background: #1a5276;
  color: #fff;
  text-decoration: none;
}

/* Dropdown */
.nav-dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #154360;
  list-style: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  z-index: 200;
}

.dropdown-menu li a {
  display: block;
  padding: 10px 18px;
  color: #d6eaf8;
  font-size: .9rem;
  border-top: 1px solid rgba(255,255,255,.05);
}

.dropdown-menu li a:hover {
  background: #1a5276;
  color: #fff;
  text-decoration: none;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }

/* Mobile nav toggle (hidden on desktop) */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}
.mobile-nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s;
}

/* ── News list (blog.html.twig) ── */
.section-title {
  font-size: 1.4rem;
  color: #1a5276;
  border-bottom: 3px solid #1a5276;
  padding-bottom: 8px;
  margin-bottom: 24px;
}

.news-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  margin-bottom: 24px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.news-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }

.news-card-inner { display: flex; gap: 0; }

.news-card-image { flex-shrink: 0; width: 200px; }
.news-card-image img { width: 100%; height: 140px; object-fit: cover; }

.news-card-body { padding: 20px; flex: 1; }

.news-date {
  display: block;
  font-size: .85rem;
  color: #888;
  margin-bottom: 6px;
}

.news-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
  line-height: 1.4;
}
.news-title a { color: #1a5276; }
.news-title a:hover { color: #154360; }

.news-excerpt {
  font-size: .92rem;
  color: #555;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  display: inline-block;
  font-size: .88rem;
  color: #1a5276;
  font-weight: 600;
  text-decoration: none;
}
.read-more:hover { text-decoration: underline; }

/* ── Pagination ── */
.pagination {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid #d6e4ee;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbfd 0%, #eef5f9 100%);
  box-shadow: 0 10px 24px rgba(16, 61, 90, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.pagination-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}

.pagination-kicker {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #5f7d92;
}

.pagination-info {
  color: #16384d;
  font-size: 1rem;
  font-weight: 600;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid #d7e6ef;
  max-width: 100%;
}

.pagination-action,
.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.pagination-action {
  border: 1px solid #c2d7e5;
  background: #fff;
  color: #1a5276;
  box-shadow: 0 2px 6px rgba(21, 67, 96, 0.06);
}

.pagination-action:hover {
  background: #1a5276;
  border-color: #1a5276;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.pagination-page {
  min-width: 42px;
  padding: 0 14px;
  color: #30556d;
  background: transparent;
  border: 1px solid transparent;
}

.pagination-page:hover {
  background: #dfeef7;
  border-color: #c0d9e9;
  text-decoration: none;
}

.pagination-page.is-active {
  background: #1a5276;
  border-color: #1a5276;
  color: #fff;
  box-shadow: 0 8px 16px rgba(26, 82, 118, 0.22);
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  color: #6d8597;
  font-weight: 700;
}

/* ── Single post (item.html.twig) ── */
.single-post {
  background: #fff;
  border-radius: 6px;
  padding: 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.post-header { margin-bottom: 24px; }

.post-title {
  font-size: 1.6rem;
  color: #1a5276;
  line-height: 1.3;
  margin-bottom: 10px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.post-date { font-size: .9rem; color: #888; }

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  display: inline-block;
  padding: 2px 10px;
  background: #d6eaf8;
  color: #1a5276;
  border-radius: 20px;
  font-size: .8rem;
}
.tag:hover { background: #aed6f1; text-decoration: none; }

.post-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
}

.post-content h2 { font-size: 1.3rem; color: #1a5276; margin: 24px 0 12px; }
.post-content h3 { font-size: 1.1rem; color: #154360; margin: 20px 0 10px; }
.post-content p { margin-bottom: 16px; }
.post-content ul, .post-content ol { margin: 0 0 16px 24px; }
.post-content li { margin-bottom: 6px; }
.post-content img { margin: 16px auto; border-radius: 4px; }
.post-content figure {
  margin: 24px 0;
}
.post-featured-media {
  margin-top: 0;
}
.post-content figure img {
  width: 100%;
  max-width: 860px;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(21, 67, 96, .14);
}
.archive-restoration-note {
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid #d6eaf8;
  border-radius: 8px;
  background: linear-gradient(180deg, #f7fbfe 0%, #eef6fb 100%);
}
.archive-restoration-note p:last-child {
  margin-bottom: 0;
}
.post-content a { color: #1a5276; text-decoration: underline; }
.post-content blockquote {
  border-left: 4px solid #1a5276;
  padding: 12px 20px;
  margin: 20px 0;
  background: #eaf4fb;
  color: #555;
  font-style: italic;
}

.post-footer { margin-top: 32px; padding-top: 20px; border-top: 1px solid #eee; }

.back-link { font-size: .9rem; color: #1a5276; }

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  gap: 16px;
}
.nav-prev, .nav-next {
  font-size: .88rem;
  color: #1a5276;
  max-width: 48%;
}

/* ── Static pages ── */
.page-content {
  background: #fff;
  border-radius: 6px;
  padding: 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.page-title {
  font-size: 1.5rem;
  color: #1a5276;
  border-bottom: 3px solid #1a5276;
  padding-bottom: 10px;
  margin-bottom: 24px;
}

.page-body { font-size: 1rem; line-height: 1.8; }
.page-body h2 { font-size: 1.2rem; color: #1a5276; margin: 20px 0 10px; }
.page-body p { margin-bottom: 16px; }
.page-body ul { margin: 0 0 16px 24px; }

/* ── Contact page ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

address { font-style: normal; }
address p { margin-bottom: 14px; }

.contact-form-block h2 { font-size: 1.2rem; color: #1a5276; margin-bottom: 16px; }

/* Grav Form Plugin default fields */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccd;
  border-radius: 4px;
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .2s;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #1a5276;
  box-shadow: 0 0 0 3px rgba(26,82,118,.15);
}
.form-field textarea { min-height: 120px; resize: vertical; }

.form-field .consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .88rem;
  color: #555;
  cursor: pointer;
}
.form-field .consent-label input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }

.form-submit-btn {
  padding: 12px 28px;
  background: #1a5276;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.form-submit-btn:hover { background: #154360; }

/* ── Sidebar ── */
.sidebar { min-width: 0; }

.sidebar-widget {
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  margin-bottom: 24px;
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a5276;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #1a5276;
}

/* Search */
.search-input-group { display: flex; gap: 0; }
.search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ccd;
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: .9rem;
}
.search-input:focus { outline: none; border-color: #1a5276; }
.search-btn {
  padding: 8px 12px;
  background: #1a5276;
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: .9rem;
}

/* Archive list */
.archive-list { list-style: none; }
.archive-list li { border-bottom: 1px solid #f0f0f0; }
.archive-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: .9rem;
  color: #1a5276;
}
.archive-list li a:hover { text-decoration: underline; }
.archive-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef5f9;
  color: #486579;
  font-size: .78rem;
  font-weight: 700;
}

/* Partner logo */
.partner-link { display: block; }
.partner-logo { display: block; width: 100%; max-width: 260px; margin: 0 auto; }

/* ── Footer ── */
.site-footer {
  background: #154360;
  color: #d6eaf8;
  padding: 40px 0 0;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 32px;
}

.footer-col h3 {
  font-size: 1rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.2);
}

.footer-col address { font-style: normal; }
.footer-col address p { margin-bottom: 8px; font-size: .88rem; }
.footer-col address a { color: #aed6f1; }
.footer-col address a:hover { color: #fff; text-decoration: underline; }

.no-property { font-size: .8rem; color: #85c1e9; margin-top: 12px; }

.footer-nav { list-style: none; }
.footer-nav li { margin-bottom: 6px; }
.footer-nav a { color: #aed6f1; font-size: .88rem; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
  text-align: center;
  font-size: .85rem;
  color: #85c1e9;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .sidebar { display: none; } /* скрываем сайдбар на мобильных */
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; }
  .site-title { font-size: .95rem; }
  .logo-содействие { font-size: 1.5rem; }

  .mobile-nav-toggle { display: flex; }

  .nav-list {
    display: none;
    flex-direction: column;
  }
  .nav-list.is-open { display: flex; }

  .nav-item > a { padding: 12px 16px; font-size: .9rem; }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: #1a5276;
  }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown.is-open .dropdown-menu { display: block; }

  .news-card-inner { flex-direction: column; }
  .news-card-image { width: 100%; }

  .pagination {
    padding: 18px;
    border-radius: 14px;
  }

  .pagination-summary,
  .pagination-controls {
    width: 100%;
  }

  .pagination-pages {
    justify-content: flex-start;
    border-radius: 18px;
  }

  .pagination-action,
  .pagination-page {
    min-height: 40px;
    font-size: .9rem;
  }

  .pagination-action {
    flex: 1 1 auto;
  }

  .footer-grid { grid-template-columns: 1fr; }
  .single-post, .page-content { padding: 20px; }
}
