/* Modern UI refresh overrides (non-breaking) */
:root {
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.16);
  --ring: #A5D6A7;
  --surface: #FFFFFF;
  --surface-2: #FBFDFA;
}

html { scroll-behavior: smooth; }
body {
  font-size: clamp(1rem, 0.96rem + 0.3vw, 1.125rem);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.2rem, 1.6rem + 2.8vw, 3.2rem); margin-bottom: clamp(10px, 1.6vw, 18px); }
h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem); margin-bottom: clamp(18px, 2.4vw, 30px); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem); }

.section { margin-bottom: clamp(48px, 7vw, 96px); }
.container { max-width: min(1280px, 105vw); }

/* Header enhancements */
header { padding: clamp(36px, 6vw, 80px) 0; position: relative; }
/* Subtle living green flow across header gradient */
header { background-size: 200% 200%; animation: rawGreenFlow 22s ease-in-out infinite alternate; }
@keyframes rawGreenFlow {
  0% { background-position: 0% 0%; }
  50% { background-position: 80% 100%; }
  100% { background-position: 100% 0%; }
}
header::before {
  content:"";
  position:absolute;
  inset:-10% -10% auto -10%;
  height: 200%;
  /* Sun glare + subtle repeating leaf pattern */
  background:
    radial-gradient(1200px 400px at 50% -10%, rgba(255,255,255,0.15), rgba(255,255,255,0)),
    url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'>\
  <g fill='%23ffffff' fill-opacity='0.08'>\
    <path d='M80 8 C102 20, 132 56, 80 150 C28 56, 58 20, 80 8 Z'/>\
    <path d='M40 30 C55 38, 75 62, 40 140 C5 62, 25 38, 40 30 Z' transform='rotate(-28 40 85)'/>\
    <path d='M120 30 C135 40, 150 60, 120 130 C90 60, 105 40, 120 30 Z' transform='rotate(22 120 80)'/>\
  </g>\
</svg>");
  background-repeat: no-repeat, repeat;
  background-size: auto, 180px 180px;
  background-position: center -10%, 0 0;
  animation: rawLeavesDrift 60s linear infinite;
  pointer-events:none;
}
@keyframes rawLeavesDrift {
  0% { background-position: center -10%, 0 0; }
  100% { background-position: center -10%, 480px -360px; }
}

/* Animated logo (subtle breathe + micro-tilt) */
.logo-main {
  transform-origin: center center;
  animation: rawLogoBreathe 8s ease-in-out infinite;
  will-change: transform;
}
@keyframes rawLogoBreathe {
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  20% { transform: translateY(-2px) rotate(-1deg) scale(1.02); }
  50% { transform: translateY(0) rotate(0deg) scale(1); }
  80% { transform: translateY(2px) rotate(1deg) scale(1.02); }
  100% { transform: translateY(0) rotate(0deg) scale(1); }
}


/* CTA button modernization */
.cta-button {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: #fff;
  border: none;
  padding: clamp(12px, 1.5vw, 16px) clamp(24px, 3.2vw, 40px);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.cta-button:hover { transform: translateY(-3px) scale(1.03); box-shadow: var(--shadow-md); filter: saturate(1.05); }
.cta-button:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }

/* Card polish */
.benefit-card,
.principle-card, .tool-card,
.testimonial-card,
.myth-card, .tip-card,
.health-card,
.transition-guide,
.daily-menu-container {
  background: linear-gradient(180deg, var(--surface), #fff 70%);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.benefit-card:hover,
.principle-card:hover, .tool-card:hover,
.testimonial-card:hover,
.myth-card:hover, .tip-card:hover,
.health-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.community-photo { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

/* FAQ accessibility + transitions */
.faq-item summary { border-radius: var(--radius-md); }
.faq-item summary:hover { background: #f6fbf6; }
.faq-item summary:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
.faq-content { overflow: hidden; max-height: 0; opacity: 0; padding: 0 20px; transition: max-height .35s ease, opacity .35s ease, padding .35s ease; }
.faq-item[open] .faq-content { max-height: 600px; opacity: 1; padding: 0 20px 20px; overflow-y: auto;
    scrollbar-width: none; }

/* Final CTA refresh */
.final-cta {
  background: radial-gradient(1200px 400px at 50% -10%, rgba(255,255,255,0.08), rgba(255,255,255,0)) ,
              linear-gradient(135deg, #0f3d12, var(--dark));
  border-top: 1px solid rgba(255,255,255,0.08);
}
.final-cta .cta-button { background: linear-gradient(135deg, #9be15d, #00e3ae); color:#073b1a; }

/* Footer refinement */
footer { border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.85rem; }

/* Testimonial stars */
.testimonial-stars {
  color: #f5b50a;
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin: 8px 0 4px;
  user-select: none;
}

/* Back to top focus */
#backToTop:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce){ * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ============================================
   ФИКСИРОВАННОЕ МЕНЮ С ТРЕМЯ ТОЧКАМИ
   ============================================ */

/* Кнопка с тремя точками - фиксирована в правом верхнем углу */
.menu-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary, #4CAF50), var(--primary-dark, #388E3C));
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 2px 6px rgba(0,0,0,0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2), 0 3px 8px rgba(0,0,0,0.15);
}

.menu-toggle:active {
  transform: scale(0.95);
}

.menu-toggle:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

/* Иконка трех точек */
.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.menu-icon span {
  width: 5px;
  height: 5px;
  background: white;
  border-radius: 50%;
  display: block;
  transition: all 0.3s ease;
}

/* Анимация иконки при открытии меню */
.menu-toggle.active .menu-icon span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  width: 20px;
  height: 2px;
  border-radius: 2px;
}

.menu-toggle.active .menu-icon span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.menu-toggle.active .menu-icon span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  width: 20px;
  height: 2px;
  border-radius: 2px;
}

/* Выдвижное меню */
.side-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #f8fdf9 100%);
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  z-index: 999;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 80px 20px 120px 20px;
}

.side-menu.active {
  right: 0;
}

/* Оверлей для закрытия меню */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Заголовок меню */
.menu-header {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark, #388E3C);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--secondary, #8BC34A);
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-header::before {
  content: "🌿";
  font-size: 1.6rem;
}

/* Пункты меню */
.menu-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-nav li {
  margin-bottom: 8px;
}

.menu-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--dark, #333);
  text-decoration: none;
  border-radius: var(--radius-sm, 8px);
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 1rem;
}

.menu-nav a:hover {
  background: linear-gradient(135deg, rgba(76,175,80,0.1), rgba(139,195,74,0.1));
  color: var(--primary-dark, #388E3C);
  transform: translateX(4px);
}

.menu-nav a:active {
  transform: translateX(2px);
}

.menu-nav .menu-icon-emoji {
  font-size: 1.3rem;
  min-width: 24px;
  text-align: center;
}

/* Разделитель в меню */
.menu-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--secondary, #8BC34A), transparent);
  margin: 16px 0;
  opacity: 0.3;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .menu-toggle {
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
  }
  
  .side-menu {
    width: 280px;
    right: -300px;
  }
}

@media (max-width: 480px) {
  .side-menu {
    width: 85vw;
    right: -85vw;
  }
}


