/* --- 1. Настройки и Переменные --- */
:root {
  --bg-body: #0f1115;
  /*--bg-body: #171c22;
  #22c55e"*/
  --bg-card: #1c1f26;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-grad: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --pc-width: 1230px;
  --laptop-width: 1000px;
  --radius: 12px;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  height: 100%;
  margin: 0;
  padding: 0;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

/* --------------------------------------- 2. Сетка и Контейнер -------------------------- */
.wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 40px;
}

.wrapper-blog {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 0px;
}

.container {
  width: 100%;
  max-width: var(--pc-width);
  padding: 0 40px;
  margin: 0 auto;
  transition: max-width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- 3. Навигация --- */

.site-header {
  width: 100%;
  border-bottom: 1px solid #525b67;
  background-color: var(--bg-body); /* Чтобы фон был сплошным */
}

/* Flex-контейнер внутри шапки */
.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  font-family: "Times New Roman", Times, serif;
  font-size: 40px;
  font-weight: normal;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Десктопное меню */
.desktop-nav {
  display: flex;
  gap: 30px;
}

.desktop-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: normal;
  text-transform: none;
  transition: color 0.3s ease;
}

.desktop-nav a:hover {
  color: var(--accent);
}

/* Гамбургер */
.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  padding: 5px;
  z-index: 101;
}

.burger-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
}

/* -------------------------------------------- Мобильное меню -------------------------------- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background-color: var(--bg-card);
  z-index: 200;
  padding: 80px 40px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(3px);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.close-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.mobile-nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

/* ------------------------------------- 4. Макет Продукта (Grid) ------------------------- */
.product-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  align-items: start;
}

