/* ─── Fonts ─────────────────────────────────────────────── */
@font-face { font-family: 'ttNorms'; src: url('../fonts/TTNorms-ExtraLight.woff2') format('woff2'); font-weight: 200; font-style: normal; }
@font-face { font-family: 'ttNorms'; src: url('../fonts/TTNorms-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; }
@font-face { font-family: 'ttNorms'; src: url('../fonts/TTNorms-LightItalic.woff2') format('woff2'); font-weight: 300; font-style: italic; }
@font-face { font-family: 'ttNorms'; src: url('../fonts/TTNorms-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'ttNorms'; src: url('../fonts/TTNorms-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; }
@font-face { font-family: 'ttNorms'; src: url('../fonts/TTNorms-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; }
@font-face { font-family: 'ttNorms'; src: url('../fonts/TTNorms-MediumItalic.woff2') format('woff2'); font-weight: 500; font-style: italic; }
@font-face { font-family: 'ttNorms'; src: url('../fonts/TTNorms-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'ttNorms'; src: url('../fonts/TTNorms-BoldItalic.woff2') format('woff2'); font-weight: 700; font-style: italic; }

/* ─── Variables ─────────────────────────────────────────── */
:root {
    --c-bg:           #f1f5f9;
    --c-surface:      #ffffff;
    --c-dark:         #0f172a;
    --c-dark2:        #1e293b;
    --c-muted:        #64748b;
    --c-border:       #e2e8f0;
    --c-accent:       #2563eb;
    --radius:         14px;
    --radius-lg:      20px;
    --radius-xl:      28px;
    --shadow-sm:      0 1px 3px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.07);
    --shadow:         0 2px 6px rgba(0,0,0,.05), 0 10px 28px rgba(0,0,0,.09);
    --shadow-hover:   0 6px 16px rgba(0,0,0,.08), 0 20px 48px rgba(0,0,0,.13);
    --shadow-xl:      0 24px 64px rgba(0,0,0,.22);
}

/* ─── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'ttNorms', sans-serif;
    margin: 0;
    overflow-x: hidden;
    background: var(--c-bg);
    color: var(--c-dark);
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: 'ttNorms', sans-serif; cursor: pointer; }
textarea { resize: vertical; }

/* ─── Container ──────────────────────────────────────────── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 48px;
    width: 100%;
}
@media (max-width: 900px) { .container { padding: 0 32px; } }
@media (max-width: 600px) { .container { padding: 0 20px; } }

/* ─── Site Header ────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 22px 0;
    border-bottom: 1px solid transparent;
    transition: background .3s, padding .3s, border-color .3s, box-shadow .3s;
}

.site-header.scrolled {
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--c-border);
    padding: 14px 0;
    box-shadow: 0 1px 16px rgba(0,0,0,.06);
}

.site-header.is-solid {
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--c-border);
    box-shadow: 0 1px 16px rgba(0,0,0,.06);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; }

.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: white;
    transition: color .3s;
    letter-spacing: -.3px;
}
.site-header.scrolled .nav-logo,
.site-header.is-solid .nav-logo { color: var(--c-dark); }

.nav-desktop { display: flex; gap: 28px; }

.nav-link {
    font-size: 15px;
    color: rgba(255,255,255,.8);
    position: relative;
    padding-bottom: 2px;
    transition: color .2s;
}
.site-header.scrolled .nav-link,
.site-header.is-solid .nav-link { color: var(--c-muted); }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: currentColor;
    border-radius: 9999px;
    transition: width .25s;
}
.nav-link:hover,
.nav-link.active { color: white; }
.site-header.scrolled .nav-link:hover,
.site-header.scrolled .nav-link.active,
.site-header.is-solid .nav-link:hover,
.site-header.is-solid .nav-link.active { color: var(--c-dark); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Hamburger */
.hamburger {
    display: none;
    background: none; border: none;
    padding: 4px;
    color: white;
    transition: color .3s;
}
.site-header.scrolled .hamburger,
.site-header.is-solid .hamburger { color: var(--c-dark); }

@media (max-width: 640px) {
    .nav-desktop { display: none; }
    .hamburger { display: block; }
}

/* ─── Mobile Menu ────────────────────────────────────────── */
.mobile-menu {
    position: fixed;
    top: 0; right: -280px;
    width: 260px; height: 100vh;
    background: white;
    z-index: 200;
    padding: 32px 24px;
    transition: right .3s cubic-bezier(.4,0,.2,1);
    box-shadow: -4px 0 32px rgba(0,0,0,.12);
}
.mobile-menu.open { right: 0; }
.mobile-menu .nav-link { color: var(--c-muted); }
.mobile-menu .nav-link:hover,
.mobile-menu .nav-link.active { color: var(--c-dark); }

.overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(2px);
    z-index: 199;
    display: none;
}
.overlay.open { display: block; }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute; inset: 0;
    background: url('/static/images/main-bg.webp') center/cover no-repeat;
}
.hero-bg::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(140deg, rgba(15,23,42,.9) 0%, rgba(30,41,59,.6) 100%);
}

.hero-body {
    position: relative; z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
}

.hero-title {
    font-size: clamp(34px, 4.5vw, 64px);
    font-weight: 700;
    line-height: 1.14;
    max-width: 680px;
}
.hero-title span { display: block; opacity: .85; font-weight: 400; }

.hero-sub {
    font-size: clamp(15px, 1.8vw, 18px);
    color: rgba(255,255,255,.72);
    margin-top: 20px;
    max-width: 520px;
    line-height: 1.65;
}

.hero-actions {
    margin-top: 36px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ─── Page Hero (inner pages) ────────────────────────────── */
.page-hero {
    position: relative;
    min-height: 52vh;
    display: flex;
    flex-direction: column;
    color: white;
    overflow: hidden;
}
.page-hero .hero-bg { /* reuses same class */ }

.page-hero-body {
    position: relative; z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 0 72px;
}

.page-hero-title {
    font-size: clamp(34px, 5.5vw, 68px);
    font-weight: 700;
    line-height: 1.12;
}

.page-hero-desc {
    font-size: clamp(14px, 1.8vw, 17px);
    color: rgba(255,255,255,.7);
    max-width: 600px;
    margin: 18px auto 0;
    line-height: 1.7;
}

/* ─── Sections ───────────────────────────────────────────── */
.section { padding: 88px 0; }
.section-sm { padding: 60px 0; }
.section-white { background: #fff; }
.section-alt { background: var(--c-bg); }

.section-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c-accent);
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(26px, 3.2vw, 42px);
    font-weight: 700;
    line-height: 1.18;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius);
    font-family: 'ttNorms', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    border: none;
    padding: 11px 22px;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

/* Primary: dark filled */
.btn-primary {
    background: var(--c-dark);
    color: white;
}
.btn-primary:hover {
    background: var(--c-dark2);
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(15,23,42,.28);
}

/* White: for use on dark backgrounds */
.btn-white {
    background: white;
    color: var(--c-dark);
}
.btn-white:hover {
    background: rgba(255,255,255,.92);
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(0,0,0,.18);
}

/* Outline: ghost on dark backgrounds */
.btn-outline-light {
    background: transparent;
    color: rgba(255,255,255,.85);
    border: 1.5px solid rgba(255,255,255,.35);
}
.btn-outline-light:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.65);
    color: white;
}

/* Ghost: outline on white backgrounds */
.btn-ghost {
    background: transparent;
    color: var(--c-dark);
    border: 1.5px solid var(--c-border);
}
.btn-ghost:hover {
    background: var(--c-dark);
    color: white;
    border-color: var(--c-dark);
}

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }

