/* === Base Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  opacity: 0;
  transition: opacity .5s ease;
}
body.loaded { opacity: 1; }

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* === Theme Variables === */
:root {
  --bg: #ffffff;
  --text: #222;
  --card: #fff;
  --border: #eee;
  --accent: #007bff;
  --link: #007bff;
}

body.dark {
  --bg: #0e1621;
  --text: #e6eef8;
  --card: #18212e;
  --border: #253244;
  --accent: #4aa3ff;
  --link: #4aa3ff;
}

/* === Header === */
header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--text);
}

nav a {
  margin: 0 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: 0.3s;
}
nav a.active,
nav a:hover {
  color: var(--accent);
}

.theme-toggle {
  margin-left: 16px;
  padding: 6px 8px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 18px;
  border-radius: 6px;
  transition: background 0.2s;
}
.theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* === HERO === */
.hero {
  background: linear-gradient(125deg, #e8f1ff, #dbe9ff, #eef3fa);
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
body.dark .hero {
  background: linear-gradient(145deg, #08121c, #122032, #1c2e45);
}

/* === Hero Title Animation === */
.hero-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  display: inline-block;
  overflow: hidden;
  /* Убираем запрет переноса */
  white-space: normal;
}
@media(max-width: 600px) {
  .hero-title {
    font-size: 1.4rem;
    line-height: 1.25;
    padding: 0 10px;
  }
}

.reveal-text {
  animation: fadeTitle .9s ease forwards;
}
@keyframes fadeTitle {
  from { opacity: 0; transform: translateY(12px); letter-spacing: 2px; }
  to { opacity: 1; transform: translateY(0); letter-spacing: .5px; }
}

/* === Hero Buttons Animation === */
.hero-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
  opacity: 0;
}
.fade-up {
  animation: fadeButtons .8s ease .3s forwards;
}
@keyframes fadeButtons {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 44px;
  padding: 0 24px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: 0.3s;
}
.btn:hover { background: #005fcc; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

/* === Video Preview === */
.video-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--text);
}
body.dark .video-title { color: #e6eef8; }

.video-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
  margin: 40px 0;
  justify-items: center;
}
.video-thumb {
  position: relative;
  display: block;
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  overflow: hidden;
  transition: .25s ease;
}
.video-thumb img {
  width: 100%;
  border-radius: 12px;
}
.video-thumb:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.play-btn {
  position: absolute;
  font-size: 48px;
  color: white;
  bottom: 18px;
  right: 18px;
  background: rgba(0,0,0,.65);
  padding: 12px 18px;
  border-radius: 50%;
}
.video-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,.6);
  color: #fff;
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 6px;
}

/* === Stats === */
.stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
  padding: 40px 0;
}
.stats .stat span {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

/* === Advantages 2x2 === */
.advantages h2 {
  text-align: center;
  font-size: 2rem;
  margin: 40px 0 20px;
}
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media(max-width:700px) {
  .advantages-grid { grid-template-columns: 1fr; }
}

/* === Cards === */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: .25s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

/* === Guarantee Section === */
.guarantee-box {
  margin-top: 60px;
  text-align: center;
  padding: 50px 20px;
}
body.dark .guarantee-box {
  background: linear-gradient(145deg,#101820,#182433);
  border-radius: 12px;
}

/* === Contact spacing === */
.contact-instruction,
.contact-form {
  margin-bottom: 25px;
}
.contact-form { gap: 18px; }

/* === COUNTERS PAGE === */
.counters-note {
  background:#eef6ff;
  border-left:4px solid var(--accent);
  padding:12px 16px;
  border-radius:6px;
  margin:15px 0 25px;
  font-size:1rem;
  color:var(--text);
  line-height:1.45;
}
body.dark .counters-note{
  background:#162231;
  color:#e6eef8;
}

.filters {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:20px 0 24px;
}
.filters input[type="text"],
.filters select{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--card);
  color:var(--text);
  font-size:1rem;
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.filters input[type="text"]:focus,
.filters select:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(0,123,255,.12);
}

#products{
  display:flex;
  flex-wrap:wrap;
  gap:20px;
  justify-content:center;
}

