/* ==========================================
   1. БАЗОВЫЕ НАСТРОЙКИ И ПЕРЕМЕННЫЕ
   ========================================== */
   :root {
    --bg-dark: #07090d;
    --bg-card: #10141d;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.25);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --font-main: 'Manrope', sans-serif;
    --font-heading: 'Oswald', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: #c4c4c4; /* Желаемый цвет фона */
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
}

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

/* ==========================================
   2. УНИВЕРСАЛЬНЫЕ КОМПОНЕНТЫ ЗАГОЛОВКОВ
   ========================================== */
.section-header-centered {
    text-align: center;
    margin-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title-ug {
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -1.5px;
    margin-top: 10px;
    margin-bottom: 12px;
    line-height: 1;
    padding-bottom: 20px;
}

.section-desc-ug {
    font-size: 1.7rem;
    color: var(--text-muted);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.3;
}

.ug-tag {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.ug-outline {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.75);
    transition: 0.3s;
}

/* ==========================================
   3. КНОПКИ И ШАПКА
   ========================================== */
.header {
    background-color: rgba(7, 9, 13, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 50px; width: auto; object-fit: contain; }
.logo span { color: var(--accent); }
.nav a { color: var(--text-muted); text-decoration: none; margin: 0 18px; font-weight: 500; font-size: 1.5rem; transition: color 0.3s; }
.nav a:hover { color: var(--text-main); }
.phone-link { flex-shrink: 0; white-space: nowrap; color: var(--text-main); text-decoration: none; font-weight: 700; border: 1px solid var(--border-color); padding: 10px 18px; border-radius: 15px; background: var(--bg-card); transition: all 0.3s; font-size: 1.3rem; }
.phone-link:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 15px var(--accent-glow); }

.btn {
    display: inline-block; padding: 14px 28px; font-size: 1.2rem; font-weight: 700; text-decoration: none; border-radius: 15px; border: none; transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); text-align: center; font-family: var(--font-main);
}
.btn-primary { margin-top: 16px; background-color: var(--accent); color: #fff; box-shadow: 0 4px 20px var(--accent-glow); }
.btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4); }
.btn-secondary { margin-top: 16px; background-color: transparent; color: var(--text-main); border: 1px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--text-main); background: rgba(255,255,255,0.03); }

/* ==========================================
   4. БЕГУЩАЯ СТРОКА
   ========================================== */
.marquee-section {
    padding: 35px 0;
    overflow: hidden;
    background: #c4c4c4;
    width: 100%; /* Занимает всю ширину экрана */
}

.marquee {
    display: flex;
    width: 100%; /* ВАЖНО: возвращаем 100%, чтобы строка не сжималась */
    overflow: hidden;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 70px;
    min-width: max-content;
    flex-shrink: 0;
    padding-left: 35px;
    padding-right: 35px;

    animation: scroll 100s linear infinite;
}

.ug-link-underline {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 4px; /* отступ линии от текста, чтобы выглядело аккуратнее */
    transition: color 0.2s ease;
}

.ug-link-underline:hover {
    color: var(--accent); /* цвет при наведении */
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.brand-logo {
    height: 95px; /* Размер логотипов */
    width: auto;
    object-fit: contain;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.brand-logo:hover {
    opacity: 1;
}

/* ==========================================
   5. ГЛАВНЫЙ ЭКРАН (HERO)
   ========================================== */
.hero-reference-section {
    position: relative;
    width: 100%;
    margin: 0;
    height: 90vh;
    min-height: 700px;
    background-image: url('img/main.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 0 0 32px 32px;
}

.hero-reference-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 4, 6, 0.8) 0%, rgba(3, 4, 6, 0.7) 50%, rgba(3, 4, 6, 0.9) 100%);
    z-index: 1;
}

.inner-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    background: rgba(9, 9, 9, 0.95);

    /* Усиливаем размытие для глубокого контраста */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px); /* Для поддержки в Safari */

    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.inner-header .header-container {
    max-width: 1720px;
    padding: 50px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
}

