:root {
    --color-bg-main: #F5F5F5;
    --color-white: #FFFFFF;
    --color-gray-dark: #5E5E5E;
    --color-black: #000000;
    --color-gray-light: #999999;
    --color-text-main: #1D1D1D;
    --color-border: #BCBCBC;
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Onest', sans-serif;
    color: var(--color-black);
    background-color: var(--color-white);
}

body.popup-open {
    overflow: hidden;
    touch-action: none;
}

/* пока открыт попап (в т.ч. форма Б24) — без плавного скролла,
   иначе подскролл к сфокусированному полю анимируется и каретка уезжает */
html:has(body.popup-open) {
    scroll-behavior: auto;
}

button, input, textarea, select, a {
    font-family: inherit;
}

#sets, 
#steps, 
#cases, 
#questions, 
#contacts {
    scroll-margin-top: 80px; 
}

.main-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    color: #000;
}

.main-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1440px;
    min-height: 76px;
    margin: 0 auto;
    padding: 12px 30px;
    background-color: var(--color-white);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

.logo-img {
    display: block;
    width: 90px;
    height: 40px;
    object-fit: contain;
}

.nav-list {
    display: flex;
    gap: 40px; 
}

.nav-link {
    font-size: 16px;
    font-weight: 400; 
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 40px; 
}

.contact-link {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
}

.btn-request {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    height: 52px; 
    padding: 16px 20px;
    gap: 10px;
    background-color: var(--color-text-main); 
    color: var(--color-white);
    border-radius: 200px; 
    border: none;
    cursor: pointer;
    font-family: 'Onest', sans-serif;
    font-size: 16px;              
    font-weight: 400;            
    line-height: 20px;         
    letter-spacing: 0;
    text-transform: uppercase;
    text-align: center;
    transition: background-color 0.2s ease;
}


.btn-request:hover {
    background-color: var(--color-gray-dark);
}

.header-actions .btn-request {
    opacity: 0;
    visibility: hidden;
    transition: background-color 0.2s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.header-scrolled .header-actions .btn-request {
    opacity: 1;
    visibility: visible;
}

.hero-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    max-width: 1420px;
    margin: 20px auto 0 auto;
    padding: 0 60px; 
    gap: 60px;
}

.hero-media {
    width: 100%;
    max-width: 731px; 
    height: 600px;
    flex-shrink: 0;
}

.hero-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 509px;
    gap: 20px;
    flex-shrink: 0;
}

.hero-title {
    font-family: 'Onest', sans-serif;
    font-size: 48px;
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: 0;
    color: var(--color-black);
}

.hero-subtitle {
    font-family: 'Onest', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    color: #000;
}

.hero-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.btn-request.btn-hero {
    width: 190px;
    font-family: 'Onest', sans-serif;
    font-size: 16px;      
    font-weight: 400;     
    line-height: 20px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.btn-cases {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 190px;
    height: 52px;
    padding: 16px 20px;
    gap: 10px;
    border-radius: 200px;
    font-family: 'Onest', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0;
    text-transform: uppercase;
    background-color: transparent;
    border: 1px solid var(--color-text-main);
    transition: opacity 0.2s ease;
}

.btn-hero:hover,
.btn-cases:hover {
    opacity: 0.8;
}

.brands-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    margin: 40px auto 0 auto; 
    gap: 24px;
}

.brands-title {
    font-family: 'Onest', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    color: var(--color-gray-dark);
    width: 147px;
    padding-right: 20px;
    flex-shrink: 0;
}

.brands-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1129px;
    height: 38px;
    flex-shrink: 0;
}

.brands-wrapper {
    position: relative;
    width: 100%;
    max-width: 1129px;
    height: 38px;
    overflow: hidden;
}

.product-section {
    display: flex;          
    flex-direction: column; 
    width: 100%;
    max-width: 1420px;
    margin: 114px auto 0 auto;
    padding: 0 60px;
    gap: 40px;
    border-radius: 20px;
}

