/* Сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Базовые стили */
body {
    font-family: Arial, sans-serif;
    color: #222;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
/* ===== HEADER ===== */

.top-bar {
    background: #fff;
    padding: 15px 0;
}

.top-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 50px;
}

.btn-disabled {
    background: #cfcfcf !important;
    color: #777 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.top-contacts {
    display: flex;
    align-items: center;
    gap: 15px;
}

.socials a img {
    height: 30px;
    width: 30px;
}

.phone {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    text-decoration: underline;
}

/* ===== NAV ===== */

.nav {
    background: #2c2f7b;
}

.menu {
    list-style: none;
    display: flex;
    gap: 30px;
    padding: 15px 0;
}

.menu__item a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;        /* было ~14–15, стало крупнее */
    font-weight: 500;
    letter-spacing: 0.3px; /* немного воздуха */
}

.menu__item.active a {
    background: #fff;
    color: #2c2f7b;
    padding: 6px 12px;
    border-radius: 20px;
}

/* ===== BUTTON ===== */

.btn {
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn--orange {
    background: #DE6F3A;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
}
.form-error {
  margin-top: 8px;
  color: #e53935;
  font-size: 14px;
}

.agreement input:invalid + span {
  color: #e53935;
}

/* ===== HERO ===== */

.hero {
    position: relative;
    min-height: 500px;
    background: url("../img/hero.jpg") center / cover no-repeat;
    color: #fff;

    margin-top: 130px; /* высота фиксированного header */
}
.hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero__content {
    position: relative;
    z-index: 1;
    padding-top: 120px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}
/* ===== ADVANTAGES ===== */

.advantages {
    padding: 80px 0;
    background: #fff;
}

.section-head {
    max-width: 900px;
    margin-bottom: 50px;
}

.section-subtitle {
    font-size: 20px;
    display: inline-block;
    font-weight: bold;
    color: #2c2f7b;
    margin-bottom: 10px;
    position: relative;
}

.section-subtitle::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: #DE6F3A;
    margin-top: 5px;
}

.section-head h2 {
    font-size: 32px;
    margin: 20px 0;
    color: #1f1f1f;
}

.section-text {
    color: #2c2c2c;
    line-height: 1.6;
}

/* GRID */

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.adv-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 35px 25px;
    text-align: center;

    box-shadow:
        5px 18px 20px rgba(0, 0, 0, 0.08),
        5px 12px 6px rgba(0, 0, 0, 0.05);

    transition: 0.3s ease;
}

.adv-card img {
    height: 70px;
    margin-bottom: 25px;
}

.adv-card p {
    font-size: 18px;
    line-height: 1.35;
    color: #1f1f1f;
}

/* hover — как "приподнимается" */
.adv-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.12),
        0 4px 10px rgba(0, 0, 0, 0.08);
}
.services {
    padding: 80px 0;
    background: #f2f2f2;
}

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

.service-card {
    background: #fff;
    border-radius: 20px;
    display: flex;
    overflow: hidden;

    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.service-text {
    padding: 35px;
    width: 50%;
}

.service-text h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.service-text p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
    color: #333;
}

.service-image {
    width: 50%;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s;
}

.btn-orange {
    background: #DE6F3A;
}

.btn-blue {
    background: #2c2c8f;
}

.btn:hover {
    opacity: 0.85;
}
.partners {
    padding: 80px 0;
    background: #fff;
}

.partners-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.partners-slider {
    overflow: hidden;
    width: 100%;
}

.partners-track {
    display: flex;
    gap: 30px;
    transition: transform 0.4s ease;
}

