/* ==========================================================================
   1. ПЕРЕМЕННЫЕ И ОБНУЛЕНИЕ
   ========================================================================== */
:root {
    --bg-dark: #0b0f19;          
    --bg-card: rgba(255, 255, 255, 0.03); 
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-purple: #8b5cf6;    
    --accent-hover: #a78bfa;
    
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. ШАПКА (HEADER)
   ========================================================================== */
.header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.3rem;
}

.logo__brand {
    color: var(--accent-purple);
}

.geo-marker {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .header__container {
        flex-direction: column; /* Выстраиваем лого и маркер в столбик */
        align-items: center;    /* Центрируем их по горизонтали */
        text-align: center;
        gap: 12px;              /* Делаем аккуратный отступ между ними */
        padding-top: 10px;
    }
}
/* ==========================================================================
   3. ГЛАВНЫЙ ЭКРАН И БЛОК СВЯЗИ
   ========================================================================== */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
}

.office-plate {
    display: inline-block;
    background-color: #ff5252; 
    color: #ffffff;            
    font-family: var(--font-sans);
    font-weight: 900;          
    font-size: 4.5rem;         
    line-height: 0.9;          
    padding: 14px 50px 18px;   
    border: 5px solid #000000; 
    border-radius: 0;          
    letter-spacing: -0.02em;   
    text-align: center;
    margin-bottom: 40px;
    user-select: none;         
}

.office-plate__number {
    font-family: var(--font-sans);
    font-weight: 900;    
    font-size: 3.5rem;   
    line-height: 1;
    letter-spacing: -0.03em;
}

.office-plate__label {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em; 
    margin-top: 4px;
    color: #666666;      
}

.hero__title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero__title span {
    color: var(--accent-purple);
}

.hero__subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Репутационный блок специалиста */
.specialist-card {
    width: 100%;
    max-width: 550px;
    margin-bottom: 30px; 
    text-align: left;
}

.specialist-card__name {
    font-size: 1.3rem;
    color: #8e8e93;
    margin-bottom: 6px;
}

.specialist-card__name span {
    font-weight: 700;
    color: #ffffff;
}

.specialist-card__status {
    font-size: 1.1rem;
    color: #10b981; 
    font-weight: 500;
    margin-bottom: 24px;
}

/* Премиальный виджет Яндекса */
.yandex-widget {
    display: flex; 
    flex-direction: column;
    width: 100%; 
    max-width: 550px; 
    background: #1c1c22;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 20px 28px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box; 
}

.yandex-widget:hover {
    background: #222229;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.yandex-widget__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.yandex-widget__icon {
    width: 26px;
    height: 26px;
    object-fit: contain; 
    flex-shrink: 0;
}

.yandex-widget__title {
    font-family: Arial, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.yandex-widget__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.yandex-widget__rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.yandex-widget__num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.yandex-widget__stars {
    color: #f59e0b; 
    font-size: 1.15rem;
    letter-spacing: 1px;
    line-height: 1;
}

.yandex-widget__count {
    color: #8e8e93;
    font-size: 0.85rem;
}

/* Сетка кнопок связи */
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; 
    gap: 12px;
    width: 100%;
    max-width: 550px;
    box-sizing: border-box;
    margin-top: 15px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; 
    height: 48px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}

.btn-action:active {
    transform: scale(0.98); 
}

.btn-action--tg {
    background: var(--accent-purple, #7c3aed);
    color: #ffffff;
}

.btn-action--tg:hover {
    background: var(--accent-purple-hover, #6d28d9);
}

.btn-action--operator {
    position: relative;
    background: #1c1c22;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #8e8e93; 
}

.btn-action--operator:hover {
    background: #222229;
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff; 
}

.btn-action__icon-phone {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    transition: color 0.2s ease;
    padding: 2px;
}

.btn-action__operator-logo {
    height: 40px;
    width: auto;  
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 5px;
    margin-left: 10px;
    padding: 2px;
}

@media (max-width: 480px) {
    .contact-grid {
        grid-template-columns: 1fr; /* Выстраиваем кнопки в один столбец */
        gap: 10px;
    }
    .btn-action {
        width: 100%; /* Кнопки растягиваются на всю ширину */
    }
}

/* Скрываем тултипы по умолчанию (Защита мобильных от зависания) */
.btn-tooltip {
    display: none;
}

/* Включаем и стилизуем кастомный тултип ТОЛЬКО на десктопах */
@media (hover: hover) {
    .btn-tooltip {
        display: block;
        position: absolute;
        bottom: calc(100% + 12px); 
        left: 50%;
        transform: translateX(-50%) translateY(6px);
        
        background: #25252c;
        color: #ffffff;
        padding: 8px 14px;
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
        
        font-family: var(--font-mono); 
        font-size: 1.05rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        white-space: nowrap;
        
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.15s ease, transform 0.15s ease;
    }

    /* Стрелочка под тултипом */
    .btn-tooltip::before {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: #25252c; 
    }

    /* Показ при наведении */
    .btn-action--operator:hover .btn-tooltip {
        opacity: 1;
        transform: translateX(-50%) translateY(0); 
    }
}

/* ==========================================================================
   4. ЕДИНЫЙ СТИЛЬ КАРТОЧЕК (УСЛУГИ И B2B)
   ========================================================================== */
.services, .b2b {
    padding: 60px 0;
}

.section-title, .b2b__title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

/* Сетки */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px; 
}

.b2b__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 24px;
    margin-top: 32px; 
}