.hero-ref-content {
    position: relative;
    z-index: 2;
    max-width: 1720px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 40px 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
    justify-content: center;
}

.ug-tag-small {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 40px;
}

.hero-ref-top-text {
    margin-bottom: 50px; /* Добавили воздух перед кнопкой/фильтром */
}

.hero-ref-top-text h1 {
    font-family: var(--font-heading);
    font-size: 7rem;
    line-height: 1.1;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 40px;
    text-transform: uppercase;
}

.hero-ref-top-text p {
    font-size: 1.6rem;
    color: #b0b0b0;
    max-width: 800px;
    margin: 0 auto;
}

.hero-ref-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 22, 30, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 10px 20px;
    gap: 16px;
    margin: 60px auto;
    max-width: 100%;
    width: max-content;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.filter-dropdown-item {
    font-size: 0.75rem;
    color: #e0e0e0;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
}
.filter-dropdown-item:not(:last-child):after {
    content: '•';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
}

.filter-btn-search {
    background-color: var(--accent);
    color: #fff;
    padding: 15px 90px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.3rem;
    text-decoration: none;
    transition: background 0.3s;
    white-space: nowrap;
    margin-left: 5px;
}
.service-subpage-actions .filter-btn-search {
    flex: 1;
    max-width: 250px;
    min-width: 180px;
    text-align: center;
    box-sizing: border-box;
}
.filter-btn-search:hover { background-color: var(--accent-hover); }
.filter-btn-prices { display: none; }

.hero-ref-bottom-row {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding: 0 40px 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
    z-index: 2;
}