.product{
  width:260px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:10px;
  padding:14px;
  text-align:center;
  transition:transform .25s ease, box-shadow .25s ease;
}
.product:hover{
  transform:translateY(-6px) scale(1.03);
  box-shadow:0 12px 28px rgba(0,0,0,.14);
}

.product img{
  width:100%;
  height:auto;
  max-height:220px;
  object-fit:contain;
  border-radius:8px;
  margin-bottom:10px;
  display:block;
}

/* === Footer === */
footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 12px 0;
  text-align: center;
  margin-top: 60px;
}

/* === Telegram button === */
.floating-telegram {
  display: none !important;
}
.floating-telegram {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #2AABEE;
  color: #fff;
  font-size: 30px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transition: 0.3s;
  z-index: 9999;
}
body.dark .floating-telegram { background:#31c4ff; }

/* === Mobile bottom panel === */
.mobile-actions {
  display: none;
}
@media(max-width:640px) {
  .mobile-actions {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: var(--card);
    display: flex;
    justify-content: space-around;
    padding: 10px;
    box-shadow: 0 -4px 14px rgba(0,0,0,.10);
  }
  .mobile-actions a {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
  }
}

/* === FAQ PAGE === */

.faq-title {
  text-align:center;
  font-size:2rem;
  margin:30px 0 15px;
  font-weight:600;
}

.faq-search {
  width: 100%;
  padding: 12px;
  margin: 15px 0 25px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: 1rem;
  outline: none;
}
.faq-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,123,255,.14);
}

.faq-section {
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: .3s;
}
.faq-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.faq-item h3 {
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 8px;
}
.faq-item p {
  font-size: 1rem;
  opacity:.92;
}

/* Dark mode for FAQ */
body.dark .faq-item {
  background:#18212e;
  border-color:#253244;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
body.dark .faq-item:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* Fix: input text color in dark mode (FAQ search) */
body.dark .faq-search {
  background: #18212e;
  color: #e6eef8;
  border-color: #253244;
}

body.dark .faq-search::placeholder {
  color: #9bb0c9;
}

/* ==== CONTACTS PAGE RESTORE STYLES ==== */

/* Общий контейнер подписей и текстов */
.contact-block {
  margin-bottom: 25px;
  line-height: 1.55;
  font-size: 1rem;
  color: var(--text);
}

/* Заголовок секции */
.contact-block h2 {
  margin-bottom: 12px;
  font-size: 1.4rem;
  font-weight: 600;
}

/* Отступы между строками */
.contact-block p {
  margin-bottom: 10px;
}

/* Ссылки */
.contact-block a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.contact-block a:hover {
  text-decoration: underline;
}

/* Форма */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

/* Поля ввода */
.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: .2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,123,255,.15);
}

/* Кнопка отправки */
.contact-form button {
  padding: 12px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: .2s ease;
}
.contact-form button:hover {
  background: #005fcc;
}

/* ✅ Dark theme support */
body.dark .contact-form input,
body.dark .contact-form textarea {
  background: #18212e;
  border-color: #253244;
  color: #e6eef8;
}

body.dark .contact-block a {
  color: #4aa3ff;
}

/* Кнопка выбора файла (русская версия) */
.file-label {
  display: inline-block;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  transition: .25s ease;
}

.file-label:hover {
  background: #005fcc;
}

/* Обёртка */
.file-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Кнопка выбора файла */
.file-label {
  display: inline-block;
  padding: 8px 14px;
  background: #34a853; /* зеленая */
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: .25s ease;
  width: auto;
}

.file-label:hover {
  background: #2b8a45;
}

/* Имя файла */
.file-name {
  font-size: 14px;
  opacity: .8;
}

/* Кнопка отправить — компактная */
.contact-form button {
  width: auto !important;
  padding: 8px 16px;
  font-size: 14px;
}

/* Кнопки формы расположены вертикально */
.contact-form {
  align-items: flex-start;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* === VIDEO GRID FIX (обязательно для сервера) === */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin-top: 25px;
}

@media (max-width: 900px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
