/* Modern Redesign - brand color: #d16259 */

:root{
    --brand: #d16259;
    --brand-dark: #b24e45;
    --brand-soft: rgba(209, 98, 89, 0.14);
    --text: #1f2937;
    --muted: rgba(31, 41, 55, 0.72);
    --surface: rgba(255, 255, 255, 0.86);
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
}

/* === Experts page === */
.experts__sep{
    height: 1px;
    background: var(--brand); /* #d16259 */
    margin: 22px 0;
}
.experts__section-title{
    margin: 0 0 12px;
}
.expert-card .block-card__title{
    margin-bottom: 10px;
}
.expert-card .block-card__desc{
    margin: 0 0 12px;
}

/* === Watermark background (biglogo1.png) === */
@media (min-width: 768px){
    body.ns-watermark{
        position: relative;
    }
    body.ns-watermark::before{
        content: '';
        position: fixed;
        inset: 0;
        background: url('/newsite/upload/img/biglogo1.png') no-repeat center;
        /* Requested: image occupies ~70% of the page */
        background-size: 39% auto;
        opacity: 0.15; /* +5% more transparency */
        pointer-events: none;
        z-index: 0;
    }
    /* Experts page: make watermark 15% less transparent (more visible) */
    body.ns-watermark-experts::before{
        opacity: 0.30;
    }
    /* Keep all page content above watermark */
    body.ns-watermark .header,
    body.ns-watermark .content,
    body.ns-watermark .footer{
        position: relative;
        z-index: 1;
    }
    /* Ensure sticky header/menu stays above content */
    body.ns-watermark .header{
        z-index: 2000;
    }
    body.ns-watermark .sticky.header{
        z-index: 2100 !important;
    }
    /* Let watermark be visible under content (keep readability) */
    body.ns-watermark .content > .inner.work{
        background: rgba(255,255,255,0.90);
    }
}