.product-title {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

.product-title span {
    font-size: 48px;
    font-weight: 400;
    line-height: 1.0;         
    letter-spacing: 0;        
    text-align: center;    
    display: inline-block;
    max-width: 898px;
    width: 100%;
}

.catalog-title {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: left;
    margin-bottom: -20px;
}

.catalog-grid {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    max-width: 1300px;
}

.product-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 310px;
}

.product-card-media {
    width: 310px;
    height: 448px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #D7D7D7;
}

.product-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.product-card-title {
    font-weight: 400;
    font-size: 20px;
    line-height: 120%;
    letter-spacing: 0%;
    vertical-align: middle;
    text-align: left;
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-popup-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.product-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.product-popup {
    position: relative;
    width: 1120px;
    min-height: 650px;
    border-radius: 30px;
    padding: 40px;
    padding-bottom: 70px;
    background-color: #F5F5F5;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.product-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    /* кнопка 40x40 с иконкой 16x16 по центру: визуально крестик в ~32px
       от краёв и нормальная зона нажатия */
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #BCBCBC;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.product-popup-close:hover {
    color: #5E5E5E;
    opacity: 0.6;
}

.product-popup-title {
    font-weight: 400;
    font-size: 40px;
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;
    color: #000;
    margin: 0;
}


.product-popup-slider-container {
    position: relative;
    width: 100%;
    /* при перелистывании белые блоки соседних слайдов смыкаются в полосу
       с прямыми краями — обрезаем область слайдера по тем же скруглениям */
    border-radius: 20px;
    overflow: hidden;
}

.product-popup-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    width: 100%;
    scrollbar-width: none;
}

.product-popup-track::-webkit-scrollbar {
    display: none; 
}

.product-popup-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    box-sizing: border-box;
}

.product-popup-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-radius: 20px;
    background-color: #fff;
    height: 440px;
    width: 100%;
}

.product-popup-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px;
}

.product-popup-product-name {
    font-size: 20px;
    font-weight: 500;
    line-height: 130%;
    color: #000;
    margin: 0 0 15px 0;
}

.product-popup-product-chars {
    color: #5E5E5E;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    font-size: 16px;
}


.product-popup-media {
    width: 470px;
    height: 380px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    margin: 30px 30px 30px 0;
}

.product-popup-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-popup-nav {
    position: absolute;
    bottom: 35px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

/* вариант А: стрелки по краям карточки слайдера, по центру по вертикали;
   точки пагинации остаются в .product-popup-nav внизу. Иконки ложатся в
   белые внутренние поля карточки (слева у текста, справа у фото). */
.product-popup-slider-container .popup-arrow-prev,
.product-popup-slider-container .popup-arrow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.product-popup-slider-container .popup-arrow-prev { left: 8px; }
.product-popup-slider-container .popup-arrow-next { right: 8px; }

.product-popup-dots {
    position: static !important;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
}

.product-popup-dot {
    width: 18px;
    height: 4px;
    background-color: #FFFFFF;
    border-radius: 100px;
    transition: background-color 0.3s ease;
}

.product-popup-dot.active {
    background-color: #5E5E5E;
}

.sets-slider {
    width: 100%;
    max-width: 1300px;
}

.sets-slider-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}


.sets-slider-track::-webkit-scrollbar {
    display: none;
    overflow: hidden;
}

.sets-slider-track .product-card {
    flex: 0 0 310px;
    scroll-snap-align: start;
}

.sets-slider-nav, .cases-slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1300px;
    max-width: 100%;
    height: 40px;
    gap: 10px;
    margin-top: 20px;
}


.sets-slider-btn, .cases-slider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: #BCBCBC;
    transition: opacity 0.2s;
}

.sets-slider-btn:hover, .cases-slider-btn:hover {
    opacity: 0.6;
}

.sets-slider-dots, .cases-slider-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sets-slider-dot, .cases-slider-dot {
    display: block;
    height: 4px;
    width: 35px;
    border-radius: 2px;
    background: #F5F5F5;
    transition: all 0.3s;
}

.sets-slider-dot.active, .cases-slider-dot.active {
    background: #5E5E5E;
}

