/* Safari-specific */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* 1200px и выше */
@media (min-width: 1200px) {
  .table-container {
    max-width: 1200px;
    margin: 20px auto;
  }
}

/* 1200px и ниже */
@media (max-width: 1200px) {
  .question_wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 800px;
  }

  .question_item {
    padding: 25px 20px;
  }
}

/* 1024px и ниже */
@media (max-width: 1024px) {
  .section_banner h1 {
    font-size: 40px;
  }

  .section_banner p {
    font-size: 20px;
  }
  .section_title {
    font-size: 32px !important;
  }
  .section_subtitle {
    font-size: 17px !important;
  }
  .advantages_wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 15px;
  }

  .feedback_wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 0 20px;
  }

  .feedback_item {
    padding: 20px;
  }

  .footer_wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .footer {
    padding: 30px 0 20px;
  }

  .banner_button {
    gap: 20px;
  }

  .banner_btn {
    min-width: 180px;
    padding: 12px 25px;
  }
}

/* 992px и ниже */
@media (max-width: 992px) {
  .header {
    height: 69px;
  }

  .header .container {
    height: 100%;
    justify-content: space-between;
  }

  .repair_services_popservices {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .repair_services_right_sidebar {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 20px;
  }
}

/* 768px и ниже */
@media (max-width: 768px) {
  .section_banner h1 {
    font-size: 32px;
  }

  .section_banner p {
    font-size: 18px;
  }
  /* Общие стили */
  .up-button {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .up-arrow {
    width: 18px;
    height: 18px;
  }

  .section_title {
    font-size: 28px !important;
    margin-bottom: 12px !important;
  }
  .section_subtitle {
    font-size: 16px !important;
    margin-bottom: 40px !important;
  }
  .tabs-nav {
    flex-direction: column;
  }

  .tab-btn {
    width: 100%;
    text-align: left;
    padding: 12px 20px;
    border-bottom: 1px solid #e9ecef;
    border-right: none;
  }

  .tab-btn.active {
    border-right: 3px solid #0a92d0;
    border-bottom: 1px solid #e9ecef;
  }

  .tabs-content {
    padding: 20px;
  }

  .contacts_wrap {
    grid-template-columns: 1fr;
  }

  .section_blog_wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  /* Feedback */
  .feedback_wrap {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
    max-width: 500px;
  }

  .feedback_head {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .feedback_item_logo {
    width: 60px;
    height: 60px;
    font-size: 20px;
  }

  .feedback_message {
    font-size: 14px;
    text-align: center;
  }

  .feedback_date {
    text-align: center;
  }

  .feedback_star {
    margin: 0 auto 15px auto;
  }

  /* Question */
  .question_wrap {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 500px;
  }

  .question_item {
    padding: 20px;
  }

  .question_item_img {
    width: 60px;
    height: 60px;
    padding: 12px;
    margin-bottom: 15px;
  }

  .question_item_title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .question_item_subtitle {
    font-size: 15px;
  }

  /* Footer */
  .footer_wrap {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer_menu_service,
  .footer_main_menu,
  .footer_contact,
  .footer_sociall {
    text-align: center;
    align-items: center;
  }

  .footer_wrap ul {
    align-items: center;
  }

  .footer_social_ico {
    justify-content: center;
  }

  .footer_wrap ul li:first-child,
  .footer_sociall p {
    font-size: 17px;
    margin-bottom: 12px;
  }

  .footer_wrap ul li {
    font-size: 14px;
  }

  /* Repair block */
  .section_repair_services {
    padding: 30px 0;
  }

  .repair_services_popservices {
    gap: 25px;
  }

  .repair_services_right_sidebar {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .repair_services_popservices_list,
  .repair_sidebar_service,
  .repair_sidebar_diagn {
    padding: 20px;
  }

  .repair_services_popservices_list h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
  }

  .popservices_list_item {
    margin-bottom: 20px;
    flex-direction: column;
    gap: 8px;
  }

  .popservices_list_item span {
    align-self: flex-start;
    padding: 5px 12px;
  }

  .repair_sidebar_diagn h3,
  .repair_sidebar_service h3 {
    font-size: 1.15rem;
  }

  .sidebar_diagn_btn {
    padding: 10px 25px;
  }

  .services_model_wrap {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .services_model_item {
    font-size: 1.125rem;
  }

  /* Single page content */
  .section_more .container h1 {
    font-size: 2rem;
  }

  .section_more .container h2 {
    font-size: 1.75rem;
  }

  .section_more .container h3 {
    font-size: 1.5rem;
  }

  .section_more .container h4 {
    font-size: 1.25rem;
  }

  .section_more .container .alignleft,
  .section_more .container .alignright {
    float: none;
    margin: 1rem auto;
    display: block;
    max-width: 100%;
  }

  .banner_button {
    grid-template-columns: 1fr; /* Меняем на одну колонку */
    gap: 15px;
    max-width: 300px; /* Ограничиваем ширину контейнера */
    margin: 0 auto; /* Центрируем */
  }

  .banner_btn {
    width: 100%; /* Кнопки растягиваются на всю ширину колонки */
    padding: 14px 20px; /* Увеличиваем padding для удобства нажатия */
  }

  .banner_button a {
    width: 100%;
  }

  .wp-block-table tbody tr {
    display: grid;
  }
}

/* 640px и ниже */
@media (max-width: 640px) {
  .modal-content {
    padding: 1.5rem 1rem;
  }

  .banner_button {
    max-width: 100%; /* На очень узких экранах занимаем всю ширину */
  }

  .banner_btn {
    font-size: 16px; /* Чуть увеличиваем шрифт для читаемости */
  }
}

/* 576px и ниже */
@media (max-width: 576px) {
  .advantages_wrap {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .advantages_item {
    padding: 20px 15px;
  }

  .advantages_item_img img {
    width: 50px;
    height: 50px;
  }

  .advantages_item_title {
    font-size: 16px;
  }

  .advantages_item_subtitle {
    font-size: 13px;
  }
}

/* 480px и ниже */
@media (max-width: 480px) {
  .section_banner h1 {
    font-size: 26px;
  }

  .section_banner p {
    font-size: 16px;
  }
  .section_title {
    font-size: 24px !important;
    margin-bottom: 10px !important;
  }
  .section_subtitle {
    font-size: 15px !important;
    margin-bottom: 30px !important;
  }
  /* Общие стили */
  .header .container img {
    width: 190px;
  }

  .popularServiceBtn {
    padding: 12px 10px;
  }

  .section_blog_wrap {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Contacts */
  .contacts_title {
    text-align: center;
  }

  /* Feedback */
  .feedback_item {
    padding: 15px;
  }

  .feedback_item_logo {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }

  .feedback_item_title {
    font-size: 16px;
  }

  .feedback_item_dubtitle {
    font-size: 13px;
  }

  .feedback_message {
    font-size: 13px;
  }

  /* Question */
  .question_wrap {
    padding: 0 15px;
    gap: 15px;
  }

  .question_item {
    padding: 15px;
  }

  .question_item_img {
    width: 50px;
    height: 50px;
    padding: 10px;
    margin-bottom: 12px;
  }

  .question_item_title {
    font-size: 16px;
  }

  .question_item_subtitle {
    font-size: 14px;
  }

  /* Footer */
  .footer {
    padding: 25px 0 15px;
  }

  .footer_wrap {
    gap: 20px;
  }

  .footer_wrap ul {
    gap: 10px;
  }

  .footer_wrap ul li:first-child,
  .footer_sociall p {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .footer_wrap ul li {
    font-size: 13px;
  }

  .footer_social_ico {
    gap: 12px;
  }

  /* Repair block */
  .repair_services_popservices_list,
  .repair_sidebar_service,
  .repair_sidebar_diagn {
    padding: 16px;
  }

  .repair_services_popservices_list h3 {
    font-size: 1.2rem;
  }

  .popservices_list_item p {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .popservices_list_item span {
    font-size: 0.9rem;
  }

  .repair_sidebar_diagn p {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .sidebar_diagn_btn {
    font-size: 0.95rem;
    padding: 10px 20px;
  }

  .repair_sidebar_service ul li a {
    font-size: 0.95rem;
  }

  .services_model_wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