/* ─── Service Card ───────────────────────────────────────── */
.service-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    display: flex;
    flex-direction: column;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.service-card-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    flex-shrink: 0;
}
.service-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.service-card:hover .service-card-img img { transform: scale(1.04); }

/* Галерея фото услуги — горизонтальная прокрутка квадратных фото */
.service-photos {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 12px 12px 8px;
    scrollbar-width: none;
}
.service-photos::-webkit-scrollbar { display: none; }

.service-photo-item {
    flex: 0 0 auto;
    width: 110px;
    height: 110px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: zoom-in;
}
.service-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f4f4f4;
    transition: transform .3s;
}
.service-photo-item:hover img { transform: scale(1.05); }

.service-card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.service-card-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.service-card-desc {
    font-size: 13px;
    color: var(--c-muted);
    margin-top: 7px;
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--c-border);
    gap: 8px;
}
.service-price { font-size: 15px; font-weight: 700; }

/* ─── Services Grid ──────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 1024px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .services-grid { grid-template-columns: 1fr; } }

/* ─── Review Card ────────────────────────────────────────── */
.review-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.review-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--c-bg);
    border: 2px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.stars { color: #f59e0b; font-size: 13px; letter-spacing: 1px; }
.review-date { font-size: 12px; color: var(--c-muted); margin-left: auto; white-space: nowrap; }

.review-text {
    color: var(--c-muted);
    font-style: italic;
    font-size: 14px;
    line-height: 1.65;
    margin-top: 12px;
}

/* ─── Reviews Grid ───────────────────────────────────────── */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}
@media (max-width: 1024px) { .reviews-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .reviews-grid { grid-template-columns: 1fr; } }

