:root {
    --bg-dark: #2c3e50;
    --bg-darker: #212f3c;
    --card-bg: #34495e;
    --text-color: #ecf0f1;
    --accent-color: #f5c542;
    --shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* ================= RESET ================= */

* {
    box-sizing: border-box;
}

button,
input,
textarea {
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

/* ================= BASE ================= */

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-color);
}

body.modal-open {
    overflow: hidden;
}

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

/* ================= HEADER ================= */

header {
    background: var(--bg-darker);
    box-shadow: var(--shadow);
}

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

.header-left {
    text-align: left;
}

.header-right {
    text-align: right;
}

.company-name {
    font-size: 2.6em;
    font-weight: 900;
    margin: 0;
}

.accent {
    color: var(--accent-color);
    font-weight: 900;
    text-shadow: 0 0 8px rgba(245, 197, 66, 0.25);
}

.header-text {
    font-size: 1.1em;
    margin: 6px 0;
    line-height: 1.5;
}

.large {
    font-size: 1.15em;
}

.header-text a {
    color: var(--accent-color);
    font-weight: 900;
    text-decoration: none;
}

/* ================= ABOUT ================= */

.about-us {
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.region-title {
    text-align: center;
    font-size: 2.2em;
    color: var(--accent-color);
    font-weight: 900;
    margin-bottom: 25px;
}

.about-text {
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 14px;
}

/* ================= EQUIPMENT ================= */

.equipment {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    text-align: center;
}

.equipment-title {
    font-size: 2.6em;
    font-weight: 900;
    color: var(--accent-color);
    margin-bottom: 40px;
}

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

.equipment-card {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.equipment-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

/* ================= BUTTON ================= */

.order-button {
    margin-top: 45px;
    padding: 16px 40px;
    font-size: 1.3em;
    border-radius: 40px;
    border: none;
    background: var(--accent-color);
    color: #000;
    font-weight: 900;
    cursor: pointer;
}

/* ================= MODAL ================= */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modern-modal {
    background: var(--card-bg);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 16px;
}

.close-button {
    font-size: 32px;
    cursor: pointer;
    display: block;
    text-align: right;
}

/* ================= SERVICE SELECT ================= */

.service-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.service-btn {
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #2c3e50;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

/* 🔥 ВАЖНО — ПОДСВЕТКА */
.service-btn.active {
    background: var(--accent-color) !important;
    color: #000 !important;
    box-shadow: 0 0 15px rgba(245,197,66,0.7);
    transform: scale(1.05);
}

/* ================= FORM ================= */

.form-section {
    margin-bottom: 22px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

input,
textarea {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: #2c3e50;
    color: #fff;
}

textarea {
    resize: vertical;
    min-height: 90px;
}

.input-error {
    box-shadow: 0 0 0 2px #e74c3c;
}

.error-text {
    margin-top: 6px;
    color: #e74c3c;
    font-size: 0.9em;
}

.submit-button {
    width: 100%;
    padding: 16px;
    border-radius: 40px;
    border: none;
    background: var(--accent-color);
    font-size: 1.2em;
    font-weight: 900;
    cursor: pointer;
}

/* ================= FOOTER ================= */

footer {
    background: var(--bg-darker);
    text-align: center;
    padding: 20px;
}

.success-box {
    text-align: center;
    padding: 20px 10px;
}

.success-box h2 {
    margin-top: 0;
    color: var(--accent-color);
}

.dev-info {
    font-size: 0.9em;
    opacity: 0.6;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    .container {
        padding: 30px 16px;
    }

    .header-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .header-left,
    .header-right {
        text-align: center;
    }

    .company-name {
        font-size: 2em;
    }

    .about-text {
        font-size: 1.05em;
    }

    .equipment-title {
        font-size: 2.2em;
    }

    .order-button {
        width: 100%;
    }

    .modal {
        align-items: flex-start;
        padding: 16px 10px;
    }

    .modern-modal {
        width: 100%;
        max-height: calc(100dvh - 32px);
        padding: 20px;
    }

    .close-button {
        position: sticky;
        top: 0;
        background: var(--card-bg);
        padding-bottom: 10px;
    }

    .form-row {
        flex-direction: column;
    }
}
