/* ===============================
GLOBAL
================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #EDF0F5;
  font-family: 'Involve', sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.app {
  max-width: 420px;
  margin: 0 auto;
  padding: 12px 8px;
  min-height: 100vh;
}

/* ===============================
HEADER (LOGO + TITLE)
================================ */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
  gap: 12px;
  padding: 0 24px;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.logo {
  width: 13.16px;
  height: 12.49px;
}

.title {
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 16.47px;
  line-height: 1;
  white-space: nowrap;
}

.title .rev {
  color: #213284;
}

.title .pay {
  color: #5165F6;
}

.top-right {
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 10px;
  line-height: 1.2;
  color: #213284;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: right;
  min-width: 0;
  margin-left: 0;
}

/* ===============================
BANNER SLIDER
================================ */
.banner {
  margin-bottom: 20px;
  width: 100%;
}

.slider {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  width: 100%;
}

.slides {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
  /* Убираем gap */
}

.slides img {
  width: 100%;
  flex-shrink: 0;
  display: block;
  border-radius: 24px;
  margin-right: 10px;
}

.slides img:last-child {
  margin-right: 0;
}

.dots {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background-color 0.3s ease;
}

.dot.active {
  background: #ffffff;
}

.slide {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  margin-right: 10px;
}

.slide:last-child {
  margin-right: 0;
}

.slide img {
  width: 100%;
  display: block;
  border-radius: 24px;
}

.banner-button {
  position: absolute;
  left: 18px;
  bottom: 20px;
  width: 186px;
  height: 46px;
  cursor: pointer;
  border-radius: 24px;
  z-index: 10;
}

/* ===============================
ACTION BUTTONS
================================ */
.actions {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto auto;
  gap: 11px 8px;
  margin: 0 0 20px;
  width: 100%;
}

.action {
  background: #ffffff;
  border: none;
  padding: 16px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  height: 72px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(45, 93, 197, 0.1);
  width: 100%;
  text-align: center;
}

.action:active {
  background-color: #f0f2f7;
}

.action span {
  font-family: 'Involve', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #2B3297;
  text-align: center;
  display: block;
  width: 100%;
}

/* Расположение кнопок в сетке - ТОЛЬКО ДЛЯ ГЛАВНОЙ СТРАНИЦЫ */
.actions button:nth-child(1) { grid-column: 1 / 4; } /* Первая кнопка в первом ряду */
.actions button:nth-child(2) { grid-column: 4 / 7; } /* Вторая кнопка в первом ряду */
.actions button:nth-child(3) { grid-column: 1 / 3; } /* Третья кнопка во втором ряду */
.actions button:nth-child(4) { grid-column: 3 / 5; } /* Четвертая кнопка во втором ряду */
.actions button:nth-child(5) { grid-column: 5 / 7; } /* Пятая кнопка во втором ряду */

/* ===============================
СТРАНИЦА ABOUT - ОТДЕЛЬНЫЕ СТИЛИ
================================ */
.about .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
  margin-bottom: 16px;
  width: 100%;
}

.about .action {
  background: #ffffff;
  border: none;
  padding: 16px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  height: 72px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  width: 100%;
  /* Сбрасываем grid-column для advantages страницы */
  grid-column: auto !important;
}

.about .action:active {
  background-color: #f0f2f7;
}

.about .action span {
  font-family: 'Involve', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #060E7B;
  text-align: center;
  display: block;
  width: 100%;
}

/* ===============================
СТРАНИЦА ADVANTAGES - ОТДЕЛЬНЫЕ СТИЛИ
================================ */
.advantages .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 11px 8px;
  margin-bottom: 16px;
  width: 100%;
}

.advantages .action {
  background: #ffffff;
  border: none;
  padding: 16px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  height: 72px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  width: 100%;
  /* Сбрасываем grid-column для advantages страницы */
  grid-column: auto !important;
}

.advantages .action:active {
  background-color: #f0f2f7;
}

.advantages .action span {
  font-family: 'Involve', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #060E7B;
  text-align: center;
  display: block;
  width: 100%;
}