/* ─── Certificate Card ───────────────────────────────────── */
.cert-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.cert-card-img {
    height: 300px;
    overflow: hidden;
    flex-shrink: 0;
}
.cert-card-img img { width: 100%; height: 100%; object-fit: cover; }

.cert-card-body {
    padding: 20px 22px 24px;
}
.cert-card-title { font-size: 17px; font-weight: 600; }
.cert-card-desc {
    font-size: 13px;
    color: var(--c-muted);
    margin-top: 6px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Certs Grid ─────────────────────────────────────────── */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 1024px) { .certs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .certs-grid { grid-template-columns: 1fr; } }

/* ─── Advantages ─────────────────────────────────────────── */
.advantages-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}
@media (max-width: 900px) {
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .advantages-grid .advantages-img { order: -1; }
}

.advantage-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.advantage-item:last-child { margin-bottom: 0; }

.advantage-num {
    width: 40px; height: 40px;
    background: var(--c-dark);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .04em;
    flex-shrink: 0;
}

.advantage-title { font-weight: 600; font-size: 15px; }
.advantage-desc { color: var(--c-muted); font-size: 13px; margin-top: 3px; line-height: 1.5; }

/* ─── Contact Grid ───────────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .contact-img { display: none; }
}

/* ─── Form ───────────────────────────────────────────────── */
.form-input {
    width: 100%;
    padding: 13px 15px;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius);
    font-family: 'ttNorms', sans-serif;
    font-size: 15px;
    background: white;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    color: var(--c-dark);
}
.form-input::placeholder { color: #94a3b8; }
.form-input:focus {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-input-error { border-color: #ef4444; }
.form-input-error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.1); }

.error-text { color: #ef4444; font-size: 12px; margin-top: 4px; }

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    border-radius: var(--radius);
    padding: 13px 16px;
    font-size: 14px;
}

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,23,42,.65);
    backdrop-filter: blur(4px);
    padding: 20px;
}
.modal-overlay.hidden { display: none; }

.modal-box {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    padding: 36px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: var(--c-bg);
    border: none;
    width: 34px; height: 34px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    color: var(--c-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.modal-close:hover { background: var(--c-dark); color: white; }

.modal-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
}

.modal-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-top: 12px;
    scrollbar-width: none;
}
.modal-gallery::-webkit-scrollbar { display: none; }
.modal-gallery-thumb {
    flex: 0 0 auto;
    width: 80px; height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s;
}
.modal-gallery-thumb.active { border-color: var(--c-primary); }
.modal-gallery-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 56px;
}
@media (max-width: 900px) { .equipment-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .equipment-grid { grid-template-columns: 1fr; } }

.modal-title { font-size: 24px; font-weight: 700; margin-top: 18px; }
.modal-desc  { color: var(--c-muted); font-size: 15px; line-height: 1.65; margin-top: 10px; }
.modal-meta  {
    display: flex; gap: 24px; flex-wrap: wrap;
    margin-top: 18px; padding-top: 18px;
    border-top: 1px solid var(--c-border);
}
.modal-meta-label { font-size: 12px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .06em; }
.modal-meta-value { font-size: 17px; font-weight: 700; margin-top: 2px; }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
    background: var(--c-dark);
    color: rgba(255,255,255,.55);
    padding: 44px 0 36px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo  { font-size: 19px; font-weight: 700; color: white; }
.footer-copy  { font-size: 13px; margin-top: 6px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-link  { font-size: 14px; color: rgba(255,255,255,.55); transition: color .2s; }
.footer-link:hover { color: white; }

/* ─── Swiper overrides ───────────────────────────────────── */
.reviews-swiper { overflow: hidden; }
