/* ============================================================
   CUSTOM.CSS — кастомные стили поверх Tilda
   Подключать ПОСЛЕДНИМ после всех Tilda-стилей
   ============================================================ */

/* ============================================================
   1. H1 на главной — убираем слипание строк
   ============================================================ */
@media screen and (min-width: 900px){
  #rec2053791431 .t189__title{
    font-size: 56px;
    line-height: 1.15;
    letter-spacing: -0.01em;
  }
}
@media screen and (max-width: 640px){
  #rec2053791431 .t189__title{
    font-size: 32px;
    line-height: 1.2;
  }
}
@media screen and (min-width: 480px){
  #rec2053791431 .t189__descr{
    font-size: 30px;
    line-height: 1.3;
  }
}

/* ============================================================
   2. Hero — блок «Написать в мессенджер» (иконка Telegram)
   ============================================================ */
#rec2053791431 .ag-hero-messenger{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1;
  color: #fff;
}
#rec2053791431 .ag-hero-messenger__text{color: #fff;}
#rec2053791431 .ag-hero-messenger__icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: transform .25s ease, filter .25s ease;
}
#rec2053791431 .ag-hero-messenger__icon:hover{
  transform: scale(1.12) rotate(-3deg);
  filter: drop-shadow(0 4px 10px rgba(255, 133, 98, 0.5));
}
#rec2053791431 .ag-hero-messenger__icon svg{display: block; width: 30px; height: 30px;}

@media screen and (max-width: 640px){
  #rec2053791431 .ag-hero-messenger{margin-top: 18px; font-size: 14px; gap: 10px;}
  #rec2053791431 .ag-hero-messenger__icon svg{width: 26px; height: 26px;}
}

/* ============================================================
   3. Блок «Обо мне» — портрет + звуковая волна
   ============================================================ */
#rec2053793561 .ag-portrait-wrap{
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 500px;
}
#rec2053793561 .ag-portrait-wave{
  position: absolute;
  width: 140%;
  max-width: 720px;
  height: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
#rec2053793561 .ag-portrait-img{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  object-position: top center;
  display: block;
  border-radius: 20px;
  margin-top: -10px;
}
@media screen and (max-width: 768px){
  #rec2053793561 .ag-portrait-wrap{min-height: 360px; margin-top: 20px;}
  #rec2053793561 .ag-portrait-wave{width: 120%; max-width: 520px;}
  #rec2053793561 .ag-portrait-img{max-width: 360px; border-radius: 16px; margin-top: 0;}
}

/* ============================================================
   4. Аудио-плееры (главная + портфолио)
   ============================================================ */

/* --- 4.1 Тёмная тема (главная, #rec2053793562) --- */
#rec2053793562 .ag-audio,
#rec2054663101 .ag-audio{max-width: 1200px; margin: 0 auto; padding: 0 20px;}

#rec2053793562 .ag-audio__title{
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 32px; font-weight: 600; color: #fff;
  text-align: center; margin: 0 0 15px; line-height: 1.2;
}
#rec2053793562 .ag-audio__descr{
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 16px; color: rgba(255,255,255,.6);
  text-align: center; max-width: 640px; margin: 0 auto 50px; line-height: 1.5;
}
#rec2053793562 .ag-audio__grid,
#rec2054663101 .ag-audio__grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}

#rec2053793562 .ag-player{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 15px; padding: 22px;
  display: flex; align-items: center; gap: 16px;
  transition: border-color .25s ease, background-color .25s ease;
}
#rec2053793562 .ag-player:hover{border-color: rgba(255,133,98,.5); background: rgba(255,255,255,.06);}
#rec2053793562 .ag-player_playing{border-color: #ff8562; background: rgba(255,133,98,.08);}
#rec2053793562 .ag-player__btn{
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; border: 0;
  cursor: pointer; background-color: #ff8562;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, background-color .2s ease;
  padding: 0; outline: none; -webkit-tap-highlight-color: transparent;
}
#rec2053793562 .ag-player__btn:hover{background-color: #ff9a7c;}
#rec2053793562 .ag-player__btn:active{transform: scale(.94);}
#rec2053793562 .ag-player__btn svg{width: 20px; height: 20px; display: block; fill: #1a1a1a;}
#rec2053793562 .ag-player__btn .ag-player__icon-pause{display: none;}
#rec2053793562 .ag-player_playing .ag-player__btn .ag-player__icon-play{display: none;}
#rec2053793562 .ag-player_playing .ag-player__btn .ag-player__icon-pause{display: block;}
#rec2053793562 .ag-player__body{flex: 1 1 auto; min-width: 0;}
#rec2053793562 .ag-player__name{
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 15px; font-weight: 600; color: #fff;
  margin: 0 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#rec2053793562 .ag-player__bar{
  position: relative; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,.12); cursor: pointer; overflow: hidden;
}
#rec2053793562 .ag-player__progress{
  position: absolute; left: 0; top: 0; height: 100%; width: 0;
  background: #ff8562; border-radius: 3px; pointer-events: none;
}
#rec2053793562 .ag-player__time{
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 12px; color: rgba(255,255,255,.5); margin-top: 8px; font-variant-numeric: tabular-nums;
}
#rec2053793562 audio,
#rec2054663101 audio{display: none;}