/* Унифицированный b2b-дизайн для обоих типов карточек */
.service-card, .b2b__item {
    background: #1c1c22; 
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 32px; /* Чуть увеличили внутренний простор */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover, .b2b__item:hover {
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}

/* Заголовки карточек (Шрифты стали крупнее) */
.service-card__title, .b2b__item-title {
    font-size: 1.35rem; 
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 14px;
}

/* Текстовые описания (Шрифты стали крупнее) */
.service-card__desc, .b2b__item-text {
    font-size: 1.05rem; 
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* Специфичные микро-элементы для карточек услуг */
.service-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.service-card__time {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Адаптивность сеток */
@media (max-width: 992px) {
    .b2b__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .b2b__grid {
        grid-template-columns: 1fr; 
        gap: 16px;
    }
}

/* ==========================================================================
   7. БЛОК С КАРТОЙ (GOOGLE MAPS)
   ========================================================================== */
.map {
    padding: 60px 0;
}

/* Оболочка для карты с рамкой в едином стиле сайта */
.map__wrapper {
    width: 100%;
    height: 450px; /* Фиксированная высота для десктопа */
    background: #1c1c22;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden; /* Чтобы углы карты скруглялись по рамке */
    box-sizing: border-box;
}

/* Сама карта */
.map__iframe {
    width: 100%;
    height: 100%;
    border: 0;
    
    /* Секретный b2b-фильтр: делает карту темной и стильной */
    filter: grayscale(100%) invert(90%) contrast(90%) hue-rotate(180deg);
    transition: filter 0.3s ease;
}

/* При наведении (или тапе) карта плавно возвращает оригинальные цвета для удобства навигации */
.map__wrapper:hover .map__iframe {
    filter: grayscale(0%) invert(0%) contrast(100%) hue-rotate(0deg);
}

/* Адаптивность под мобильные экраны */
@media (max-width: 768px) {
    .map {
        padding: 40px 0;
    }
    
    .map__wrapper {
        height: 320px; /* На смартфонах делаем карту чуть компактнее по высоте */
    }
}

/* ==========================================================================
   8. БЛОК ЛОГИСТИКИ ПОД КАРТОЙ (ЮЗЕР-ГАЙД)
   ========================================================================== */
.map__info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 колонки на десктопе */
    gap: 24px;
    margin-top: 28px; /* Отступ от рамки карты */
}

.map__info-card {
    background: #1c1c22; /* Наш фирменный b2b-фон */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 32px; /* Просторные паддинги как в карточках услуг */
    box-sizing: border-box;
}

.map__info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 14px;
}

.map__info-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.map__info-title {
    font-size: 1.35rem; 
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.map__info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px; /* Расстояние между пунктами */
}

.map__info-list li {
    font-size: 1.05rem; /* Крупный b2b-размер шрифта */
    line-height: 1.6;
    color: var(--text-muted);
    position: relative;
    padding-left: 20px;
}

/* Фиолетовые маркеры-точки для списков */
.map__info-list li::before {
    content: "•";
    color: var(--accent-purple);
    font-weight: 700;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: -1px;
}

/* Акцентное выделение важных локаций внутри текста */
.map__info-list span {
    color: #ffffff;
    font-weight: 600;
}

/* Выделение кодового слова для охраны */
.map__info-code {
    color: var(--accent-hover);
    background: rgba(139, 92, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

/* Адаптивность для мобильных телефонов */
@media (max-width: 768px) {
    .map__info-grid {
        grid-template-columns: 1fr; /* Схлопываем в одну колонку */
        gap: 16px;
    }
    
    .map__info-card {
        padding: 24px; /* Чуть компактнее отступы на смартфонах */
    }
    
    .map__info-list li {
        font-size: 1rem; /* Слегка оптимизируем под мелкие экраны */
    }
}

/* ==========================================================================
   9. ФИНАЛЬНЫЙ БЛОК СВЯЗИ (CTA) И ФУТЕР
   ========================================================================== */
.map__cta {
    text-align: center;
    margin-top: 48px;
    padding: 40px 32px;
    background: radial-gradient(100% 100% at 50% 0%, rgba(139, 92, 246, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
}

.map__cta-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.map__cta-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin: 0 0 28px 0;
}

.map__cta .contact-grid {
    width: max-content;      /* Схлопываем сетку до ширины самих кнопок */
    margin: 0 auto;          /* Выравниваем получившийся блок по центру */
    justify-content: center; /* Центрируем колонки на случай флекс-костылей */
}

@media (max-width: 480px) {
    .map__cta .contact-grid {
        width: 100%;
    }
}

/* Стили для аккуратного футера */
.footer {
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Адаптив для мелких экранов */
@media (max-width: 768px) {
    .map__cta {
        margin-top: 32px;
        padding: 24px 16px;
    }
    
    .map__cta-title {
        font-size: 1.2rem;
    }
    
    .map__cta-subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .footer__container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

