/* --- RESET & BASIC STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Montserrat', sans-serif;
    color: #1e293b;
    background-color: #ffffff;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}

/* --- COLOR PALETTE --- */
:root {
    --accent-blue: #1d74d8;
    --accent-blue-hover: #155cb0;
    --dark-navy: #0a1320;
    --header-dark: #08101a;
    --section-dark: #0b1728;
    --text-light: #f8fafc;
    --text-muted: #8e9db2;
    --border-dark: rgba(255, 255, 255, 0.12);
    --border-light: #e2e8f0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER --- */
header {
    background-color: var(--header-dark);
    color: #ffffff;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-dark);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    flex-shrink: 0;
}
.logo-icon svg {
    width: 100%;
    height: 100%;
}
.logo-text h1 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.2px;
    color: #ffffff;
}
.logo-text span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
}

.nav-menu {
    display: flex;
    gap: 28px;
    font-size: 13px;
    font-weight: 500;
}
.nav-menu a {
    color: #e2e8f0;
    transition: color 0.2s;
}
.nav-menu a:hover, .nav-menu a.active {
    color: var(--accent-blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-phone-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s;
}
.header-phone-link svg {
    width: 15px;
    height: 15px;
    stroke: var(--accent-blue);
    fill: none;
    stroke-width: 2.2;
    flex-shrink: 0;
}
.header-phone-link:hover {
    color: var(--accent-blue);
}

.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.burger-btn span {
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.burger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger-btn.active span:nth-child(2) {
    opacity: 0;
}
.burger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-menu-mobile {
    display: none;
    flex-direction: column;
    background-color: #050a12;
    border-top: 1px solid var(--border-dark);
    padding: 10px 20px;
}
.nav-menu-mobile.open {
    display: flex;
}
.nav-menu-mobile a {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.nav-menu-mobile a:last-child {
    border-bottom: none;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    background: linear-gradient(90deg, rgba(8, 16, 26, 0.92) 0%, rgba(8, 16, 26, 0.75) 55%, rgba(8, 16, 26, 0.4) 100%),
                url('img/header.png') center/cover no-repeat;
    color: #ffffff;
    padding: 80px 0 60px;
    min-height: 580px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-content {
    max-width: 680px;
}
.hero-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.hero-subtitle {
    font-size: 15px;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 35px;
    max-width: 580px;
    font-weight: 400;
}
.hero-btns {
    display: flex;
    gap: 16px;
    margin-bottom: 50px;
}

/* КНОПКА HERO MAX */
.btn-max-hero {
    background: linear-gradient(135deg, #00a2ff 0%, #7b2cbf 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 18px rgba(123, 44, 191, 0.4);
    transition: all 0.3s ease;
    border: none;
}
.btn-max-hero:hover {
    background: linear-gradient(135deg, #008cdb 0%, #6923a5 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(123, 44, 191, 0.55);
    color: #ffffff;
}
.hero-btn-icon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.hero-features {
    display: flex;
    gap: 45px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 25px;
    max-width: 550px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.feature-icon-box {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}
.feature-icon-box svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent-blue);
    fill: none;
    stroke-width: 1.8;
}
.feature-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #f1f5f9;
}

/* --- SECTION HEADER --- */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}
.section-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
}
.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--accent-blue);
    margin: 8px auto 0;
    border-radius: 2px;
}
.section-subtitle {
    font-size: 13px;
    color: #64748b;
    font-weight: 400;
}

/* --- BEFORE / AFTER SECTION --- */
.before-after-sec {
    padding: 60px 0;
    background-color: #ffffff;
}
.ba-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.ba-card {
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
}
.ba-slider-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    user-select: none;
}
.ba-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ba-after-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}
.ba-after-wrapper .ba-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #ffffff;
    z-index: 10;
    cursor: ew-resize;
    transform: translateX(-50%);
    box-shadow: 0 0 6px rgba(0,0,0,0.5);
}
.ba-handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    font-size: 11px;
    color: #334155;
    font-weight: 700;
}
.ba-caption {
    text-align: center;
    padding: 14px 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    background-color: #ffffff;
}

/* --- SERVICES TEXT SECTION --- */
.services-text-sec {
    padding: 60px 0;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}