/* --- 4.2 Оранжевая тема (портфолио, #rec2054663101) --- */
#rec2054663101 .ag-audio__title{
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 32px; font-weight: 600; color: #000;
  text-align: center; margin: 0 0 15px; line-height: 1.2;
}
#rec2054663101 .ag-audio__descr{
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 16px; color: rgba(0,0,0,.7);
  text-align: center; max-width: 640px; margin: 0 auto 50px; line-height: 1.5;
}
#rec2054663101 .ag-player{
  background: #fff; border: 1px solid rgba(0,0,0,.06);
  border-radius: 15px; padding: 22px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
#rec2054663101 .ag-player:hover{transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.12);}
#rec2054663101 .ag-player_playing{border-color: #000; box-shadow: 0 4px 14px rgba(0,0,0,.15);}
#rec2054663101 .ag-player__btn{
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; border: 0;
  cursor: pointer; background-color: #1a1a1a;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, background-color .2s ease;
  padding: 0; outline: none; -webkit-tap-highlight-color: transparent;
}
#rec2054663101 .ag-player__btn:hover{background-color: #000;}
#rec2054663101 .ag-player__btn:active{transform: scale(.94);}
#rec2054663101 .ag-player__btn svg{width: 20px; height: 20px; display: block; fill: #fff;}
#rec2054663101 .ag-player__btn .ag-player__icon-pause{display: none;}
#rec2054663101 .ag-player_playing .ag-player__btn .ag-player__icon-play{display: none;}
#rec2054663101 .ag-player_playing .ag-player__btn .ag-player__icon-pause{display: block;}
#rec2054663101 .ag-player__body{flex: 1 1 auto; min-width: 0;}
#rec2054663101 .ag-player__name{
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 15px; font-weight: 600; color: #1a1a1a;
  margin: 0 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#rec2054663101 .ag-player__bar{
  position: relative; height: 6px; border-radius: 3px;
  background: rgba(0,0,0,.12); cursor: pointer; overflow: hidden;
}
#rec2054663101 .ag-player__progress{
  position: absolute; left: 0; top: 0; height: 100%; width: 0;
  background: #1a1a1a; border-radius: 3px; pointer-events: none;
}
#rec2054663101 .ag-player__time{
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 12px; color: rgba(0,0,0,.55); margin-top: 8px; font-variant-numeric: tabular-nums;
}

@media screen and (max-width: 960px){
  #rec2053793562 .ag-audio__grid,
  #rec2054663101 .ag-audio__grid{grid-template-columns: 1fr; gap: 16px;}
  #rec2053793562 .ag-audio__title,
  #rec2054663101 .ag-audio__title{font-size: 24px;}
  #rec2053793562 .ag-audio__descr,
  #rec2054663101 .ag-audio__descr{margin-bottom: 30px;}
}

/* ============================================================
   5. FAQ-блок (главная)
   ============================================================ */
#rec2053795061 .ag-faq{max-width: 800px; margin: 0 auto; padding: 0 20px;}
#rec2053795061 .ag-faq__title{
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 32px; font-weight: 600; color: #1a1a1a;
  text-align: center; margin: 0 0 15px; line-height: 1.2;
}
#rec2053795061 .ag-faq__descr{
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 16px; color: #555;
  text-align: center; max-width: 600px; margin: 0 auto 40px; line-height: 1.5;
}
#rec2053795061 .ag-faq__item{
  background: #fff; border-radius: 15px; margin-bottom: 12px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
