/* =====================================================
   MAIN.CSS - Основные стили для сайта DoTerra
   ===================================================== */

/* Общие стили */

/* Утилитарные классы для JavaScript */
.js-ripple-container {
  position: relative !important;
  /* НЕ используем overflow: hidden - он обрезает box-shadow кнопок! */
}

.js-hidden {
  display: none !important;
}

.js-visible {
  display: block !important;
}

/* Экран загрузки */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(-45deg, #e3f2fd, #f3e5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loading-screen .spinner-container {
  text-align: center;
}

#loading-screen .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(102, 126, 234, 0.2);
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

#loading-screen .loading-text {
  margin-top: 20px;
  color: #667eea;
  font-size: 18px;
  font-weight: 500;
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: linear-gradient(-45deg, #e3f2fd, #f3e5f5, #e1f5fe, #f1f8e9);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  margin: 0;
  padding: 0;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 500px;
  margin: 20px auto;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease-out;
}

/* Шапка сайта */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 25px 20px;
  margin: -15px -15px 30px -15px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
}

.header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate360 20s linear infinite;
}

h1 {
  text-align: center;
  margin: 0;
  padding: 0;
  font-size: 28px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  position: relative;
  z-index: 1;
  letter-spacing: 1.5px;
  line-height: 1.6;
}

h1 .doterra {
  display: block;
  font-size: 48px;
  background: linear-gradient(90deg,
    #ffffff 0%,
    #fff5e6 20%,
    #ffffff 40%,
    #fff5e6 60%,
    #ffffff 80%,
    #fff5e6 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
  letter-spacing: 3px;
  animation: textShimmer 4s linear infinite;
  margin: 8px 0;
  font-family: 'Helvetica Neue', 'Arial Black', sans-serif;
}

h1::before {
  content: '🌿';
  display: block;
  font-size: 42px;
  margin-bottom: 8px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(255, 255, 255, 0.3));
}

h1::after {
  content: '✨';
  display: block;
  font-size: 42px;
  margin-top: 8px;
  animation: float 3s ease-in-out infinite, sparkle 2s ease-in-out infinite;
  animation-delay: 1.5s;
  filter: drop-shadow(0 4px 10px rgba(255, 255, 255, 0.3));
}

.subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.95);
  font-size: 16px;
  margin-top: 12px;
  font-weight: 500;
  position: relative;
  z-index: 1;
  letter-spacing: 3px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1.2s ease-out;
  font-style: italic;
}

/* Стили строки поиска */
.search-container {
  text-align: center;
  margin-bottom: 15px;
  position: relative;
  animation: fadeInUp 1s ease-out;
}

.search-container input {
  width: 80%;
  padding: 12px 40px 12px 15px;
  font-size: 16px;
  border: 2px solid transparent;
  border-radius: 25px;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, #667eea, #764ba2) border-box;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-container input:focus {
  outline: none;
  transform: scale(1.02);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.search-clear {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  cursor: pointer;
  color: white;
  font-size: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.search-clear:hover {
  transform: translateY(-50%) rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

/* Кнопки управления */
.controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  animation: fadeInUp 1.2s ease-out;
}

.control-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  overflow: visible !important; /* Важно: позволяем тени выходить за границы */
}

.control-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.control-btn:active {
  transform: translateY(-1px);
}

/* Стили для аккордеона */
.accordion {
  overflow: hidden;
}

.accordion-item {
  margin-bottom: 15px;
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
  transform: translateZ(0);
}

.accordion-item:nth-child(1) { animation-delay: 0.1s; }
.accordion-item:nth-child(2) { animation-delay: 0.2s; }
.accordion-item:nth-child(3) { animation-delay: 0.3s; }
.accordion-item:nth-child(4) { animation-delay: 0.4s; }
.accordion-item:nth-child(5) { animation-delay: 0.5s; }
.accordion-item:nth-child(n+6) { animation-delay: 0.6s; }

.accordion-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
}