.steps-section {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1420px;
    margin: 110px auto 0 auto;
    padding: 80px 60px;
    background: #F5F5F5;
    border-radius: 20px;
}

.steps-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 509px;
    height: 683px;
    flex-shrink: 0;
}

.steps-left-content {
    display: flex;
    flex-direction: column;
}

.steps-title {
    font-size: 48px;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0;
}

.steps-desc {
    margin-top: 20px;
    font-size: 20px;
    font-weight: 400;
    line-height: 120%;
    letter-spacing: 0;

}

.btn-steps {
    margin-top: 20px;
    width: 190px;
    height: 52px;
    font-size: 14px;
    text-transform: uppercase;
}

.steps-logo {
    width: 150px;
    height: 67px;
    object-fit: contain;
}

.steps-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 553px;
    height: 683px;
    flex-shrink: 0;
}

.step-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 553px;
    height: 208px;
    padding: 30px;
    background: #FFFFFF;
    border-radius: 30px;
}

.step-card-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step-card-title {
    font-size: 24px;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: 0;
    color: #000000;
}

.step-card-desc {
    font-size: 16px;
    font-weight: 400;
    line-height: 120%;
    letter-spacing: 0;
    color: #5E5E5E;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 40px;
    background: #1D1D1D;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 400;
}

.step-card--dark {
    background: #1D1D1D;
}

.step-card--dark .step-card-title {
    color: #FFFFFF;
}

.step-card--dark .step-card-desc {
    color: #ABABAB;
}

.step-card-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    height: 100%;
}

.step-card--dark .step-card-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 325px;
    height: 148px;
    gap: 0;
}

.step-number--light {
    background: #FFFFFF;
    color: #1D1D1D;
    margin-top: 30px;
}

.step-card-photo {
    width: 148px;
    height: 148px;
    border-radius: 17px;
    overflow: hidden;
    flex-shrink: 0;
}

.step-card-photo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.step-card-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-card--large {
    height: 227px;
}

.cases-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1300px;
    margin: 116px auto 0 auto;
    gap: 20px;
}

.cases-title {
    font-size: 48px;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;
}

.cases-slider {
    max-width: 1300px;
    width: 100%;
    margin: 40px auto 0;
    box-sizing: border-box;
}

.cases-slider-track {
    width: 100%;
    margin-left: auto; 
    margin-right: auto;
    display: flex;
    gap: 20px;
    height: 497px;
}

.case-card {
    display: flex;
    gap: 20px;
    width: 1300px;
    height: 497px;
    flex-shrink: 0;
    padding-left: 177.5px;
    box-sizing: border-box;
}


.case-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 492px;
    height: 497px;
    padding: 30px;
    background: #F5F5F5;
    border-radius: 20px;
    flex-shrink: 0;
}

.case-info-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.case-info-title {
    font-size: 24px;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: 0;
    color: #000000;
}

.case-info-desc {
    font-size: 20px;
    font-weight: 400;
    line-height: 120%;
    letter-spacing: 0;
    color: #000000;
}

.case-info-logo {
    width: 247px;
    height: 54px;
    object-fit: contain;
}

.case-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.case-photo {
    width: 433px;
    height: 293px;
    border-radius: 20px;
    overflow: hidden;
}

.case-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-review {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 433px;
    height: 184px;
    padding: 24px;
    background: #F5F5F5;
    border-radius: 20px;
    flex-shrink: 0;
    box-sizing: border-box;
}
.case-review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.case-review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.case-review-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.case-review-name {
    font-size: 20px;
    font-weight: 400;
    line-height: 120%;
    color: #000000;
}

.case-review-role {
    font-size: 16px;
    font-weight: 400;
    line-height: 120%;
    color: #5E5E5E;
}

.case-review-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 120%;
    color: #000000;
}


.cases-slider {
    position: relative;
    max-width: 1300px;
    width: 100%;
    margin: 20px auto 0;
    box-sizing: border-box;
    overflow: hidden;
}


.cases-slider-track {
    display: flex;
    gap: 20px;
    height: 497px;
    overflow-x: auto;
    scrollbar-width: none;
}