#rec2053795061 .ag-faq__item summary{
  cursor: pointer; list-style: none; padding: 20px 24px;
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 17px; font-weight: 600; color: #1a1a1a;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; transition: background .2s;
}
#rec2053795061 .ag-faq__item summary::-webkit-details-marker{display: none;}
#rec2053795061 .ag-faq__item summary:hover{background: #fafafa;}
#rec2053795061 .ag-faq__icon{
  flex: 0 0 auto; width: 22px; height: 22px; position: relative; transition: transform .25s;
}
#rec2053795061 .ag-faq__icon::before,
#rec2053795061 .ag-faq__icon::after{
  content: ''; position: absolute; background: #ff8562; border-radius: 2px;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
#rec2053795061 .ag-faq__icon::before{width: 14px; height: 2px;}
#rec2053795061 .ag-faq__icon::after{width: 2px; height: 14px; transition: transform .25s;}
#rec2053795061 .ag-faq__item[open] .ag-faq__icon::after{
  transform: translate(-50%,-50%) rotate(90deg); opacity: 0;
}
#rec2053795061 .ag-faq__answer{
  padding: 0 24px 22px;
  font-family: 'TildaSans', Arial, sans-serif;
  font-size: 15px; line-height: 1.65; color: #444;
}
#rec2053795061 .ag-faq__answer a{
  color: #ff7f50; text-decoration: none; border-bottom: 1px solid rgba(255,127,80,.3);
  transition: color .2s ease, border-color .2s ease;
}
#rec2053795061 .ag-faq__answer a:hover{
  color: #ff6b3d; border-bottom-color: #ff6b3d;
}
@media screen and (max-width: 640px){
  #rec2053795061 .ag-faq__title{font-size: 24px;}
  #rec2053795061 .ag-faq__item summary{font-size: 15px; padding: 16px 18px;}
  #rec2053795061 .ag-faq__answer{padding: 0 18px 18px; font-size: 14px;}
}

/* ============================================================
   6. Hover-анимация кнопок на главной
   ============================================================ */
.t-btnflex,
a[href="portfolio/"],
a[href="contacts/"],
a[href="about/"]{
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
  will-change: transform, box-shadow;
}
.t-btnflex:hover,
a[href="portfolio/"]:hover,
a[href="contacts/"]:hover,
a[href="about/"]:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 133, 98, 0.35);
}
.t-btnflex:active,
a[href="portfolio/"]:active,
a[href="contacts/"]:active,
a[href="about/"]:active{
  transform: translateY(0);
}

a[href="https://t.me/Ozvuchka_Studio"]{
  transition: transform .25s ease, opacity .25s ease;
}
a[href="https://t.me/Ozvuchka_Studio"]:hover{
  transform: translateY(-1px);
  opacity: 0.85;
}

@media (hover: none){
  .t-btnflex:hover,
  a[href="portfolio/"]:hover,
  a[href="contacts/"]:hover,
  a[href="about/"]:hover{
    transform: none;
    box-shadow: none;
  }
  #rec2053791431 .ag-hero-messenger__icon:hover{
    transform: none;
    filter: none;
  }
  a[href="https://t.me/Ozvuchka_Studio"]:hover{
    transform: none;
    opacity: 1;
  }
}

/* ============================================================
   7. Hover-анимация карточек услуг (/services/)
   ============================================================ */
.ag-services article{
  transition: transform .3s ease, box-shadow .3s ease;
  will-change: transform, box-shadow;
}
.ag-services article:hover{
  transform: translateY(-6px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 133, 98, 0.4);
}
.ag-services article a[href="../contacts/"]{
  transition: background-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.ag-services article:hover a[href="../contacts/"],
.ag-services article a[href="../contacts/"]:hover{
  background-color: #ff9a7c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 133, 98, 0.4);
}
.ag-services article a[href="../contacts/"]:active{
  transform: translateY(0);
}
@media (hover: none){
  .ag-services article:hover{
    transform: none;
    box-shadow: none;
  }
  .ag-services article:hover a[href="../contacts/"]{
    background-color: #ff8562;
    transform: none;
    box-shadow: none;
  }
}

/* ============================================================
   8. Общие правки Tilda-классов (безопасные)
   ============================================================ */

/* Карточки портфолио — квадратные по умолчанию */
.t772__imgwrapper{padding-bottom: 100%;}

/* Отзывы — чуть больше воздуха сверху */
.t726__text{margin-bottom: 36px;}

/* На мобильных — одна колонка в портфолио Tilda */
@media screen and (max-width: 960px){
  .t772__col_mobile-grid{width: 100%;}
}