.accordion-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.accordion-header:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.accordion-header::after {
  content: '\002B';
  font-size: 24px;
  transition: transform 0.3s ease;
  background: rgba(255, 255, 255, 0.2);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.accordion-item.active .accordion-header::after {
  transform: rotate(135deg);
  background: rgba(255, 255, 255, 0.3);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  background: linear-gradient(to bottom, #f8f9ff, #ffffff);
  transition: max-height 0.2s ease-out;
  transform: translateZ(0);
}

/* max-height теперь устанавливается динамически через JavaScript */

/* Стили для вложенного аккордеона */
.nested-accordion {
  margin: 15px;
}

.nested-accordion-item {
  margin-bottom: 10px;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: translateZ(0);
}

.nested-accordion-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.nested-accordion-header {
  padding: 15px 18px;
  background: linear-gradient(135deg, #e3ffe9 0%, #d0f4ea 100%);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.nested-accordion-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transition: left 0.5s;
}

.nested-accordion-header:hover::before {
  left: 100%;
}

.nested-accordion-header:hover {
  background: linear-gradient(135deg, #d0f4ea 0%, #b8e6d5 100%);
}

.nested-accordion-header::after {
  content: '\002B';
  font-size: 22px;
  transition: transform 0.3s ease;
  color: #667eea;
  font-weight: bold;
}

.nested-accordion-item.active .nested-accordion-header::after {
  transform: rotate(135deg);
  color: #764ba2;
}

.nested-accordion-content {
  max-height: 0;
  overflow: hidden;
  background-color: #ffffff;
  transition: max-height 0.18s ease-out;
  padding: 0 18px;
  transform: translateZ(0);
}

.nested-accordion-item.active .nested-accordion-content {
  padding: 15px 18px;
  /* max-height теперь устанавливается динамически через JavaScript */
}

/* Стили для информации */
.condition ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.condition ul li {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.7;
  padding: 12px 15px 12px 40px;
  position: relative;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 10px;
  border-left: 4px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

.condition ul li:nth-child(1) { animation-delay: 0.05s; }
.condition ul li:nth-child(2) { animation-delay: 0.1s; }
.condition ul li:nth-child(3) { animation-delay: 0.15s; }
.condition ul li:nth-child(4) { animation-delay: 0.2s; }
.condition ul li:nth-child(5) { animation-delay: 0.25s; }
.condition ul li:nth-child(n+6) { animation-delay: 0.3s; }

.condition ul li::before {
  content: '🌿';
  position: absolute;
  left: 12px;
  font-size: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.condition ul li:nth-child(2n)::before {
  content: '✨';
}

.condition ul li:nth-child(3n)::before {
  content: '🌸';
}

.condition ul li:hover {
  transform: translateX(8px);
  border-left-color: #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
  background: linear-gradient(135deg, #f0f3ff 0%, #ffffff 100%);
}

.condition ul li strong {
  color: #667eea;
  font-weight: 600;
}

/* Стили для параграфов с описанием */
.condition p {
  padding: 15px;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 10px;
  border-left: 4px solid #667eea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  line-height: 1.7;
  color: #555;
  transition: all 0.3s ease;
}

.condition p:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
  background: linear-gradient(135deg, #f0f3ff 0%, #ffffff 100%);
}

.applications {
  margin-top: 15px;
}

.applications p {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.7;
  padding: 12px 15px 12px 45px;
  background: linear-gradient(135deg, #e3ffe9 0%, #ffffff 100%);
  border-left: 4px solid #4caf50;
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

.applications p:nth-child(1) { animation-delay: 0.35s; }
.applications p:nth-child(2) { animation-delay: 0.4s; }
.applications p:nth-child(3) { animation-delay: 0.45s; }
.applications p:nth-child(n+4) { animation-delay: 0.5s; }

.applications p::before {
  content: '💧';
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
}

.applications p:nth-child(2n)::before {
  content: '🌬️';
}

.applications p:nth-child(3n)::before {
  content: '💆';
}

.applications p:hover {
  background: linear-gradient(135deg, #d0f4ea 0%, #ffffff 100%);
  transform: translateX(8px);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
  border-left-color: #2e7d32;
}

.applications p strong {
  color: #2e7d32;
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
}

/* Стили кнопки консультации */
.consult-btn {
  display: block;
  background: linear-gradient(135deg, #FF3B5C 0%, #FF6B6B 25%, #FF3B5C 50%, #FF6B6B 75%, #FF3B5C 100%);
  background-size: 300% 100%;
  color: white;
  text-align: center;
  padding: 16px 40px;
  border-radius: 50px;
  margin: 30px auto;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  max-width: 340px;
  box-shadow: 0 6px 25px rgba(255, 59, 92, 0.5),
              0 0 25px rgba(255, 107, 107, 0.3),
              inset 0 0 12px rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
  animation: buttonGlow 2.5s ease-in-out infinite;
  border: 2px solid rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  z-index: 1;
}

.consult-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: buttonShine 2s linear infinite;
  z-index: -1;
}

.consult-btn::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 20px;
  animation: iconBounce 3s ease-in-out infinite;
}

.consult-btn:hover {
  background-position: 100% 0;
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 40px rgba(255, 59, 92, 0.7),
              0 0 45px rgba(255, 107, 107, 0.6),
              inset 0 0 16px rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1.2px;
}

.consult-btn:active {
  transform: translateY(-3px) scale(1.03);
}

/* Футер сайта */
.footer {
  margin-top: 30px;
  padding: 25px 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  box-shadow: 0 -5px 20px rgba(102, 126, 234, 0.2);
  color: white;
  animation: fadeInUp 1.8s ease-out;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 15px;
  margin-bottom: 15px;
}

.footer-section {
  flex: 1;
  min-width: 150px;
  text-align: center;
}

.footer-section h3 {
  font-size: 14px;
  margin-bottom: 5px;
  color: white;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.footer-section p {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin: 3px 0;
}

.footer-icon {
  font-size: 24px;
  margin-bottom: 5px;
  display: block;
}

.disclaimer {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  padding: 12px 15px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  line-height: 1.5;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.disclaimer strong {
  color: white;
  font-size: 12px;
  letter-spacing: 0.3px;
}

.disclaimer em {
  color: rgba(255, 255, 255, 0.9);
  font-style: normal;
}

.footer-bottom {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
}

.footer-bottom a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.footer-bottom a:hover {
  text-decoration: underline;
  color: #fff5e6;
}

/* Частицы на фоне */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(102, 126, 234, 0.5);
  border-radius: 50%;
  animation: particleFloat 15s infinite ease-in-out;
}

/* Ripple эффект */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
}

/* Подсветка найденного */
.highlight {
  background: linear-gradient(120deg, #fff59d 0%, #fffacd 100%);
}

.no-results {
  animation: fadeInUp 0.5s ease-out;
  font-size: 18px;
  text-align: center;
  padding: 20px;
  color: #666;
  display: none;
}
