@media (max-width: 1400px) {
  .header-inner { gap: clamp(14px, 1.6vw, 26px); }
  .main-nav { gap: clamp(14px, 1.45vw, 26px); }
}

@media (max-width: 1280px) {
  .main-nav,
  .header-phone { font-size: 14px; }
  .logo-image { width: clamp(235px, 19vw, 270px); }
}

@media (max-width: 1180px) {
  .header-actions > .header-phone { display: none; }
  .menu-toggle { display: block; }
  .header-inner {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .main-nav {
    position: absolute;
    top: 86px;
    right: 28px;
    left: 28px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 14px 0; }
  .mobile-nav-actions {
    display: grid;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .mobile-nav-actions .header-phone { display: inline-flex; }
  .mobile-nav-actions .lang-switcher { width: max-content; }
  .hero-grid { grid-template-columns: minmax(0, .98fr) minmax(390px, 1.02fr); }
  .hero h1 { font-size: clamp(46px, 4.6vw, 56px); }
  .hero-photo { width: min(84vw, 940px); right: 0; }
  .advantages { padding: 72px 0 66px; }
  .advantages-grid { grid-template-columns: minmax(360px, 1.2fr) repeat(3, 1fr); gap: 24px; }
  .advantages h2 { max-width: 470px; font-size: clamp(34px, 3vw, 42px); }
  .advantages article { min-height: auto; }
  .about-grid,
  .consultation-card,
  .service-layout,
  .service-hero-grid,
  .service-body-grid { grid-template-columns: 1fr; }
  .about-grid { gap: 54px; }
  .about-panel { min-height: 0; }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .hero {
    min-height: auto;
    background: linear-gradient(180deg, #fff 0%, #f8f9fb 100%);
  }
  .hero-grid {
    display: flex;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 44px 0 0;
  }
  .hero-content { width: 100%; max-width: 100%; min-width: 0; }
  .hero h1 {
    max-width: 100%;
    font-size: clamp(44px, 5.4vw, 54px);
    line-height: 1.02;
  }
  .hero h1 .hero-line { white-space: normal; }
  .hero-photo {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: auto;
    margin: 0;
  }
  .hero-photo::before { display: none; }
  .hero-photo picture { height: auto; }
  .hero-photo img { height: auto; object-position: center center; }
}

@media (max-width: 900px) {
  .container { width: min(100% - 36px, 760px); }
  .header-inner { min-height: 76px; }
  .logo-image { width: clamp(190px, 28vw, 235px); height: auto; }
  .main-nav { top: 76px; right: 18px; left: 18px; }
  .hero {
    min-height: auto;
    background: linear-gradient(180deg, #fff 0%, #f8f9fb 100%);
  }
  .hero-grid {
    display: flex;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 44px 0 0;
  }
  .hero-content { width: 100%; max-width: 100%; min-width: 0; }
  .hero h1 {
    max-width: 100%;
    font-size: clamp(40px, 6.4vw, 54px);
    line-height: 1.02;
  }
  .hero h1 .hero-line { white-space: normal; }
  .hero-lead { max-width: 650px; font-size: 16px; }
  .hero-badges {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin-bottom: 30px;
  }
  .hero-photo {
    position: relative;
    top: auto;
    right: auto;
    width: calc(100vw - 36px);
    max-width: calc(100vw - 36px);
    flex: 0 0 auto;
    align-self: flex-start;
    height: auto;
    margin: 0;
  }
  .hero-photo::before { display: none; }
  .hero-photo picture { height: auto; }
  .hero-photo img { height: auto; object-position: 68% center; }
  .section { padding: 78px 0; }
  .advantages-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .advantages-heading { grid-column: 1 / -1; }
  .advantages h2 { max-width: 720px; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contacts-grid { grid-template-columns: 1fr; }
  .contact-card { min-height: 227px; }
  .contact-card p { min-height: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
  .footer-legal-links {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
  }
  .service-hero { padding: 92px 0 70px; }
  .service-hero-grid { gap: 40px; }
  .service-summary { padding: 32px; }
  .service-cta-grid { grid-template-columns: 1fr; align-items: start; }
  .service-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .hero {
    min-height: auto;
    height: auto;
    background-color: #fff;
    background-image: none;
  }
  .hero::before,
  .hero::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
  }
  .hero::before {
    z-index: 0;
    background-image: url("../assets/images/hero-mobile-office.png");
    background-position: calc(100% + 90px) top;
    background-size: auto clamp(840px, 118svh, 980px);
    background-repeat: no-repeat;
  }
  .hero::after {
    z-index: 1;
    background: linear-gradient(
      90deg,
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,1) 28%,
      rgba(255,255,255,.98) 40%,
      rgba(255,255,255,.9) 50%,
      rgba(255,255,255,.58) 62%,
      rgba(255,255,255,.14) 78%,
      rgba(255,255,255,0) 100%
    );
  }
  .hero-grid {
    position: relative;
    z-index: 2;
    min-height: auto;
    padding: 42px 0 0;
  }
  .hero-content {
    max-width: 620px;
    padding-right: 0;
  }
  .hero-content > .eyebrow,
  .hero h1,
  .hero-lead {
    width: calc(100% - clamp(72px, 23vw, 142px));
  }
  .hero-content > .eyebrow {
    margin-bottom: 6px;
  }
  .hero h1 {
    max-width: 100%;
    font-size: clamp(38px, 9vw, 54px);
  }
  .hero-lead {
    max-width: 520px;
    color: #2f3b4d;
  }
  .hero-actions {
    display: grid;
    width: min(100%, 540px);
    gap: 14px;
  }
  .hero-actions .btn {
    width: 100%;
    min-height: 56px;
  }
  .hero-photo { display: none; }
  .hero-badges {
    width: min(100%, 540px);
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 0;
  }
  .hero-badges div {
    min-height: 48px;
    font-size: 14px;
  }
  .whatsapp-float { display: none; }
  #services.section-animate {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 642px) and (max-width: 742px) {
  .hero::before {
    background-position: calc(100% + 150px) top;
    background-size: auto clamp(900px, 112svh, 1040px);
  }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 560px); }
  .services-grid,
  .service-catalog,
  .principles,
  .consult-form { grid-template-columns: 1fr; }
  .consult-form textarea,
  .consult-form .agree,
  .consult-form .form-error,
  .consult-form button { grid-column: auto; }
  .hero-actions .btn { width: 100%; min-height: 54px; }
  .advantages-grid { grid-template-columns: 1fr; }
  .hero-photo {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    height: auto;
    margin: 0;
  }
  .hero-photo::before { display: none; }
  .service-card { min-height: 250px; padding: 30px 26px; }
  .service-category summary { padding: 20px 18px; }
  .service-category summary span { font-size: 20px; }
  .service-category-list { padding: 0 18px 16px; }
  .service-line { font-size: 14px; }
  .about-panel { min-height: 0; }
  .consultation-card { padding: 30px 22px; gap: 28px; }
  .modal-dialog { padding: 28px 18px; }
  .whatsapp-float {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
  }
  .whatsapp-float img { width: 30px; height: 30px; }
  .service-hero h1 { font-size: 42px; }
  .detail-card-large { min-height: auto; padding: 30px 24px; }
  .service-related-grid { grid-template-columns: 1fr; }
  .numbered-list li { grid-template-columns: 44px 1fr; }
}

@media (max-width: 480px) {
  .hero::before {
    background-position: calc(100% + 88px) top;
    background-size: auto clamp(820px, 118svh, 960px);
  }
  .hero-content > .eyebrow,
  .hero h1,
  .hero-lead {
    width: calc(100% - 118px);
  }
}

@media (max-width: 420px) {
  .container { width: min(100% - 24px, 390px); }
  .header-inner { gap: 8px; }
  .header-actions { gap: 8px; }
  .lang-switcher button { min-width: 28px; min-height: 28px; font-size: 11px; }
  .logo-image { width: clamp(150px, 50vw, 190px); height: auto; }
  .hero h1 { font-size: clamp(34px, 10.4vw, 40px); }
  .hero h1 .hero-line { white-space: normal; }
  .hero-content > .eyebrow,
  .hero h1,
  .hero-lead {
    width: calc(100% - 104px);
  }
  .hero-grid { padding: 36px 0 0; }
  .section-title h2,
  .about h2,
  .advantages h2,
  .consultation-card h2 { font-size: 32px; }
  .hero-photo {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    height: auto;
    margin: 0;
  }
  .service-hero { padding: 56px 0 48px; }
  .service-hero-grid { gap: 28px; }
  .service-hero h1 { font-size: 36px; }
  .service-summary { padding: 26px 22px; }
  .service-summary li { padding: 11px 0 11px 24px; }
  .service-cta { padding: 54px 0; }
}

@media (min-width: 375px) and (max-width: 389px) {
  .hero::before {
    background-position: calc(100% + 72px) top;
  }
  .hero h1 {
    font-size: clamp(35px, 9.8vw, 38px);
    line-height: .97;
  }
}

@media (min-width: 390px) and (max-width: 410px) {
  .hero::before {
    background-position: calc(100% + 78px) top;
  }
  .hero h1 {
    font-size: clamp(36px, 9.4vw, 38px);
    line-height: .97;
  }
}

@media (min-width: 411px) and (max-width: 430px) {
  .hero::before {
    background-position: calc(100% + 72px) top;
  }
  .hero h1 {
    font-size: clamp(36px, 9vw, 38px);
    line-height: .97;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
