/* ==========================================================================
   1. ПЕРЕМЕННЫЕ И БАЗОВЫЕ НАСТРОЙКИ (MAIN THEME)
   ========================================================================== */
:root {
  --bg-card: #ffffff;
  --bg-highlight: #f0f7ff;
  --border-color: #e1e8ed;
  --primary-color: #00b5ef;
  --text-main: #333333;
  --text-muted: #666666;
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.01);
  --radius-md: 14px;
  --radius-lg: 16px;
}

/* ==========================================================================
   2. HERO-БАННЕР (ГЛАВНАЯ СЕКЦИЯ)
   ========================================================================== */
.hero {
  width: 100%;
  height: 480px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)),
    url("../assets/images/index/1.JPG") no-repeat center center / cover;
  background-color: #2c3e50;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  padding: 0 24px;
}

.hero-content {
  max-width: 750px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 42px;
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 28px;
  opacity: 0.95;
  line-height: 1.5;
}

/* Кнопка в баннере (резерв) */
.btn-secondary {
  display: inline-block;
  color: #ffffff;
  border: 2px solid #ffffff;
  padding: 12px 32px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #ffffff;
  color: #333333;
  transform: scale(1.02);
}

/* ==========================================================================
   3. ОБЩИЕ СЕКЦИИ И СЕТКИ (TOPICS, POPULAR, ATOMY)
   ========================================================================== */
.topics,
.popular,
.atomy-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 30px 24px;
}

.topics-header h2,
.popular-header h2,
.atomy-header h2,
.news-title {
  font-size: 28px;
  font-weight: 700;
  text-align: left;
  margin-bottom: 24px;
  color: var(--text-main);
}

.topics-grid,
.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

/* 3.1. Секция: Темы (Topics) */
.topics-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 90px;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.topics-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 181, 239, 0.08);
}

.topics-card-icon {
  font-size: 28px;
}

.topics-card-text h3 {
  margin: 0;
  font-size: 17px;
  color: var(--text-main);
  font-weight: 600;
}

.topics-count {
  font-size: 13px;
  color: #888888;
}

/* 3.2. Секция: Популярное (Popular Cards) */
.popular-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.popular-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.popular-card-image {
  width: 100%;
  height: 170px;
  border-radius: 10px;
  margin-bottom: 14px;
  background-color: #f5f5f5;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Картинки для карточек «Полезные гайды» */
.image-hemohim {
  background: url("../assets/images/index/hemohim.JPEG") no-repeat center
    center / cover;
  background-color: var(--bg-card);
}

.image-absolute {
  background: url("../assets/images/index/absolute.JPEG") no-repeat center
    center / cover;
  background-color: var(--bg-card);
}

.image-ingredients {
  background: url("../assets/images/index/3.JPG") no-repeat center center /
    cover;
  background-color: var(--bg-card);
}

/* Мета-данные и текстовый блок карточки */
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-category {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--primary-color);
  font-weight: 700;
  letter-spacing: 0.5px;
}

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

.popular-card h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.popular-card h3 a {
  color: var(--text-main);
  text-decoration: none;
}

.popular-card h3 a:hover {
  color: var(--primary-color);
}

.popular-card p {
  margin: 0 0 16px 0;
  line-height: 1.5;
  color: var(--text-muted);
  font-size: 14px;
  flex-grow: 1;
}

.card-more {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 14px;
}

/* ==========================================================================
   4. СЕКЦИЯ НОВОСТЕЙ И ОБНОВЛЕНИЙ И ГАЛЕРЕИ МОДАЛЬНЫХ ОКОН
   ========================================================================== */
.section-divider {
  border-top: 2px solid var(--border-color);
  background-color: #fafbfc;
  margin-top: 20px;
  padding-top: 50px;
}

