﻿:root {
    --blue: #1b3a6b;
    --blue-dark: #142d54;
    --orange: #ff6600;
    --orange-hover: #e55a00;
    --white: #ffffff;
    --gray-50: #f5f7fa;
    --gray-200: #e2e8f0;
    --gray-500: #64748b;
    --gray-700: #334155;
    --text: #1e293b;
    --shadow: 0 4px 20px rgba(27, 58, 107, 0.12);
    --radius: 8px;
    --font: 'Montserrat', system-ui, sans-serif;
    --container: 1200px;
    --sidebar: 300px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--gray-50);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
}

/* Header */
.site-header {
    background: var(--blue);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 64px;
    padding: 8px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--white);
    flex-shrink: 0;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--orange);
    border-radius: 50%;
    color: var(--white);
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-nav > ul {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.has-dropdown {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 50;
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown a {
    display: block;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.nav-dropdown a:hover {
    background: var(--gray-50);
    color: var(--blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn-cta {
    background: var(--orange);
    color: var(--white);
}

.btn-cta:hover {
    background: var(--orange-hover);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 0.85rem;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.72rem;
}

.btn-block {
    width: 100%;
}

.header-cta {
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--white);
    border-radius: 1px;
}

/* Main two-column layout */
.main-columns {
    display: grid;
    grid-template-columns: 1fr var(--sidebar);
    gap: 24px;
    align-items: start;
}

.column-main {
    min-width: 0;
}

.reviews-sidebar {
    position: sticky;
    top: 80px;
}

/* Hero */
.hero {
    position: relative;
    min-height: 380px;
    margin-bottom: 0;
    border-radius: 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(27, 58, 107, 0.88) 0%, rgba(27, 58, 107, 0.55) 55%, rgba(27, 58, 107, 0.15) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 620px;
    color: var(--white);
    padding: 48px 32px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    margin: 0 0 16px;
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hero-lead {
    margin: 0 0 24px;
    font-size: 1rem;
    opacity: 0.95;
    max-width: 480px;
}

.services-section {
    padding: 28px 0 40px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.services-grid .service-card:nth-child(5) {
    grid-column: 1;
}

.services-grid .service-card:nth-child(6) {
    grid-column: 2;
}

.services-grid .service-card:nth-child(7) {
    grid-column: 3;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.service-card:hover {
    box-shadow: var(--shadow);
    border-color: #cbd5e1;
}

.service-card--accent {
    border-color: rgba(255, 102, 0, 0.35);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    color: var(--blue);
}

.service-icon--orange {
    color: var(--orange);
}

.service-card h3 {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--text);
}

.service-card p {
    margin: 0 0 12px;
    font-size: 0.75rem;
    color: var(--gray-500);
    line-height: 1.45;
}

.service-link {
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--blue);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.service-link:hover {
    color: var(--orange);
}

/* Reviews sidebar */
.reviews-sidebar {
    padding-top: 24px;
}

.sidebar-title {
    margin: 0 0 14px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: 0.05em;
}

.reviews-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--gray-200);
}

.review-body {
    min-width: 0;
}

.review-name {
    margin: 0 0 4px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.review-text {
    margin: 0 0 6px;
    font-size: 0.72rem;
    color: var(--gray-500);
    line-height: 1.4;
}

.stars {
    display: inline-flex;
    gap: 2px;
    color: var(--orange);
}

/* Bottom panel */
.bottom-panel {
    background: var(--blue);
    color: var(--white);
    padding: 40px 0 0;
}

.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: 28px;
    padding-bottom: 32px;
}

.bottom-title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.price-list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 10px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.price-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--orange);
    font-weight: 700;
}

.price-calc {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.calc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 0.9rem;
    font-weight: 600;
}

.calc-form label {
    display: block;
    margin-bottom: 10px;
}

.calc-form label span {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 4px;
    opacity: 0.85;
}

.calc-form select,
.calc-form input {
    width: 100%;
    padding: 8px 10px;
    font-family: var(--font);
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
}

.calc-result {
    margin: 12px 0;
    font-size: 0.9rem;
}

.calc-result strong {
    color: var(--orange);
    font-size: 1.1rem;
}

.reviews-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.review-card--dark {
    background: var(--white);
}

.map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.map-wrap img {
    width: 100%;
    filter: saturate(0.85) hue-rotate(10deg);
}

.map-note {
    margin: 10px 0 0;
    font-size: 0.78rem;
    opacity: 0.85;
}

.footer-bar {
    display: grid;
    grid-template-columns: 1fr auto 1.2fr;
    gap: 24px;
    align-items: start;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bar h3 {
    margin: 0 0 10px;
    font-size: 0.85rem;
    font-weight: 700;
}

.footer-contacts a {
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-contacts a:hover {
    color: var(--orange);
}

.footer-hours,
.footer-about {
    margin: 8px 0 0;
    font-size: 0.78rem;
    opacity: 0.88;
    line-height: 1.45;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: var(--white);
    transition: background 0.2s;
}

.social-link:hover {
    background: var(--orange);
}

.footer-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.footer-form input {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    font-family: var(--font);
    font-size: 0.85rem;
    border: none;
    border-radius: 4px;
}

.footer-copy {
    padding: 12px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    opacity: 0.75;
    text-align: center;
}

.footer-copy p {
    margin: 0;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
}

.modal-dialog {
    position: relative;
    width: min(100%, 440px);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--white);
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-50);
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--gray-700);
}

.modal-dialog h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    color: var(--blue);
}

.modal-lead {
    margin: 0 0 20px;
    font-size: 0.88rem;
    color: var(--gray-500);
}

.modal-form label {
    display: block;
    margin-bottom: 14px;
}

.modal-form label span {
    display: block;
    margin-bottom: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
}

.modal-form input,
.modal-form select,
.modal-form textarea {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--font);
    font-size: 0.9rem;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    z-index: 300;
    max-width: 90vw;
    padding: 14px 22px;
    background: var(--blue-dark);
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.icon {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1100px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .bottom-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bottom-map {
        grid-column: 1 / -1;
    }
}

@media (max-width: 960px) {
    .main-columns {
        grid-template-columns: 1fr;
    }

    .reviews-sidebar {
        position: static;
        padding-top: 16px;
    }

    .reviews-stack {
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
    }

    .review-card {
        min-width: 260px;
        scroll-snap-align: start;
    }

    .hide-mobile {
        display: none !important;
    }

    .header-cta {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--blue);
        padding: 16px;
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-nav > ul {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.15);
        margin-top: 4px;
    }

    .nav-dropdown a {
        color: var(--white);
    }

    .bottom-grid {
        grid-template-columns: 1fr;
    }

    .footer-bar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reviews-grid-2x2 {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 32px 20px;
        min-height: 300px;
    }
}

@media (max-width: 420px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}
