/* ================================================================
   БАЗОВЫЕ НАСТРОЙКИ И СБРОС
   ================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.7;
  color: #1f2937;
  background: #f8fafc;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ================================================================
   HEADER / НАВИГАЦИЯ - VERTICAL STACKED MINIMAL
   ================================================================ */
.site-header {
  background: #ffffff;
  padding: 0.875rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 0 #e5e7eb;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

/* Логотип - simple text */
.site-logo {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.site-logo a {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.025em;
  line-height: 1;
}

.site-logo a:hover {
  color: #3b82f6;
}

.site-tagline {
  font-size: 0.6875rem;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Навигационное меню - minimal right aligned */
#top_menus {
  display: flex;
  list-style: none;
  gap: 0.125rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

#top_menus li {
  margin: 0;
}

#top_menus .nav-link {
  display: inline-block;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  border-radius: 6px;
  transition: all 0.2s ease;
}

#top_menus .nav-link:hover,
#top_menus .nav-link:focus {
  color: #3b82f6;
  background: #eff6ff;
}

#top_menus .current-menu-item .nav-link,
#top_menus .current_page_item .nav-link {
  color: #3b82f6;
  background: #dbeafe;
  font-weight: 600;
}

/* ================================================================
   HERO BLOCKS - FEATURED SECTIONS
   ================================================================ */
.hero-blocks {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.hero-blocks-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

.hero-block {
  padding: 3rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}

.hero-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.02;
  z-index: 0;
}

.hero-block-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  color: #fff;
}

.hero-block-secondary {
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  color: #1f2937;
}

.hero-block-secondary:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.hero-block-content {
  position: relative;
  z-index: 1;
}

