/* ========== Секция AI ========== */
.ai-section {
  margin-top: 0;
  padding-top: 0;
}

/* ——— Тёмный Header ——— */
.ai-header {
  padding: 40px 42px;
  width: 76%;
  margin: 0 282px 0 0;
  box-sizing: border-box;
}
.ai-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}
.ai-subtitle {
  margin: 12px 0 0;
  color: #fff;
  font-family: 'KievitOT', monospace;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.5;
  max-width: 76%;
}
.ai-header-note {
  margin: 16px 0 0;
  color: #f6d9fa;
  font-family: 'KievitOT', monospace;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 76%;
}

/* ——— Розовый Main Box ——— */
.ai-phase {
  background: linear-gradient(90deg, #594176 0%, #981954 100%);
  padding: 40px 40px 40px 70px;
  margin: -1px 282px 0 -8px;  /* за счёт границ header-а */
  box-shadow: 0 6px 28px rgba(192, 9, 129, 0.25);
  box-sizing: border-box;
}

/* Grid для двух колонок */
.ai-phase-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 40px;
  margin-top: 10px;
}

/* Левая колонка: фичи */
.ai-phase-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ai-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
}
.ai-feature .dot {
  width: 14px;
  height: 14px;
  background: #ffe98a;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Правая колонка: детали */
.ai-phase-details {
  color: #fff;
  font-family: 'KievitOT', monospace;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
}
.ai-phase-details p {
  margin-bottom: 16px;
}
.ai-phase-details ul {
  list-style: disc inside;
  margin: 0 0 16px;
  padding-left: 1em;
}
.ai-phase-details strong {
  display: block;
  margin-bottom: 8px;
}

/* ========== Responsive ========== */
@media (max-width: 1200px) {
  .ai-header, .ai-phase {
    width: 98%;
    margin: 0 auto;
    padding: 0 16px 40px;
  }
  .ai-phase-content {
    grid-template-columns: 1fr; 
    grid-gap: 24px;
  }
}
@media (max-width: 900px) {
  .ai-header, .ai-phase {
    padding: 0 8px 40px;
  }
}
/* ===================================================================
   MOBILE ADAPTATION FOR AI SECTION
   =================================================================== */

/* 1) Tablet‐large down to narrow desktop (≤1200px) */
@media (max-width: 1200px) {
  .ai-header,
  .ai-phase {
    width: 98%;
    margin: 0 auto;
    padding: 0 16px 40px;
  }
  .ai-phase-content {
    display: block;
    /* stack features and details */
  }
  .ai-phase-features,
  .ai-phase-details {
    margin-bottom: 2rem;
  }
}

/* 2) Narrow tablet / large phone (≤900px) */
@media (max-width: 900px) {
  .ai-header,
  .ai-phase {
    padding: 0 8px 40px;
  }
  .ai-feature {
    font-size: 1.1rem;
  }
  .ai-phase-details {
    font-size: 0.95rem;
  }
}

/* 3) Classic mobile (≤719px) */
@media (max-width: 719px) {
  .ai-header {
    padding: 1.5rem 1rem 1rem;
    text-align: center;
  }
  .ai-header h2 {
    font-size: 1.6rem;
    line-height: 1.3;
  }
  .ai-subtitle,
  .ai-header-note {
    font-size: 0.9rem;
    max-width: 100%;
    margin: 0.5rem 0;
  }
  .ai-phase {
    padding: 1.5rem 1rem;
    margin: 0;
  }
  .ai-phase-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  .ai-phase-features {
    gap: 1rem;
  }
  .ai-feature {
    font-size: 1rem;
  }
  .ai-phase-details {
    font-size: 0.9rem;
    line-height: 1.4;
}
}

/* ===================================================================
   DEVICE-SPECIFIC TWEAKS
   Approximate CSS widths for popular phones
   =================================================================== */

/* iPhone 16 Pro Max (~430px CSS width) */
@media only screen 
  and (min-width: 391px) 
  and (max-width: 430px) {
  .ai-header {
    padding: 1.2rem 0.7rem 0.8rem;
  }
  .ai-header h2 {
    font-size: 1.5rem;
  }
  .ai-subtitle,
  .ai-header-note {
    font-size: 0.85rem;
  }
  .ai-feature {
    font-size: 0.95rem;
  }
  .ai-phase-details {
    font-size: 0.9rem;
  }
}

/* Google Pixel (~393px CSS width) */
@media only screen 
  and (min-width: 361px) 
  and (max-width: 393px) {
  .ai-header {
    padding: 1.3rem 0.8rem 0.9rem;
  }
  .ai-header h2 {
    font-size: 1.55rem;
  }
  .ai-subtitle,
  .ai-header-note {
    font-size: 0.88rem;
  }
  .ai-feature {
    font-size: 0.97rem;
  }
}

/* Samsung Galaxy S (~360px CSS width) */
@media (max-width: 360px) {
  .ai-header {
    padding: 1rem 0.6rem 0.8rem;
  }
  .ai-header h2 {
    font-size: 1.4rem;
  }
  .ai-subtitle,
  .ai-header-note {
    font-size: 0.85rem;
  }
  .ai-feature {
    font-size: 0.9rem;
  }
  .ai-phase-details {
    font-size: 0.85rem;
  }
}

/* Xiaomi (≈360px–400px CSS width) */
@media (max-width: 400px) and (min-width: 361px) {
  .ai-header {
    padding: 1.1rem 0.7rem 0.8rem;
  }
  .ai-header h2 {
    font-size: 1.45rem;
  }
  .ai-subtitle,
  .ai-header-note {
    font-size: 0.87rem;
  }
}