/* ===============================
RATES CONTAINER (белый фон)
================================ */
.rates-container {
  background: #ffffff;
  border-radius: 20px;
  padding: 16px 4px 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  width: 100%;
}

.rates-title {
  font-family: 'Involve', sans-serif;
  font-size: 14px;
  font-weight: 1200;
  color: #213284;
  margin-bottom: 12px;
  text-transform: uppercase; /* Все заглавные буквы */
  padding-left: 8px; /* Отступ слева, сдвигаем заголовок вправо */
}

/* ===============================
RATE BLOCK (градиентный фон)
================================ */
.rate-block {
  background: radial-gradient(
    circle at 0% -50%, /* Центр в левом верхнем углу */
    #2F61C8 0%,
    #2D5CC3 14%,
    #060E7B 48%,
    #010133 74%,
    #101571 100%
  );
  background-size: 200% 100%; /* Растягиваем в 3 раза */
  background-position: left top;
  border-radius: 20px;
  padding: 10px 16px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.block-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.block-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  flex-shrink: 0;
}

.block-icon img,
.block-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.block-title {
  font-family: 'Involve', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.56);
  line-height: 1.3;
}

/* ===============================
CURRENCY ROWS
================================ */
.currency-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  position: relative;
}

.currency-row:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 0px;
}

.currency-label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.flag-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.flag-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.currency-name {
  font-family: 'Involve', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
}

