/* Базовые стили секции */
.exchange-section {
  margin-top: 0;
  padding-top: 0;
}

/* Заголовок */
.exchange-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 100px;
  margin-left: -8px;
  margin-right: 282px;
  padding: 40px 40px 40px 70px;
  border-bottom: 1.5px solid rgba(255,255,255,0.07);
  border-radius: 0;
}

.exchange-header h2 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0 -45px;
  letter-spacing: 0.5px;
}

.exchange-subtitle {
  font-family: 'KievitOT', monospace;
  font-weight: 300;
  width: 76%;
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.1px;
}

/* Основной блок обмена */
.exchange-phase {
  background: linear-gradient(90deg, #594176 0%, #981954 100%);
  padding: 40px 40px 40px 70px;
  margin-left: -8px;
  margin-right: 282px;
  border-radius: 0;
  min-height: 290px;
  position: relative;
  box-shadow: 0 6px 28px 0 #540c6140;
  display: flex;
  flex-direction: column;
}
/* стили навигации */
.exchange-slider-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.exchange-slider-nav button {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.8;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.exchange-slider-nav button:hover:enabled {
  background: #ffe98a;
  color: #983954;
  border-color: #ffe98a;
}
.exchange-slider-nav button:disabled {
  opacity: 0.3;
  cursor: default;
}
.exchange-slider-nav #exchange-slide-number {
  font-family: 'Montserrat', Arial, sans-serif;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 300;
}
.exchange-phase-slide {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.exchange-phase-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Контент внутри блока: очищаем float и добавляем отступ сверху */
.exchange-phase-content {
  overflow: hidden;
  margin-top: 10px;
}

/* Описание (левая колонка) */
.exchange-phase-desc {
  float: left;
  width: 45%;
  color: #f6d9fa;
  font-family: 'KievitOT', monospace;
  font-size: 1rem;
  margin-bottom: 20px;
  font-weight: 300;
}

/* Фичи (левая колонка, под описанием) */
.exchange-phase-features {
  float: left;
  width: 45%;
  display: flex;
  gap: 44px;
  margin-bottom: 20px;
}

.exchange-feature {
  color: #fff;
  font-weight: 600;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.exchange-feature .dot {
  width: 14px;
  height: 14px;
  background: #ffe98a;
  border-radius: 50%;
  display: inline-block;
  margin-right: 9px;
  flex-shrink: 0;
}

/* Детали (правая колонка) */
.exchange-phase-details {
  float: right;
  width: 50%;
  font-family: 'KievitOT', monospace;
  font-weight: 300;
  color: #fff;
  font-size: 1rem;
  opacity: 0.88;
  margin: 0;
}

.exchange-phase-details h4 {
  margin: 18px 0 6px;
  font-size: 1.13rem;
  font-weight: 600;
  color: #ffe98a;
}

.exchange-phase-details ul,
.exchange-phase-details ol {
  margin: 12px 0 12px 30px;
  color: #e8fff6;
  font-size: 1rem;
}

/* Адаптивные правки */
@media (max-width: 1200px) {
  .exchange-header,
  .exchange-phase {
    width: 98%;
    padding-left: 16px;
    padding-right: 16px;
    margin-left: 0;
    margin-right: 0;
  }
  .exchange-phase {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .exchange-header,
  .exchange-phase {
    width: 100%;
    padding-left: 8px;
    padding-right: 8px;
    margin-left: 0;
    margin-right: 0;
  }
  .exchange-phase-features {
    float: none;
    width: auto;
    flex-direction: column;
    gap: 18px;
  }
  .exchange-phase-desc,
  .exchange-phase-details {
    float: none;
    width: auto;
  }
}

/* ===================================================================
   MOBILE ADAPTATION — Exchange Section (≤719px)
   =================================================================== */
@media screen and (max-width: 719px) {
  /* 1) Контейнеры заголовка и блока */
  .exchange-header,
  .exchange-phase {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 24px 16px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .exchange-header {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
  }
  .exchange-header h2 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
  }
  .exchange-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }

  /* 2) Содержимое блока — единая колонка */
  .exchange-phase-content {
    position: relative;
    margin-top: 1rem;
    overflow: hidden; /* Прячет вылезающее */
  }
  .exchange-phase-desc,
  .exchange-phase-features,
  .exchange-phase-details {
    float: none !important;
    width: 100% !important;
    margin: 0 0 1.5rem 0;
  }

  /* Описание */
  .exchange-phase-desc {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  /* Фичи */
  .exchange-phase-features {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }
  .exchange-feature {
    font-size: 1rem;
  }
  .exchange-feature .dot {
    width: 12px;
    height: 12px;
  }

  /* Детали */
  .exchange-phase-details {
    font-size: 0.95rem;
    opacity: 0.9;
  }
  .exchange-phase-details h4 {
    font-size: 1.1rem;
    margin-top: 1rem;
  }
  .exchange-phase-details ul,
  .exchange-phase-details ol {
    margin-left: 1.2rem;
    font-size: 0.95rem;
  }

  /* 3) Слайдер навигация — фиксируем чтобы не выпадала! */
  .exchange-slider-nav {
    position: static;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.2rem 0;
    width: 100%;
    z-index: 2;
  }
  .exchange-slider-nav button {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 1rem;
    border-width: 2px;
    min-width: unset;
    min-height: unset;
  }
  .exchange-slider-nav #exchange-slide-number {
    font-size: 1rem;
    line-height: 1;
    min-width: 48px;
    text-align: center;
  }

  /* 4) Скрываем декор если есть */
  .exchange-phase-slides {
    position: relative;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
}

/* ===================================================================
   Device-specific tweaks
   =================================================================== */

/* iPhone 16 Pro Max (~430px CSS width) */
@media screen and (min-width: 391px) and (max-width: 430px) {
  .exchange-header,
  .exchange-phase {
    padding: 20px 12px !important;
  }
  .exchange-header h2 { font-size: 1.45rem; }
  .exchange-subtitle { font-size: 0.9rem; }
  .exchange-phase-desc,
  .exchange-phase-details { font-size: 0.9rem; }
  .exchange-feature       { font-size: 0.95rem; }
  .exchange-feature .dot  { width: 10px; height: 10px; }
  .exchange-slider-nav button { width: 1.8rem; height: 1.8rem; font-size: 0.95rem; }
}

/* Google Pixel (~393px CSS width) */
@media screen and (min-width: 361px) and (max-width: 393px) {
  .exchange-header,
  .exchange-phase {
    padding: 18px 10px !important;
  }
  .exchange-header h2 { font-size: 1.4rem; }
  .exchange-subtitle { font-size: 0.88rem; }
  .exchange-phase-desc,
  .exchange-phase-details { font-size: 0.88rem; }
  .exchange-feature       { font-size: 0.9rem; }
  .exchange-feature .dot  { width: 9px; height: 9px; }
  .exchange-slider-nav button { width: 1.7rem; height: 1.7rem; font-size: 0.9rem; }
}

/* Samsung Galaxy S-series (~360px CSS width) */
@media screen and (max-width: 360px) {
  .exchange-header,
  .exchange-phase {
    padding: 16px 8px !important;
  }
  .exchange-header h2 { font-size: 1.3rem; }
  .exchange-subtitle { font-size: 0.85rem; }
  .exchange-phase-desc,
  .exchange-phase-details { font-size: 0.85rem; }
  .exchange-feature       { font-size: 0.85rem; }
  .exchange-feature .dot  { width: 8px; height: 8px; }
  .exchange-slider-nav button { width: 1.5rem; height: 1.5rem; font-size: 0.8rem; }
}

/* Xiaomi (≈411px CSS width) */
@media screen and (min-width: 394px) and (max-width: 411px) {
  .exchange-header,
  .exchange-phase {
    padding: 22px 14px !important;
  }
  .exchange-header h2 { font-size: 1.48rem; }
  .exchange-subtitle { font-size: 0.92rem; }
  .exchange-phase-desc,
  .exchange-phase-details { font-size: 0.92rem; }
  .exchange-feature       { font-size: 0.93rem; }
  .exchange-feature .dot  { width: 9px; height: 9px; }
  .exchange-slider-nav button { width: 1.7rem; height: 1.7rem; font-size: 0.9rem; }
}
