
/* ====== About Section ====== */
.about{
  position:relative;
  padding:0px 24px;
  overflow-x: hidden;
}

.about__container{
  max-width:1300px;
  margin:0 auto;
  display:grid;
  grid-template-columns: 1fr 1fr;
  align-items:center;
}

.about__media{
  position:relative;
}
.about__media img{
  width:85%;
  height:auto;
  border-radius:24px;
  object-fit:cover;
}

/* ====== Content ====== */
.about__content{
  display:flex;
  flex-direction:column;
  gap: 20px;
}
.about__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.about__title{
  font-size: clamp(28px, 4vw, 42px);
  font-weight:800;
  margin:0;
  color: black;
}
.about__text{
  color:#374151;
  line-height:1.6;
  font-size:22px;
}

/* ====== CTA pill button ====== */
.pill-btn{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 24px 48px;
  border-radius: 20px;
  background:#0b0f14;
  color:#fff;
  text-decoration:none;
  font-weight:700;
  white-space:nowrap;
  box-shadow: 0 12px 24px rgba(0,0,0,.18);
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
}
.pill-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0,0,0,.22);
  opacity:.96;
}

/* ====== Мини-карточки ====== */
.about__cards{
  display:flex;
  gap:16px;
  margin-top:12px;
}
.about-card{
  flex:1;
  border-radius:18px;
  overflow:hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.about-card:hover{
  transform: translateY(-4px);
  box-shadow:0 14px 36px rgba(0,0,0,.14);
}
.about-card img{
  width:100%;
  height:120px;
  object-fit:cover;
}
.about-card p{
  padding:10px;
  margin:0;
  font-weight:600;
  text-align:center;
  color: black;
}


/* ====== Мобильная адаптация ====== */
@media (max-width: 960px) {
  .about__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about__media img {
    width: 100%;
    max-height: 400px;
    border-radius: 20px;
  }

  .about__content {
    align-items: center;
    gap: 0px;
  }

  .about__text {
    text-align: left;
    font-size: 16px;
  }

  .pill-btn {
    align-self: center;
    font-size: 15px;
    margin: 15px;
  }

 .about__cards{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;                  /* плотнее */
  }
  .about-card{
    /* делаем карточки компактными, чтобы влезало красиво */
    padding: 10px;
    border-radius: 12px;
  }
}
@media (max-width: 480px) {
  /* Родитель секции — колонкой, чтобы работал order */
  .about {
    display: flex;
    flex-direction: column;
  }

  /* ВНУТРИ ХЕДЕРА — свой порядок: заголовок → кнопка → текст */
  .about__header{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
  }

  .about__title { 
    order: 1; 
    text-align: center;          /* по желанию: center/left */
  }
  .pill-btn{
    order: 2;
    align-self: center;
    width: 100%;
    max-width: 320px;
  }
  .about__text{
    order: 3;
    text-align: left;            /* или center */
  }

  /* Центровка и защита от переполнения (как обсуждали) */
  .about__media {
    display: flex;
    justify-content: center !important;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    text-align: center;
  }
  .about__media img{
    display: block !important;
    margin: 0 auto !important;
    float: none !important;
    max-width: min(100%, 100vw - 32px);
    height: auto;
    transform: none !important;
  }

  /* Карточки по центру, не вылезают за экран */
  .about__cards {
    display: flex;               /* если у тебя grid — см. ниже */
    flex-wrap: wrap;
    justify-content: center !important;
    align-items: center;
    gap: 6px;
    max-width: 100%;
  }
  .about-card {
    padding: 8px;
    text-align: center;
    max-width: 100%;
    min-width: 0;
  }
  .about-card img{
    display: block !important;
    margin: 0 auto !important;
    max-width: 100%;
    height: 100px;
    transform: none !important;
  }

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

  /* всем детям по умолчанию большой order */
  .about > * { order: 10; }

  /* нужный порядок: фото → карточки → заголовок+кнопка+текст */
  .about__media  { order: 0; }  /* фото */
  .about__cards  { order: 1; }  /* маленькие карточки */
  .about__header { order: 2; }  /* заголовок, кнопка, текст внутри */

  .about__title { order: 1; text-align: center; }
  .pill-btn     { order: 2; align-self: center; width:100%; max-width:320px; }
  .about__text  { order: 3; text-align: left; }
}