.visual-section {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.main-preview {
  width: 100%;
  background-color: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.main-preview img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.main-preview:hover img {
  transform: scale(1.02);
}

.info-panel {
  grid-column: span 1;
  padding: 0px;
  position: static;
}

.nav-info {
  margin-bottom: 10px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
}

/*------------------------------------------------text-------------------------------------*/
.gallery-panel {
  grid-column: span 2;
  padding: 0px;
  min-height: 150px;
  display: flex;
  align-items: top;
  justify-content: center;
  color: var(--text-muted);
}

.gallery-panel p {
  margin: 0px;
}

h1 {
  font-size: 2rem;
  margin: 0 0 10px 0;
  line-height: 1.2;
  padding-bottom: 5px;
}

h3 {
  color: var(--text-main);
  font-size: 0.9rem;
  margin-bottom: 0px;
  margin-left: 5px;
  margin-top: 0;
  text-transform: uppercase;
}

h5 {
  color: var(--text-main);
  font-size: 17px;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

p {
  font-size: 16px;
}

.badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge.highlight {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.description {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0px;
  border-top: 1px solid #525b67;
  padding-top: 20px;
  padding-bottom: 20px;
}

.cta-button {
  width: 100%;
  padding: 18px;
  background: var(--accent-grad);
  border: none;
  border-radius: 8px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
}

.cta-button:hover {
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

.file-info {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 10px;
}

.ad-block {
  display: flex;
  justify-content: center;
  width: 100%;
  /*border: solid 1px red;*/
  margin-bottom: 40px;
  padding: 0;
}

.ad-block-blog {
  margin-bottom: 0;
  margin-top: 40px;
}

.product-gallery {
  justify-content: right;
}

.gallery {
  display: flex;
  flex-direction: column;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 30px;
  justify-content: space-around;
  margin-bottom: 60px;
}

.gallery-blog-4 {
  display: flex;
  flex-direction: column;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  justify-content: space-around;
  margin-bottom: 60px;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.gallery-blog-4 img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.h3-name {
  padding: 20px 0;
  margin-left: 0;
}

.title-name {
  padding-top: 40px;
  padding-bottom: 20px;
}

.title-name h3 {
  margin-left: 0;
}

.gallery-card {
  background-color: #3d4354;
  border: solid 1px #37474f;
  border-radius: 8px;
  color: var(--text-muted);
  /* color: var(--text-muted);
 background-color: var(--bg-card)
 #3d4354*/
  text-align: center;
}

figure {
  margin: 0;
}

figcaption {
  padding: 10px;
  color: var(--text-main);
  font-weight: normal;
}

span {
  text-transform: capitalize;
  color: var(--text-muted);
}

.content {
  width: 100%;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 60px;
  margin-top: 60px;
}

.content-blog {
  width: 100%;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 60px;
  margin-top: 0px;
}

.content h5 {
  margin-bottom: 0;
}
.content p {
  width: 100%;
  margin-top: 5px;
  margin-bottom: 30px;
}

.gallery-name {
  padding-top: 40px;
  padding-bottom: 20px;
}

.pop-link a {
  text-decoration: none;
  color: #e2e8f0;
  font-size: 16px;
  font-weight: normal;
  text-transform: none;
  transition: color 0.3s ease;
}

.pop-link a:hover {
  color: var(--accent);
}

/* ------------------------------Threads Gallery----------------------------------*/
.container-threads {
  max-width: 1100px; /* 264px * 4 + отступы */
  margin: 0 auto;
}

/* Сетка галереи */
.gallery-blog {
  display: grid;
  /* 4 колонки ровно по 264px */
  grid-template-columns: repeat(4, 264px);
  gap: 12px;
  justify-content: center;
}

/* Стили ссылок-оберток */
.gallery-blog a {
  display: block;
  position: relative;
  border-radius: 12px; /* Мягкие углы Threads */
  overflow: hidden;
  border: 1px solid #0f1115;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  aspect-ratio: 1 / 1; /* Делаем превью строго квадратными */
}

.gallery-blog a:hover {
  opacity: 0.85;
  transform: scale(0.98); /* Эффект нажатия при наведении */
}

/* Стили самих картинок */
.gallery-blog img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 480px) {
  .gallery-blog {
    /* На совсем маленьких экранах — в одну колонку */
    grid-template-columns: 1fr;
  }
}

/*--------------------------- Pagination --------------------------*/

.pagination {
  display: flex;
  align-items: center;
  gap: 15px; /* Расстояние между стрелками и точками */
}

/* Настройка кружков */
.dots {
  display: flex;
  gap: 15px; /* Расстояние между кружками */
}

.dot {
  width: 11px;
  height: 11px;
  border: 1px solid white;
  border-radius: 50%;
  background-color: transparent;
  display: block;
  transition: all 0.3s;
}

/* Выделенная страница (залитый кружок) */
.dot.active {
  background-color: white;
}

/* Эффект при наведении */
.dot:hover,
.arrow:hover {
  opacity: 0.7;
}

.popup-link {
}

/* ---------------------------------------- Сarousel-Сontainer --------------------------------------- */

/* Контейнер карусели */
.carousel-container {
  position: relative;
  max-width: 900px; /* Максимальная ширина карусели */
  margin: 0 auto;
  margin-bottom: 70px;
  overflow: hidden;
  border-radius: 12px;
}

/* Дорожка со слайдами */
.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

/* Слайд */
.slide {
  min-width: 100%;
  box-sizing: border-box;
}

/* Адаптивный контейнер для видео (16:9) */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* Соотношение 16:9 */
  height: 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Кнопки */
.prev-btn,
.next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: white;
  border: 1px;
  padding: 15px;
  cursor: pointer;
  font-size: 25px;
  border-radius: 25%;
  transition: 0.3s;
}

.prev-btn:hover,
.next-btn:hover {
  background: rgba(0, 0, 0, 0.3);
}
.prev-btn {
  left: 10px;
}
.next-btn {
  right: 10px;
}

/* ---------------------------------------- 6. (FOOTER) --------------------------------------- */
.site-footer {
  background-color: #3d4354;
  color: #cfd8dc;
  font-size: 0.9rem;
  padding: 40px 0 20px 0;
  border-top: 1px solid #37474f;
  width: 100%;
  display: block;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-links {
  display: flex;
  flex: 1;
  justify-content: space-between;
  min-width: 60%;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-col h4 {
  font-weight: 700;
  margin: 0 0 10px 0;
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 4px;
}

.footer-col a {
  text-decoration: none;
  color: #b0bec5;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 30px 0;
  width: 100%;
}

.footer-bottom {
  text-align: center;
  color: #b0bec5;
  line-height: 1.5;
  font-size: 0.85rem;
}

.footer-bottom a.underline {
  color: #fff;
  text-decoration: underline;
}

.copyright {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-block;
  width: 100%;
  border-top: none;
}

/* --------------------------------------------- MEDIA -------------------------------------- */

@media screen and (max-width: 1367px) {
  .container {
    max-width: var(--laptop-width);
  }
  .ad-block {
    padding-bottom: 20px;
  }
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 60px;
  }
  .title-name {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .gallery-blog-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  .threads-feed-gallery {
    grid-template-columns: repeat(2, 1fr); /* 2 колонки на планшетах */
    width: 95vw;
  }

  .hide-mobile {
    display: none !important;
  }
}

@media screen and (max-width: 1024px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .visual-section,
  .info-panel,
  .specs-panel,
  .gallery-panel {
    grid-column: auto;
  }

  .info-panel {
    position: static;
  }

  .container {
    padding: 0 20px;
  }

  .desktop-nav {
    display: none;
  }

  .burger-btn {
    display: flex;
  }

  .ad-block {
    margin-bottom: 20px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
  .footer-col {
    min-width: 45%;
    margin-bottom: 20px;
  }
  .footer-top {
    flex-direction: column;
  }

  .gallery-blog {
    /* Если экран меньше, переходим на 2 колонки */
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
    margin: 0 auto;
  }
}

@media screen and (max-width: 600px) {
  .container {
    padding: 0 15px;
  }
  h1 {
    font-size: 1.4rem;
    margin: 0 0 10px 0;
    line-height: 1;
  }
  .ad-block {
    margin-bottom: 20px;
  }
  .footer-col {
    flex-direction: column;
  }
  .gallery-blog-4 {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .wrapper-blog {
    padding-top: 25px;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  .specs-panel {
    min-width: 320px;
  }
  .brand {
    font-family: "Times New Roman", Times, serif;
    font-size: 30px;
    line-height: 1.2;
    padding: 10px 0;
  }
  h1 {
    font-size: 1.4rem;
    margin: 0px 0 15px 0;
    line-height: 1;
  }
  .ad-block {
    margin-bottom: 0;
  }
  .footer-col {
    min-width: 100%;
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-blog-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .wrapper-blog {
    padding-top: 25px;
  }

  .gallery-blog {
    /* На совсем маленьких экранах — в одну колонку */
    grid-template-columns: 1fr;
    padding-right: 15px;
    padding-left: 15px;
  }
}
