/* ===== TT ADS: Safety Frame (неубиваемый каркас) ===== */
.ad-slot{
  display:block;
  width:100%;
  overflow:hidden;
  border-radius:14px;
  position:relative;
  isolation:isolate;
  contain:layout paint;
}

/* Не даём внутренностям ломать размеры */
.ad-slot *{
  max-width:100%;
  
  box-sizing:border-box;
}

/* Любые медиа внутри должны влезать в рамку */
.ad-slot img,
.ad-slot video{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  max-height:100%; 
}

/* iframe (рекламные сети) — принудительно в размер рамки */
.ad-slot iframe{
  display:block;
  width:100% !important;
  height:100% !important;
  border:0;
}

/* ВАЖНО: не задаём height:100% “любому ребенку” (ломает HTML-баннеры) */
.ad-slot > *:not(style):not(script){
  width:100%;
  display:block;
}
/* Доп. защита от “всплывающих” позиций (если кто-то сунет inline-style) */
.ad-slot [style*="position:fixed"],
.ad-slot [style*="position: sticky"]{
  position:static !important;
}

/* ===== HOME ===== */

/* Под шапкой: 970×250 → 728×90 → 320×100 */
.ad-home_after_header{
  max-width:970px;
  height:250px;
  margin:20px auto;
  width:100%;
}
@media (max-width: 992px){
  .ad-home_after_header{
    max-width:728px;
    height:90px;
    margin:16px auto;
  }
}
@media (max-width: 480px){
  .ad-home_after_header{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

/* HOME Sidebar 300×250 */
.ad-home_sidebar_top{
  max-width:300px;
  height:250px;
  margin:20px auto;
  width:100%;
}

/* HOME Sidebar Tall 300×600 → (≤992) 300×250 */
.ad-home_sidebar_top_tall{
  max-width:300px;
  height:600px;
  margin:20px auto;
  width:100%;
}
@media (max-width: 992px){
  .ad-home_sidebar_top_tall{
    height:250px;
    margin:16px auto;
  }
}
@media (max-width: 380px){
  .ad-home_sidebar_top_tall{
    max-width:100%;
  }
}

/* Низ главной: 970×250 → 728×90 → 320×100 */
.ad-home_bottom{
  max-width:970px;
  height:250px;
  margin:30px auto;
  width:100%;
}
@media (max-width: 992px){
  .ad-home_bottom{
    max-width:728px;
    height:90px;
    margin:16px auto;
  }
}
@media (max-width: 480px){
  .ad-home_bottom{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

/* ===== LIST ===== */

/* Inline в ленте: 728×90 → 320×100 */
.ad-list_inline_1{
  max-width:728px;
  height:90px;
  margin:16px auto;
  width:100%;
}
@media (max-width: 480px){
  .ad-list_inline_1{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

/* Top в списке: 970×250 → 728×90 → 320×100 */
.ad-list_top{
  max-width:970px;
  height:250px;
  margin:20px auto;
  width:100%;
}
@media (max-width: 992px){
  .ad-list_top{
    max-width:728px;
    height:90px;
    margin:16px auto;
  }
}
@media (max-width: 480px){
  .ad-list_top{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

/* ===== DETAIL ===== */

/* Под галереей: 970×250 → 728×90 → 320×100 */
.ad-detail_after_gallery{
  max-width:970px;
  height:250px;
  margin:24px auto;
  width:100%;
}
@media (max-width: 992px){
  .ad-detail_after_gallery{
    max-width:728px;
    height:90px;
    margin:16px auto;
  }
}
@media (max-width: 480px){
  .ad-detail_after_gallery{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

/* Detail Sidebar: 300×250 (на мобиле может стать 100%) */
.ad-detail_sidebar{
  max-width:300px;
  height:250px;
  margin:24px auto;
  width:100%;
}
@media (max-width: 380px){
  .ad-detail_sidebar{
    max-width:100%;
  }
}

/* =========================================================
   TT ADS — дополнительные слоты (v2)
   (дописываем только то, чего нет в твоём CSS)
   ========================================================= */

/* ===== LIST (доп.) ===== */

/* LIST_INLINE_2: 728×90 → 320×100 */
.ad-list_inline_2{
  max-width:728px;
  height:90px;
  margin:16px auto;
  width:100%;
}
@media (max-width: 480px){
  .ad-list_inline_2{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

/* LIST_BOTTOM: 970×250 → 728×90 → 320×100 */
.ad-list_bottom{
  max-width:970px;
  height:250px;
  margin:24px auto;
  width:100%;
}
@media (max-width: 992px){
  .ad-list_bottom{
    max-width:728px;
    height:90px;
    margin:16px auto;
  }
}
@media (max-width: 480px){
  .ad-list_bottom{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

/* ===== DETAIL (доп.) ===== */

/* DETAIL_BEFORE_CONTACT: desktop 300×250 (если сайдбар),
   tablet/mobile → 728×90 → 320×100 (если колонка становится широкой) */
.ad-detail_before_contact{
  max-width:300px;
  height:250px;
  margin:16px auto;
  width:100%;
}
@media (max-width: 992px){
  .ad-detail_before_contact{
    max-width:728px;
    height:90px;
    margin:16px auto;
  }
}
@media (max-width: 480px){
  .ad-detail_before_contact{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

/* DETAIL_BEFORE_SIMILAR: 970×250 → 728×90 → 320×100 */
.ad-detail_before_similar{
  max-width:970px;
  height:250px;
  margin:24px auto;
  width:100%;
}
@media (max-width: 992px){
  .ad-detail_before_similar{
    max-width:728px;
    height:90px;
    margin:16px auto;
  }
}
@media (max-width: 480px){
  .ad-detail_before_similar{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

/* ===== PROFILE / DASHBOARD ===== */

/* PROFILE_TOP: 728×90 → 320×100 */
.ad-profile_top{
  max-width:728px;
  height:90px;
  margin:16px auto;
  width:100%;
}
@media (max-width: 480px){
  .ad-profile_top{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

/* PROFILE_SIDEBAR: 300×250 */
.ad-profile_sidebar{
  max-width:300px;
  height:250px;
  margin:16px auto;
  width:100%;
}
@media (max-width: 380px){
  .ad-profile_sidebar{
    max-width:100%;
  }
}

/* ===== CREATE AD ===== */

/* CREATE_AD_BOTTOM: 728×90 → 320×100 */
.ad-create_bottom{
  max-width:728px;
  height:90px;
  margin:16px auto;
  width:100%;
}
@media (max-width: 480px){
  .ad-create_bottom{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

/* ===== ARTICLES / INFO ===== */

/* ARTICLE_TOP: 728×90 → 320×100 */
.ad-article_top{
  max-width:728px;
  height:90px;
  margin:16px auto;
  width:100%;
}
@media (max-width: 480px){
  .ad-article_top{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

/* ARTICLE_INLINE: 300×250 */
.ad-article_inline{
  max-width:300px;
  height:250px;
  margin:16px auto;
  width:100%;
}
@media (max-width: 380px){
  .ad-article_inline{
    max-width:100%;
  }
}

/* ARTICLE_BOTTOM: 728×90 → 320×100 */
.ad-article_bottom{
  max-width:728px;
  height:90px;
  margin:16px auto;
  width:100%;
}
@media (max-width: 480px){
  .ad-article_bottom{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}

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

/* GLOBAL_HEADER_BAR: 728×90 → 320×100 */
.ad-global_header_bar{
  max-width:728px;
  height:90px;
  margin:12px auto;
  width:100%;
}
@media (max-width: 480px){
  .ad-global_header_bar{
    max-width:320px;
    height:100px;
    margin:10px auto;
  }
}

/* GLOBAL_FOOTER_TOP: 970×250 → 728×90 → 320×100 */
.ad-global_footer_top{
  max-width:970px;
  height:250px;
  margin:24px auto;
  width:100%;
}
@media (max-width: 992px){
  .ad-global_footer_top{
    max-width:728px;
    height:90px;
    margin:16px auto;
  }
}
@media (max-width: 480px){
  .ad-global_footer_top{
    max-width:320px;
    height:100px;
    margin:12px auto;
  }
}