/* Картинки для главных новостных карточек */
.image-news-1 {
  background: url("../assets/news/16.09.2026/6.PNG") no-repeat center center /
    cover;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.image-news-2 {
  background: url("../assets/news/14.09.2026/6.PNG") no-repeat center center /
    cover;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.image-news-3 {
  background: url("../assets/news/09.09.2026/6.png") no-repeat center center /
    cover;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.image-news-4 {
  background: url("../assets/news/08.09.2026/6.jpg") no-repeat center center /
    cover;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

/* --- Галерея СТАТЬИ 1 (18 сентября) --- */
.image-news1-item1 {
  background: url("../assets/news/16.09.2026/1.PNG") no-repeat center center /
    cover;
}
.image-news1-item2 {
  background: url("../assets/news/16.09.2026/2.JPG") no-repeat center center /
    cover;
}
.image-news1-item3 {
  background: url("../assets/news/16.09.2026/3.JPG") no-repeat center center /
    cover;
}
.image-news1-item4 {
  background: url("../assets/news/16.09.2026/4.JPG") no-repeat center center /
    cover;
}
.image-news1-item5 {
  background: url("../assets/news/16.09.2026/5.PNG") no-repeat center center /
    cover;
}
.image-news1-item6 {
  background: url("../assets/news/16.09.2026/6.PNG") no-repeat center center /
    cover;
}

/* --- Галерея СТАТЬИ 2 (14 сентября) --- */
.image-news2-item1 {
  background: url("../assets/news/14.09.2026/1.JPG") no-repeat center center /
    cover;
}
.image-news2-item2 {
  background: url("../assets/news/14.09.2026/2.PNG") no-repeat center center /
    cover;
}
.image-news2-item3 {
  background: url("../assets/news/14.09.2026/3.PNG") no-repeat center center /
    cover;
}
.image-news2-item4 {
  background: url("../assets/news/14.09.2026/4.PNG") no-repeat center center /
    cover;
}
.image-news2-item5 {
  background: url("../assets/news/14.09.2026/5.PNG") no-repeat center center /
    cover;
}
.image-news2-item6 {
  background: url("../assets/news/14.09.2026/6.PNG") no-repeat center center /
    cover;
}

/* --- Галерея СТАТЬИ 3 (05 сентября) --- */
.image-news3-item1 {
  background: url("../assets/news/09.09.2026/6.png") no-repeat center center /
    cover;
}
.image-news3-item2 {
  background: url("../assets/news/09.09.2026/2.png") no-repeat center center /
    cover;
}
.image-news3-item3 {
  background: url("../assets/news/09.09.2026/3.png") no-repeat center center /
    cover;
}
.image-news3-item4 {
  background: url("../assets/news/09.09.2026/4.png") no-repeat center center /
    cover;
}
.image-news3-item5 {
  background: url("../assets/news/09.09.2026/5.png") no-repeat center center /
    cover;
}
.image-news3-item6 {
  background: url("../assets/news/09.09.2026/1.png") no-repeat center center /
    cover;
}

/* --- Галерея СТАТЬИ 4 (08 сентября — Мужское очищение) --- */
.image-news4-item1 {
  background: url("../assets/news/08.09.2026/1.jpg") no-repeat center center /
    cover;
}
.image-news4-item2 {
  background: url("../assets/news/08.09.2026/2.jpg") no-repeat center center /
    cover;
}
.image-news4-item3 {
  background: url("../assets/news/08.09.2026/3.jpg") no-repeat center center /
    cover;
}
.image-news4-item4 {
  background: url("../assets/news/08.09.2026/4.jpg") no-repeat center center /
    cover;
}
.image-news4-item5 {
  background: url("../assets/news/08.09.2026/5.jpg") no-repeat center center /
    cover;
}
.image-news4-item6 {
  background: url("../assets/news/08.09.2026/6.jpg") no-repeat center center /
    cover;
}

/* ==========================================================================
   5. UX-МОСТ И ПАРТНЕРСКИЙ БЛОК (BRIDGE & ATOMY SECTION)
   ========================================================================== */
.bridge-banner {
  width: 100%;
  background: var(--bg-highlight);
  border-top: 1px solid #d0f0ff;
  border-bottom: 1px solid #d0f0ff;
  padding: 50px 24px;
  text-align: center;
}

.bridge-content {
  max-width: 700px;
  margin: 0 auto;
}

.bridge-content h2 {
  font-size: 24px;
  color: #0081a7;
  margin-bottom: 10px;
  font-weight: 700;
}

.bridge-content p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Блок Atomy / Клубные цены */
.atomy-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 50px 30px;
  margin-top: 50px;
  margin-bottom: 60px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.01);
}

.stepper-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

/* Карточки шагов (Stepper) */
.step-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.step-number {
  width: 34px;
  height: 34px;
  background: var(--primary-color);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  font-weight: 700;
  font-size: 15px;
}

.step-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text-main);
}

.step-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Блок вопросов и ответов (FAQ) */
.faq-grid {
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  margin-top: 35px;
}

.faq-item h4 {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text-main);
}

.faq-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Призыв к действию (CTA) */
.atomy-cta-box {
  text-align: center;
  margin-top: 35px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: #ffffff !important;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 181, 239, 0.3);
  transition: all 0.2s ease;
}

.btn-cta:hover {
  background-color: #009ecc;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 181, 239, 0.4);
}

/* ==========================================================================
   6. МОДАЛЬНЫЕ ОКНА И ЗУМ (Увеличение картинок и просмотр статей)
   ========================================================================== */

/* 6.1. Зум картинок по клику */
.zoomable-image {
  cursor: zoom-in;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.zoomable-image:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-wrapper {
  position: relative;
  max-width: 95%;
  max-height: 95vh;
}

.modal-content {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  animation: modalZoom 0.25s ease;
}

.modal-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 36px;
  height: 36px;
  background-color: #ffffff;
  color: #333333;
  font-size: 24px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition:
    background 0.2s,
    transform 0.2s;
  z-index: 10000;
  line-height: 1;
}

.modal-close:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: scale(1.1);
}

/* 6.2. Модальное окно полной статьи */
.article-modal {
  display: none;
  position: fixed;
  z-index: 9990;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.article-modal-wrapper {
  position: relative;
  background: var(--bg-card);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  animation: modalZoom 0.25s ease;
}

.article-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  background-color: #f5f5f5;
  color: #333333;
  font-size: 24px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
  line-height: 1;
  border: none;
}

.article-modal-close:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: scale(1.1);
}

.article-modal-content h2 {
  font-size: 22px;
  color: var(--text-main);
  margin-bottom: 20px;
  padding-right: 30px;
}

/* Галерея внутри статьи: максимум 3 в ряд, дальше перенос на 2-ю строку */
.article-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.article-gallery-img {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: zoom-in;
  border: 1px solid var(--border-color);
  transition:
    transform 0.2s,
    filter 0.2s;
}

.article-gallery-img:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}

.article-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

@keyframes modalZoom {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ==========================================================================
   7. АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И МОБИЛЬНЫХ (MEDIA QUERIES)
   ========================================================================== */
@media screen and (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .hero {
    height: 380px;
    padding: 0 16px;
  }

  .hero-content h1 {
    font-size: 30px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .topics,
  .popular,
  .atomy-section,
  .news-section {
    padding: 40px 16px 20px 16px;
  }

  .atomy-section {
    padding: 30px 16px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 576px) {
  .article-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