.hero-block h2 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.hero-block h3 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-block p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.hero-block-primary p {
  color: #e0e7ff;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  background: #fff;
  color: #3b82f6;
  font-weight: 700;
  font-size: 0.9375rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.hero-block-primary .cta-button {
  color: #3b82f6;
}

.hero-block-primary .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cta-button-secondary {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.cta-button-secondary:hover {
  background: #2563eb;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* ================================================================
   FEATURED CONTENT - 4 COLUMN BLOCKS
   ================================================================ */
.featured-content {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

.featured-content-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.featured-item {
  background: #fff;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.featured-item:hover {
  transform: translateY(-4px);
  border-color: #3b82f6;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
}

.featured-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.featured-item h3 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.featured-item p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* ================================================================
   СПИСОК ПОСТОВ (КАРТОЧКИ) - BENTO BOX GRID
   ================================================================ */
.post-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

/* Каждый 5-й пост занимает 2 колонки */
.post-item:nth-child(5n+1) {
  grid-column: span 2;
  grid-row: span 2;
}

.post-item:nth-child(5n+1) .post-featured-image {
  height: 360px;
}

.post-item:nth-child(5n+1) h3 {
  font-size: 1.5rem;
}

/* Карточка поста */
.post-item {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
}

.post-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
}

/* Изображение поста */
.post-featured-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-item:hover .post-featured-image img {
  transform: scale(1.1) rotate(2deg);
}

/* Wrapper для контента */
.post-content-wrapper {
  display: contents;
}

/* Заголовок поста */
.post-item h3 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 1.25rem 1.25rem 0.75rem;
  color: #0f172a;
}

.post-item h3 a {
  color: #0f172a;
  transition: color 0.2s ease;
}

.post-item h3 a:hover {
  color: #3b82f6;
}

/* Краткое описание */
.post-item > p {
  margin: 0 1.25rem 1.25rem;
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.6;
  flex: 1;
}

/* Кнопка "Read More" */
.post-item > a:last-of-type {
  display: inline-flex;
  align-items: center;
  margin: 0 1.25rem 1.25rem;
  padding: 0.5rem 1.25rem;
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
  border-radius: 6px;
  transition: all 0.25s ease;
  align-self: flex-start;
}

.post-item > a:last-of-type:hover {
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.post-item > a:last-of-type::after {
  content: '→';
  margin-left: 0.5rem;
}

/* ================================================================
   ПАГИНАЦИЯ
   ================================================================ */
nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem auto 4rem;
  padding: 0 2rem;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  color: #475569;
  transition: all 0.2s ease;
}

.page-numbers:hover {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.page-numbers.current {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.next.page-numbers,
.prev.page-numbers {
  border-color: #e5e7eb;
  background: #fff;
  color: #64748b;
  font-weight: 600;
}

.next.page-numbers:hover,
.prev.page-numbers:hover {
  color: #3b82f6;
  border-color: #3b82f6;
}

/* ================================================================
   ХЛЕБНЫЕ КРОШКИ
   ================================================================ */
.breadcrumbs {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 0 2rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.breadcrumbs a {
  color: #64748b;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: #3b82f6;
}

.breadcrumbs span {
  color: #cbd5e1;
}

/* ================================================================
   СТРАНИЦА / ПОСТ (ПОЛНЫЙ КОНТЕНТ)
   ================================================================ */
.page-content {
  max-width: 820px;
  margin: 3rem auto;
  padding: 3rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #f1f5f9;
}

.page-content .post-featured-image {
  height: auto;
  max-height: 480px;
  margin: -3rem -3rem 2.5rem;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.page-content h1 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
  margin-bottom: 2rem;
  text-align: left;
  letter-spacing: -0.025em;
}

.page-content .content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #334155;
}

.page-content .content p {
  margin-bottom: 1.5rem;
}

.page-content .content h2 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  margin: 2.5rem 0 1.25rem;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.page-content .content h3 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: #1e293b;
}

.page-content .content ul,
.page-content .content ol {
  margin: 1.5rem 0 1.5rem 2rem;
}

.page-content .content li {
  margin-bottom: 0.75rem;
}

.page-content .content a {
  color: #3b82f6;
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.3);
  text-underline-offset: 3px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.page-content .content a:hover {
  color: #2563eb;
  text-decoration-color: #2563eb;
}

.page-content .content img {
  margin: 2.5rem auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.page-content .content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #3b82f6;
  background: #eff6ff;
  font-style: italic;
  color: #475569;
  border-radius: 0 8px 8px 0;
}

/* ================================================================
   FOOTER / ПОДВАЛ - GRADIENT CARD STYLE
   ================================================================ */
footer {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #e0e7ff;
  padding: 4rem 2rem 2rem;
  margin-top: 5rem;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

/* Колонка с информацией о сайте */
.footer-about h3 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.375rem;
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-about p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #c7d2fe;
  margin-bottom: 1.5rem;
}

/* Колонки меню */
.footer-section h4 {
  font-size: 0.8125rem;
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-menu {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-menu a {
  font-size: 0.9375rem;
  color: #c7d2fe;
  transition: all 0.2s ease;
  display: inline-block;
}

.footer-menu a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

/* Copyright */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.875rem;
  color: #c7d2fe;
}

.footer-bottom a {
  color: #ffffff;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-bottom a:hover {
  color: #fde047;
}

/* ================================================================
   АДАПТИВНОСТЬ (МОБИЛЬНЫЕ УСТРОЙСТВА)
   ================================================================ */
@media (max-width: 1200px) {
  .post-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .post-item:nth-child(5n+1) {
    grid-column: span 3;
    grid-row: span 1;
  }

  .post-item:nth-child(5n+1) .post-featured-image {
    height: 280px;
  }
}

@media (max-width: 1024px) {
  .hero-blocks-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-block {
    min-height: 240px;
    padding: 2.5rem;
  }

  .hero-block h2 {
    font-size: 1.75rem;
  }

  .featured-content-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .featured-item {
    padding: 1.75rem 1.25rem;
  }

  .featured-icon {
    font-size: 2rem;
  }

  .post-list {
    grid-template-columns: 1fr;
  }

  .post-item:nth-child(5n+1) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .post-item:nth-child(5n+1) .post-featured-image {
    height: 220px;
  }

  .post-item:nth-child(5n+1) h3 {
    font-size: 1.25rem;
  }

  .page-content {
    padding: 2.5rem;
  }

  .page-content .post-featured-image {
    margin: -2.5rem -2.5rem 2rem;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0.875rem 1.5rem;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .site-logo {
    gap: 0.25rem;
  }

  #top_menus {
    flex-wrap: wrap;
    gap: 0.375rem;
  }

  #top_menus .nav-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }

  .hero-blocks {
    padding: 0 1.5rem;
    margin: 2rem auto 0;
  }

  .hero-blocks-container {
    gap: 1rem;
    margin-bottom: 3rem;
  }

  .hero-block {
    min-height: 220px;
    padding: 2rem;
  }

  .hero-block h2 {
    font-size: 1.5rem;
  }

  .hero-block h3 {
    font-size: 1.25rem;
  }

  .hero-block p {
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
  }

  .cta-button {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
  }

  .featured-content {
    padding: 0 1.5rem;
    margin: 0 auto 3rem;
  }

  .featured-content-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .featured-item {
    padding: 1.5rem 1.25rem;
  }

  .featured-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }

  .featured-item h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .featured-item p {
    font-size: 0.8125rem;
  }

  .post-list {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1.5rem;
  }

  .post-item:nth-child(5n+1) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .post-item:nth-child(5n+1) .post-featured-image {
    height: 220px;
  }

  .post-item:nth-child(5n+1) h3 {
    font-size: 1.25rem;
  }

  .post-featured-image {
    height: 200px;
  }

  .page-content {
    padding: 2rem 1.5rem;
    margin: 2rem 1rem;
    border-radius: 12px;
  }

  .page-content .post-featured-image {
    margin: -2rem -1.5rem 1.5rem;
    border-radius: 12px 12px 0 0;
  }

  .page-content h1 {
    font-size: 1.875rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .site-logo a {
    font-size: 1.25rem;
  }

  .site-tagline {
    font-size: 0.625rem;
  }

  .hero-blocks {
    padding: 0 1rem;
    margin: 1.5rem auto 0;
  }

  .hero-block {
    min-height: 200px;
    padding: 1.5rem;
  }

  .hero-block h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  .hero-block h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }

  .hero-block p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
  }

  .cta-button {
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
  }

  .featured-content {
    padding: 0 1rem;
    margin: 0 auto 2.5rem;
  }

  .featured-content-container {
    gap: 0.875rem;
  }

  .featured-item {
    padding: 1.25rem 1rem;
  }

  .featured-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .featured-item h3 {
    font-size: 0.9375rem;
    margin-bottom: 0.375rem;
  }

  .featured-item p {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  .page-content {
    padding: 1.5rem;
  }

  .page-content .post-featured-image {
    margin: -1.5rem -1.5rem 1.25rem;
  }

  .page-content h1 {
    font-size: 1.625rem;
  }

  .page-content .content {
    font-size: 1rem;
  }

  .post-item h3 {
    font-size: 0.9375rem;
    margin: 1rem 1rem 0.625rem;
  }

  .post-item > p {
    margin: 0 1rem 1rem;
    font-size: 0.8125rem;
  }

  .post-item > a:last-of-type {
    margin: 0 1rem 1rem;
  }

  footer {
    padding: 3rem 1.5rem 1.5rem;
  }
}

/* ================================================================
   СТРАНИЦА 404
   ================================================================ */
.error-404 {
  max-width: 600px;
  margin: 5rem auto;
  padding: 4rem 3rem;
  text-align: center;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.15);
  border: 1px solid #dbeafe;
}

.error-404 h1 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 6rem;
  font-weight: 900;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1;
}

.error-404 h2 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
}

.error-404 p {
  font-size: 1rem;
  color: #64748b;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.error-404 a {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  font-size: 0.9375rem;
  transition: all 0.25s ease;
}

.error-404 a:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}