.cases-slider-track::-webkit-scrollbar {
    display: none;
}

/* стрелки слайдера «Решения» — по бокам, по центру по вертикали;
   точки пагинации остаются в .cases-slider-nav внизу. Карточка 497px
   высотой, по краям ≥1440px — пустые поля (~177px), стрелки садятся в них. */
.cases-slider .cases-slider-btn--prev,
.cases-slider .cases-slider-btn--next {
    position: absolute;
    top: 248px;
    transform: translateY(-50%);
    z-index: 5;
}

.cases-slider .cases-slider-btn--prev { left: 32px; }
.cases-slider .cases-slider-btn--next { right: 32px; }

 .faq {
     margin: 95px auto 0 auto;
 }  

.faq-title {
    font-size: 48px;
    font-weight: 400; 
    line-height: 1; 
    letter-spacing: 0;
    text-align: center;
    margin-bottom: 40px;
}

  .faq-answer p {
    margin-bottom: 1.2em;
  }

.faq-list {
    max-width: 830px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background-color: #F5F5F5;
    border-radius: 10px;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    padding: 16px 24px 16px 16px;
    cursor: pointer;
    list-style: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-icon {
    position: relative;
    width: 14px;
    height: 14px;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background-color: #1D1D1D;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.faq-icon::before {
    width: 14px;
    height: 2px;
}

.faq-icon::after {
    width: 2px;
    height: 14px;
    transition: height 0.2s ease;
}

.faq-item[open] .faq-icon::after {
    height: 0;
}

.faq-answer {
    padding: 0 16px 16px 16px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    color: #5E5E5E;
}

.footer {
    padding-top: 112px; 
}

.footer-container {
    max-width: 1440px;
    min-height: 732px;
    margin: 0 auto;
    background-color: #F5F5F5;
    border-radius: 20px;
    padding: 80px 70px 100px 70px;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
}

.footer-left {
    width: 458px;
    height: 552px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.footer-contacts-title {
    font-size: 48px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    color: #000000;
    margin: 0;
}

.footer-contacts-info {
    width: 458px;
    height: 137px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.info-row {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 60px;
}

.info-label {
    width: 150px;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    color: #5E5E5E; 
}

.info-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1; 
}

.footer-contacts-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%; 
}

.social-links {
    display: flex;
    flex-direction: row;
    justify-content: space-between; 
    width: 100%;
    gap: 0; 
}

.info-link {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
}

.footer-contacts-links .info-link {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
}
.footer-form {
    width: 553px;
    height: auto; 
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-input, 
.form-textarea {
    width: 100%;
    background-color: #FFFFFF;
    border: none; 
    outline: none;
    font-size: 16px; 
    color: #1D1D1D;
    box-sizing: border-box;
}

.footer-form .form-input {
    height: 79px;
    border-radius: 16px;
    padding: 0 30px;
    line-height: 79px;
}

.footer-form .form-textarea {
    height: 139px;
    border-radius: 16px;
    padding: 25px 30px;
    resize: none; 
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.form-textarea::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #999999;
    opacity: 1; 
}

.form-submit-btn {
    width: 553px;
    height: 52px;
    border: none;
    background-color: #1D1D1D;
    color: #FFFFFF;
    border-radius: 200px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

.form-submit-btn:hover {
    background-color: #333333; 
}

.form-privacy-text {
    font-size: 12px; 
    font-weight: 400;
    color: #5E5E5E;
    margin: 0;
    text-align: center;
}


/* =====================================================================
   Планшеты и узкие ноутбуки: та же десктопная сетка, но колонки
   в процентах вместо фиксированных ширин, чтобы влезало в экран
   ===================================================================== */
@media (min-width: 769px) and (max-width: 1439px) {

    .main-header {
        padding: 12px 24px;
    }

    .nav-list,
    .header-actions {
        gap: 20px;
    }

    .hero-title,
    .product-title span,
    .steps-title,
    .cases-title,
    .faq-title,
    .footer-contacts-title {
        font-size: clamp(32px, 3.5vw, 48px);
    }

    .hero-section {
        padding: 0 32px;
        gap: 32px;
    }

    .hero-media {
        max-width: none;
        flex: 1 1 55%;
        min-width: 0;
        height: auto;
        aspect-ratio: 731 / 600;
    }

    .hero-content {
        max-width: none;
        flex: 1 1 45%;
        min-width: 0;
    }

    .hero-actions {
        flex-wrap: wrap;
    }

    .brands-section {
        padding: 0 32px;
    }

    .product-section {
        padding: 0 32px;
    }

    .catalog-grid .product-card {
        flex: 1 1 0;
        max-width: none;
        min-width: 0;
    }

    .catalog-grid .product-card-media,
    .sets-slider-track .product-card-media {
        width: 100%;
        height: auto;
        aspect-ratio: 310 / 448;
    }

    .steps-section {
        padding: 48px 32px;
        gap: 32px;
    }

    .steps-left {
        width: auto;
        flex: 1 1 45%;
        min-width: 0;
        height: auto;
        gap: 40px;
    }

    .steps-right {
        width: auto;
        flex: 1 1 55%;
        min-width: 0;
        height: auto;
    }

    .step-card {
        width: 100%;
    }

    .step-card--dark .step-card-text {
        width: auto;
        flex: 1;
        margin-right: 20px;
    }

    .cases-section {
        padding: 0 32px;
    }

    .case-card {
        width: 100%;
        padding-left: 0;
    }

    .case-info {
        width: 45%;
        flex-shrink: 1;
        min-width: 0;
    }

    .case-photo,
    .case-review {
        width: 100%;
    }

    .faq {
        padding: 0 32px;
    }

    .footer-container {
        padding: 48px 32px;
        gap: 32px;
        min-height: 0;
    }

    .footer-left {
        width: auto;
        flex: 1 1 45%;
        min-width: 0;
        height: auto;
        gap: 48px;
    }

    .footer-contacts-info {
        width: 100%;
    }

    .footer-form {
        width: auto;
        flex: 1 1 55%;
        min-width: 0;
    }

    .form-submit-btn {
        width: 100%;
    }
}

/* на планшетах поуже почта и телефон в хедере не влезают —
   остаются меню и кнопка заявки */
@media (min-width: 769px) and (max-width: 1100px) {
    .header-actions .contact-link {
        display: none;
    }
}

@media (max-width: 768px) {


    h2,
    .product-title span,
    .faq-title {
        font-weight: 500;
        font-size: 24px;
        line-height: 120%;
        letter-spacing: 0;
        text-align: center;
        width: 100%;
    }

    .main-header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--color-white);
        height: 48px;
        min-height: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .header-logo,
    .header-logo a {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .header-logo .logo-img {
        width: 50px;
        height: auto;
        display: block;
        margin: 0;
    }

    .header-nav {
        display: none;
    }

    /* в хедере остаётся только кнопка заявки; почта и телефон скрыты,
       сама кнопка появляется после скролла hero (логика .header-scrolled общая с десктопом) */
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0;
    }

    .header-actions .contact-link {
        display: none;
    }

    .header-actions .btn-request {
        min-width: 0;
        height: 32px;
        padding: 0 16px;
        font-size: 12px;
        line-height: 1;
    }

    [id] {
        scroll-margin-top: 48px;
    }

.hero-section {
        display: flex;
        flex-direction: column;
        padding: 0 8px 16px 8px;
        margin: 16px auto 0 auto;
        gap: 16px;
        max-width: 100%;
        box-sizing: border-box;
        height: calc(100dvh - 64px);
    }
    .hero-content {
        display: contents;
    }

.hero-title {
        order: 1;
        font-weight: 400;
        font-size: 36px;
        line-height: 100%;
        letter-spacing: 0;
        flex-shrink: 0;
    }

.hero-subtitle {
        order: 2;
        font-weight: 400;
        font-size: 20px;
        line-height: 120%;
        letter-spacing: 0;
        flex-shrink: 0;
    }

.hero-media {
        order: 3;
        width: 100%;
        max-width: 100%;
        aspect-ratio: auto; 
        flex-grow: 1;
        flex-shrink: 1;
        min-height: 100px;
        display: flex; 
    }

.hero-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 20px;
    }

.hero-actions {
        order: 4;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
        box-sizing: border-box;
        flex-shrink: 0;
    }

    .btn-request.btn-hero,
    .btn-cases {
        width: 100%;
        box-sizing: border-box;
    }

    .brands-section {
        margin-top: 80px;
        padding-top: 0;
    }

    .brands-section .brands-title {
        display: none;
    }

    .brands-list {
        gap: 50px;
    }


  .product-section {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
    gap: 16px;
    box-sizing: border-box;
}

.product-title {
    padding: 0 8px;
    margin: 80px 0 0 0;
    text-align: center;
}

.catalog-title {
    padding: 0 8px;
    margin: 0;
    text-align: left;
    font-weight: 500;
    font-size: 20px;
}

.product-section .catalog-grid,
.product-section .sets-slider-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding: 0 0 0 8px;
    scroll-padding-left: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-sizing: border-box;
}

.product-section .catalog-grid::-webkit-scrollbar,
.product-section .sets-slider-track::-webkit-scrollbar {
    display: none;
}

.product-section .catalog-grid .product-card,
.product-section .sets-slider-track .product-card {
    flex: 0 0 258px;
    width: 258px;
    scroll-snap-align: start;
    margin: 0;
}

.product-section .catalog-grid .product-card-media,
.product-section .sets-slider-track .product-card-media {
    width: 100%;
    height: 377px;
    border-radius: 10px;
    overflow: hidden;
}

.sets-slider {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

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

.product-card-title {
    margin: 8px 0 0 0;
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    text-align: left;
}

.product-section .sets-slider-nav {
    display: none !important;
}
.steps-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: auto;
    padding: 32px 8px;
    border-radius: 10px;
    gap: 16px;
    margin-top: 80px;
    box-sizing: border-box;
}

.steps-left {
    display: contents;
}

.steps-left-content {
    display: contents;
}

.steps-title {
    order: 1;
    font-size: 24px;
    line-height: 120%;
    text-align: left;
    font-weight: 500;
}

.steps-desc {
    order: 2;
    margin-top: 4px;
    font-size: 20px;
    line-height: 120%;
}

.steps-right {
    order: 3;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    gap: 16px;
}

.step-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    height: auto;
    border-radius: 15px;
    padding: 15px;
    gap: 30px;
    box-sizing: border-box;
}

