/*
Theme Name: Центр социального развития и благополучия
Theme URI: https://xn--80aaleqeomgsg.xn--p1ai
Author: Андрей Лапин
Author URI: https://андрейлапин.рф
Description: Спокойная, бережная тема для некоммерческой организации помощи людям.
Version: 1.0
License: GPL v2 or later
Text Domain: csrb
*/

/* ========== ОСНОВНЫЕ СТИЛИ ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Manrope', system-ui, -apple-system, sans-serif;
  background-color: #FEFAF5;
  color: #2C2C2C;
  line-height: 1.45;
  scroll-behavior: smooth;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4rem 0;
}

@media (max-width: 768px) {
  section {
    padding: 3rem 0;
  }
  .hero {
    min-height: 70vh !important;
  }
  h2 {
    font-size: 1.8rem;
  }
}

h1, h2, h3, p, .card, .btn {
  letter-spacing: -0.01em;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #2F3E3A;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #2F3E3A;
}

/* Анимации */
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
section {
  animation: fadeUp 0.6s ease-out forwards;
}

.card, .issue-tag, .trust-item, .meetings-gallery img, .btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.04);
}

/* Кнопки */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 48px;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  background-color: #EFF3ED;
  color: #3A5E4A;
  border: 1px solid #D9E0D6;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.btn-primary {
  background-color: #5B8C6F;
  border-color: #5B8C6F;
  color: white;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}
.btn-primary:hover {
  background-color: #4A735A;
}
.btn-outline:hover {
  background-color: #F2F6EF;
}

/* ========== МЕНЮ ========== */
.main-nav {
  background-color: #FEFAF5;
  border-bottom: 1px solid #ECE5DB;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.9rem 1.5rem;
  gap: 1rem;
}
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  cursor: pointer;
  background: transparent;
  border: none;
}
.burger span {
  width: 100%;
  height: 2px;
  background-color: #3A5E4A;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  list-style: none;
}
.nav-links > li {
  position: relative;
}
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: #3A5E4A;
  font-size: 1rem;
  transition: color 0.2s;
  padding: 0.4rem 0;
  display: inline-block;
}
.nav-links > li > a {
  border-bottom: 2px solid transparent;
}
.nav-links > li > a:hover {
  color: #2F4B3E;
  border-bottom-color: #BED0BC;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #FFFFFF;
  min-width: 200px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  padding: 0.6rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 10;
  border: 1px solid #ECE5DB;
  list-style: none;
}
.nav-links li:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 0.5rem 1.2rem;
  border-bottom: none;
}
.dropdown-menu a:hover {
  background-color: #F2F6EF;
  color: #2F4B3E;
}
.social-icons {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  margin-left: auto;
}
.social-icons a {
  color: #5B8C6F;
  font-size: 1.3rem;
  transition: opacity 0.2s, transform 0.2s;
}
.social-icons a:hover {
  opacity: 0.75;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .burger {
    display: flex;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0.8rem;
    background-color: #FEFAF5;
    padding: 1rem 0 1.2rem 0;
    border-top: 1px solid #ECE5DB;
    margin-top: 0.5rem;
    order: 3;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links > li {
    width: 100%;
    text-align: center;
  }
  .nav-links a {
    padding: 0.5rem 0;
    width: 100%;
  }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: #F9F6F0;
    margin-top: 0.5rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    border-radius: 20px;
    padding: 0.4rem 0;
    border: none;
  }
  .dropdown-menu.show-mobile {
    display: block;
  }
  .social-icons {
    margin-left: auto;
  }
  .nav-links li:hover .dropdown-menu {
    display: none;
  }
}

