* {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden; /* Гарантированный запрет горизонтального скролла */
    position: relative;
}


:root {
    --accent: #8A2BE2;
    --accent-glow: rgba(138, 43, 226, 0.4);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --bg-dark: #050505;
    --text-main: #ffffff;
    --text-dim: #888;
}

body {
    background: white;
    color: var(--text-main);
    font-family: 'Raleway', sans-serif;
    margin: 0;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
}
/* Обертка для всей страницы контактов */
.contacts-grid {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 50px;
    margin-top: 60px;
}

/* Карточки слева */
.info-card-glass {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    padding: 35px;
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    transition: 0.3s;
}

.info-card-glass:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.icon-circle {
    min-width: 50px;
    height: 50px;
    background: var(--accent);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Сама форма (справа) */
/* Основной контейнер формы */
.cyber-form {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    padding: 60px;
    width: 100%;
    max-width: 800px; /* Чтобы форма не растягивалась на весь экран */
    margin: 0 auto;
}

/* Сетка для имени и почты */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.pro-content h3 {
    text-align: right;
}
.pro-content a {
    text-decoration: none;
    color: white;
}
.pro-content a:hover {
    color: var(--accent)
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Прижимает лейблы к левому краю */
    margin-bottom: 25px;
}

.input-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent); /* Твой фиолетовый */
    margin-bottom: 12px;
    font-weight: 700;
}

.input-wrapper {
    width: 100%;
    position: relative;
}

/* Стили для всех полей ввода */
.input-group input,
.input-group select,
.input-group textarea {
    width: 100% !important;
    border-radius: 20px !important;
    padding: 18px 25px !important;
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

/* Эффект при фокусе */
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--accent) !important;
    background: rgba(138, 43, 226, 0.05) !important;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.1);
}
.fa-solid {
    color: white;
}
/* Кнопка */
.send-btn {
    width: 100%;
    margin-top: 20px;
    background: #fff !important;
    color: #000 !important;
    padding: 22px !important;
    border-radius: 22px !important;
    border: 1px solid var(--accent) !important;
    font-weight: 900 !important;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.send-btn:hover {
    background: var(--accent) !important;
    color: #fff !important;
}

.send-btn i {
    font-size: 1.1rem;
}

/* Адаптив: на мобилках поля в одну колонку */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .cyber-form {
        padding: 40px 25px;
    }

}

.map-section {
    position: relative;
    width: 100%;
    height: 600px;
    margin-top: 100px;
    display: flex !important;
    align-items: center;

    overflow: hidden;
    /* Это критично: */
    display: block;
    box-sizing: border-box;
}

.interactive-map {
    width: 100%;
    height: 100%;
    position: absolute; /* Чтобы карта не создавала лишних отступов */
    top: 0;
    left: 0;
}

