@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap');

html {
    scroll-padding-top: 75px;
    scroll-behavior: smooth;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #004a8c;
    --secondary-color: #1a2530;
    --accent-color: #d32f2f;
    --bg-light: #f4f6f8;
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-color: #e0e0e0;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(16, 38, 64, .10);
    --font-heading: 'Montserrat', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
}

body {
    background-color: var(--text-light);
    color: var(--text-dark);
    line-height: 1.65;
    font-size: 15px;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern", "liga";
}

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

ul {
    list-style: none;
}

h1, h2, h3, h4,
.section-title,
.hero h1,
.card h3,
.footer-col h4,
.btn,
.accordion-btn,
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--text-light);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.responsive-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

header {
    background-color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 14px rgba(0,0,0,.06);
}

.header-main {
    position: relative;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-block {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 90px;
    width: auto;
    display: block;
}

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

.nav-desktop a {
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-desktop a:hover {
    color: var(--primary-color);
}

.btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: transform .15s, box-shadow .15s, background-color 0.2s;
    text-transform: uppercase;
    border-radius: 8px;
    letter-spacing: .4px;
    font-family: var(--font-heading);
}

.btn:hover {
    background-color: #003666;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

.btn-accent {
    background-color: var(--accent-color);
}

.btn-accent:hover {
    background-color: #b71c1c;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary-color);
    margin-left: 15px;
}

.mobile-nav {
    display: none;
    background-color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.mobile-nav.active {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.header-contacts {
    position: absolute;
    right: 195px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    line-height: 1.2;
    white-space: nowrap;
    z-index: 10;
}

.header-contacts a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.header-contacts a:hover {
    color: var(--primary-color);
}

.header-contacts .contact-phone {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.header-contacts .contact-email {
    font-size: 12px;
    color: #666;
}

.hero {
    background: linear-gradient(135deg, #eef3f8 0%, #fff 100%);
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero h1 {
    font-size: 32px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-family: var(--font-heading);
}

.hero p {
    font-size: 16px;
    margin-bottom: 30px;
    color: #555555;
}

.hero-more-btn {
    display: none;
}

.hero-img-container {
    height: 400px;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
    color: var(--secondary-color);
    text-transform: uppercase;
    position: relative;
    padding-bottom: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
    transform: translateX(-50%);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    border: 1px solid var(--border-color);
    padding: 30px;
    background-color: var(--text-light);
    border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(16,38,64,.06);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.card-img-container {
    height: 150px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    border-radius: 10px;
}

.card-img-container img {
    max-height: 100%;
    object-fit: contain;
}

.card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-weight: 700;
}

.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.details-item { border: 1px solid var(--border-color); padding: 30px; border-radius: var(--radius); box-shadow: 0 4px 14px rgba(16,38,64,.06); }
.details-item h3 { color: var(--primary-color); margin-bottom: 12px; font-size: 20px; font-family: var(--font-heading); }
.details-note { margin-top: 30px; background: var(--bg-light); padding: 25px 30px; border-left: 4px solid var(--primary-color); border-radius: var(--radius); }
.details-note p + p { margin-top: 12px; }

.about-section {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.about-section .section-title {
    color: var(--text-light);
    text-align: left;
}

.about-section .section-title::after {
    left: 0;
    transform: none;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text p {
    margin-bottom: 15px;
}

.accordion {
    margin-top: 20px;
}

.accordion-item {
    margin-bottom: 10px;
    border: 1px solid #34495e;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-btn {
    background-color: #2c3e50;
    color: var(--text-light);
    padding: 15px;
    width: 100%;
    text-align: left;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    font-family: var(--font-heading);
}

.accordion-btn:hover,
.accordion-btn.active {
    background-color: #34495e;
}

.accordion-icon {
    font-size: 18px;
    font-weight: normal;
    transition: transform 0.3s;
}

.accordion-btn.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    background-color: #1a2530;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content p {
    padding: 15px;
    margin: 0;
    font-size: 14px;
    color: #d1d8e0;
    border-top: 1px solid #34495e;
}

.contacts-section { 
    background: linear-gradient(135deg, #eef3f8 0%, #fff 100%);
    color: var(--text-dark); 
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.contacts-section .section-title { 
    color: var(--secondary-color); 
    margin-bottom: 40px; 
}

.contacts-grid { 
    display: grid; 
    grid-template-columns: 1fr 1.25fr; 
    gap: 30px; 
    align-items: stretch; 
}

.contacts-info-block { 
    background: #ffffff; 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius); 
    padding: 30px; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    box-shadow: 0 4px 15px rgba(0,0,0,.04);
}

.contacts-main-row { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
}

.contacts-phone-big { 
    font-size: 20px; 
    font-weight: 700; 
    color: var(--primary-color); 
    text-decoration: none; 
    display: block; 
    margin-bottom: 4px; 
    font-family: var(--font-heading);
}

.contacts-phone-big:hover {
    text-decoration: underline;
}

.contacts-subtext { 
    font-size: 12px; 
    color: #777777; 
    line-height: 1.3; 
}

.contacts-label { 
    font-size: 12px; 
    color: #004a8c; 
    margin-bottom: 6px; 
    text-transform: uppercase; 
    letter-spacing: .5px; 
    font-weight: 700;
    font-family: var(--font-heading);
}

.contacts-address { 
    font-size: 13px; 
    line-height: 1.45; 
    color: #444444; 
}

.contacts-divider { 
    height: 1px; 
    background: var(--border-color); 
    margin: 20px 0; 
}

.contacts-col p { 
    font-size: 13px; 
    margin-bottom: 4px; 
    color: #444444;
}

.contacts-col .person-name {
    font-weight: 700;
    color: var(--secondary-color);
}

.contacts-col a { 
    color: var(--primary-color); 
    font-weight: 600; 
}

.contacts-col a:hover { 
    text-decoration: underline; 
}

.contacts-map { 
    position: relative; 
    min-height: 420px; 
    border-radius: var(--radius); 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,.08); 
    background: #e5e3df; 
    border: 1px solid var(--border-color);
}

.contacts-map iframe { 
    position: absolute; 
    inset: 0; 
    width: 100%; 
    height: 100%; 
    border: 0; 
}

.map-link { 
    position: absolute; 
    left: 12px; 
    bottom: 12px; 
    background: #ffffff; 
    color: #222222; 
    padding: 8px 14px; 
    font-size: 13px; 
    font-weight: 600; 
    border-radius: 8px; 
    box-shadow: 0 2px 8px rgba(0,0,0,.15); 
    text-decoration: none;
}

.map-link:hover { 
    background: #f1f1f1; 
}

.request-section {
    background: url('../images/request-background.jpg') no-repeat center center/cover;
    position: relative;
}

.contact-form {
    background-color: rgba(255, 255, 255, 0.96);
    padding: 40px;
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--text-light);
    font-size: 14px;
    border-radius: 8px;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 74, 140, 0.1);
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-group .radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    font-weight: 500;
    cursor: pointer;
}

.radio-option input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-group label {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: #444444;
    cursor: pointer;
}

.checkbox-group a {
    color: var(--primary-color);
    text-decoration: underline;
}

.checkbox-group a:hover {
    color: var(--secondary-color);
}

.privacy-link {
    color: var(--primary-color);
    text-decoration: underline;
}

.privacy-link:hover {
    color: var(--secondary-color);
}

footer {
    background-color: #111820;
    color: #999999;
    padding: 40px 0 20px;
    font-size: 13px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 16px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.4px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid #333333;
    padding-top: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .details-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 24px; }
    .nav-desktop,
    .header-main .btn {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-content,
    .about-grid,
    .contacts-grid, 
    .contacts-main-row {
        grid-template-columns: 1fr;
    }

    .contacts-map { 
        min-height: 320px; 
    }

    .logo img {
        max-height: 70px;
        max-width: 100%;
    }

    .responsive-img {
        object-position: left center;
    }

    .hero-img-container {
        height: 260px;
    }

    .request-section {
        background: var(--bg-light);
    }

    .header-main { gap: 8px; }
    .logo-block { min-width: 0; }
    .header-contacts a,
    .contacts-col a,
    .footer-col li { overflow-wrap: anywhere; }
    .card, .contact-form { min-width: 0; }
    .contact-form { padding: 25px 20px; }

    .hero-more {
        display: none;
    }

    .hero-more.open {
        display: inline;
    }

    .hero-more-btn {
        display: block;
        margin-top: 10px;
        padding: 0;
        background: none;
        border: none;
        color: var(--primary-color);
        font-family: var(--font-body);
        font-size: 15px;
        font-weight: 600;
        text-decoration: underline;
        cursor: pointer;
    }

    .grid-3 {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 15px;
        padding-bottom: 15px;
        padding-left: 5px;
        padding-right: 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) var(--bg-light);
    }

    .grid-3::-webkit-scrollbar {
        height: 4px;
    }

    .grid-3::-webkit-scrollbar-track {
        background: var(--bg-light);
    }

    .grid-3::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 4px;
    }

    .grid-3 .card {
        flex: 0 0 85%;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .slider-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 15px;
    }

    .slider-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: #ccc;
        transition: all 0.3s ease;
    }

    .slider-dot.active {
        background-color: var(--primary-color);
        width: 20px;
        border-radius: 4px;
    }

    .logo-block {
        flex: 1;
        justify-content: space-between;
        gap: 10px;
    }

    .header-contacts {
        position: static;
        top: auto;
        right: auto;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        white-space: normal;
        min-width: 0;
        align-items: center;
        gap: 12px;
        font-size: 13px;
        margin-right: 5px;
    }

    .header-contacts {
        flex: 1;
        justify-content: center;
        align-items: center;
        text-align: center;
        margin-right: 0;
    }

    .header-contacts .contact-phone {
        font-size: 13px;
        margin-right: 5px;
    }

    .header-contacts .contact-email {
        font-size: 12px;
        color: var(--text-dark);
        display: inline-block;
    }

    @media (max-width: 350px) {
        .header-contacts .contact-email {
            display: none;
        }
    }
}

@media (min-width: 769px) {
    .slider-dots {
        display: none;
    }
}