/* ========== КНОПКА НАВЕРХ ========== */
.go-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 52px;
  height: 52px;
  background-color: #5B8C6F;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 99;
  border: none;
  font-size: 1.6rem;
}
.go-top.show {
  opacity: 1;
  visibility: visible;
}
.go-top:hover {
  background-color: #4A735A;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
@media (max-width: 768px) {
  .go-top {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    bottom: 20px;
    right: 20px;
  }
}

/* ========== ГЛАВНАЯ СТРАНИЦА ========== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background-image: url('https://андрейлапин.рф/wp-content/uploads/2025/10/Persona_20251020_102836.jpg');
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(100deg, rgba(30, 35, 28, 0.55) 0%, rgba(20, 25, 22, 0.5) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  color: #FFFFFF;
  padding: 2rem 1.5rem;
}
.hero h1 {
  font-size: 3.2rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  text-shadow: -1px -1px 0 #262626, 1px -1px 0 #262626, -1px 1px 0 #262626, 1px 1px 0 #262626;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.75rem;
  text-shadow: -1px -1px 0 #262626, 1px -1px 0 #262626, -1px 1px 0 #262626, 1px 1px 0 #262626;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #F0F2ED;
  text-shadow: -1px -1px 0 #262626, 1px -1px 0 #262626, -1px 1px 0 #262626, 1px 1px 0 #262626;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.hero-buttons .btn-primary {
  background-color: #5B8C6F;
  border: none;
}
.hero-buttons .btn-outline {
  background: rgba(255,255,245,0.12);
  border: 1px solid rgba(255,255,240,0.5);
  color: white;
}
.hero-buttons .btn-outline:hover {
  background: rgba(255,255,245,0.25);
}
@media (max-width: 680px) {
  .hero h1 { font-size: 2.3rem; }
  .hero p { font-size: 1rem; }
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}
.card {
  background: #FFFFFF;
  border-radius: 28px;
  padding: 1.8rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.03);
  border: 1px solid #F0EADF;
}
.card h4 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: #2F3E3A;
}
.card p {
  color: #4A4F4A;
  font-size: 0.95rem;
}

.issues-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 1.2rem;
}
.issue-tag {
  background: #F2F6F0;
  padding: 0.6rem 1.2rem;
  border-radius: 60px;
  font-size: 0.9rem;
  color: #3A5E4A;
  font-weight: 500;
  transition: all 0.2s;
}
.issue-tag:hover {
  background: #E5EDE0;
  transform: translateY(-1px);
}
.gentle-phrase {
  font-size: 1.15rem;
  border-left: 3px solid #BED0BC;
  padding-left: 1.25rem;
  margin-top: 1rem;
  color: #4E6B5C;
}

.about-text {
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 820px;
}
.about-text p {
  margin-bottom: 1rem;
}
.wide-photo {
  margin-top: 2.5rem;
  border-radius: 32px;
  overflow: hidden;
  width: 100%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}
.wide-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.meetings-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  margin-top: 1rem;
}
.meetings-gallery {
  flex: 1.2;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.meetings-gallery img {
  width: calc(50% - 0.6rem);
  border-radius: 24px;
  object-fit: cover;
  height: 220px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}
.meetings-info {
  flex: 1;
  background: #FEF9F2;
  padding: 1.8rem;
  border-radius: 28px;
}
.topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}
.topic {
  background: #EFF3EB;
  padding: 0.4rem 1rem;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #3F604E;
}
@media (max-width: 800px) {
  .meetings-grid { flex-direction: column; }
  .meetings-gallery img { width: 100%; }
}

.trust-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  background: #F8F4ED;
  border-radius: 40px;
  padding: 2.5rem;
}
.trust-list {
  flex: 1.5;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.trust-item {
  font-weight: 500;
  background: rgba(91, 140, 111, 0.08);
  padding: 0.6rem 1rem;
  border-radius: 60px;
  text-align: center;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.trust-item:hover {
  background: rgba(91, 140, 111, 0.15);
  transform: scale(1.01);
}
.trust-quote {
  flex: 1;
  font-size: 1.15rem;
  background: #FFFFFFC9;
  border-radius: 28px;
  padding: 1.2rem;
  text-align: center;
  font-weight: 450;
  color: #2F4B3E;
}
@media (max-width: 700px) {
  .trust-grid { flex-direction: column; }
  .trust-list { grid-template-columns: 1fr; }
}

/* ========== СТРАНИЦА КАТЕГОРИИ (список постов) ========== */
.category-header {
  text-align: center;
  margin-bottom: 2rem;
}
.category-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}
.category-header p {
  color: #5E6E60;
  max-width: 700px;
  margin: 0 auto;
}