.currency-value {
  display: flex;
  align-items: center;
  font-family: 'Involve', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

.arrow-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.currency-text {
  font-family: 'Involve', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

/* ===============================
EXCHANGE NOTE
================================ */
.exchange-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
  padding-top: 0;
  padding-left: 8px;
}

.note-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.note-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.note-text {
  font-family: 'Involve', sans-serif;
  font-size: 10px;
  font-weight: 500; /* Medium */
  color: #060E7B;
  opacity: 0.72; /* 72% opacity */
  line-height: 1.4;
  flex: 1;
}

/* ===============================
SPECIAL BANNER
================================ */
.special-banner {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.special-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===============================
MEDIA QUERIES
================================ */
@media (max-width: 420px) {
  .top {
    padding: 0 12px;
  }
  
  .action span {
    font-size: 11px;
  }
}

/* ===============================
ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ
================================ */
@media (max-width: 380px) {
  .top {
    padding: 0 8px;
    gap: 8px;
  }
  
  .logo {
    width: 12.66px;
    height: 11.99px;
  }
  
  .title {
    font-size: 15.97px;
  }
  
  .top-right {
    font-size: 9.5px;
  }
}

/* ===============================
ABOUT PAGE
================================ */
.about .app {
  padding: 16px;
  min-height: 100vh;
}

/* Header */
.about-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  padding: 0 24px; /* Отступы слева и справа как в index.html */
  width: 100%;
  box-sizing: border-box;
}

/* Кнопка назад - уменьшаем в 4 раза */
.back-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.back-btn img {
  display: block;
  width: 95px;
  height: 32px;
  object-fit: contain;
}

.about-logo {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Hero banner */
.about-hero {
  width: 100%;
  margin-bottom: 16px;
}

.about-hero img {
  width: 100%;
  border-radius: 24px;
  display: block;
}

/* CEO блок */
.about-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  width: 100%;
}

.ceo-card-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ceo-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ceo-name {
  font-family: 'Involve', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #010133;
  opacity: 0.72;
  line-height: 1.3;
}

.ceo-role {
  font-family: 'Involve', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: #010133;
  opacity: 0.48;
  margin-top: 4px;
}

.about-text {
  display: flex;
  flex-direction: column;
}

.about-paragraph {
  font-family: 'Involve', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.5;
  color: #010133;
  opacity: 0.72;
  margin: 0;
  white-space: pre-line;
}

/* ===============================
ABOUT STATS
================================ */
.about-stats {
  background: #ffffff;
  border-radius: 20px;
  padding: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  width: 100%;
}

.stat-row.single {
  margin-bottom: 12px;
}

.stat-row.single img {
  width: 100%;
  display: block;
}

.stat-row.double {
  display: flex;
  gap: 8px;
  width: 100%;
}

.stat-row.double img {
  flex: 1;
  width: calc(50% - 4px);
  display: block;
}

/* ===============================
MEDIA QUERIES
================================ */
@media (max-width: 420px) {
  .about .app {
    padding: 16px 12px;
  }
  
  .about-top {
    padding: 0 12px;
  }
  
  .ceo-avatar {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 360px) {
  .stat-row.double {
    flex-direction: column;
  }
  
  .stat-row.double img {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .stat-row.double img:last-child {
    margin-bottom: 0;
  }
}

/* ===============================
ADVANTAGES PAGE
================================ */
.advantages .app {
  padding: 16px;
  min-height: 100vh;
}

/* Header */
.advantages-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
}

.advantages-logo {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Основной блок */
.advantages-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  width: 100%;
}

/* Элемент преимущества */
.advantage-item {
  background: rgba(218, 224, 248, 0.2);;
  border-radius: 16px;
  padding: 12px 12px 12px 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.advantage-item:last-child {
  margin-bottom: 0;
}

/* Иконка преимущества */
.advantage-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.advantage-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Контент преимущества */
.advantage-content {
  flex: 1;
}

/* Заголовок преимущества */
.adv-title {
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 700; /* Bold */
  font-size: 14px;
  color: #060E7B;
  text-transform: uppercase;
  margin-bottom: 6px;
  line-height: 1.3;
  letter-spacing: 0.3px;
}

/* Текст преимущества */
.adv-text {
  font-family: 'Involve', sans-serif;
  font-weight: 500; /* Medium */
  font-size: 12px;
  line-height: 1.5;
  color: #010133;
  opacity: 0.72;
  margin: 0;
}

/* ===============================
MEDIA QUERIES FOR ADVANTAGES PAGE
================================ */
@media (max-width: 420px) {
  .advantages .app {
    padding: 16px 12px;
  }
  
  .advantages-top {
    padding: 0 12px;
  }
  
  .advantage-icon {
    width: 56px;
    height: 56px;
  }
  
  .adv-title {
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .advantage-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }
}

/* ===============================
   ВЕРСИЯ ДЛЯ ПК (ОБЩИЕ НАСТРОЙКИ)
================================ */
@media (min-width: 768px) {
    .app {
        max-width: 1100px !important;
        min-height: auto !important;
        margin: 0 auto;
        padding: 30px 24px;
    }

    /* ЕДИНЫЙ HEADER ДЛЯ ВСЕХ СТРАНИЦ */
    .top, .about-top, .advantages-top {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        margin-bottom: 30px !important; /* Умеренный отступ */
        padding: 0 24px !important;
        width: 100% !important;
    }

    /* АККУРАТНЫЙ ЛОГОТИП (Средний размер) */
    .logo, .about-logo .logo {
        width: 18px !important; 
        height: 18px !important;
    }

    .title {
        font-size: 20px !important; /* Было 26px, теперь аккуратнее */
        letter-spacing: 0.3px;
    }

    /* КНОПКА НАЗАД (Компактнее) */
    .back-btn img {
        width: 115px !important; /* Оптимальный размер вместо 140px */
        height: auto !important;
        transition: transform 0.2s ease;
    }
    
    .back-btn:hover img {
        transform: scale(1.03);
    }

    /* ТЕКСТ В ШАПКЕ ГЛАВНОЙ */
    .top-right {
        font-size: 14px !important; /* Было 18px, теперь не кричит */
        max-width: none !important;
        opacity: 0.85;
    }
}

/* ===============================
   ВЕРСИЯ ДЛЯ ПК (ГЛАВНАЯ СТРАНИЦА)
================================ */
@media (min-width: 768px) {
    body:not(.about):not(.advantages):not(.special-page) .app {
        display: block; 
    }
    
    body:not(.about):not(.advantages):not(.special-page) .app::after {
        content: ""; display: table; clear: both;
    }

    body:not(.about):not(.advantages):not(.special-page) .banner,
    body:not(.about):not(.advantages):not(.special-page) .special-banner {
        float: left; clear: left; width: calc(50% - 15px); margin-bottom: 20px;
    }

    body:not(.about):not(.advantages):not(.special-page) .actions,
    body:not(.about):not(.advantages):not(.special-page) .rates-container {
        float: right; clear: right; width: calc(50% - 15px); margin-bottom: 20px;
    }
}

/* ===============================
   ВЕРСИЯ ДЛЯ ПК (СТРАНИЦА ABOUT)
================================ */
@media (min-width: 768px) {
    .about.app {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        column-gap: 30px;
        row-gap: 20px;
        align-items: start;
    }

    .about-top { grid-column: 1 / 3; }
    .about-hero { grid-column: 1; grid-row: 2; width: 100% !important; margin: 0; }
    .about-card { grid-column: 1; grid-row: 3; width: 100% !important; margin: 0; }
    .about .actions {
        grid-column: 1; grid-row: 4; width: 100% !important; margin: 0;
        display: grid !important; grid-template-columns: 1fr 1fr; gap: 12px;
    }
    .about-stats { grid-column: 2; grid-row: 2 / 5; width: 100% !important; margin: 0; }
}

/* ===============================
   ВЕРСИЯ ДЛЯ ПК (СПЕЦИАЛЬНЫЙ КУРС)
================================ */
@media (min-width: 768px) {
    .special-page .app {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        column-gap: 30px;
        row-gap: 20px; 
        align-items: start;
    }

    .special-page .about-top { grid-column: 1 / 3; }

    .special-page #rates-5m {
        grid-column: 1;
        grid-row: 2 / 4;
        margin-bottom: 0 !important; 
    }

    .special-page #rates-10m {
        grid-column: 2;
        grid-row: 2;
        margin-bottom: 0 !important; 
    }

    .special-page .actions {
        grid-column: 2;
        grid-row: 3;
        display: grid !important;
        grid-template-columns: repeat(6, 1fr);
        gap: 11px 8px;
        margin: 0 !important;
    }

    .special-page .actions button:nth-child(1) { grid-column: 1 / 4 !important; }
    .special-page .actions button:nth-child(2) { grid-column: 4 / 7 !important; }
    .special-page .actions button:nth-child(3) { grid-column: 1 / 3 !important; }
    .special-page .actions button:nth-child(4) { grid-column: 3 / 5 !important; }
    .special-page .actions button:nth-child(5) { grid-column: 5 / 7 !important; }
}

/* ===============================
   ВЕРСИЯ ДЛЯ ПК (ADVANTAGES PAGE)
================================ */
@media (min-width: 768px) {
    .advantages.app {
        display: grid !important;
        grid-template-columns: 1fr 1fr; /* Разделение на две равные колонки */
        column-gap: 30px;
        row-gap: 20px;
        align-items: start;
    }

    /* Шапка на всю ширину */
    .advantages-top {
        grid-column: 1 / 3;
    }

    /* ЛЕВАЯ КОЛОНКА: Список преимуществ */
    .advantages-card {
        grid-column: 1;
        grid-row: 2;
        margin-bottom: 0 !important;
        padding: 16px !important; /* Немного больше внутренних отступов для ПК */
    }

    /* ПРАВАЯ КОЛОНКА: Кнопки действий */
    .advantages .actions {
        grid-column: 2;
        grid-row: 2;
        position: sticky; /* Кнопки будут "плавать" при скролле, если контент слева длинный */
        top: 30px;
        
        display: grid !important;
        grid-template-columns: 1fr 1fr; /* Кнопки в два столбика в правой колонке */
        gap: 15px;
        margin: 0 !important;
    }

    /* Настройка карточек преимуществ для ПК */
    .advantage-item {
        padding: 20px !important;
        margin-bottom: 15px !important;
    }

    .advantage-icon {
        width: 72px !important; /* Чуть крупнее иконки на ПК */
        height: 72px !important;
    }

    .adv-title {
        font-size: 15px !important;
    }

    .adv-text {
        font-size: 13px !important;
    }

    /* Сброс флоатов, если они где-то остались */
    .advantages-card, .advantages .actions {
        float: none !important;
        clear: none !important;
    }
}