.interactive-map iframe {
    width: 100%;
    height: 100%;
    border: none !important; /* Убираем бордер у самого фрейма */
    display: block;
    filter: invert(90%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.map-floating-card {
    position: absolute;
    left: 40px;
    width: 380px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    padding: 40px;
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.info-content h3 {
    margin: 13px 0;
}

.map-floating-card h2 {
    font-size: 2rem;
    margin: 15px 0 30px;
    line-height: 1.1;
}

.accent-dot { color: var(--accent); }

.map-info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.map-info-item i {
    color: var(--accent);
    font-size: 1.2rem;
    margin-top: 5px;
}

.map-info-item strong { display: block; font-size: 1rem; color: #fff; }
.map-info-item p { color: var(--text-dim); margin: 0; font-size: 0.9rem; }

.map-links {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn-outline-small {
    padding: 10px 15px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    transition: 0.3s;
}

.btn-outline-small:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.map-section, .interactive-map {
    width: 100% !important;
    max-width: 100vw;
    overflow: hidden; /* Обрезает всё, что торчит */
}

.interactive-map iframe {
    width: 100% !important;
    max-width: 100%;
}

/* Стилизация контейнера селекта */
.input-wrapper select {
    appearance: none; /* Убирает дефолтную стрелку */
    -webkit-appearance: none;
    -moz-appearance: none;

    /* Добавляем кастомную стрелку через SVG */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238A2BE2' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 20px center !important;
    background-size: 16px !important;

    cursor: pointer;
    padding-right: 50px !important; /* Чтобы текст не налезал на стрелку */
}

/* Стилизация выпадающего списка (вариантов) */
.input-wrapper select option {
    background-color: #121212; /* Цвет выпадающего меню */
    color: #fff;
    padding: 15px;
}

/* Убираем синее выделение в некоторых браузерах */
.input-wrapper select:focus {
    outline: none;
    border-color: var(--accent) !important;
}

/* Фикс для Firefox (убирает пунктирную линию) */
.input-wrapper select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #fff;
}

.contacts-header {
    position: relative;
    text-align: center;
    /* Вместо margin используй padding, чтобы не "отталкивать" фон */
    padding: 150px 0 60px 0;
    margin-top: 0;
}

/* Световое пятно за текстом */
.header-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 200px;
    background: var(--accent);
    filter: blur(120px);
    opacity: 0.15;
    z-index: -1;
}

.ultra-title {
    font-size: 5rem; /* Огромный размер */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -2px;
    line-height: 0.9;
    margin: 0;
    color: black;
}

.gradient-text {
    /* Уходим от белого к нашим фиолетовым тонам */
    background: linear-gradient(90deg, #8A2BE2 0%, #4b0082 100%) !important;

    display: inline-block !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;

    /* Чтобы текст не сливался, если шрифт тонкий */
    font-weight: 800;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 500px;
    margin: 25px auto 0;
    line-height: 1.6;
    font-weight: 500;
}

.white-accent {
    color: #fff;
    font-weight: 800;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* Navbar */
.navbar {
    background: linear-gradient(90deg, #7b2ff7 0%, #a134eb 100%);
    padding: 15px 0;
    /* МЕНЯЕМ sticky на fixed */
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    /* Поднимаем выше всех элементов страницы */
    z-index: 10000;
}

/* Убедись, что хедер не прячется под фиксированный навбар */
.contacts-header {
    padding-top: 180px; /* Увеличили со 150px, чтобы учесть высоту навбара */
}

/* Гарантируем, что навбар всегда сверху без зазоров */
.navbar {
    top: 0 !important;
    backdrop-filter: blur(10px);
}

@media (max-width: 1100px) {
    .contacts-grid {
        grid-template-columns: 1fr; /* Карточки над формой */
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

    .info-card-glass {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .ultra-title {
        font-size: 3rem; /* Уменьшаем заголовок на мобилках */
    }

    .map-floating-card {
        position: relative; /* Карта больше не перекрывает форму */
        left: 0;
        width: 100%;
        border-radius: 0;
        bottom: 0;
    }

    .map-section {
        height: auto; /* Позволяем карте и карточке стакаться вертикально */
        display: flex;
        flex-direction: column;
    }

    .interactive-map {
        height: 350px; /* Фиксированная высота карты на мобилках */
        position: relative;
    }
}

.interactive-map iframe {
    pointer-events: none; /* Карта не реагирует на скролл */
}

.map-section:hover .interactive-map iframe {
    pointer-events: auto; /* Активируется только при наведении */
}

/* Анимация лейбла при фокусе на инпуте */
.input-group:focus-within label {
    color: #fff;
    text-shadow: 0 0 10px var(--accent-glow);
    transform: translateX(5px);
    transition: 0.3s ease;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* --- ЕДИНЫЙ БЛОК АДАПТИВА ДЛЯ КОНТАКТОВ --- */

@media (max-width: 1100px) {
    /* Схлопываем сетку: карточки становятся над формой */
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 40px;
    }

    .info-card-glass {
        flex-direction: row;
        padding: 25px;
    }
}

@media (max-width: 768px) {
    /* Хедер и Заголовок */
    .contacts-header {
        padding-top: 140px; /* Учитываем высоту fixed-navbar */
        padding-bottom: 40px;
    }

    .ultra-title {
        font-size: 3rem;
        letter-spacing: -1px;
    }

    .subtitle {
        font-size: 1rem;
        padding: 0 20px;
    }

    /* Карточки информации */
    .info-card-glass {
        flex-direction: column; /* Иконка над текстом */
        text-align: center;
        align-items: center;
        border-radius: 24px;
    }

    /* Форма */
    .cyber-form {
        padding: 40px 20px;
        border-radius: 30px;
    }

    .form-grid {
        grid-template-columns: 1fr; /* Поля Имя и Почта друг под другом */
        gap: 0;
    }

    .send-btn {
        padding: 18px !important;
        font-size: 0.9rem;
    }

    /* Карта и Плавающая карточка */
    .map-section {
        margin-top: 60px;
        height: auto;
        display: flex;
        flex-direction: column; /* Карточка вылетает ИЗ карты вниз */
    }

    .interactive-map {
        height: 300px; /* Фиксируем высоту самой карты */
        position: relative;
    }

    .map-floating-card {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        border-radius: 0; /* Убираем скругления, чтобы прилегала к краям */
        padding: 30px 20px;
        backdrop-filter: none;
        background: #0a0a0a; /* Плотный фон для читаемости */
    }

    .map-floating-card h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .ultra-title {
        font-size: 2.2rem;
    }

    .container {
        padding: 0 20px;
    }

    .info-card-glass {
        padding: 20px;
    }
}


.badge {
    background: #f4f0ff;
    color: #8A2BE2;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 20px;
}

.title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 30px;
    color: #1a1a1a;
}

.dot { color: #8A2BE2; }

.info-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 35px;
}

.info-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.info-item i {
    color: #8A2BE2;
    font-size: 20px;
    margin-top: 3px;
}

.text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.text strong {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a1a;
}

.text span {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.btn-outline, .btn-primary {
    text-align: center;
    padding: 14px;
    border-radius: 15px;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s;
}

/* 1. SECTION WRAPPER */
.contacts-section {
    position: relative;
    width: 100%;
    height: 700px; /* High enough for a big laptop map */
    background: #fff;
    font-family: 'Raleway', sans-serif;
    display: flex;
    align-items: center; /* Vertically centers the card */
    justify-content: flex-start; /* Pushes card to the left */
    overflow: hidden;
}

/* 2. THE MAP (FULL BACKGROUND) */
.map-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 3. THE INFO CARD (LAPTOP STYLE) */
.info-container {
    position: relative;
    z-index: 10;
    margin-left: 6%; /* Pushes card away from the very edge */
    width: 100%;
    max-width: 420px;
    pointer-events: none; /* Allows clicks to pass through to map outside the card */
}

.info-card {
    background: #fff;
    padding: 40px;
    border-radius: 35px;
    box-shadow: 0 20px 60px rgba(138, 43, 226, 0.15);
    pointer-events: auto; /* Re-enables clicks for buttons inside card */
}

/* 4. BUTTONS GRID */
.button-group {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 15px;
    margin-top: 30px;
}
.btn-outline{
    color: #8A2BE2;
}

.btn-outline, .btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    border-radius: 18px;
    font-weight: 800;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

/* MOBILE RESPONSIVE OVERRIDE */
@media (max-width: 1024px) {
    .contacts-section {
        height: 90vh; /* Fill mobile screen */
        flex-direction: column;
        justify-content: flex-end; /* Card goes to bottom */
        padding: 0;
    }

    .info-container {
        margin-left: 0;
        max-width: none;
        padding: 15px;
        width: 100%;
    }

    .info-card {
        padding: 25px;
        border-radius: 30px 30px 0 0; /* Rounded top only for mobile */
    }

    .map-container {
        height: 100%;
    }
}

.pro-content a {
    color: black;
}

.contacts-section {
    position: relative;
    width: 100%;
    min-height: 600px;
    background: #f8f9fa;
    overflow: hidden;
}

/* На десктопе карта на весь фон */
.map-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

/* Контейнер для карточки */
.info-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    pointer-events: none; /* Пропускаем клики сквозь контейнер к карте */
}

.info-card {
    background: white;
    padding: 40px;
    border-radius: 30px;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    pointer-events: auto; /* Возвращаем клики самой карточке */
}

/* --- МАГИЯ АДАПТИВА --- */

@media (max-width: 1024px) {
    .contacts-section {
        display: flex;
        flex-direction: column; /* Складываем друг под друга */
        min-height: auto;
    }

    .map-container {
        position: relative; /* Вынимаем из фона */
        height: 400px; /* Фиксированная высота карты на мобилках */
        order: 2; /* Карта будет снизу */
    }

    .info-container {
        order: 1; /* Карточка будет сверху */
        padding: 30px 15px;
        pointer-events: auto;
    }

    .info-card {
        max-width: 100%; /* Карточка на всю ширину */
        border-radius: 0; /* Убираем скругления по бокам для мобильного вида */
        box-shadow: none;
        padding: 20px;
    }

    .button-group {
        flex-direction: column; /* Кнопки одна под другой */
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .title { font-size: 24px !important; }
    .badge { font-size: 10px; }
    .info-item { gap: 10px; }
    .map-container { height: 300px; }
}