/* ============================================
   Volksmedizine.de — Main Stylesheet
   Organic / Editorial Aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Source+Sans+3:wght@300;400;600&family=Playfair+Display:ital,wght@1,700&display=swap');

/* === CSS VARIABLES === */
:root {
  --green-dark:   #1e4d3a;
  --green-mid:    #2d6a4f;
  --green-light:  #52b788;
  --green-pale:   #b7e4c7;
  --cream:        #fefae0;
  --cream-dark:   #f2e8c6;
  --brown:        #6b4226;
  --brown-light:  #a0673a;
  --terracotta:   #c1440e;
  --text-dark:    #1a1a1a;
  --text-mid:     #3d3d3d;
  --text-light:   #6b6b6b;
  --white:        #ffffff;
  --border:       #d9cba8;
  --shadow:       rgba(45, 106, 79, 0.12);
  --radius:       8px;
  --font-head:    'Lora', Georgia, serif;
  --font-body:    'Source Sans 3', sans-serif;
  --font-italic:  'Playfair Display', serif;
  --max-w:        1180px;
  --sidebar-w:    300px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-mid); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-dark); }

/* === COOKIE BANNER === */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--green-dark); color: var(--cream);
  padding: 16px 24px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.875rem; box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}
#cookie-banner p { flex: 1; min-width: 200px; }
#cookie-banner a { color: var(--green-pale); text-decoration: underline; }
.cookie-btn {
  background: var(--green-light); color: var(--green-dark);
  border: none; padding: 8px 20px; border-radius: 4px;
  cursor: pointer; font-weight: 600; font-size: .875rem;
  white-space: nowrap; transition: background .2s;
}
.cookie-btn:hover { background: var(--green-pale); }

/* === DISCLAIMER BANNER === */
.disclaimer-bar {
  background: #fff8e7; border-bottom: 2px solid #f0c060;
  padding: 10px 24px; font-size: 0.8rem; color: #7a5a00;
  text-align: center;
}
.disclaimer-bar strong { color: var(--brown); }

/* === HEADER === */
.site-header {
  background: var(--green-dark);
  border-bottom: 4px solid var(--green-light);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 16px var(--shadow);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 68px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: 1.5rem;
  font-weight: 700; color: var(--cream); letter-spacing: -.5px;
}
.site-logo .leaf { font-size: 1.8rem; }
.site-logo span { color: var(--green-pale); }

/* NAV */
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--cream-dark); padding: 6px 12px; border-radius: 4px;
  font-size: .9rem; font-weight: 400; transition: all .2s;
}
.site-nav a:hover, .site-nav a.active {
  background: rgba(255,255,255,.12); color: var(--white);
}

/* LANG SWITCHER */
.lang-switcher {
  display: flex; gap: 4px; margin-left: 16px;
  border-left: 1px solid rgba(255,255,255,.2); padding-left: 16px;
}
.lang-switcher a {
  color: rgba(255,255,255,.6); font-size: .8rem; font-weight: 600;
  padding: 3px 7px; border-radius: 3px; letter-spacing: .5px;
  transition: all .2s;
}
.lang-switcher a:hover, .lang-switcher a.active {
  color: var(--white); background: rgba(255,255,255,.15);
}

/* HAMBURGER */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.hamburger span { width: 24px; height: 2px; background: var(--cream); display: block; transition: all .3s; border-radius: 2px; }

/* === HERO === */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 60%, var(--green-light) 100%);
  padding: 80px 24px; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { max-width: 780px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 {
  font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--white); font-weight: 700; line-height: 1.2; margin-bottom: 16px;
}
.hero p { color: var(--green-pale); font-size: 1.15rem; max-width: 600px; margin: 0 auto 32px; }
.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hero-tag {
  background: rgba(255,255,255,.12); color: var(--cream);
  padding: 6px 16px; border-radius: 20px; font-size: .85rem;
  border: 1px solid rgba(255,255,255,.2);
}