/* === Header / Menu === */
.header{
    background: linear-gradient(180deg, #ffffff 0%, #fbf7f7 100%);
    box-shadow: 0 6px 24px rgba(17, 24, 39, 0.08);
    border-bottom: 1px solid rgba(209, 98, 89, 0.18);
    position: relative;
    z-index: 2000;
}

.sticky.header{
    /* Ensure sticky works on all widths (not only template breakpoints) */
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.sticky.header .bottom{
    display: block !important;
}

/* Ensure menu stays visible in sticky state */
.sticky.header .nav{
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Desktop: keep menu visible even in nosticky/top state */
@media (min-width: 992px){
    .header .bottom,
    .header .nav{
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    /* Base template hides these in sticky state; keep them visible */
    .sticky.header .place,
    .sticky.header .phone,
    .sticky.header .callback_container{
        display: block !important;
    }
}

.sticky.header{
    z-index: 2100 !important;
}

/* === Page background (newsite): remove template gray background image === */
.content{
    /* Base template adds `background: url('/bitrix/images/history_bg2.png')` */
    background: none !important;
}
.content > .inner.work{
    /* Ensure content area is visually white */
    background: #fff;
}

/* Keep targeted rule too (harmless if class is present) */
body.ns-service-level-3 .content{
    background: none !important;
}

/* === Service "Заявка на расчет" inline form === */
.service-sep{
    border-top: 1px solid var(--brand-dark);
    margin: 18px 0;
}
.service-request{
    background: transparent !important;
    padding: 0 !important;
}
.service-request__title{
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.25;
}
.service-request__form{
    max-width: 860px;
    /* 20px padding from all sides (requested) */
    padding: 20px;
}
.service-request__grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
}
@media (max-width: 768px){
    .service-request__grid{ grid-template-columns: 1fr; }
}
.service-request label,
.service-request__form label,
.form_wrap.service-modal label{
    display:block;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 6px;
    color: rgba(31,41,55,.88);
}
.service-request .req,
.service-request__form .req,
.form_wrap.service-modal .req{
    color: var(--brand);
}
.service-request input[type="text"],
.service-request input[type="email"],
.service-request input[type="tel"],
.service-request textarea,
.service-request select,
.service-request__form input[type="text"],
.service-request__form input[type="email"],
.service-request__form input[type="tel"],
.service-request__form textarea,
.service-request__form select,
.form_wrap.service-modal input[type="text"],
.form_wrap.service-modal input[type="email"],
.form_wrap.service-modal input[type="tel"],
.form_wrap.service-modal textarea,
.form_wrap.service-modal select{
    width: 100%;
    box-sizing: border-box;
    padding: 12px 12px;
    border: 1px solid rgba(31,41,55,.18);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    outline: none;
    font: inherit;
}
.service-request textarea,
.service-request__form textarea,
.form_wrap.service-modal textarea{
    min-height: 120px;
    resize: vertical;
}
.service-request input:focus,
.service-request textarea:focus,
.service-request select:focus,
.service-request__form input:focus,
.service-request__form textarea:focus,
.service-request__form select:focus,
.form_wrap.service-modal input:focus,
.form_wrap.service-modal textarea:focus,
.form_wrap.service-modal select:focus{
    border-color: rgba(209,98,89,.55);
    box-shadow: 0 0 0 4px rgba(209,98,89,.12);
}

/* Multi-select dropdown */
.ms{
    position: relative;
}
.ms__btn{
    width: 100%;
    padding: 12px 12px;
    border: 1px solid rgba(31,41,55,.18);
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}
.ms__btn span{ color: rgba(31,41,55,.75); }
.ms.open .ms__btn{
    border-color: rgba(209,98,89,.55);
    box-shadow: 0 0 0 4px rgba(209,98,89,.12);
}
.ms__panel{
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    border: 1px solid rgba(31,41,55,.14);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(17,24,39,.16);
    /* 3px padding for checkbox rows and labels (requested) */
    padding: 3px;
    max-height: 320px;
    overflow: auto;
}
.ms__opt{
    display: flex;
    align-items: flex-start;
    /* Requested: 3px between checkbox and service title */
    gap: 3px;
    /* keep options close to panel edge: 3px */
    padding: 3px;
    border-radius: 10px;
    cursor: pointer;
}
.ms__opt:hover{ background: rgba(17,24,39,.03); }
.ms__opt input[type="checkbox"]{
    margin-top: 2px;
    /* Requested: no checkmark glyph, keep square selection */
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(209,98,89,.8);
    border-radius: 3px;
    background: #fff;
    flex: 0 0 auto;
}
.ms__opt input[type="checkbox"]:checked{
    background: var(--brand);
    border-color: var(--brand);
}
.ms__opt input[type="checkbox"]:focus{
    outline: none;
    box-shadow: 0 0 0 3px rgba(209,98,89,.18);
}
.ms__opt span{
    font-size: 13px;
    line-height: 1.35;
    color: rgba(31,41,55,.92);
    /* Forms cleanup: shift service names inside dropdowns 3px right */
    padding-left: 3px;
}

.service-request__actions{
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Callback modal uses same form styles */
.form_wrap.service-modal .form_body{
    padding: 0;
}
.service-modal__sep{
    margin: 12px 0;
}

/* Callback modal: remove close (X) icon */
.form_wrap.service-modal .top-close{
    display: none !important;
}

/* Callback modal: title lower by 5px and aligned to form fields */
.form_wrap.service-modal .service-request__title{
    text-align: left !important;
    margin: 5px 20px 12px !important;
}
.form_wrap.service-modal .service-modal__sep{
    margin: 12px 20px !important;
}

/* Requested: modal window should have 20px from top of viewport */
.callback_frame.jqmWindow,
.request_frame.jqmWindow{
    top: 20px !important;
    bottom: auto !important;
    max-height: calc(100vh - 40px);
    overflow: auto;
}

/* Vertical services menu: triangles instead of squares */
.content .menu li a{
    padding-left: 28px !important;
}
.content .menu li a::before{
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid var(--brand);
}
.content .menu li li a{
    padding-left: 34px !important;
}
.content .menu li li a,
.content .menu li li li a{
    /* Menu spacing (levels 2 & 3): +1px between wrapped lines */
    line-height: calc(1.25em + 1px) !important;
}

/* Sidebar menu separators (levels 2 and 3): between items only */
.content .menu ul.dropdown{
    /* shrink-to-fit so separator width follows longest item */
    display: inline-block;
    width: max-content;
    max-width: 100%;
}
.content .menu ul.dropdown > li > a{
    display: block;
    position: relative;
}
.content .menu ul.dropdown > li + li > a::after{
    content: '';
    position: absolute;
    left: 34px; /* match nested link text inset */
    right: 0;
    top: 0;
    height: 1px;
    background: var(--brand); /* #d16259 */
}
.content .menu li li a::before{
    left: 18px;
    border-top-width: 5px;
    border-bottom-width: 5px;
    border-left-width: 7px;
}
.service-request__submit{
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand) 0%, #e08a84 100%);
    color: #fff;
    padding: 12px 18px;
    font-weight: 650;
    cursor: pointer;
}
.service-request__submit:disabled{
    opacity: .65;
    cursor: not-allowed;
}
.service-request__result{
    display:none;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
}
.service-request__result.ok{
    display:block;
    border: 1px solid rgba(39,174,96,.35);
    background: rgba(39,174,96,.08);
    color: #1f7a44;
}
.service-request__result.err{
    display:block;
    border: 1px solid rgba(235,87,87,.45);
    background: rgba(235,87,87,.08);
    color: #b03030;
}

.header .inner.work,
.header .inner.work.clearfix{
    /* Force stable layout: top row (logo + contacts) then menu */
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.header .logo{
    order: 10;
    flex: 0 0 auto;
}

.header .bottom_right{
    order: 20;
    /* push all contact items to the right */
    margin-left: auto;
    flex: 0 0 auto;
}

.header .slogan{ order: 21; flex: 0 0 100%; display: none; }
.header .place{ order: 22; flex: 0 1 auto; }
.header .phone{ order: 23; flex: 0 1 auto; }
.header .callback_container{ order: 24; flex: 0 0 auto; }

/* Header typography: address like phone/email */
.header .place{
    font-size: 13px;
    font-weight: 500;
    line-height: 16px;
    color: #202020;
}
.header .place span{
    display: block;
    font: inherit;
    color: inherit;
}

/* Keep phone number on one line */
.header .phone{
    /* avoid shrinking too much in our flex header */
    flex: 0 0 auto !important;
}
.header .phone .small:first-child{
    white-space: nowrap;
}

/* Align address/phone to top of "Заказать звонок" (desktop) */
@media (min-width: 992px){
    .header .inner.work,
    .header .inner.work.clearfix{
        align-items: flex-start !important;
    }
    .header .place,
    .header .phone,
    .header .callback_container{
        align-self: flex-start;
        margin-top: 0 !important;
    }
    /* Base template adds padding-top:5px on callback container; remove it */
    .header .callback_container{
        padding-top: 0 !important;
    }
}

.header .bottom{
    order: 40;
    flex: 0 0 100%;
    width: 100%;
}

.header .bottom{
    /* Base template uses position:absolute; make it flow below top header row */
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    clear: both;
    margin-top: 14px;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.header::before{
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--brand) 0%, #e08a84 55%, var(--brand-dark) 100%);
}

.header .inner{
    /* keep comfortable spacing now that menu is in flow */
    padding-top: 18px;
    padding-bottom: 14px;
}

@media (max-width: 980px){
    .header .bottom_right{ margin-left: 0; }
    .header .place,
    .header .phone{
        flex: 0 0 100%;
    }
    .header .callback_container{
        flex: 0 0 100%;
    }
}

.header .logo img{
    /* Slightly larger logo */
    height: 120px !important;
    width: auto;
    display: block;
    /* Template may set background on the IMG itself (color_logo); force transparent */
    background: transparent !important;
    background-color: transparent !important;
}

.header .logo{
    /* User requirement: logo must be on transparent background */
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.header .logo img{ transition: none !important; }

.header .bottom.colored{
    background: transparent !important;
}

/* Some template rules are more specific: `.header.nosticky .bottom.colored { background: #d16259; }` */
.header.nosticky .bottom.colored{
    background: transparent !important;
}

.toggleMenu{
    color: var(--text) !important;
    opacity: 0.9;
    transition: opacity .2s ease;
}
.toggleMenu:hover{ opacity: 1; }

.header .nav {
    /* Menu background must match header background */
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: 0 8px 26px rgba(17, 24, 39, 0.10);
    /* Menu borders: only horizontal 1px lines, no vertical borders */
    border: none !important;
    border-top: 1px solid var(--brand-dark) !important;
    border-bottom: 1px solid var(--brand-dark) !important;
    padding: 4px 6px;
    backdrop-filter: none !important;
}

/* Remove any vertical separators/borders in top menu */
.header .nav,
.header .nav > li,
.header .nav > li > a{
    border-left: 0 !important;
    border-right: 0 !important;
}

.nav > li > a {
    position: relative;
    padding: 18px 24px !important;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
    color: var(--text) !important;
    border-radius: 12px;
    border: 0 !important;
}

/* Menu hover: ONLY text color change */
.nav > li > a:hover,
.nav > li.hover > a{
    background: transparent !important;
    color: var(--brand) !important; /* #d16259 */
}

/* Template hover highlight is applied to LI, not A */
.header .nav > li:hover,
.header .nav > li.hover{
    background: transparent !important;
}

/* Active/current item: no background, keep readable highlight */
.nav > li.active > a,
.nav > li > a.active,
.nav > li.selected > a{
    background: transparent !important;
    color: var(--brand) !important;
}

.nav > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--brand);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav > li > a:hover::after {
    width: 80%;
}

/* Keep hover unobtrusive: disable strong underline animation */
.nav > li > a::after{
    display: none !important;
}

/* Выпадающее меню */
.nav li ul {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: none !important;
    padding: 8px 0;
    margin-top: 8px;
    z-index: 999 !important;
    /* Separator width: shrink-to-fit to the widest item */
    display: inline-block;
    width: max-content;
    max-width: calc(100vw - 40px);
    box-sizing: border-box;
}

/* “Услуги” dropdown: increase width by +20px (base min-width is 260px) */
.header .nav > li > a[href^="/services/"] + ul,
.header .nav > li > a[href^="services/"] + ul,
.header .nav > li > a[href^="/newsite/services/"] + ul{
    min-width: 280px !important;
}

.nav li ul::before{
    /* hover bridge: prevents dropdown closing when moving cursor down */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
}

.nav li li a {
    padding: 12px 20px !important;
    color: var(--text) !important;
    transition: color 0.2s ease;
    /* Menu spacing (levels 2 & 3): +1px between wrapped lines */
    line-height: calc(1.35em + 1px) !important;
    display: block;
    position: relative;
}

/* Menu separators (levels 2 and 3): between items only */
.nav li ul > li + li > a::before{
    content: '';
    position: absolute;
    left: 20px;   /* match link text inset */
    right: 20px;  /* match link text inset */
    top: 0;
    height: 1px;
    background: var(--brand); /* #d16259 */
}

.nav li li a:hover {
    background: transparent !important;
    color: var(--brand) !important; /* #d16259 */
    padding-left: 20px !important;
}

/* Ensure no background on submenu item hover from template */
.nav li li:hover > a{
    background: transparent !important;
    color: var(--brand) !important;
}

/* === Services cards (modern) === */
.services{
    background: linear-gradient(180deg, rgba(209, 98, 89, 0.06) 0%, rgba(255,255,255,1) 55%, rgba(17, 24, 39, 0.03) 100%);
    padding: 34px 0;
}

.home-news{
    padding: 28px 0 10px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.02) 0%, rgba(255,255,255,1) 60%);
}
/* Home: move news 10px down from map */
body.ns-home .home-news{
    margin-top: 10px;
}
.home-news__head{
    display:flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.home-news__head .title_block{
    margin: 0;
}
.home-news__grid{
    display:grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.home-news__item{
    display:flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    color: inherit;
    text-decoration: none;
}
.home-news__item:hover{
    transform: translateY(-3px);
    border-color: rgba(209, 98, 89, 0.22);
    box-shadow: 0 16px 40px rgba(209, 98, 89, 0.16);
}
.home-news__thumb{
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow:hidden;
    flex: 0 0 auto;
    background: rgba(17, 24, 39, 0.04);
}
.home-news__thumb img{
    width:100%;
    height:100%;
    object-fit: cover;
    display:block;
}
.home-news__title{
    font-size: 14px;
    line-height: 1.35;
    font-weight: 650;
    color: var(--text);
}
.home-news__meta{
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}
@media (max-width: 980px){
    .home-news__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
    .home-news__grid{ grid-template-columns: 1fr; }
}

.services .inner.work{
    max-width: 1240px;
}

.services .inner.work > .clearfix{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.services .item {
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.10);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.services .item:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 48px rgba(209, 98, 89, 0.20);
    border-color: rgba(209, 98, 89, 0.22);
}

/* Эффект затемнения изображений */
.services .item .pic {
    position: relative;
    transition: all 0.4s ease;
    filter: brightness(0.7) contrast(1.1);
    min-height: 180px;
}

.services .item .pic::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(209, 98, 89, 0.35) 0%, rgba(0,0,0,0.45) 100%);
    transition: all 0.4s ease;
}

/* Осветление при наведении */
.services .item:hover .pic {
    filter: brightness(1) contrast(1);
    transform: scale(1.05);
}

.services .item:hover .pic::after {
    background: linear-gradient(135deg, rgba(209, 98, 89, 0.14) 0%, rgba(0,0,0,0.08) 100%);
}

.services .item .description {
    position: relative;
    z-index: 2;
    background: #fff;
    padding: 22px 20px 26px;
}

.services .item .description .name {
    font-size: 18px;
    font-weight: 650;
    color: var(--text);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.services .item:hover .description .name {
    color: var(--brand);
}

/* Добавляем иконку-стрелку */
.services .item a::before {
    content: '→';
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 24px;
    color: var(--brand);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.services .item:hover a::before {
    opacity: 1;
    transform: translateX(0);
}

/* Logo: no background in logo area */
.header .logo{
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

@media (max-width: 768px){
    .header .logo img{
        height: 72px !important;
    }
}

@media (max-width: 560px){
    .header .logo img{
        height: 64px !important;
    }
}

/* Sticky header: keep address/contacts/callback visible on scroll
   (base template hides them via `.sticky .phone/.place/.callback_container { display:none; }`) */
@media (min-width: 992px){
    .sticky .place,
    .sticky .phone,
    .sticky .callback_container{
        display: block !important;
    }

    /* Base template changes layout in sticky state using floats/widths; keep our flex layout */
    .sticky .bottom{
        width: 100% !important;
        float: none !important;
        position: relative !important;
        padding-top: 0 !important;
        margin-top: 14px !important;
    }
    .sticky .logo{
        width: auto !important;
        float: none !important;
    }
}

/* Remove colored bar/highlights that can appear in sticky/scroll state */
.sticky .bottom.colored,
.sticky .bottom.dark{
    background: transparent !important;
}

/* Defensive: ensure no background “squares” on top-level menu items in any state */
.header .nav > li,
.header .nav > li > a{
    background: transparent !important;
}

/* === Кнопка "Заказать звонок" === */
.btn_main.callback {
    background: linear-gradient(135deg, var(--brand) 0%, #e08a84 100%);
    border: none;
    border-radius: 24px;
    padding: 14px 32px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 26px rgba(209, 98, 89, 0.28);
    transition: all 0.3s ease;
}

.btn_main.callback:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(209, 98, 89, 0.34);
    background: linear-gradient(135deg, #e08a84 0%, var(--brand-dark) 100%);
}

/* === Плавная прокрутка === */
html {
    scroll-behavior: smooth;
}

/* === Анимация появления блоков === */
.services .item {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Задержка анимации для каждого блока */
.services .item:nth-child(1) { animation-delay: 0.1s; }
.services .item:nth-child(2) { animation-delay: 0.2s; }
.services .item:nth-child(3) { animation-delay: 0.3s; }
.services .item:nth-child(4) { animation-delay: 0.4s; }
.services .item:nth-child(5) { animation-delay: 0.5s; }
.services .item:nth-child(6) { animation-delay: 0.6s; }

/* === Улучшенная типографика === */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text);
}

/* === Адаптивность === */
@media (max-width: 768px) {
    .nav > li > a {
        padding: 14px 16px !important;
    }
    
    .services .item {
        margin-bottom: 20px;
    }

    .services .inner.work > .clearfix{
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 1100px){
    .services .inner.work > .clearfix{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* === Amulex-inspired homepage blocks (text-focused) === */
.home-blocks{
    padding: 42px 0 26px;
    background:
        radial-gradient(1000px 460px at 20% -10%, rgba(209, 98, 89, 0.12), rgba(255,255,255,0) 60%),
        radial-gradient(900px 420px at 90% 10%, rgba(209, 98, 89, 0.10), rgba(255,255,255,0) 55%),
        linear-gradient(180deg, rgba(17, 24, 39, 0.02) 0%, rgba(255,255,255,1) 55%, rgba(17, 24, 39, 0.02) 100%);
}

.home-blocks__head{
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.home-blocks__title{
    margin: 0;
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.home-blocks__subtitle{
    margin: 0;
    max-width: 560px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.home-blocks__grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

/* Homepage: show 4 service blocks per row (desktop) */
body.ns-home .home-blocks__grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1300px){
    body.ns-home .home-blocks__grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.block-card{
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    min-height: 260px;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.block-card:hover{
    transform: translateY(-4px);
    border-color: rgba(209, 98, 89, 0.26);
    box-shadow: 0 18px 48px rgba(209, 98, 89, 0.16);
}

.block-card__title{
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.block-card__title a{
    color: var(--text) !important;
    text-decoration: none;
}

.block-card__title a:hover{
    color: var(--brand-dark) !important;
}

.block-card__desc{
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.block-card__bullets{
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.block-card__bullets li{
    position: relative;
    padding-left: 16px;
    color: rgba(31, 41, 55, 0.88);
    font-size: 13px;
    line-height: 1.45;
}

.block-card__bullets li::before{
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 0 0 4px rgba(209, 98, 89, 0.12);
    transform: translateY(-50%);
}

.block-card__actions{
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    justify-content: flex-start;
}

.block-card__btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand) 0%, #e08a84 100%);
    color: #fff !important;
    font-weight: 650;
    font-size: 13px;
    text-decoration: none !important;
    box-shadow: 0 10px 26px rgba(209, 98, 89, 0.22);
    transition: transform .2s ease, box-shadow .2s ease;
}

.block-card__btn:hover{
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(209, 98, 89, 0.28);
}

.block-card__btn::after{
    content: '→';
    font-size: 16px;
    line-height: 1;
    opacity: 0.9;
}

/* Services root (/services/): show category image inside cards */
.service-card__media{
    display: block;
    border-radius: 14px;
    overflow: hidden;
    margin: 0 0 12px;
    background: rgba(17,24,39,0.06);
    position: relative;
}
.service-card__media img{
    display: block;
    width: 100%;
    height: 148px;
    object-fit: cover;
    filter: brightness(0.78) saturate(0.98);
    transform: scale(1);
    transition: filter .25s ease, transform .35s ease;
}
.block-card:hover .service-card__media img{
    filter: brightness(1) saturate(1.05);
    transform: scale(1.02);
}

@media (max-width: 1100px){
    .home-blocks__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px){
    .home-blocks__head{ flex-direction: column; align-items: flex-start; }
    .home-blocks__title{ font-size: 28px; }
    .home-blocks__grid{ grid-template-columns: 1fr; }
    .block-card{ min-height: unset; }
}