.services-text-sec .section-title {
    max-width: 900px;
    margin: 0 auto 15px;
    font-size: 22px;
    line-height: 1.35;
}
.services-intro {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
    text-align: center;
    max-width: 850px;
    margin: 0 auto 30px;
}
.services-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 950px;
    margin: 0 auto;
}
.service-feature-card {
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.service-feature-icon {
    width: 28px;
    height: 28px;
    background: rgba(29, 116, 216, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.service-feature-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent-blue);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.service-feature-text {
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
}
.service-feature-text strong {
    color: #0f172a;
}

/* --- HOW WE WORK SECTION --- */
.how-we-work-sec {
    background-color: var(--section-dark);
    color: #ffffff;
    padding: 60px 0;
}
.how-we-work-sec .section-title {
    color: #ffffff;
}
.steps-wrapper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 40px;
}
.steps-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 1px;
    border-top: 2px dashed rgba(255, 255, 255, 0.2);
    z-index: 1;
}
.step-card {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
    padding: 0 10px;
}
.step-number {
    width: 38px;
    height: 38px;
    background-color: var(--accent-blue);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    margin: 0 auto 20px;
    border: 3px solid var(--section-dark);
}
.step-icon-box {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.step-icon-box svg {
    width: 36px;
    height: 36px;
    stroke: #ffffff;
    fill: none;
    stroke-width: 1.5;
}
.step-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #ffffff;
}
.step-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- MATERIALS SECTION --- */
.materials-sec {
    padding: 60px 0;
    background-color: #ffffff;
}
.materials-carousel-wrapper {
    position: relative;
    margin-top: 30px;
    width: 100%;
}
.materials-grid {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 15px;
}
.material-card {
    text-align: center;
    flex: 1;
}
.material-img-wrap {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 3px solid #f8fafc;
}
.material-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.material-name {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

/* --- CONTACTS SECTION --- */
.contacts-sec {
    padding: 60px 0;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.contacts-card-wrapper {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}
.contacts-header {
    text-align: center;
    margin-bottom: 35px;
}
.contacts-title {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.contacts-subtitle {
    font-size: 14px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.contacts-item-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.contacts-icon {
    width: 52px;
    height: 52px;
    background: rgba(29, 116, 216, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contacts-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--accent-blue);
    fill: none;
    stroke-width: 2;
}

/* MAX МЕССЕНДЖЕР */
.max-icon-wrap {
    background: transparent !important;
    padding: 0;
    overflow: hidden;
}
.max-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.btn-messenger.btn-max {
    background: linear-gradient(135deg, #00a2ff 0%, #7b2cbf 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 4px;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    transition: all 0.3s ease;
}
.btn-messenger.btn-max:hover {
    background: linear-gradient(135deg, #008cdb 0%, #6923a5 100%);
    box-shadow: 0 4px 15px rgba(123, 44, 191, 0.35);
}

.contacts-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.contacts-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.contacts-phone {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    transition: color 0.2s;
}
.contacts-phone:hover {
    color: var(--accent-blue);
}
.contacts-schedule, .contacts-hint {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* --- FOOTER --- */
footer {
    background-color: var(--header-dark);
    color: var(--text-muted);
    padding: 50px 0 25px;
    font-size: 13px;
    border-top: 1px solid var(--border-dark);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
    margin-bottom: 35px;
}
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.footer-desc {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 420px;
}
.footer-col h4 {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: #cbd5e1;
}
.contact-item svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent-blue);
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}
.footer-bottom {
    border-top: 1px solid var(--border-dark);
    padding-top: 25px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

/* --- MEDIA QUERIES / RESPONSIVE --- */

/* Ultra HD & 4K */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    .hero-title {
        font-size: 42px;
    }
    .hero {
        min-height: 650px;
    }
}

/* Планшеты и мобильные устройства (Экраны <= 992px) */
@media (max-width: 992px) {
    .ba-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-title {
        font-size: 30px;
    }

    /* Как мы работаем в 2 колонки */
    .steps-wrapper::before {
        display: none;
    }
    .steps-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-top: 30px;
    }
    .step-card {
        padding: 20px 12px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .step-number {
        margin-bottom: 12px;
    }
    .step-icon-box {
        height: 36px;
        margin-bottom: 8px;
    }
    .step-icon-box svg {
        width: 28px;
        height: 28px;
    }
    .step-card:last-child {
        grid-column: 1 / -1;
        max-width: 320px;
        justify-self: center;
        width: 100%;
    }

    /* Слайдер материалов */
    .materials-carousel-wrapper {
        overflow: hidden;
    }
    .materials-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        padding: 10px 5px 20px 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--accent-blue) #e2e8f0;
    }
    .materials-grid::-webkit-scrollbar {
        height: 6px;
    }
    .materials-grid::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 10px;
    }
    .materials-grid::-webkit-scrollbar-thumb {
        background: var(--accent-blue);
        border-radius: 10px;
    }
    .material-card {
        flex: 0 0 140px;
        scroll-snap-align: center;
    }
}

/* Мобильные телефоны (Экраны <= 768px) */
@media (max-width: 768px) {
    header {
        padding: 10px 0;
    }
    .nav-menu {
        display: none;
    }
    .burger-btn {
        display: flex;
    }
    .logo-subtitle {
        display: none;
    }
    .logo-text h1 {
        font-size: 13px;
        line-height: 1.1;
    }
    .logo-icon {
        width: 28px;
        height: 28px;
    }
    .header-phone-link {
        font-size: 12px;
        gap: 4px;
    }
    .header-phone-link svg {
        width: 13px;
        height: 13px;
    }
    .header-actions {
        gap: 10px;
    }

    .hero {
        padding: 40px 0;
        min-height: auto;
    }
    .hero-title {
        font-size: 22px;
    }
    .hero-subtitle {
        font-size: 13px;
        margin-bottom: 25px;
    }
    .hero-btns {
        margin-bottom: 30px;
    }
    .btn-max-hero {
        width: 100%;
        padding: 13px 18px;
        font-size: 12px;
    }
    .hero-features {
        flex-direction: column;
        gap: 15px;
        max-width: 100%;
    }

    .section-title {
        font-size: 20px;
    }
    .ba-grid {
        grid-template-columns: 1fr;
    }
    .services-features-grid {
        grid-template-columns: 1fr;
    }

    /* Компактный блок контактов */
    .contacts-sec {
        padding: 40px 0;
    }
    .contacts-card-wrapper {
        padding: 0;
        background: transparent;
        box-shadow: none;
        border: none;
    }
    .contacts-header {
        margin-bottom: 20px;
    }
    .contacts-title {
        font-size: 20px;
    }
    .contacts-subtitle {
        font-size: 13px;
        line-height: 1.4;
    }
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .contacts-item-box {
        flex-direction: row;
        text-align: left;
        align-items: center;
        padding: 16px;
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
        border: 1px solid #e2e8f0;
        gap: 14px;
    }
    .contacts-icon {
        width: 44px;
        height: 44px;
    }
    .contacts-icon svg {
        width: 22px;
        height: 22px;
    }
    .contacts-info {
        align-items: flex-start;
        width: 100%;
    }
    .contacts-label {
        font-size: 10px;
        margin-bottom: 2px;
    }
    .contacts-phone {
        font-size: 17px;
    }
    .contacts-schedule, .contacts-hint {
        font-size: 11px;
        margin-top: 2px;
    }
    .contacts-item-box.max-box {
        background: #f5f3ff;
        border-color: #ddd6fe;
    }
    .btn-messenger.btn-max {
        width: 100%;
        text-align: center;
        padding: 11px 14px;
        font-size: 12px;
        margin-top: 6px;
        border-radius: 6px;
        box-shadow: 0 3px 12px rgba(123, 44, 191, 0.25);
    }

    /* Компактный подвал */
    footer {
        padding: 35px 0 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 25px;
        text-align: center;
    }
    .footer-brand {
        align-items: center;
        gap: 10px;
    }
    .footer-desc {
        font-size: 12px;
        line-height: 1.5;
        max-width: 100%;
    }
    .footer-col h4 {
        font-size: 12px;
        margin-bottom: 12px;
    }
    .contact-item {
        justify-content: center;
        font-size: 12px;
        margin-bottom: 10px;
    }
    .contact-item svg {
        width: 16px;
        height: 16px;
    }
    .footer-bottom {
        padding-top: 18px;
        font-size: 11px;
    }
}

/* Маленькие смартфоны (< 480px) */
@media (max-width: 480px) {
    .material-card {
        flex: 0 0 120px;
    }
    .steps-wrapper {
        gap: 12px;
    }
    .step-card {
        padding: 16px 8px;
    }
    .step-title {
        font-size: 13px;
    }
    .step-desc {
        font-size: 11px;
    }
}

/* Экраны 380px и меньше */
@media (max-width: 380px) {
    .header-phone-link {
        font-size: 11px;
    }
    .logo-text h1 {
        font-size: 11px;
    }
}
.logo-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Стили для нового логотипа-картинки */
.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}