/* === BREADCRUMB === */
.breadcrumb {
  background: var(--cream-dark); border-bottom: 1px solid var(--border);
  padding: 10px 24px;
}
.breadcrumb-inner {
  max-width: var(--max-w); margin: 0 auto;
  font-size: .82rem; color: var(--text-light);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.breadcrumb-inner a { color: var(--green-mid); }
.breadcrumb-inner span { color: var(--text-light); }

/* === MAIN LAYOUT === */
.page-wrap { max-width: var(--max-w); margin: 0 auto; padding: 48px 24px; }
.content-grid {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 48px;
  align-items: start;
}

/* === ARTICLE === */
.article-header { margin-bottom: 32px; }
.article-category {
  display: inline-block; background: var(--green-light); color: var(--white);
  font-size: .75rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 3px; margin-bottom: 12px;
}
.article-header h1 {
  font-family: var(--font-head); font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: var(--green-dark); line-height: 1.25; margin-bottom: 16px;
}
.article-meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: .85rem; color: var(--text-light); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 12px 0; margin-bottom: 24px;
}
.article-meta span { display: flex; align-items: center; gap: 5px; }
.article-img {
  width: 100%; height: 340px; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 32px;
  box-shadow: 0 8px 32px var(--shadow);
}
.article-img-placeholder {
  width: 100%; height: 260px; border-radius: var(--radius); margin-bottom: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, var(--green-pale), var(--cream-dark));
  box-shadow: 0 8px 32px var(--shadow);
}