.partner-item {
    min-width: 220px;
    height: 120px;
    background: #f3f3f3;
    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.partner-item img {
    max-width: 80%;
    max-height: 60%;
    object-fit: contain;
}

/* Стрелки */
.partner-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;

    background: #2c2c8f;
    color: #fff;
    font-size: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.partner-arrow.left {
    left: -22px;
}

.partner-arrow.right {
    right: -22px;
}

.partner-arrow:hover {
    opacity: 0.85;
}
/* ===== Карта ===== */
.map-section {
    position: relative;
}

.map-container {
    position: relative;
    width: 100%;
    height: 620px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Карточка контактов */
.map-contacts {
    position: absolute;
    left: 60px;
    bottom: 60px;

    background: #f5f5f5;
    padding: 30px;
    border-radius: 14px;
    max-width: 320px;

    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.map-contacts h3 {
    margin-bottom: 15px;
    font-size: 22px;
}

.map-contacts p {
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.4;
}

.map-contacts a {
    color: #000;
    text-decoration: underline;
}

/* ===== Футер ===== */
.footer {
    background: #2c2c8f;
    color: #fff;
    padding: 25px 0;
}

.footer-content {
    display: flex;
    align-items: center;
}

.footer-left p {
    margin-bottom: 5px;
    font-size: 14px;
}

.footer-left a {
    font-size: 14px;
    color: #fff;
    opacity: 0.85;
}

.footer-left a:hover {
    opacity: 1;
}
html {
    scroll-behavior: smooth;
}
/* ===== FIXED HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* верхняя часть */
.top-bar {
    background: #fff;
}

/* навигация */
.nav {
    background: #2c2f7b;
}

/* центрируем меню */
.nav .menu {
    justify-content: center;
}
section {
    scroll-margin-top: 180px;
}
/* ===== ABOUT PAGE ===== */
.about-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.about-row.reverse {
    grid-template-columns: 1fr 1fr;
}

.about-text p {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 15px;
    color: #222;
}

.about-title {
    font-size: 22px;
    margin-bottom: 20px;
}

.about-list {
    padding-left: 20px;
}

.about-list li {
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 18px;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.about-page {
    padding-top: 150px;
}
/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.modal-content {
    position: relative;
    max-width: 1000px;
    max-height: 90vh;
    margin: 5vh auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
}

.modal-close {
    position: absolute;
    top: 50%;
    right: -60px; /* расстояние от модального окна */
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 26px;
    line-height: 40px;
    text-align: center;
    border: none;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: 0.2s ease;
}

.modal-close:hover {
    background: #ff7a2f;
    color: #fff;
    transform: translateY(-50%) scale(1.1) rotate(90deg);
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.modal-gallery img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.modal-text p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-text h4 {
    margin: 20px 0 10px;
}

.modal-text ul {
    padding-left: 20px;
}

.modal-text li {
    margin-bottom: 6px;
}
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal.active {
  display: block;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
}

.modal__content {
  position: relative;
  max-width: 420px;
  margin: 60px auto;
  background: #fff;
  padding: 25px;
  border-radius: 6px;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.calculator-form input,
.calculator-form select {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px;
}

.agreement {
  display: flex;
  gap: 8px;
  font-size: 12px;
  margin: 10px 0;
}

.btn-yellow {
  width: 100%;
  background: #DE6F3A;
  border: none;
  padding: 12px;
  font-weight: bold;
  cursor: pointer;
}
@media (max-width: 1024px) {

  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .service-card {
    flex-direction: column;
  }

  .service-text,
  .service-image {
    width: 100%;
  }

  /* ограничиваем высоту картинок услуг */
  .service-image {
    height: 260px;
  }

  .service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .partners-wrapper {
    padding: 0 40px;
  }

  /* карта меньше */
  .map-container {
    height: 420px;
  }
}

/* ======================= 768 ======================= */

@media (max-width: 768px) {

  .modal-close {
    right: 10px;
    top: 10px;
    transform: none;
  }
.about-page .about-image {
        display: none;
    }

    .about-page .about-row {
        display: block; /* ⬅ ломаем flex */
    }

    .about-page .about-text {
        width: 100%; /* ⬅ забираем всю ширину */
    }

    /* reverse больше не нужен */
    .about-page .about-row.reverse {
        flex-direction: column;
    }

    /* текст на всю ширину */
    .about-page .about-text {
        width: 100%;
        font-size: 15px;
        line-height: 1.6;
    }
    .about-page .section-head h2 {
        font-size: 22px;
        line-height: 1.3;
    }

    .about-page .about-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .about-page .about-list li {
        font-size: 14px;
        line-height: 1.5;
    }

  /* ===== HEADER ===== */
  .top-bar__inner {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }

  /* 🔹 лого + соцсети */
  .logo-socials-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .logo img {
    height: 42px;
  }

  .socials {
    display: flex;
    gap: 10px;
  }

  .socials img {
    width: 26px;
    height: 26px;
  }

  /* 🔹 телефон + кнопка */
  .top-contacts {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .phone {
    font-size: 16px;
    white-space: nowrap;
  }

  .top-contacts .btn {
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
  }

  /* ===== NAV ===== */
  .menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .menu__item a {
    font-size: 15px;
  }

  /* ===== HERO ===== */
  .hero {
    min-height: 420px;
    margin-top: 190px;
    background-position: center;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero__content {
    padding-top: 70px;
  }

  /* ===== ADVANTAGES ===== */
  .advantages {
    padding: 60px 0;
  }

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

  .adv-card {
    padding: 28px 20px;
  }

  /* ===== SERVICES ===== */
  .services {
    padding: 60px 0;
  }

  .service-text {
    padding: 24px;
  }

  .service-image {
    height: 210px;
  }

  .service-text .btn {
    margin-top: 15px;
    width: 100%;
    text-align: center;
  }

  /* ===== PARTNERS ===== */
  .partners-slider {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .partners-track {
    display: flex;
    gap: 20px;
    width: max-content;
    padding-bottom: 10px;
  }

  .partner-item {
    min-width: 190px;
    height: 100px;
    flex-shrink: 0;
  }

  .partners-slider::-webkit-scrollbar {
    display: none;
  }

  .partner-arrow {
    display: none;
  }

  /* ===== MAP / CONTACTS ===== */
  .map-container {
    height: 260px;        /* компактная карта */
    position: relative;
    overflow: hidden;
  }

  .map-container iframe {
    width: 100%;
    height: 100%;
    display: block;
  }

  /* ❌ УБИРАЕМ НАЛОЖЕНИЕ */
  .map-contacts {
    position: relative;
    inset: auto;
    transform: none;

    margin: 20px 16px 0;
    max-width: none;
    width: auto;

    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  }

}
  .modal-content {
    width: calc(100% - 30px);
    max-width: 500px;
    margin: 40px auto;
  }

  .modal__content {
    width: calc(100% - 30px);
    max-width: 420px;
    margin: 40px auto;
  }
  .modal-content {
    max-height: 90vh;
    padding-right: 20px; /* чтобы скролл не наезжал */
  }

  .modal-text {
    max-height: calc(90vh - 140px); /* минус галерея + отступы */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-close {
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
  }

  .modal-text {
    overflow-y: auto;
  }

  .modal {
    align-items: flex-start;
  }
  .about-page {
    padding-top: 150px;
}
@media (max-width: 768px) {
  .map-contacts {
    position: relative !important;
    left: auto !important;
    bottom: auto !important;
    inset: auto !important;

    margin: 20px 16px 0;
    max-width: none;
    width: auto;

    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  }
  .map-container {
    margin-bottom: 10px;
  }
}
}
  
/* ======================= 480 ======================= */

@media (max-width: 480px) {

  /* ===== HEADER ===== */
  .logo-socials-row {
    justify-content: center;
    gap: 15px;
  }

  .top-contacts {
    flex-direction: column;
    gap: 8px;
  }

  .top-contacts .btn {
    width: 100%;
    text-align: center;
  }

  /* ===== HERO ===== */
  .hero h1 {
    font-size: 26px;
  }

  /* ===== COMMON ===== */
  .btn {
    width: 100%;
    text-align: center;
  }

  .section-head h2 {
    font-size: 24px;
  }

  .section-subtitle {
    font-size: 16px;
  }

  /* ===== MAP ===== */

  .map-container {
    height: 220px;
  }

  .map-contacts {
    margin: 16px;
    padding: 18px;
    font-size: 14px;
  }

  .map-contacts h3 {
    font-size: 20px;
  }
  .map-contacts h3 {
    display: none;
  }
}


  /* ===== FOOTER ===== */
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  /* Модалка "Заказать звонок" — принудительно во всю ширину */
.modal-callback .callback-form {
    width: 100%;
}

.modal-callback .callback-form .btn {
    width: 100% !important;
}

/* ===== ОБЩИЕ СТИЛИ ФОРМ В МОДАЛКАХ ===== */
.modal form {
    width: 100%;
}

.modal input,
.modal select,
.modal textarea {
    width: 100%;
    max-width: 100%;
    display: block;
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: 12px;
}

.modal form button[type="submit"] {
    width: 100%;
}
.about-page {
    padding-top: 200px;
}
/* ===== MOBILE CONTACTS ABOVE MAP ===== */

.mobile-contacts {
  display: none;
}

/* Только мобилки */
@media (max-width: 768px) {
    
    .hero {
        background-position: 80% center; /* подбираешь значение */
    }

  .mobile-contacts {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;

    background: #2c2c8f;
    color: #fff;

    padding: 12px 14px;
    margin-bottom: 10px;

    font-size: 13px;
    line-height: 1.3;
  }

  .mobile-contacts div {
    white-space: nowrap;
  }

  .mobile-contacts a {
    color: #fff;
    text-decoration: underline;
  }
}
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
@media (max-width: 400px) {
  .mobile-contacts {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .mobile-contacts div {
    white-space: normal;
  }
  .top-contacts {
        flex-wrap: wrap; /* разрешаем перенос */
    }

    .top-contacts .btn {
        width: 100%;
        margin-top: 10px;
        text-align: center;
    }
    .about-page {
    padding-top: 280px;
}
.policy-text {
    padding-top: 70px;
}
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10000;

    background: #2ecc71;
    color: #fff;
    padding: 14px 20px;
    border-radius: 8px;

    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);

    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;

    transition: 0.4s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