.step-card--large {
    height: auto;
}

.step-card-inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    height: auto;
    gap: 30px;
}

.step-card-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    height: auto;
}

.step-card-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step-card--dark .step-card-text {
    width: 100%;
    height: auto;
    gap: 0;
}

.step-card-title {
    font-size: 20px;
    line-height: 120%;
}

.step-card-desc {
    font-size: 14px;
    line-height: 130%;
}


.step-card-photo {
    display: none;
}

.steps-logo {
    display: none;
}

.btn-steps {
    order: 4;
    margin-top: 24px;
    width: 100%;
    box-sizing: border-box;
}

.cases-section {
    width: 100%;
    padding-left: 8px;
    padding-right: 8px;
    box-sizing: border-box;
    margin-top: 80px;
}

.cases-title {
    font-size: 24px;
    line-height: 120%;
    text-align: center;
}

/* скроллится трек (как на десктопе), а не контейнер: пагинация лежит
   в контейнере после трека и не должна уезжать вместе со слайдами */
.cases-slider {
    overflow: hidden;
    margin-top: 0;
}

.cases-slider-track {
    display: flex;
    /* зазор между слайдами, чтобы при свайпе карточки не липли друг к другу */
    gap: 12px;
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0;
}

.case-card {
    flex: 0 0 100%; 
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0;
}