/* === ARTICLE BODY === */
.article-body { font-size: 1.05rem; color: var(--text-mid); }
.article-body h2 {
  font-family: var(--font-head); font-size: 1.6rem; color: var(--green-dark);
  margin: 40px 0 16px; padding-bottom: 8px;
  border-bottom: 2px solid var(--green-pale);
}
.article-body h3 {
  font-family: var(--font-head); font-size: 1.2rem; color: var(--brown);
  margin: 28px 0 12px;
}
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol {
  margin: 0 0 20px 24px;
}
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--green-dark); }
.article-body em { color: var(--brown); font-style: italic; }
.article-body blockquote {
  background: var(--cream-dark); border-left: 4px solid var(--green-light);
  padding: 16px 20px; margin: 24px 0; border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--text-mid);
}
.article-body .highlight-box {
  background: linear-gradient(135deg, #e8f5ee, #f0faf4);
  border: 1px solid var(--green-pale); border-radius: var(--radius);
  padding: 20px 24px; margin: 28px 0;
}
.article-body .highlight-box h4 {
  font-family: var(--font-head); color: var(--green-dark);
  margin-bottom: 8px; font-size: 1rem;
}
.article-body .warning-box {
  background: #fff8e7; border: 1px solid #f0c060;
  border-radius: var(--radius); padding: 16px 20px; margin: 24px 0;
  font-size: .9rem; color: #7a5a00;
}
.article-body .warning-box::before { content: '⚠️ '; }

/* FAQ Section */
.faq-item { margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-question {
  background: var(--cream-dark); padding: 16px 20px; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; color: var(--green-dark);
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.faq-question::after { content: '+'; font-size: 1.5rem; color: var(--green-mid); }
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer { display: none; padding: 16px 20px; background: var(--white); }
.faq-item.open .faq-answer { display: block; }

/* Tags */
.article-tags { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.article-tags span { font-size: .85rem; color: var(--text-light); margin-right: 8px; }
.tag {
  display: inline-block; background: var(--cream-dark);
  color: var(--green-mid); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 20px; font-size: .8rem;
  margin: 0 4px 4px 0; transition: all .2s;
}
.tag:hover { background: var(--green-light); color: var(--white); border-color: var(--green-light); }

/* === SIDEBAR === */
.sidebar { position: sticky; top: 88px; }
.sidebar-widget {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 24px;
  box-shadow: 0 2px 12px var(--shadow);
}
.sidebar-widget h3 {
  font-family: var(--font-head); font-size: 1rem; color: var(--green-dark);
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--green-pale);
}
.sidebar-list { list-style: none; }
.sidebar-list li { border-bottom: 1px solid var(--cream-dark); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a {
  display: block; padding: 8px 0; font-size: .9rem; color: var(--text-mid);
  transition: color .2s; display: flex; align-items: flex-start; gap: 8px;
}
.sidebar-list a:hover { color: var(--green-mid); }
.sidebar-list a .icon { font-size: .9rem; flex-shrink: 0; margin-top: 2px; }

.search-box { display: flex; gap: 8px; }
.search-box input {
  flex: 1; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 4px; font-family: var(--font-body); font-size: .9rem;
  background: var(--cream); outline: none; transition: border .2s;
}
.search-box input:focus { border-color: var(--green-light); }
.search-box button {
  background: var(--green-mid); color: var(--white); border: none;
  padding: 8px 14px; border-radius: 4px; cursor: pointer; transition: background .2s;
}
.search-box button:hover { background: var(--green-dark); }

/* === CARD GRID === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px; margin-bottom: 40px;
}
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px var(--shadow); }
.card-thumb {
  width: 100%; height: 180px; object-fit: cover;
}
.card-thumb-placeholder {
  width: 100%; height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--green-pale), var(--cream-dark));
}
.card-body { padding: 18px; }
.card-cat {
  font-size: .72rem; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--green-light); margin-bottom: 6px;
}
.card h3 { font-family: var(--font-head); font-size: 1.05rem; color: var(--green-dark); margin-bottom: 8px; line-height: 1.35; }
.card p { font-size: .88rem; color: var(--text-light); margin-bottom: 14px; line-height: 1.55; }
.card-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .85rem; font-weight: 600; color: var(--green-mid);
}
.card-link::after { content: '→'; transition: transform .2s; }
.card:hover .card-link::after { transform: translateX(4px); }

/* === CATEGORY PAGE === */
.cat-header {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  padding: 48px 24px; text-align: center; color: var(--white);
}
.cat-header h1 { font-family: var(--font-head); font-size: 2.2rem; margin-bottom: 10px; }
.cat-header p { color: var(--green-pale); max-width: 600px; margin: 0 auto; }

/* === HOME SECTIONS === */
.section-title {
  font-family: var(--font-head); font-size: 1.8rem; color: var(--green-dark);
  margin-bottom: 8px;
}
.section-subtitle { color: var(--text-light); margin-bottom: 32px; font-size: 1rem; }
.section-divider { border: none; border-top: 2px solid var(--green-pale); margin: 48px 0; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-bottom: 48px; }
.feature-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px var(--shadow); }
.feature-icon { font-size: 2.5rem; margin-bottom: 12px; }
.feature-card h3 { font-family: var(--font-head); font-size: 1rem; color: var(--green-dark); margin-bottom: 8px; }
.feature-card p { font-size: .88rem; color: var(--text-light); }

/* === FOOTER === */
.site-footer {
  background: var(--green-dark); color: var(--green-pale);
  padding: 48px 24px 24px; margin-top: 64px;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .site-logo { margin-bottom: 12px; }
.footer-brand p { font-size: .88rem; line-height: 1.6; color: rgba(255,255,255,.6); }
.footer-col h4 {
  font-family: var(--font-head); color: var(--white); font-size: .95rem;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,.6); font-size: .88rem; transition: color .2s; }
.footer-col a:hover { color: var(--green-light); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px; font-size: .8rem; color: rgba(255,255,255,.4);
  flex-wrap: wrap; gap: 8px;
}
.footer-disclaimer {
  background: rgba(0,0,0,.2); border-radius: var(--radius);
  padding: 14px 18px; margin: 24px 0; font-size: .8rem;
  color: rgba(255,255,255,.5); border-left: 3px solid var(--green-light);
}

/* === BOT LOG PANEL (hidden in production) === */
#bot-log-panel {
  display: none;
  position: fixed; bottom: 80px; right: 20px; z-index: 8888;
  background: rgba(0,0,0,.85); color: #0f0; font-family: monospace;
  font-size: .7rem; padding: 12px; border-radius: 6px; max-width: 320px;
  max-height: 200px; overflow-y: auto;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .site-nav { display: none; flex-direction: column; position: absolute; top: 68px;
    left: 0; right: 0; background: var(--green-dark); padding: 12px 0; gap: 0; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 24px; border-radius: 0; width: 100%; }
  .hamburger { display: flex; }
  .lang-switcher { border-left: none; padding-left: 0; margin-left: 0; }
  .header-inner { position: relative; }
  .hero { padding: 48px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .page-wrap { padding: 28px 16px; }

  /* FIX 1: Список статей — 1 колонка */
  .alist { grid-template-columns: 1fr !important; }

  /* FIX 2: Touch-targets — минимум 44px */
  .sidebar-list a { padding: 12px 0; min-height: 44px; }
  .site-nav a { min-height: 44px; display: flex; align-items: center; }
  .cookie-btn { min-height: 44px; padding: 10px 24px; }
  .card-link { min-height: 44px; display: inline-flex; align-items: center; }
  .tag { padding: 8px 14px; }

  /* FIX 3: Cookie banner — вертикальный стек */
  #cookie-banner { flex-direction: column; text-align: center; padding: 20px 16px; gap: 12px; }
  #cookie-banner p { min-width: unset; }

  /* Бонус: мета статьи читаемее на мобиле */
  .article-meta { font-size: .9rem; gap: 10px; }
  .article-meta span { min-height: 44px; display: flex; align-items: center; }
}

/* === ANIMATIONS === */
@keyframes fadeUp { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }
.fade-up { animation: fadeUp .5s ease both; }
.fade-up:nth-child(2) { animation-delay: .1s; }
.fade-up:nth-child(3) { animation-delay: .2s; }
.fade-up:nth-child(4) { animation-delay: .3s; }
