/* CSS Variables & Design System */
:root {
  --bg-primary: #FDFBF7;
  --bg-secondary: #F4EFEA;
  --bg-dark: #1E241F;
  --text-primary: #232621;
  --text-muted: #6C7067;
  --text-on-dark: #F2F4F1;
  --accent-primary: #3E5C43;
  --accent-hover: #2C4230;
  --accent-warm: #C86D51;
  --border-subtle: rgba(35, 38, 33, 0.08);
  --shadow-soft: 0 10px 30px -10px rgba(62, 92, 67, 0.08);
  --shadow-hover: 0 20px 40px -12px rgba(35, 38, 33, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, .font-serif {
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: -0.02em;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(253, 251, 247, 0.85);
  border-bottom: 1px solid var(--border-subtle);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 22px;
  color: var(--text-primary);
}

.main-nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
}

.search-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  opacity: 0.6;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
}

.lang-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  background: var(--bg-secondary);
  border-radius: 6px;
  color: var(--text-muted);
}

/* Buttons */
.btn-primary {
  background-color: var(--accent-primary);
  color: #FFFFFF;
  padding: 12px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(62, 92, 67, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}

.btn-link {
  background: transparent;
  border: none;
  text-decoration: underline;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
}

/* Cards */
.card {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card-image-wrapper {
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-image-wrapper img {
  transform: scale(1.04);
}

.card-badge-warm {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--accent-warm);
  color: #FFF;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

/* Hero */
.hero-section {
  padding: 60px 0;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: center;
}

.hero-tag {
  color: var(--accent-warm);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-content h1 {
  font-size: 48px;
  line-height: 1.15;
  margin: 16px 0;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.hero-form {
  display: flex;
  gap: 12px;
}

.hero-form input {
  flex: 1;
  padding: 12px 20px;
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
  background: #FFF;
  font-size: 15px;
  outline: none;
}

.hero-card-body {
  padding: 20px;
}

.card-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-icon {
  width: 14px;
  height: 14px;
}

/* Categories */
.categories-section {
  padding: 40px 0 60px;
}

.section-title {
  font-size: 28px;
  margin-bottom: 24px;
  text-align: center;
}

.categories-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.chip-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  padding: 10px 20px;
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
}

.chip-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.chip-icon {
  width: 16px;
  height: 16px;
}

/* Articles Section */
.articles-section {
  padding: 60px 0;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.featured-card {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.featured-card .card-image-wrapper {
  aspect-ratio: 16/9;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.category-tag {
  font-size: 12px;
  color: var(--accent-primary);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.card-body h3 {
  font-size: 20px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.excerpt {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer-meta {
  margin-top: auto;
  font-size: 12px;
  color: var(--text-muted);
}

/* Planning Section */
.planning-section {
  background: var(--bg-secondary);
  padding: 80px 0;
}

.planning-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.planning-header h2 {
  font-size: 32px;
  margin-bottom: 12px;
}

.planning-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.benefit-card {
  background: #FFFFFF;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
}

.benefit-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--accent-primary);
}

.benefit-card p {
  font-size: 15px;
  color: var(--text-muted);
}

/* Newsletter Section */
.newsletter-section {
  padding: 80px 24px;
  display: flex;
  justify-content: center;
}

.newsletter-card {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-radius: 24px;
  padding: 60px 40px;
  max-width: 800px;
  text-align: center;
  width: 100%;
}

.newsletter-card h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

.newsletter-card p {
  font-size: 16px;
  color: #A3A8A0;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 100px;
  border: none;
  outline: none;
  font-size: 15px;
}

.btn-newsletter {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-newsletter:hover {
  background-color: #FFF;
  transform: translateY(-2px);
}

/* Welcome Section */
.welcome-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 20px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.welcome-section h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.welcome-section p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: #A3A8A0;
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 40px;
}

.footer-logo {
  font-size: 20px;
  color: var(--text-on-dark);
  display: inline-block;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 14px;
  margin-bottom: 20px;
}

.copyright {
  font-size: 12px;
  opacity: 0.6;
}

.footer-col h4 {
  color: var(--text-on-dark);
  font-size: 15px;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col ul a:hover {
  color: var(--text-on-dark);
}

.footer-disclaimer h4 {
  color: var(--text-on-dark);
  font-size: 14px;
  margin-bottom: 8px;
}

.footer-disclaimer p {
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.8;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  max-width: 380px;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border-subtle);
  transform: translateX(120%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.show {
  transform: translateX(0);
}

.cookie-header {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.cookie-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-header p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
  }
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .featured-card {
    grid-column: span 2;
    grid-row: auto;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .main-nav {
    display: none;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .featured-card {
    grid-column: span 1;
  }
  .planning-grid {
    grid-template-columns: 1fr;
  }
  .hero-content h1 {
    font-size: 32px;
  }
  .hero-form, .newsletter-form {
    flex-direction: column;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .cookie-banner {
    left: 16px;
    right: 16px;
    max-width: none;
  }
}
/* Inner page styles */
/* Additional Styles for Article Internal Page */

.article-page-main {
  padding-bottom: 80px;
}

.article-container {
  max-width: 860px;
  margin: 40px auto;
  padding: 0 24px;
}

.article-breadcrumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.article-breadcrumbs a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.article-breadcrumbs a:hover {
  color: var(--accent-primary);
}

.article-header {
  margin-bottom: 32px;
}

.article-title {
  font-size: 42px;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 12px 0 20px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.meta-author {
  color: var(--text-primary);
  font-weight: 600;
}

/* Main & Inline Article Images */
.article-featured-media {
  margin-bottom: 40px;
}

.responsive-img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
  object-fit: cover;
}

.article-main-img {
  max-height: 480px;
  box-shadow: var(--shadow-soft);
}

.image-caption {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

.article-inline-image {
  margin: 36px 0;
}

.article-inline-image figcaption {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

/* Table of Contents (Oglavlenie) */
.table-of-contents {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 40px;
  border: 1px solid var(--border-subtle);
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent-primary);
}

.toc-icon {
  width: 20px;
  height: 20px;
}

.toc-list {
  list-style: none;
  padding-left: 0;
}

.toc-list li {
  margin-bottom: 10px;
}

.toc-list li:last-child {
  margin-bottom: 0;
}

.toc-list a {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--accent-warm);
  text-decoration: underline;
}

/* Article Text Formatting (Headings, Paragraphs, Links) */
.article-content {
  font-size: 17px;
  line-height: 1.8;
  color: #333731;
}

.lead-paragraph {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 28px;
}

.article-content h1, 
.article-content h2, 
.article-content h3, 
.article-content h4, 
.article-content h5, 
.article-content h6 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.article-content h1 { font-size: 36px; }
.article-content h2 { font-size: 28px; border-bottom: 1px solid var(--border-subtle); padding-bottom: 8px; }
.article-content h3 { font-size: 22px; }
.article-content h4 { font-size: 19px; color: var(--accent-primary); }
.article-content h5 { font-size: 17px; text-transform: uppercase; letter-spacing: 0.05em; }
.article-content h6 { font-size: 15px; color: var(--text-muted); }

.article-content p {
  margin-bottom: 20px;
}

.article-content span {
  color: var(--accent-primary);
  font-weight: 600;
}

.article-content a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.article-content a:hover {
  color: var(--accent-warm);
}

/* Lists Styling */
.styled-ul, .styled-ol {
  margin: 20px 0 28px 24px;
}

.styled-ul li {
  margin-bottom: 12px;
  list-style-type: disc;
}

.styled-ol li {
  margin-bottom: 12px;
  list-style-type: decimal;
}

.styled-ol li span {
  font-weight: 600;
  color: var(--text-primary);
}

.disclaimer-text {
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-left: 4px solid var(--accent-primary);
  border-radius: 4px;
}

/* Custom Table Styling */
.table-wrapper {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF;
  text-align: left;
  font-size: 15px;
}

.custom-table th {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.custom-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: #444841;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:nth-child(even) {
  background-color: #FAF8F4;
}

/* Related Section (Perelinkovka) */
.related-section {
  background: var(--bg-secondary);
  padding: 60px 0;
  margin-top: 60px;
}

.related-section .section-title {
  text-align: left;
  margin-bottom: 32px;
}

/* Contact Section & Form */
.contact-section {
  margin: 60px auto;
}

.contact-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}

.contact-info h2 {
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--accent-primary);
}

.contact-info p {
  color: var(--text-muted);
  font-size: 15px;
}

.contact-form, .comment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-form input, 
.contact-form textarea, 
.comment-form input, 
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus,
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--accent-primary);
}

.btn-icon {
  width: 14px;
  height: 14px;
  margin-left: 8px;
  filter: brightness(0) invert(1);
}

/* Comments Section */
.comments-section {
  max-width: 860px;
  margin: 60px auto;
}

.comments-title {
  font-size: 28px;
  margin-bottom: 24px;
}

.comments-list {
  margin-bottom: 40px;
}

.comment-item {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.comment-author {
  font-weight: 700;
  font-size: 16px;
}

.comment-date {
  font-size: 12px;
  color: var(--text-muted);
}

.comment-text {
  font-size: 15px;
  color: var(--text-primary);
}

.comment-form-wrapper {
  background: #FFFFFF;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
}

.comment-form-wrapper h3 {
  font-size: 22px;
  margin-bottom: 4px;
}

.form-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Responsive Layout Adjustments */
@media (max-width: 820px) {
  .contact-card {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  
  .article-title {
    font-size: 32px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}