.case-info {
    display: flex;
    flex-direction: column;
    background: #F5F5F5;
    border-radius: 10px;
    padding: 24px 16px;
    box-sizing: border-box;
    height: auto;
    gap: 16px;
    width: 100%;
    /* карточки в треке равной высоты (по самой высокой) — свободное место
       коротких кейсов забирает инфо-плашка, чтобы пагинация была сразу под карточкой;
       min-height выравнивает плашки между кейсами с разной длиной текста */
    flex: 1;
    min-height: 330px;
}

.case-info-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.case-info-title {
    font-size: 20px;
    line-height: 120%;
}

.case-info-desc {
    font-size: 16px;
    line-height: 120%;
}

.case-info-logo {
    align-self: flex-start;
    height: 24px;
    width: auto;
}

.case-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    height: auto;
}

.case-photo {
    width: 100%;
    height: auto;
    /* фото кейсов разных пропорций (есть квадратные) — приводим все
       к пропорции первой карточки, лишнее кадрируется object-fit: cover */
    aspect-ratio: 433 / 293;
    border-radius: 10px;
    overflow: hidden;
}

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

.case-review {
    background: #F7F7F7;
    border-radius: 12px;
    padding: 24px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    height: auto;
    /* плашки разной наполненности (отзыв vs «почему сработало») — выравниваем,
       чтобы и инфо-блоки карточек получались одинаковой высоты */
    min-height: 200px;
}