.hero-ref-bottom-left { text-align: left; max-width: 490px; }
.hero-ref-bottom-left p { font-size: 1.25rem; color: #888; line-height: 1.5; }

.hero-ref-bottom-right-card {
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 16px 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}
.map-card-text { display: flex; flex-direction: column; gap: 2px; }
.map-card-text strong { font-size: 1.5rem; color: #fff; }
.map-card-text small { font-size: 1.3rem; color: var(--accent); }

.main-bg-img {
    position: absolute;
    top: 0;
    left: -50%; /* Немного выпускаем за левый край для объема */
    width: 60%; /* Делаем крупной */
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    pointer-events: none; /* Чтобы клики проходили сквозь картинку */
    z-index: 1; /* Под основным текстом шапки */
    overflow: visible;
}

.main-bg-img img {
    width: 130%;
    max-width: none;
    height: auto;
    object-fit: contain;
    opacity: 0.05; /* Делаем линии полупрозрачными и легкими */
    transition: transform 0.1s ease-out; /* Плавность для параллакса */
}

/* Верхняя асимметричная часть */
.about-top-complex {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: flex-end;
    margin-bottom: 60px;
    border-bottom: 1px solid rgba(22, 22, 22, 0.15);
    padding-bottom: 40px;
}

.section-title-light {
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 900;
    color: #161616;
    text-transform: uppercase;
    letter-spacing: -1.5px;
    margin-top: 10px;
    margin-bottom: 12px;
    line-height: 1;
}

.section-title-light span {
    -webkit-text-stroke: 1px #161616;
    color: transparent;
}

.about-lead-text p {
    font-size: 1.5rem;
    color: #191919;
    max-width: 900px;
    margin: 0 auto;
}

/* Сложная Bento-сетка */
.about-bento-grid-light {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 24px;
}

.about-bento-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(22, 22, 22, 0.08);
    border-radius: 15px;
    padding: 35px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Делаем две карточки широкими (занимают по 2 колонки) */
.about-bento-card.large-card {
    grid-column: span 2;
}

.about-bento-card:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(22, 22, 22, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
}

/* Полупрозрачный водяной знак-номер внутри карточки */
.card-num-watermark {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 48px;
    font-weight: 900;
    color: rgba(22, 22, 22, 0.04);
    line-height: 1;
    pointer-events: none;
}

.feature-icon-wrap {
    width: 48px;
    height: 48px;
    background: #161616;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: #ffffff;
    transition: background 0.3s ease, transform 0.3s ease;
}

.about-bento-card:hover .feature-icon-wrap {
    background: var(--accent);
    transform: scale(1.05);
}

.card-inner-content h3 {
    font-size: 2rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 6px;
    color: #161616;
    letter-spacing: -0.5px;
}

.card-inner-content p {
    font-size: 1.5rem;
    line-height: 1.4;
    color: #4a4a4a;
    margin: 0;
}

/* Контейнер картинки на фоне справа */
.about-bg-img {
    position: absolute;
    top: 95%; /* Центрируем по вертикали */
    right: -50%; /* Выпускаем правую часть за пределы экрана */
    transform: translateY(-50%);
    width: 55%; /* Делаем контейнер шире */
    height: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
    z-index: 1; /* Под текстом */
}

.about-bg-img img {
    width: 150%; /* Делаем саму картинку больше контейнера */
    max-width: none;
    height: auto;
    object-fit: contain;
    opacity: 0.05; /* Чуть уменьшаем прозрачность, чтобы текст поверх читался идеально */
}

/* Поднимаем внутренний контейнер с текстом выше картинки */
.about-ref-container {
    position: relative;
    z-index: 2;
    max-width: 1720px;
    margin: 0 auto;
    margin-top: 60px;
    margin-bottom: 60px;
    padding-left: 20px;
}

.about-top-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 40px;
    padding-bottom: 60px;
}
.about-tag { font-size: 0.85rem; color: var(--accent); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; display: block; margin-bottom: 15px; }
.about-left-title h2 { font-size: clamp(2.2rem, 3.5vw, 5.2rem); font-weight: 700; line-height: 1.1; margin: 0; color: #161616; }
.about-left-title .ug-outline { -webkit-text-stroke: 1.5px rgba(22, 22, 22, 0.75); }
.about-top-text-1 h3, .about-top-text-2 h3 { font-size: 2rem; font-weight: 600; margin-bottom: 10px; color: #161616; }
.about-top-text-1 p, .about-top-text-2 p { font-size: 1.3rem; line-height: 1.6; color: #161616; margin: 0; }

.about-bottom-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.about-bottom-col { position: relative; padding-top: 35px; border-top: 1px solid rgba(23, 23, 23, 0.3); }
.about-col-number { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-bottom: 12px; letter-spacing: 1px; }
.about-bottom-col h3 { font-size: 1.7rem; font-weight: 600; margin-bottom: 10px; color: #161616; }
.about-bottom-col p { font-size: 1rem; line-height: 1.6; color: #161616; }

/* ==========================================
   7. УСЛУГИ
   ========================================== */
.services-underground-full {
    position: relative;
    max-width: 100%;
    margin: 0 auto;           /* Меняем вертикальные отступы на 0, чтобы убрать зазоры сверху и снизу */
    background-color: #090909;
    overflow: hidden;
    padding: 100px 0;
    border-radius: 32px 32px 0 0; /* Скруглены только верхние углы, снизу углы прямые */
}
.services-wrapper { width: 100%; max-width: 1720px; margin: 0 auto; padding: 0 40px; }
.services-grid-ug {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card-ug {
    position: relative;
    background: #0b0d12;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 15px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    overflow: hidden; /* Чтобы увеличенная картинка не вылезала за скругления */
    transition: all 0.3s ease;
}

/* Слой с текстом поверх картинки */
.service-card-content-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    flex-grow: 1;
}

.service-card-ug:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: #10131b;
    transform: translateY(-4px);
}

.service-card-ug.highlight-card {
    border-color: rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #0b0d12 0%, #0d1222 100%);
}

.service-card-top {
    margin-bottom: 12px;
}

.service-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
    margin-bottom: 16px;
}

.service-info {
    flex: 1;
}

.service-card-inner { display: grid; grid-template-columns: 1fr 140px; gap: 15px; height: 100%; align-items: center; }
.service-content-left { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.service-badge-num { font-size: 0.65rem; font-weight: 800; letter-spacing: 1.5px; color: var(--accent); text-transform: uppercase; }
.card-title-ug {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.card-desc-ug {
    font-size: 1.5rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.service-card-actions {
    display: flex;
    gap: 15px;
}

.service-card-actions .btn {
    flex: 1; /* Обе кнопки делят ширину 50 на 50 */
    width: 100%;
    text-align: center;
    justify-content: center; /* Центрируем текст внутри кнопок, если там есть иконки */
    white-space: nowrap;     /* Защищает текст от переносов на мобилках */
    box-sizing: border-box;
}

.btn-sm {
    padding: 10px 14px;
    font-size: 1.1rem;
    flex: 1;
}

.service-car-preview {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 60%;
    height: 120%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    z-index: 1;
    pointer-events: none;
}

.service-car-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.15; /* Прозрачность, чтобы текст отлично читался */
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.service-card-ug:hover .service-car-preview img {
    transform: scale(1.1);
    opacity: 0.2;
}

/* Модальное окно */
/* 1. Общий фон модалки с размытием */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

/* 2. Само модальное окно (большое и просторное) */
.modal-content {
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    width: 90%;
    max-width: 1200px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

/* ==========================================
   8. ПРАЙС-ЛИСТ И ЭТАПЫ
   ========================================== */
.contacts-underground-full {
    position: relative;
    max-width: 100%;
    margin: 0 auto;               /* Вплотную по вертикали (без зазоров сверху и снизу) */
    background-color: #090909;
    overflow: hidden;
    padding: 100px 0;
    border-radius: 32px 32px 0 0; /* Скругление только сверху (слева и справа), снизу прямые углы */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pricing-underground-full {
    position: relative;
    max-width: 100%;
    margin: 0 auto;           /* убираем вертикальные отступы (сверху/снизу 0) */
    background-color: #090909;
    overflow: hidden;
    padding: 100px 0;
    border-radius: 0;         /* без закруглений */
}

.steps-section {
    position: relative;
    max-width: 100%;
    margin: 0 auto;           /* убираем вертикальные отступы (сверху/снизу 0) */
    background-color: #090909;
    overflow: hidden;
    padding: 100px 0;
    border-radius: 0 0 32px 32px; /* закругление только снизу (справа, слева и снизу) */
}

.pricing-wrapper, .steps-wrapper, .contacts-wrapper { max-width: 1400px; margin: 0 auto; padding: 0 32px; }

.pricing-accordion-box { display: flex; flex-direction: column; gap: 16px; max-width: 100%; margin: 0 auto; }
.accordion-ug { scroll-margin-top: 1px; background: #0b0d12; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 15px; overflow: hidden; transition: 0.3s; }
.accordion-header-ug { padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; }
.accordion-header-ug:hover { background: #10131b; }
.accordion-ug h3 { font-family: var(--font-heading); font-size: 2rem; color: #fff; text-transform: uppercase; margin: 0; }
.icon-ug { font-size: 1.25rem; font-weight: 700; color: var(--accent); transition: transform 0.3s; }
.accordion-content-ug { display: none; padding: 0 24px 24px 24px; border-top: 1px solid rgba(255, 255, 255, 0.05); background: #0b0d12; }
.accordion-ug.active .accordion-content-ug { display: block; }
.accordion-ug.active .icon-ug { transform: rotate(45deg); }

.price-row-ug {
    display: flex;
    justify-content: space-between;
    padding: 12px 8px; /* Добавили небольшие отступы по бокам, чтобы фон не прилипал к краям */
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px; /* Аккуратное скругление для подсветки */
    transition: background-color 0.2s ease; /* Плавное появление фона */
}

.price-name { color: var(--text-muted); font-size: 1.5rem; }
.price-val { font-weight: 700; color: #fff; font-size: 1.5rem; }
.price-row-ug:hover {
    background-color: rgba(255, 255, 255, 0.06); /* Цвет подсветки при наведении */
}

/* ЭТАПЫ РАБОТЫ — ГОРИЗОНТАЛЬНОЕ РАСПОЛОЖЕНИЕ */
.steps-wrapper {
    max-width: 1640px;
    margin: 0 auto;
    padding: 0 20px;
    padding-bottom: 140px;
}

.steps-stairs-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    max-width: 100%;
    margin: 0 auto;
}

.step-stair-card {
    position: relative;
    background: #0b0d12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 32px;
    /* Карточки выстраиваются по 3 штуки в ряд на широких экранах */
    width: calc(33.333% - 16px);
    min-width: 300px;
    min-height: 180px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: 0.4s;
    /* Полностью сбрасываем старые вертикальные сдвиги */
    margin-left: 0 !important;
    margin-top: 0 !important;
    left: auto !important;
    top: auto !important;
}

.step-stair-card:hover {
    transform: translateY(-6px) scale(1.02);
    z-index: 10;
    border-color: rgba(255, 255, 255, 0.25);
}

.step-stair-card::before {
    content: attr(data-step);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.035);
    line-height: 1;
    pointer-events: none;
}

.step-stair-card.highlight-card {
    border-color: rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #0b0d12 0%, #0d1222 100%);
}

/* ==========================================
   ФОРМА ОБРАТНОЙ СВЯЗИ (ОБНОВЛЕННАЯ)
   ========================================== */

.booking-ticket-section {
    box-sizing: border-box;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    background-size: cover;
    background-position: center;
    padding: 120px 30px;
    padding-top: 160px;     /* Увеличиваем верхний отступ секции */
    padding-bottom: 160px;  /* Делаем большой отступ снизу, чтобы блок «дышал» */
}

.booking-ticket-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding: 0 40px;
}

.ticket-right-form {
    width: 100%;
    max-width: 100%;
    background: #0b0d12;
    border-radius: 25px;
    padding: 60px 70px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Декоративное мягкое свечение в углу карточки */
.ticket-right-form::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: rgba(37, 99, 235, 0.1);
    filter: blur(60px);
    border-radius: 50%;
    pointer-events: none;
}

.ticket-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 8px;
    line-height: 1.2;
    margin-bottom: 20px;
}

/* Описание под заголовком, если оно есть в разметке */
.ticket-subtitle, .form-desc {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 10px;
}

.form-ticket-ug {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 30px;
}

/* Превращаем старые плоские линии в объемные стильные инпуты */
.input-line-group {
    position: relative;
    background: #121620;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 6px 20px;
    transition: all 0.3s ease;
}

.input-line-group:focus-within {
    border-color: var(--accent);
    background: #161b26;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.input-line-group input,
.input-line-group select {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 0;
    color: #fff;
    font-size: 1.4rem;

    /* Полностью убираем стандартную стрелочку браузера */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* Никаких фоновых картинок и лишних отступов */
    background: transparent;
}

.input-line-group input::placeholder {
    color: #64748b;
}

/* Убираем стандартную уродливую стрелочку селекта и ставим красивую кастомную */
.input-line-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 18px;
}

.input-line-group select option {
    background: #121620;
    color: #fff;
    padding: 12px;
}

/* Кнопка отправки на всю ширину для гармонии с полями */
.ticket-submit-btn {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background-color: var(--accent);
    color: #fff;
    padding: 18px 30px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-left: 0;
    margin-top: 10px;
    border: none;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.ticket-submit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(37, 99, 235, 0.4);
}
.form-success-message {
    padding: 30px 20px;
    text-align: center;
    color: #fff;
    animation: successScaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes successScaleIn {
    0% { opacity: 0; transform: scale(0.95) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.success-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 50%;
    animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}

.success-heading {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.success-heading .ug-outline {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
    color: transparent;
}

.success-desc {
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto 25px auto;
}

.highlight-time {
    color: #fff;
    font-weight: 600;
    border-bottom: 1px dashed var(--accent);
}

/* КОНТАКТЫ И ФУТЕР */
.contacts-grid-ug {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 30px;
    align-items: start; /* Отменяет принудительное растягивание блоков по высоте */
}
.contacts-info-ug { background: #0b0d12; border: 1px solid rgba(255,255,255,0.08); border-radius: 15px; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.contact-block-ug { padding-bottom: 6px; }
.contact-label-ug { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; }
.contact-value-ug a { color: var(--text-muted); text-decoration: none; font-size: 2.5rem }
.messenger-buttons-ug {
    display: flex;
    flex-wrap: wrap;       /* Позволяет кнопкам аккуратно переноситься на новую строку */
    gap: 10px;             /* Равномерный отступ между кнопками со всех сторон */
    margin-top: 12px;
}
.btn-messenger-ug {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #141824;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 16px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 1.4rem;
    transition: all 0.3s ease;

    /* Убираем старые конфликтующие отступы, которые ломали верстку */
    margin: 0 !important;
}

.btn-messenger-ug:hover {
    border-color: var(--accent);
    background: #1a2235;
}

.btn-messenger-ug i {
    margin-right: 0; /* Иконка управляется через flex gap */
}
.contacts-map-ug {
    border-radius: 15px;
    overflow: hidden;        /* Обязательно обрезает всё, что вылезает за рамки */
    height: 100%;
    min-height: 480px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0b0d12;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;     /* Создает контекст позиционирования */
}

.contacts-map-ug:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.contacts-map-ug iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(20%) contrast(105%);
    position: absolute;     /* Растягиваем iframe на всю площадь */
}

.footer-niche {
    position: relative;
    max-width: 100%;
    margin: 0 auto 0px auto;     /* Добавили отступ снизу (40px) перед подвалом */
    background-color: #000000; /* Глубокий темный фон */
    color: #999;
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-left {
    max-width: 350px;
}

/* Стили для картинки-логотипа в подвале */
.footer-logo-link {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 15px;

}

.footer-logo {
    height: 100px; /* Подстрой под высоту логотипа в шапке */
    width: auto;
    object-fit: contain;
    display: block;
}

.footer-slogan {
    font-size: 1.3rem;
    line-height: 1.5;
    color: #888;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
}

.footer-nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
    font-size: 1.4rem;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: #ffffff; /* Подсветка при наведении */
}

.copyright {
    font-size:  1.2rem;
    color: #666;
    text-align: right;
}

/* Скрываем контент подраздела по умолчанию */
.sub-accordion-content {
    display: none;
}

/* Когда подраздел активен — показываем контент */
.sub-accordion-ug.active .sub-accordion-content {
    display: block;
}

/* Делаем шапку подраздела кликабельной */
.sub-accordion-header {
    cursor: pointer;
}

/* =========================================
   9. АДАПТИВНОСТЬ (ЕДИНЫЙ БЛОК)
   ========================================== */

   @media (max-width: 1200px) {
    .step-stair-card {
        margin-left: 0 !important;
        margin-top: 0 !important;
        width: 100% !important;
        margin-bottom: 16px;
    }
}

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

@media (max-width: 1200px) {

    .nav {
        display: none !important;
    }
    .about-top-row { grid-template-columns: 1fr; }
    .about-bottom-grid { grid-template-columns: 1fr; }
    .contacts-grid-ug { grid-template-columns: 1fr; }
    .step-stair-card { width: calc(50% - 12px); }

    .about-top-complex {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .about-bento-grid-light {
        grid-template-columns: 1fr;
    }
    .about-bento-card.large-card {
        grid-column: span 1;
    }
}

@media (max-width: 1200px) {
    /* Исправление огромных заголовков для телефонов */
    .section-title-ug {
        font-size: 5rem;
    }
    .hero-ref-top-text h1 {
        font-size: 5rem;
        line-height: 1.2;
    }
    .ticket-title {
        font-size: 4rem;
    }

    /* Сетка услуг и шагов в одну колонку */
    .services-grid-ug {
        grid-template-columns: 1fr;
    }
    .step-stair-card {
        width: 100%;
    }

    /* Компактные отступы шапки на мобильных */
    .inner-header .header-container {
        padding: 50px 35px;
    }

    /* Форма и футер */
    .ticket-right-form {
        padding: 50px 50px;
        border-radius: 15px;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 20px;
    }

    .footer-right {
        align-items: flex-start;
        width: 100%;
    }

    .footer-nav {
        gap: 15px;
    }

    .copyright {
        text-align: left;
    }

    /* Кнопки мессенджеров: на мобильных строго друг под другом и на всю ширину */
    .messenger-buttons-ug {
        flex-direction: column;
    }

    .btn-messenger-ug {
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }
}

/* ==========================================
   МОБИЛЬНАЯ ШАПКА И ГАМБУРГЕР
   ========================================== */
   .header-right-mobile {
    display: none;
    align-items: center;
    gap: 40px;
    color: #000000;
}

.header-phone-btn {
    color: #fff;
    background: var(--accent);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.95rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 1200px) {
    .desktop-phone {
        display: none !important;
    }

    .header-right-mobile {
        display: flex !important;
    }

    .hamburger {
        display: flex !important;
    }

    /* Выпадающее меню сверху */
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0b0d12;
        flex-direction: column;
        align-items: center;
        gap: 25px;
        padding: 35px 20px;
        z-index: 1000;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);

        /* Состояние скрыто */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease-in-out;
        display: flex !important;
    }

    .nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Анимация гамбургера в крестик */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
    }
}

/* ==========================================
   ГЛАВНЫЙ ЭКРАН (HERO)
   ========================================== */
.service-subpage-hero {
    position: relative;
    background-color: #0b0b0b;
    background-image: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 100%), url('img/back_main.svg');
    background-size: cover;
    background-position: center;
    height: 60vh;
    min-height: 650px;
    max-height: 600px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-subpage-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center !important;
    box-sizing: border-box;
    padding: 80px 5vw 0 5vw;
}

.service-subpage-content h1 {
    font-family: var(--font-heading) !important;
    font-size: 5rem;
    line-height: 1.05;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center !important;
    margin: 15px 0;
    color: #fff;
}

.service-subpage-content p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 25px;
    color: #dfdfdf;
    max-width: 650px;
}

.service-subpage-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center !important;
}

@media (max-width: 1200px) {
    .service-subpage-hero {
        height: auto;
        min-height: 480px;
        max-height: none;
        padding-top: 50px;
        padding-bottom: 50px;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        justify-content: center;
    }
    .service-subpage-content {
        padding: 100px 20px;
    }
}

/* ==========================================================
   СТИЛИ ДЛЯ ПК (DESKTOP >= 1024px)
   ========================================================== */
@media (min-width: 1024px) {
    /* Скрываем мобильный блок услуг и мобильный футер на ПК */
    .mobile-dropdown-block,
    .mobile-menu-footer {
        display: none !important;
    }

    .dropdown {
        position: relative;
        display: inline-block;
    }

    /* Невидимый мостик между ссылкой и меню, чтобы курсор не "терялся" */
    .dropdown::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: 30px;
        background: transparent;
    }

    .dropdown-content {
        display: none;
        position: absolute;
        top: calc(100% + 15px);
        left: -25px;
        background: rgba(10, 10, 10, 0.97);
        min-width: 440px;
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(255, 255, 255, 0.05);
        z-index: 1000;
        border-radius: 15px;
        padding: 18px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(20px);
    }

    .dropdown-content a {
        color: #eaeaea;
        padding: 16px 22px;
        text-decoration: none;
        display: block;
        font-family: 'Manrope', sans-serif;
        font-weight: 600;
        font-size: 1.2rem;
        letter-spacing: 0.3px;
        border-radius: 15px;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        margin-bottom: 6px;
    }

    .dropdown-content a:last-child {
        margin-bottom: 0;
    }

    .dropdown-content a:hover {
        background-color: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        padding-left: 28px;
    }

    .dropdown:hover .dropdown-content {
        display: block !important;
        animation: dropFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .nav {
        display: flex;
        align-items: center;
        /* Умный адаптивный отступ между пунктами меню */
        gap: clamp(15px, 2vw, 30px);
    }

    /* Адаптивные ссылки в шапке ПК */
    .nav a,
    .dropdown > a {
        font-family: 'Manrope', sans-serif;
        /* Штрафной размер плавно меняется от 0.9rem до 1.1rem в зависимости от ширины экрана */
        font-size: clamp(1.4rem, 1.1vw, 1.1rem);
        font-weight: 600;
        color: var(--text-main, #fff);
        text-decoration: none;
        transition: color 0.2s ease;
        white-space: nowrap; /* Защищает текст от переноса слов на две строки */
    }

    .nav a:hover,
    .dropdown > a:hover {
        color: var(--accent, #4da3ff);
    }

}

@keyframes dropFade {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================
   СТИЛИ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ (< 1200px)
   ========================================================== */
@media (max-width: 1200px) {
    /* Скрываем десктопный выпадающий список */
    .dropdown {
        display: none !important;
    }

    /* Мобильное меню на почти весь экран */
    #mobile-menu {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        min-height: calc(100vh - 80px);
        padding: 50px 24px 32px 24px;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-menu-content-top {
        display: flex;
        flex-direction: column;
        gap: 18px;
        width: 100%;
    }

    .mobile-dropdown-block {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .mobile-dropdown-title {
        font-family: 'Manrope', sans-serif;
        font-size: 2rem;
        font-weight: 700;
        color: #ffffff;
        letter-spacing: 0.5px;
    }

    .mobile-services-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px; /* Увеличили расстояние между пунктами, чтобы не сливались */
        width: 100%;
        margin: 6px 0 0 0;
        padding: 0;
        border: none;
    }

    .mobile-services-list a {
        font-family: 'Manrope', sans-serif;
        font-size: 1.6rem; /* Сделали шрифт крупнее и заметнее */
        font-weight: 500;
        color: #d0d0d0; /* Сделали цвет светлее, чтобы читался с первого взгляда */
        text-decoration: none;
        text-align: center;
        padding: 6px 12px;
        transition: color 0.2s ease, transform 0.2s ease;
    }

    .mobile-services-list a:hover {
        color: #ffffff;
        transform: scale(1.02);
    }

    #mobile-menu > .mobile-menu-content-top > a {
        font-family: 'Manrope', sans-serif;
        font-size: 2rem;
        font-weight: 700;
        color: #ffffff;
        text-decoration: none;
        text-align: center;
        padding: 4px;
        letter-spacing: 0.5px;
    }

    .mobile-menu-footer {
        margin-top: 20px;
        padding-top: 100px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        width: 100%;
        text-align: center;
    }

    .mob-footer-address {
        font-family: 'Manrope', sans-serif;
        font-size: 2rem;
        color: #b0b0b0;
        line-height: 0.5;
    }

    .mob-footer-time {
        font-family: 'Manrope', sans-serif;
        font-size: 3rem;
        color: #777777;
    }
    .mob-footer-socials {
        display: flex;
        justify-content: center;
        gap: 16px;
        margin-top: 5px; /* Сделали отступ компактным, и иконки поднимутся выше */
        width: 100%;
    }

    .mob-soc-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100px;
        height: 100px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #ffffff;
        transition: all 0.2s ease;
    }

    .mob-soc-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }
    .mob-soc-btn i,
    .mob-soc-btn svg {
        font-size: 3rem; /* Если это иконка-шрифт (например, FontAwesome) */

    }

    .mob-soc-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }
}

/* На ПК ссылки Цены, Этапы и т.д. показываем в ряд, а мобильный блок скрываем */
@media (min-width: 1024px) {
    .nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 30px;
        position: static;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .mobile-menu-content-top,
    .mobile-menu-footer {
        display: none !important;
    }
}

/* На мобилках скрываем дублирующие десктопные ссылки */
@media (max-width: 1200px) {
    .dropdown.desktop-services-dropdown,
    .nav > .desktop-nav-link {
        display: none !important;
    }
}
.mob-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    margin-right: 10px; /* Отступ между ними в ряд */
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #ffffff;
    font-size: 2rem; /* Размер самой иконки */
    text-decoration: none;
    transition: 0.2s ease;
}

.mob-footer a:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--accent);
}