.blog-grid {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.blog-main {
  flex: 2;
}
.blog-main .post-category-group {
  margin-bottom: 15px;
}
.blog-sidebar {
  flex: 1;
  background: #FFFFFF;
  border-radius: 28px;
  padding: 1.5rem;
  border: 1px solid #F0EADF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}
.sidebar-widget {
  margin-bottom: 2rem;
}
.sidebar-widget:last-child {
  margin-bottom: 0;
}
.sidebar-widget h3 {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #2F3E3A;
  border-left: 3px solid #BED0BC;
  padding-left: 0.75rem;
}
.category-list, .recent-posts-list {
  list-style: none;
}
.category-list li, .recent-posts-list li {
  margin-bottom: 0.6rem;
}
.category-list a, .recent-posts-list a {
  text-decoration: none;
  color: #3A5E4A;
  font-weight: 500;
  transition: color 0.2s;
}
.category-list a:hover, .recent-posts-list a:hover {
  color: #2F4B3E;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tag-cloud a {
  background: #F2F6F0;
  padding: 0.4rem 1rem;
  border-radius: 40px;
  font-size: 0.85rem;
  color: #3A5E4A;
  text-decoration: none;
  transition: all 0.2s;
}
.tag-cloud a:hover {
  background: #E5EDE0;
  transform: translateY(-1px);
}

/* Стили для постов в категории */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.post-item {
  background: #FFFFFF;
  border-radius: 28px;
  padding: 1.8rem;
  border: 1px solid #F0EADF;
  transition: box-shadow 0.2s;
}
.post-item:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}
.post-full-image img,
.post-left-image .post-thumb img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  object-fit: cover;
}
.post-left-image {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.post-left-image .post-thumb {
  flex: 0 0 30%;
  max-width: 30%;
}
.post-left-image .post-content {
  flex: 1;
}
.post-no-image .post-content {
  width: 100%;
}
.post-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2F3E3A;
}
.post-title a {
  text-decoration: none;
  color: inherit;
}
.post-title a:hover {
  text-decoration: underline;
}
.post-excerpt {
  margin: 0.75rem 0;
  color: #4A4F4A;
  line-height: 1.5;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-size: 0.8rem;
  color: #5E6E60;
  margin: 1rem 0 1.2rem;
}
.post-meta i {
  margin-right: 0.3rem;
  color: #5B8C6F;
}
.post-meta a {
  color: #3A5E4A;
  text-decoration: none;
}
.post-meta a:hover {
  text-decoration: underline;
}
.btn-sm {
  padding: 0.4rem 1.2rem;
  font-size: 0.85rem;
}
@media (max-width: 600px) {
  .post-left-image {
    flex-direction: column;
  }
  .post-left-image .post-thumb {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ========== СТРАНИЦА СТАТЬИ ========== */
.article-title {
  margin-bottom: 1rem;
}
.article-title h1 {
  font-size: 2.2rem;
  font-weight: 600;
  color: #2F3E3A;
}
.content h2 {
  font-size: 1.8rem;
  margin-top: 15px;
  margin-bottom: 15px;
}
.content p {
  margin-bottom: 10px;
}
.content ul {
  padding-left: 35px;
  margin-bottom: 10px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  margin: 1rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #E8E0D6;
  font-size: 0.85rem;
  color: #5E6E60;
}
.article-meta-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #E8E0D6;
  border-bottom: none;
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.meta-item i {
  width: 1rem;
  color: #5B8C6F;
}
.meta-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.meta-tags a {
  background: #F2F6F0;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  color: #3A5E4A;
  text-decoration: none;
  transition: all 0.2s;
}
.meta-tags a:hover {
  background: #E5EDE0;
}
.meta-category a {
  color: #3A5E4A;
  text-decoration: none;
  border-bottom: 1px solid #D0DDC8;
}
.meta-category a:hover {
  border-bottom-color: #5B8C6F;
}

/* ========== КОНТАКТЫ И ФУТЕР ========== */
.contacts-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1rem;
}
.contacts-info {
  flex: 1;
}
.contacts-info p {
  margin: 0.8rem 0;
}
.contacts-info a {
  color: #4A735A;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid #D0DDC8;
  transition: border-color 0.2s;
}
.contacts-info a:hover {
  border-bottom-color: #5B8C6F;
}
.map {
  flex: 1;
  min-height: 280px;
  min-width: 280px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  min-height: 280px;
  min-width: 280px;
}
footer {
  background: #F3EFE9;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: #5E6E60;
  border-top: 1px solid #E8E0D6;
}
.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  margin-bottom: 1.2rem;
}
.footer-social a {
  color: #5B8C6F;
  font-size: 1.6rem;
  transition: opacity 0.2s;
}
.footer-social a:hover {
  opacity: 0.7;
}
hr {
  margin: 1rem 0;
  border: none;
  height: 1px;
  background: #E8E0D6;
}
/* Стили для статических страниц */
.page-header {
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-size: 2.2rem;
  font-weight: 600;
  color: #2F3E3A;
}
.page-content {
  max-width: 820px;

  font-size: 1.05rem;
  line-height: 1.55;
}
.page-content h2 {
  font-size: 1.8rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: #2F3E3A;
}
.page-content h3 {
  font-size: 1.4rem;
  margin-top: 1.2rem;
  margin-bottom: 0.8rem;
  color: #2F3E3A;
}
.page-content p {
  margin-bottom: 1rem;
}
.page-content ul, .page-content ol {
  padding-left: 2rem;
  margin-bottom: 1rem;
}
.page-content li {
  margin-bottom: 0.3rem;
}
.page-content a {
  color: #5B8C6F;
  text-decoration: underline;
}
.page-content a:hover {
  text-decoration: none;
}