.case-review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.case-review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.case-review-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.case-review-name {
    font-size: 16px;
    font-weight: 600;
}

.case-review-role {
    font-size: 12px;
    color: #8E8E93;
}

.case-review-text {
    font-size: 14px;
    line-height: 130%;
}

.cases-slider-nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cases-slider-btn {
    display: none;
}

.footer-contacts-title {
    display: none;
}


.footer {
    padding-top: 80px;
}

.footer-container {
    display: flex;
    flex-direction: column;
    padding: 24px 8px;
    gap: 0;
    min-height: auto;
}

.footer-form {
    order: 1;
    width: 100%;
}

.footer-left {
    order: 2;
    width: 100%;
    height: auto;
    margin-top: 20px;
}

.footer-contacts-title {
    display: block;
    font-size: 28px;
    margin-bottom: 16px;
    text-align: left;
}

.footer-contacts-info {
    width: 100%;
    height: auto;
    gap: 24px;
    padding-bottom: 60px;
}

.info-row {
    gap: 20px;
}

.info-label {
    width: 100px;
    font-size: 14px;
}

.footer-contacts-links .info-link {
    font-size: 16px;
}

.social-links {
    justify-content: flex-start;
    gap: 20px;
}

.form-submit-btn {
    width: 100%;
    padding: 20px;
}

.form-privacy-text {
    font-size: 11px;
    text-align: center;
    padding-bottom: 40px;
}


.product-popup-overlay {
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
}

.product-popup {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto; 
    max-height: 90vh;
    border-radius: 30px;
    padding: 40px 16px;
    overflow-y: auto;
    box-sizing: border-box;
    margin: 0;

    padding-bottom: 40px
}

.product-popup-nav {
    position: absolute;
    bottom: 10px; 
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.product-popup-slider-container .popup-arrow-prev,
.product-popup-slider-container .popup-arrow-next {
    display: none !important;
}

.product-popup-close {
    top: 8px;
    right: 8px;
    /* иконка по центру кнопки 40x40 — визуально ~20px от краёв попапа */
    width: 40px;
    height: 40px;
}

.product-popup-title {
    order: 0;
    font-size: 24px;
    text-align: center;
    margin-bottom: 0;
}

.product-popup-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    order: 1;
    height: auto;
}

.product-popup-info {
    padding: 0;
}

.product-popup-product-name {
    font-size: 20px;
    font-weight: 500;
    margin-left: 16px;
    margin-top: 24px;
    margin-bottom: 12px;

}

.product-popup-product-chars {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 16px;
    line-height: 120%;
    color: #5E5E5E;
    margin-left: 16px;
}

.product-popup-media {
    margin: 0 16px 0 16px;
    width: calc(100% - 32px); 
    border-radius: none;
}

.product-popup-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

/* попап-форма Б24: отступы от краёв экрана */
.b24-window-popup {
    padding-left: 8px;
    padding-right: 8px;
}

}


