/* ==========================================================================
   1. БАЗОВЫЕ НАСТРОЙКИ И ПЕРЕМЕННЫЕ
   ========================================================================== */
:root {
    --accent-burgundy: #800020;    /* Благородный бордовый */
    --accent-hover: #600018;       /* Бордовый при наведении */
    --accent-gold: #c5a059;        /* Матовое золото для премиум-акцентов */
    --bg-dark-blue: #0f172a;       /* Темно-синий для акцентов и результатов */
    --bg-gray: #f8fafc;            /* Светло-серый фон */
    --border-color: #cbd5e1;       /* Нейтральная граница */
    --text-main: #334155;          /* Основной цвет текста */
    --text-muted: #64748b;         /* Вспомогательный текст */
    --white: #ffffff;
    
    --font-family: 'Inter', sans-serif;
    --transition-fast: 0.25s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Контейнер */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Заголовки */
.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--bg-dark-blue);
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn--primary {
    background-color: var(--accent-burgundy);
    color: var(--white);
    border: none;
}

.btn--primary:hover {
    background-color: var(--accent-hover);
}

.btn--outline {
    background-color: transparent;
    color: var(--accent-burgundy);
    border: 2px solid var(--accent-burgundy);
}

.btn--outline:hover {
    background-color: var(--accent-burgundy);
    color: var(--white);
}

/* ==========================================================================
   2. LUXURY REFINED HEADER (ОБНОВЛЕННАЯ ШАПКА)
   ========================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 18px 0;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4af37 0%, #f3e5ab 50%, #d4af37 100%);
    opacity: 0.8;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Логотип */
.header__logo-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.header__logo-wrapper:hover {
    transform: translateY(-1px);
}

.header__logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

.header__brand {
    display: flex;
    flex-direction: column;
}

.header__brand .logo__primary {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.header__brand .logo__secondary {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-top: -2px;
}

/* Контакты в шапке */
.header__luxury-contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.header__row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header__row--phones {
    color: #0f172a;
}

.header__row--details {
    color: #64748b;
    margin-top: 2px;
}

.header__detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Иконки и ссылки */
.header__icon {
    stroke: #94a3b8;
    transition: stroke 0.2s ease;
}

.header__icon--red {
    stroke: #e11d48;
}

.header__link {
    text-decoration: none;
    transition: all 0.2s ease;
}

.header__link--phone {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.header__link--text {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.header__separator {
    color: #cbd5e1;
    font-size: 12px;
    user-select: none;
}

/* Ховеры элементов шапки */
.header__link--phone:hover {
    color: var(--accent-gold);
}

.header__detail-item:hover .header__link--text {
    color: #0f172a;
}

.header__detail-item:hover .header__icon {
    stroke: var(--accent-gold);
}

/* ==========================================================================
   3. СЕКЦИЯ HERO
   ========================================================================== */
.hero {
    position: relative;
    background: url('https://images.unsplash.com/photo-1506880018603-83d5b814b5a6?q=80&w=1600&auto=format&fit=crop') center/cover no-repeat;
    padding: 140px 0;
    color: var(--white);
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 100%);
    z-index: 1;
}

.hero__container {
    position: relative;
    z-index: 2;
}

.hero__content {
    max-width: 650px;
}

.hero__title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero__subtitle {
    font-size: 18px;
    color: #cbd5e1;
    margin-bottom: 32px;
}

/* ==========================================================================
   4. МОДУЛЬ КАЛЬКУЛЯТОРОВ
   ========================================================================== */
.calc-section {
    padding: 80px 0;
    background-color: #f1f5f9;
}

.calc-card {
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    overflow: hidden;
}

.calc-card__inputs {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
}

.calc-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-field__label {
    font-size: 16px;
    font-weight: 600;
    color: var(--bg-dark-blue);
}

.calc-field__hint {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Счетчик инпутов */
.calc-counter {
    display: inline-flex;
    align-items: center;
    background-color: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: fit-content;
    height: 52px;
    overflow: hidden;
}

.calc-counter__btn {
    width: 52px;
    height: 100%;
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-main);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.calc-counter__btn:hover {
    background-color: #e2e8f0;
}

.calc-counter__input {
    width: 80px;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    color: var(--bg-dark-blue);
    outline: none;
    -moz-appearance: textfield;
}

.calc-counter__input::-webkit-outer-spin-button,
.calc-counter__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Селектор страниц */
.calc-select-field {
    width: 100%;
    max-width: 240px;
    height: 52px;
    background-color: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 40px 0 16px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--bg-dark-blue);
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23334155' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 16px) center;
}

.calc-select-field:focus {
    border-color: var(--accent-burgundy);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.05);
}

/* Правая сторона результатов */
.calc-card__results {
    background-color: #111827; 
    padding: 40px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calc-results-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 24px;
    border-bottom: 1px solid #1f2937;
    padding-bottom: 12px;
}

.calc-results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.calc-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-result-item__label {
    font-size: 15px;
    color: #94a3b8;
}

.calc-result-item__value {
    font-size: 16px;
    font-weight: 600;
}

.calc-total {
    border-top: 1px solid #1f2937;
    padding-top: 24px;
}

.calc-total__label {
    font-size: 14px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}

.calc-total__price {
    font-size: 42px;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.calc-total__currency {
    font-size: 24px;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 4px;
}

/* ==========================================================================
   5. БЛОК: ЭТАПЫ ПРОИЗВОДСТВА (ИСПРАВЛЕНО ДУБЛИРОВАНИЕ)
   ========================================================================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
    align-items: stretch; /* Карточки одинаковой высоты в строке */
}

.step-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.step-card__meta {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-burgundy); /* Изменено на фирменный бордовый */
    padding: 16px 20px 8px 20px;
    background-color: #ffffff;
}

.step-card__image-wrapper {
    width: 100%;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-card__image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.step-card__content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #f1f5f9;
}

.step-card__title {
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.3;
}

.step-card__description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   6. СЕКЦИЯ С КАРТОЙ
   ========================================================================== */
.map-section {
    background-color: var(--white);
    padding: 40px 0 60px 0; /* Идеальное поле перед футером */
    border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   7. ПОДВАЛ СТИЛЕЙ (FOOTER)
   ========================================================================== */
.footer {
    background-color: var(--bg-dark-blue);
    color: #94a3b8;
    padding: 48px 0;
    border-top: 4px solid var(--accent-burgundy);
}

.footer__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}

.footer__copy {
    font-size: 13px;
    margin-top: 8px;
}

.footer__info {
    text-align: right;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer__info a {
    color: var(--white);
    text-decoration: none;
}

.footer__info a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   8. АДАПТИВНАЯ ВЕРСТКА (MEDIA QUERIES - СГРУППИРОВАНО)
   ========================================================================== */
@media (max-width: 1024px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 868px) {
    .header {
        padding: 14px 0;
    }
    .header__container {
        flex-direction: column;
        gap: 14px;
        text-align: center;
    }
    .header__luxury-contacts {
        align-items: center;
        gap: 8px;
    }
    .header__row--details {
        flex-direction: column;
        gap: 6px;
    }
    .header__separator--desktop {
        display: none;
    }
    .calc-card {
        grid-template-columns: 1fr;
    }
    .calc-card__inputs, 
    .calc-card__results {
        padding: 32px 24px;
    }
    .calc-select-field {
        max-width: 100%;
    }
    .hero__title {
        font-size: 36px;
    }
    .footer__container {
        flex-direction: column;
        text-align: center;
    }
    .footer__info {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .section-title {
        font-size: 26px;
    }
}