/* Media Star / Vasha Viveska 3.0 — scoped extensions for rebuilt pages. */
:root{
  --ms-ink:#151722;
  --ms-dark:#050215;
  --ms-purple:#5d54bd;
  --ms-purple-deep:#433a9a;
  --ms-green:#63df8b;
  --ms-paper:#f2f2f2;
  --ms-white:#fff;
  --ms-muted:#686872;
  --ms-line:#dddddf;
}
html{scroll-padding-top:104px}
body{font-family:'TildaSans',Arial,Helvetica,sans-serif;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
main{display:block}
.ms-head{position:sticky;top:0;z-index:500;transition:box-shadow .25s ease,height .25s ease}
.ms-head.is-scrolled{box-shadow:0 12px 36px rgba(5,2,21,.08)}
.ms-navdrop>button{color:var(--ms-ink)}
.ms-navdrop__menu{max-height:min(70vh,620px);overflow:auto}
.ms-mobile{z-index:499}
.ms-mobile a:last-child{background:var(--ms-dark);color:#fff;margin-top:12px;text-align:center}

/* Mandatory contrast rules for all rebuilt controls. */
.ms-btn,.ms-form button,.ms-case-controls button,.ms-filter button.is-active,
.ms-arrow,.ms-outline:hover,.ms-business-grid a:hover{color:#fff!important}
.ms-btn--light,.ms-btn--ghost,.ms-outline,.ms-filter button:not(.is-active),
.ms-map>a,.ms-case__images span{color:var(--ms-dark)!important}
.ms-btn--light:hover{background:var(--ms-green)!important;border-color:var(--ms-green)!important;color:var(--ms-dark)!important}
.ms-btn--ghost:hover,.ms-outline:hover{background:var(--ms-dark)!important;border-color:var(--ms-dark)!important;color:#fff!important}
.ms-btn:focus-visible,.ms-outline:focus-visible,.ms-filter button:focus-visible,.ms-faq__item button:focus-visible,.ms-burger:focus-visible{outline:3px solid var(--ms-green);outline-offset:3px}
button:disabled{opacity:.58;cursor:not-allowed}

.ms-hero__copy{min-width:0}
.ms-hero h1,.ms-section-head h2,.ms-article__head h1,.ms-order__copy h2,.ms-footer__cta h2{
  overflow-wrap:normal;word-break:normal;hyphens:none;text-wrap:balance
}
.ms-hero__copy>p,.ms-section-head p,.ms-richtext,.ms-service-card p,.ms-feature-card p{text-wrap:pretty}
.ms-hero__media{isolation:isolate}
.ms-hero__slide{display:block}
.ms-hero__slide img{object-position:center}
.ms-section--dark .ms-section-head h2,.ms-section--dark .ms-section-head p{color:#fff}
.ms-section--compact{padding:52px 0}
.ms-section-action{display:flex;justify-content:center;margin-top:36px}

/* Rebuilt case slider on the home page. */
.ms-case-slider{position:relative;min-height:610px}
.ms-case-slide{display:none;grid-template-columns:minmax(0,1.65fr) minmax(340px,.7fr);gap:14px;min-height:610px}
.ms-case-slide.is-active{display:grid}
.ms-case-slide .ms-case__images{height:610px}
.ms-case-slide .ms-case__images figure{height:610px}
.ms-case-slide .ms-case__copy{min-height:610px}
.ms-case-slide .ms-case__copy h3{font-size:clamp(34px,3vw,58px);line-height:.98}
.ms-case-slide dl{display:grid;gap:15px;margin:26px 0 34px}
.ms-case-slide dl>div{display:grid;grid-template-columns:90px 1fr;gap:14px;padding-top:13px;border-top:1px solid #ececf0}
.ms-case-slide dt{font-size:10px;text-transform:uppercase;color:#777}
.ms-case-slide dd{margin:0;font-size:14px;line-height:1.4}
.ms-case-controls{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.ms-case-controls button{width:48px;height:48px;border:0;background:var(--ms-purple);font-size:24px;cursor:pointer}
.ms-case-controls button:hover{background:var(--ms-green)!important;color:var(--ms-dark)!important}

/* Image-backed expert, material and technology cards. */
.ms-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ms-feature-card{display:grid;grid-template-rows:260px 1fr;min-width:0;background:#fff;border:1px solid var(--ms-line)}
.ms-feature-card>img{width:100%;height:260px;object-fit:cover}
.ms-feature-card>div{padding:25px;display:flex;flex-direction:column;min-width:0}
.ms-feature-card>div>span,.ms-feature-card__number{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--ms-purple)}
.ms-feature-card h3{font-size:24px;line-height:1.04;font-weight:400;text-transform:uppercase;margin:28px 0 12px;overflow-wrap:normal;word-break:normal}
.ms-feature-card p{font-size:14px;line-height:1.5;color:var(--ms-muted);margin:0 0 22px}
.ms-feature-card small{display:block;margin-top:auto;padding-top:15px;border-top:1px solid #ececf0;font-size:11px;color:#777}

.ms-stats--four{grid-template-columns:repeat(4,minmax(0,1fr))}
.ms-stats--four>div{min-height:180px}
.ms-review-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ms-review-grid article{border:1px solid var(--ms-line);padding:30px;min-height:260px;background:#fff}
.ms-review-grid span{font-size:10px;letter-spacing:.13em;text-transform:uppercase;color:var(--ms-purple)}
.ms-review-grid h3{font-size:26px;font-weight:400;line-height:1.04;text-transform:uppercase;margin:55px 0 14px}
.ms-review-grid p{font-size:14px;line-height:1.55;color:var(--ms-muted)}

/* Portfolio and case pages. */
.ms-portfolio-card{min-width:0}
.ms-portfolio-card[hidden]{display:none!important}
.ms-case-facts{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--ms-line);margin-top:28px;border:1px solid var(--ms-line)}
.ms-case-facts>div{background:#fff;padding:20px}
.ms-case-facts dt{font-size:10px;text-transform:uppercase;color:#777;margin-bottom:7px}
.ms-case-facts dd{margin:0;font-size:14px;line-height:1.4}
.ms-related-articles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ms-related-articles a{display:flex;flex-direction:column;gap:10px;min-height:150px;padding:25px;border:1px solid var(--ms-line);background:#fff;text-decoration:none}
.ms-related-articles b{font-size:20px;line-height:1.08;text-transform:uppercase;font-weight:400}
.ms-related-articles span{margin-top:auto;font-size:10px;text-transform:uppercase;color:var(--ms-purple)}

/* Contacts. */
.ms-contact-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ms-contact-photo-grid figure{position:relative;margin:0;min-height:470px;overflow:hidden;background:#171323}
.ms-contact-photo-grid img{width:100%;height:100%;min-height:470px;object-fit:cover}
.ms-contact-photo-grid figcaption{position:absolute;left:0;right:0;bottom:0;padding:22px;color:#fff;background:linear-gradient(180deg,transparent,rgba(5,2,21,.88));font-size:12px;text-transform:uppercase}
.ms-contact-detail a,.ms-docs a{color:var(--ms-purple);overflow-wrap:anywhere}
.ms-map iframe{background:#e8e8eb}

/* Blog/article refinements. */
.ms-blog-card{min-width:0}
.ms-blog-card h2{overflow-wrap:normal;word-break:normal;hyphens:none}
.ms-blog-card[hidden]{display:none!important}
.ms-article__body>.ms-order{width:auto;margin:48px 0;padding:0;background:transparent}
.ms-article__body>.ms-order .ms-order__grid{width:100%;display:grid;background:var(--ms-dark);padding:36px}
.ms-article__body>.ms-order .ms-order__copy{color:#fff}
.ms-article__body>.ms-order .ms-form{display:none}
.ms-article__body>.ms-order .ms-order__contacts{display:none}
.ms-article__body>.ms-order .ms-order__copy:after{content:'Оставить заявку';display:inline-flex;align-items:center;justify-content:center;min-height:48px;margin-top:20px;padding:0 24px;background:#fff;color:var(--ms-dark);font-size:11px;text-transform:uppercase}
.ms-article__body ul{padding-left:24px}
.ms-article__body li+li{margin-top:8px}
.ms-toc{max-height:calc(100vh - 140px);overflow:auto}

/* Form usability. */
.ms-form input,.ms-form textarea,.ms-form select{min-width:0}
.ms-form input:focus,.ms-form textarea:focus,.ms-form select:focus{outline:2px solid var(--ms-green);outline-offset:1px;border-color:var(--ms-green)}
.ms-consent a{color:inherit}
.ms-form__status:not(:empty){padding:12px;background:#eeedf5;color:var(--ms-dark)}

/* Ensure dark and light button semantics site-wide on controlled pages. */
.ms-section--dark a:not(.ms-btn):not(.ms-portfolio-card),.ms-footer a{color:inherit}
.ms-section--dark .ms-service-card,.ms-section--dark .ms-trust-card,.ms-section--dark .ms-feature-card{color:var(--ms-ink)}

@media(max-width:1300px){
  .ms-case-slide{grid-template-columns:minmax(0,1.4fr) minmax(320px,.8fr)}
  .ms-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ms-stats--four{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:980px){
  html{scroll-padding-top:90px}
  .ms-head{position:sticky}
  .ms-hero h1{font-size:clamp(48px,9vw,72px)}
  .ms-case-slider{min-height:0}
  .ms-case-slide,.ms-case-slide.is-active{grid-template-columns:1fr;min-height:0}
  .ms-case-slide .ms-case__images,.ms-case-slide .ms-case__images figure{height:430px}
  .ms-case-slide .ms-case__copy{min-height:0}
  .ms-contact-photo-grid{grid-template-columns:1fr 1fr}
  .ms-contact-photo-grid figure:last-child{grid-column:1/-1}
  .ms-related-articles{grid-template-columns:1fr 1fr}
  .ms-review-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:620px){
  body{font-size:16px}
  .ms-head{height:82px}
  .ms-mobile{inset:82px 0 0}
  .ms-logo img{width:56px;height:56px}
  .ms-hero{padding-top:8px}
  .ms-hero__copy{padding-top:22px}
  .ms-hero h1{font-size:clamp(39px,13vw,52px);line-height:.96;letter-spacing:-.045em;margin-bottom:22px}
  .ms-hero__copy>p{font-size:16px;line-height:1.5}
  .ms-hero__media{min-height:390px}
  .ms-hero__badge{left:20px;bottom:22px;max-width:220px}
  .ms-arrow{width:42px;height:42px;font-size:26px}
  .ms-section{padding:66px 0}
  .ms-section--compact{padding:40px 0}
  .ms-section-head{margin-bottom:34px}
  .ms-section-head h2{font-size:clamp(34px,11vw,43px);line-height:.98;letter-spacing:-.04em}
  .ms-section-head p{font-size:16px}
  .ms-service-card__image{aspect-ratio:4/3}
  .ms-service-card>div{padding:22px}
  .ms-service-card__foot{align-items:flex-start;flex-direction:column}
  .ms-case-slide .ms-case__images{height:auto;grid-template-columns:1fr}
  .ms-case-slide .ms-case__images figure{height:320px}
  .ms-case-slide .ms-case__copy{padding:26px}
  .ms-case-slide dl>div{grid-template-columns:1fr;gap:5px}
  .ms-case-controls{justify-content:center}
  .ms-feature-grid,.ms-review-grid,.ms-related-articles,.ms-contact-photo-grid,.ms-stats--four{grid-template-columns:1fr}
  .ms-feature-card{grid-template-rows:230px 1fr}
  .ms-feature-card>img{height:230px}
  .ms-feature-card h3{font-size:22px;margin-top:24px}
  .ms-contact-photo-grid figure,.ms-contact-photo-grid img{min-height:360px}
  .ms-contact-photo-grid figure:last-child{grid-column:auto}
  .ms-calculator{padding:24px 18px}
  .ms-calculator h3{font-size:29px}
  .ms-price th,.ms-price td{padding:16px 14px}
  .ms-filter{display:flex;overflow-x:auto;scrollbar-width:none;padding-bottom:4px}
  .ms-filter::-webkit-scrollbar{display:none}
  .ms-filter button{flex:0 0 auto}
  .ms-portfolio-card figure{height:300px}
  .ms-order__copy h2{font-size:clamp(38px,12vw,50px)}
  .ms-article{padding-top:32px}
  .ms-article__head h1{font-size:clamp(38px,12vw,49px)}
  .ms-article__head>p{font-size:17px}
  .ms-article__meta{gap:10px;flex-direction:column}
  .ms-article__hero{height:360px}
  .ms-article__layout{margin-top:44px;gap:35px}
  .ms-article__body h2{font-size:32px}
  .ms-article__body p,.ms-article__body li{font-size:16px;line-height:1.65}
  .ms-article__body>.ms-order .ms-order__grid{padding:26px 22px}
  .ms-case-facts{grid-template-columns:1fr}
  .ms-footer__cta h2{font-size:42px}
  .ms-footer__grid{gap:28px}
}
@media(prefers-reduced-motion:reduce){
  .ms-head,.ms-case-slide,.ms-feature-card,.ms-portfolio-card{transition:none!important}
}

/* Safe reveal: content stays visible when JS is unavailable. */
.ms-reveal{opacity:1;transform:none}
.ms-motion-ready .ms-reveal{opacity:0;transform:translateY(20px)}
.ms-motion-ready .ms-reveal.is-visible{opacity:1;transform:none}
.ms-map-preview{width:100%;height:100%;min-height:560px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;background:repeating-linear-gradient(45deg,#ececf0,#ececf0 18px,#e4e4e9 18px,#e4e4e9 36px);color:#151722;text-align:center}.ms-map-preview span{font-size:11px;text-transform:uppercase;color:#5d54bd}.ms-map-preview b{font-size:20px;font-weight:400}
.ms-order{background:linear-gradient(120deg,#5d54bd,#433a9a)!important;color:#fff}.ms-order__copy p,.ms-order__contacts a,.ms-order__contacts p{color:#fff}
/* Variant backgrounds must win over the base button rule from the preserved stylesheet. */
.ms-btn--light{background:#fff!important;border-color:#fff!important;color:#050215!important}
.ms-btn--ghost{background:#fff!important;border-color:#bdbdc4!important;color:#050215!important}
.ms-outline{background:#fff!important;color:#5d54bd!important}
.ms-filter button{background:#fff;color:#151722}
.ms-filter button.is-active{background:#050215;color:#fff}
/* Fail-safe animation: never hide content while waiting for IntersectionObserver. */
.ms-motion-ready .ms-reveal{opacity:1!important;transform:none!important}
.ms-motion-ready .ms-reveal.is-visible{animation:msSoftReveal .55s ease both}
@keyframes msSoftReveal{from{opacity:.35;transform:translateY(12px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.ms-motion-ready .ms-reveal.is-visible{animation:none}}
/* Mobile title sizing follows the longest word so headings never leave the viewport. */
@media(max-width:620px){
  .ms-hero h1{font-size:40px;line-height:.98;letter-spacing:-.04em;max-width:100%;overflow-wrap:normal;word-break:normal;hyphens:none}
  .ms-hero--long h1{font-size:34px;letter-spacing:-.035em}
  .ms-hero--xlong h1{font-size:30px;letter-spacing:-.03em}
}
/* Final mobile readability guardrails: no horizontal clipping and no oversized long headings. */
html,body{overflow-x:clip}
@media(max-width:620px){
  .ms-section-head h2{font-size:34px;line-height:1;letter-spacing:-.035em;max-width:100%}
  .ms-production__copy h2,.ms-order__copy h2,.ms-footer__cta h2{font-size:34px;line-height:1;letter-spacing:-.035em;max-width:100%}
  .ms-article__head h1{font-size:36px;line-height:1;letter-spacing:-.035em;max-width:100%}
  .ms-mobile{visibility:hidden;pointer-events:none;contain:layout paint}
  .menu-open .ms-mobile{visibility:visible;pointer-events:auto}
}
/* Long desktop titles, especially About and Contacts, stay comfortably inside the copy column. */
.ms-hero--xlong h1{font-size:clamp(50px,4.4vw,70px)}
.ms-hero--long h1{font-size:clamp(52px,4.8vw,78px)}
@media(max-width:620px){
  .ms-hero--long h1{font-size:34px}
  .ms-hero--xlong h1{font-size:30px}
}
/* Portfolio cards contain an image and a separate text area; never crop the copy. */
.ms-portfolio-card{
  aspect-ratio:auto!important;
  display:grid;
  grid-template-rows:260px minmax(150px,auto);
  overflow:visible!important;
  background:#fff!important;
  border:1px solid var(--ms-line);
  color:var(--ms-ink)!important;
  text-decoration:none;
}
.ms-portfolio-card figure{height:260px!important;margin:0;overflow:hidden;background:#e9e9ec}
.ms-portfolio-card figure img{width:100%;height:100%;object-fit:cover}
.ms-portfolio-card>div{padding:22px;display:flex;flex-direction:column;min-width:0}
.ms-portfolio-card>div>span{position:static!important;display:inline-block;align-self:flex-start;background:transparent!important;color:var(--ms-purple)!important;padding:0!important;font-size:10px;letter-spacing:.12em;text-transform:uppercase}
.ms-portfolio-card h3{font-size:22px;line-height:1.05;font-weight:400;text-transform:uppercase;margin:24px 0 10px;overflow-wrap:normal;word-break:normal;hyphens:none}
.ms-portfolio-card p{font-size:13px;line-height:1.45;color:var(--ms-muted);margin:auto 0 0}
@media(max-width:620px){
  .ms-portfolio-card{grid-template-rows:280px minmax(140px,auto)}
  .ms-portfolio-card figure{height:280px!important}
  .ms-portfolio-card h3{font-size:21px}
}
/* Article grids must shrink to the mobile viewport instead of using intrinsic text width. */
.ms-article__layout{grid-template-columns:260px minmax(0,1fr)}
.ms-article__layout>*{min-width:0}
.ms-article__body{min-width:0;width:100%}
@media(max-width:980px){
  .ms-article__layout{grid-template-columns:minmax(0,1fr)}
  .ms-toc,.ms-article__body{width:100%;max-width:100%;min-width:0}
}
@media(max-width:620px){
  .ms-expert{grid-template-columns:1fr;padding:26px 22px;gap:18px}
  .ms-expert img{width:96px}
  .ms-related>div{grid-template-columns:1fr}
  .ms-article-gallery{grid-template-columns:1fr}
  .ms-article-gallery img{height:280px}
}

/* Expanded company, contacts and portfolio sections. */
.ms-production-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ms-production-gallery figure{position:relative;margin:0;min-height:390px;overflow:hidden;background:#171323}
.ms-production-gallery img{width:100%;height:100%;min-height:390px;object-fit:cover;display:block}
.ms-production-gallery figcaption{position:absolute;left:0;right:0;bottom:0;padding:42px 20px 20px;color:#fff;background:linear-gradient(180deg,transparent,rgba(5,2,21,.92));font-size:11px;line-height:1.4;letter-spacing:.08em;text-transform:uppercase}
.ms-docs--four{grid-template-columns:repeat(4,minmax(0,1fr))}
.ms-contact-actions{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0 24px}
.ms-contact-actions .ms-btn{min-height:50px}
.ms-section-action{display:flex;justify-content:center;margin-top:34px}
.ms-case-process{width:100%;height:360px;object-fit:cover;margin-top:26px;border:1px solid var(--ms-line)}
.ms-order--subscribe .ms-form{align-self:center}
.ms-review-grid article{display:flex;flex-direction:column}
.ms-review-grid article p{margin-top:auto}
@media(max-width:1180px){
  .ms-production-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ms-docs--four{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .ms-production-gallery,.ms-docs--four{grid-template-columns:1fr}
  .ms-production-gallery figure,.ms-production-gallery img{min-height:330px}
  .ms-contact-actions{display:grid;grid-template-columns:1fr}
  .ms-contact-actions .ms-btn{width:100%}
  .ms-case-process{height:300px}
}
/* ==================================================
   ФИНАЛЬНЫЕ РУЧНЫЕ ПРАВКИ
   Добавлять в самый конец assets/css/ms-v3.css
   ================================================== */


/* Маленькая подпись над заголовком секции:
   «Направления», «Производство», «Этапы» и т. д. */
body .ms-section-head > span {
    display: block !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    font-weight: 500 !important;
    letter-spacing: 0.08em !important;
}


/* Категория проекта:
   например «Вывески» над названием кейса */
body .ms-case-slide .ms-case__copy > span,
body .ms-case__copy > span {
    display: block !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    font-weight: 500 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}


/* Название проекта делаем меньше */
body .ms-case-slide .ms-case__copy > h3,
body .ms-case__copy > h3 {
    font-size: clamp(28px, 2.2vw, 38px) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.025em !important;
    margin-top: 26px !important;
    margin-bottom: 30px !important;
}


/* Всё меню в шапке — верхним регистром.
   Важно: пункт «Услуги» является button, а не ссылкой. */
body .ms-head .ms-nav > a,
body .ms-head .ms-navdrop > button,
body .ms-head .ms-navdrop__menu > a,
body .ms-head .ms-mobile > a {
    text-transform: uppercase !important;
}


/* Мобильная версия */
@media (max-width: 620px) {
    body .ms-section-head > span {
        font-size: 16px !important;
    }

    body .ms-case-slide .ms-case__copy > span,
    body .ms-case__copy > span {
        font-size: 16px !important;
    }

    body .ms-case-slide .ms-case__copy > h3,
    body .ms-case__copy > h3 {
        font-size: 27px !important;
        line-height: 1.08 !important;
        margin-top: 20px !important;
        margin-bottom: 25px !important;
    }
}
/* Подпись в первом экране:
   «Рекламно-производственная компания» */
body .ms-kicker {
    font-size: 18px !important;
    line-height: 1.35 !important;
}


/* Подпись над заголовком формы:
   «Заявка» */
body .ms-order__copy > span {
    display: block !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    font-weight: 500 !important;
    letter-spacing: 0.08em !important;
}

/* Более тёмный текст абзацев во всех светлых экспертных/SEO-блоках */
body .ms-section--soft .ms-seo-two .ms-richtext p {
    color: #3b3b43 !important;
    opacity: 1 !important;
}
/* Центрирование пяти карточек этапов работы */
body .ms-timeline {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: stretch !important;
}

/* ПК: ровно 5 карточек в ряд */
body .ms-timeline > article {
    flex: 0 0 20% !important;
    width: 20% !important;
    max-width: 20% !important;
}

/* Планшет: 3 карточки сверху, 2 снизу по центру */
@media (max-width: 1300px) {
    body .ms-timeline > article {
        flex-basis: 33.333% !important;
        width: 33.333% !important;
        max-width: 33.333% !important;
    }
}

/* Телефон: по одной карточке */
@media (max-width: 620px) {
    body .ms-timeline > article {
        flex-basis: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}
/* Стрелка выпадающего меню «УСЛУГИ» — независимая от шрифта */
body .ms-head .ms-nav .ms-navdrop > button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    line-height: 1 !important;
}

/* Скрываем кривой текстовый символ ⌄ и рисуем свою стрелку */
body .ms-head .ms-nav .ms-navdrop > button > span {
    display: block !important;
    flex: 0 0 auto !important;

    width: 8px !important;
    height: 8px !important;

    font-size: 0 !important;
    line-height: 0 !important;

    border-right: 1.5px solid currentColor !important;
    border-bottom: 1.5px solid currentColor !important;

    margin: 0 !important;
    padding: 0 !important;

    position: relative !important;
    top: -2px !important;

    transform: rotate(45deg) !important;
    transform-origin: center !important;
}

/* ==================================================
   ПРОИЗВОДСТВО — средняя ровная галерея 3 × 2
   ================================================== */

body .ms-production {
    display: grid !important;
    grid-template-columns: minmax(320px, 430px) minmax(0, 780px) !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: clamp(45px, 5vw, 80px) !important;
}

/* Левая текстовая часть */
body .ms-production__copy {
    width: 100% !important;
    max-width: 430px !important;
    min-width: 0 !important;
}

/* Галерея: ровно 3 колонки и 2 ряда */
body .ms-production__gallery {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    gap: 14px !important;

    width: 100% !important;
    max-width: 780px !important;
    margin: 0 auto !important;

    align-items: stretch !important;
}

/* Сброс старого нестандартного расположения карточек */
body .ms-production__gallery > figure,
body .ms-production__gallery > figure:nth-child(n) {
    position: relative !important;

    grid-column: auto !important;
    grid-row: auto !important;
    grid-area: auto !important;

    display: block !important;
    width: 100% !important;
    height: 190px !important;
    min-width: 0 !important;
    min-height: 190px !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;
    transform: none !important;

    background: #17171d !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
}

/* Фотография */
body .ms-production__gallery > figure > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;

    object-fit: cover !important;
    object-position: center !important;

    transition: transform 0.35s ease !important;
}

/* Небольшое увеличение при наведении */
body .ms-production__gallery > figure:hover > img {
    transform: scale(1.035) !important;
}

/* Затемнение под подпись */
body .ms-production__gallery > figure::after {
    content: "" !important;
    position: absolute !important;
    inset: 40% 0 0 !important;
    z-index: 1 !important;

    background: linear-gradient(
        to bottom,
        rgba(10, 10, 14, 0),
        rgba(10, 10, 14, 0.9)
    ) !important;

    pointer-events: none !important;
}

/* Подпись на фотографии */
body .ms-production__gallery > figure > figcaption {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 2 !important;

    display: block !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 15px 16px !important;

    color: #ffffff !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
}


/* Планшет */
@media (max-width: 1100px) {
    body .ms-production {
        grid-template-columns: 1fr !important;
        align-items: start !important;
        gap: 38px !important;
    }

    body .ms-production__copy {
        max-width: 720px !important;
    }

    body .ms-production__gallery {
        max-width: 820px !important;
        margin: 0 !important;
    }
}


/* Телефон: две колонки и три ряда */
@media (max-width: 700px) {
    body .ms-production__gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    body .ms-production__gallery > figure,
    body .ms-production__gallery > figure:nth-child(n) {
        height: 165px !important;
        min-height: 165px !important;
    }

    body .ms-production__gallery > figure > figcaption {
        padding: 12px !important;
        font-size: 13px !important;
    }
}


/* Узкий телефон: одна колонка */
@media (max-width: 420px) {
    body .ms-production__gallery {
        grid-template-columns: 1fr !important;
    }

    body .ms-production__gallery > figure,
    body .ms-production__gallery > figure:nth-child(n) {
        height: 205px !important;
        min-height: 205px !important;
    }

    body .ms-production__gallery > figure > figcaption {
        padding: 14px !important;
        font-size: 14px !important;
    }
}

/* ==================================================
   Этапы работы — 6 карточек в одной строке на ПК
   ================================================== */

body .ms-timeline {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: clamp(8px, 1.2vw, 18px) !important;

    width: 100% !important;
    align-items: stretch !important;
}

/* Карточки уменьшаются вместе с шириной экрана */
body .ms-timeline > article {
    display: flex !important;
    flex-direction: column !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100% !important;

    padding: clamp(16px, 1.7vw, 28px) !important;
    box-sizing: border-box !important;
}

/* Номер этапа */
body .ms-timeline > article > span {
    font-size: clamp(20px, 1.8vw, 30px) !important;
    line-height: 1 !important;
    margin-bottom: clamp(14px, 1.5vw, 24px) !important;
}

/* Заголовок карточки */
body .ms-timeline > article > h3 {
    font-size: clamp(15px, 1.25vw, 20px) !important;
    line-height: 1.15 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
}

/* Описание */
body .ms-timeline > article > p {
    font-size: clamp(12px, 0.95vw, 15px) !important;
    line-height: 1.45 !important;
    margin-top: 12px !important;
}


/* На небольших ноутбуках всё ещё одна строка */
@media (min-width: 901px) and (max-width: 1250px) {
    body .ms-timeline {
        gap: 8px !important;
    }

    body .ms-timeline > article {
        padding: 16px 12px !important;
    }

    body .ms-timeline > article > h3 {
        font-size: 14px !important;
    }

    body .ms-timeline > article > p {
        font-size: 12px !important;
        line-height: 1.35 !important;
    }
}


/* Планшет: 3 карточки в строке */
@media (max-width: 900px) {
    body .ms-timeline {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    body .ms-timeline > article {
        padding: 20px !important;
    }

    body .ms-timeline > article > h3 {
        font-size: 17px !important;
    }

    body .ms-timeline > article > p {
        font-size: 14px !important;
    }
}


/* Телефон: одна карточка в строке */
@media (max-width: 620px) {
    body .ms-timeline {
        grid-template-columns: 1fr !important;
    }

    body .ms-timeline > article {
        padding: 22px !important;
    }
}

/* На ПК убираем синий прямоугольник полностью */
body .ms-production__copy {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* Убираем возможный фон через псевдоэлементы */
body .ms-production__copy::before,
body .ms-production__copy::after {
    content: none !important;
    display: none !important;
}

/* На мобильном возвращаем карточку с фоном */
@media (max-width: 620px) {
    body .ms-production__copy {
        background: linear-gradient(
            145deg,
            #241a49 0%,
            #17102f 55%,
            #110c27 100%
        ) !important;

        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        padding: 30px 22px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
}
/* ==================================================
   ЭТАПЫ РАБОТЫ — единый исправленный вариант
   5 или 6 карточек, без обрезания слов
   ================================================== */

body .ms-timeline {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: stretch !important;

    width: 100% !important;
    max-width: 100% !important;
    gap: clamp(8px, 1.15vw, 18px) !important;

    margin: 0 auto !important;
}

/* Если в блоке есть шестая карточка — создаём 6 колонок */
body .ms-timeline:has(> article:nth-child(6)) {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

/* Полный сброс старого позиционирования карточек */
body .ms-timeline > article,
body .ms-timeline > article:nth-child(n) {
    position: relative !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;

    grid-column: auto !important;
    grid-row: auto !important;
    grid-area: auto !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;

    margin: 0 !important;
    padding: clamp(16px, 1.55vw, 27px) !important;
    box-sizing: border-box !important;

    overflow: visible !important;
    transform: none !important;
}

/* Номер этапа */
body .ms-timeline > article > span {
    display: block !important;

    font-size: clamp(20px, 1.7vw, 29px) !important;
    line-height: 1 !important;

    margin: 0 0 clamp(14px, 1.35vw, 22px) !important;
}

/* Заголовок — перенос только между словами */
body .ms-timeline > article > h3 {
    display: block !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;

    font-size: clamp(14px, 1.08vw, 19px) !important;
    line-height: 1.18 !important;

    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;

    overflow: visible !important;
    text-overflow: clip !important;

    /* Убираем возможное ограничение количества строк */
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
}

/* Описание также не обрезается */
body .ms-timeline > article > p {
    display: block !important;

    width: 100% !important;
    height: auto !important;
    max-height: none !important;

    margin: 12px 0 0 !important;

    font-size: clamp(12px, 0.88vw, 15px) !important;
    line-height: 1.45 !important;

    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;

    overflow: visible !important;
    text-overflow: clip !important;

    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
}


/* Небольшие экраны ПК и ноутбуки:
   карточки всё ещё остаются в одной строке */
@media (min-width: 901px) and (max-width: 1250px) {
    body .ms-timeline {
        gap: 7px !important;
    }

    body .ms-timeline > article,
    body .ms-timeline > article:nth-child(n) {
        padding: 16px 11px !important;
    }

    body .ms-timeline > article > span {
        font-size: 21px !important;
        margin-bottom: 14px !important;
    }

    body .ms-timeline > article > h3 {
        font-size: 13px !important;
        line-height: 1.2 !important;
    }

    body .ms-timeline > article > p {
        font-size: 11px !important;
        line-height: 1.38 !important;
        margin-top: 9px !important;
    }
}


/* Планшет: три карточки в строке */
@media (max-width: 900px) {
    body .ms-timeline,
    body .ms-timeline:has(> article:nth-child(6)) {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    body .ms-timeline > article,
    body .ms-timeline > article:nth-child(n) {
        padding: 20px !important;
    }

    body .ms-timeline > article > h3 {
        font-size: 17px !important;
    }

    body .ms-timeline > article > p {
        font-size: 14px !important;
    }
}


/* Телефон: одна карточка в строке */
@media (max-width: 620px) {
    body .ms-timeline,
    body .ms-timeline:has(> article:nth-child(6)) {
        grid-template-columns: 1fr !important;
    }

    body .ms-timeline > article,
    body .ms-timeline > article:nth-child(n) {
        min-height: 0 !important;
        padding: 22px !important;
    }

    body .ms-timeline > article > h3 {
        font-size: 18px !important;
    }

    body .ms-timeline > article > p {
        font-size: 14px !important;
    }
}