/* ═══════════════════════════════════════════
   CSS VARIABLES & THEMES
═══════════════════════════════════════════ */
:root {
    --accent-blue:         #1a6bff;
    --accent-blue-light:   #4d8dff;
    --accent-orange:       #ff6a00;
    --accent-orange-light: #ff8c38;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Neon effects — only active in dark theme (overridden in light) */
    --neon-blue:        0 0 8px #1a6bff, 0 0 20px #1a6bff55, 0 0 40px #1a6bff33;
    --neon-orange:      0 0 8px #ff6a00, 0 0 20px #ff6a0055, 0 0 40px #ff6a0033;
    --neon-blue-border: 0 0 6px #1a6bff99;
}

/* ── DARK THEME ── */
[data-theme="dark"] {
    --bg-primary:    #0a0c12;
    --bg-secondary:  #0f1220;
    --bg-card:       #131725;
    --bg-card-hover: #1a2035;
    --border-color:  #1e2540;
    --border-hover:  #2a3560;
    --text-primary:  #e8ecf4;
    --text-secondary:#8892a8;
    --text-muted:    #4a5368;
    --header-bg:     rgba(10, 12, 18, 0.96);
    --footer-bg:     #070910;
    --glass:         rgba(255,255,255,0.03);
    --glass-border:  rgba(255,255,255,0.07);
    --shadow-card:   0 8px 32px rgba(0,0,0,0.5);
    --shadow-hover:  0 20px 60px rgba(0,0,0,0.7);
    --block-bg:      #0f1220;
    --block-border:  #1e2540;
}

/* ── LIGHT THEME — нейтральные, читаемые тона без неона ── */
[data-theme="lightdark"] {
    --bg-primary:    #f5f6fa;
    --bg-secondary:  #eef0f7;
    --bg-card:       #ffffff;
    --bg-card-hover: #f8f9ff;
    --border-color:  #d8dce8;
    --border-hover:  #a8b0cc;
    --text-primary:  #1a1f2e;
    --text-secondary:#505870;
    --text-muted:    #8890a4;
    --header-bg:     rgba(245, 246, 250, 0.97);
    --footer-bg:     #e8eaf4;
    --glass:         rgba(0,0,0,0.03);
    --glass-border:  rgba(0,0,0,0.10);
    --shadow-card:   0 2px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
    --shadow-hover:  0 8px 32px rgba(0,0,0,0.14);
    --block-bg:      #ffffff;
    --block-border:  #d8dce8;

    /* Отключаем неоновое свечение в светлой теме */
    --neon-blue:        none;
    --neon-orange:      none;
    --neon-blue-border: none;
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.4s, color 0.4s;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* ═══════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 3px; }

/* ═══════════════════════════════════════════
   PAGE CONTAINER — все секции в рамке
═══════════════════════════════════════════ */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ═══════════════════════════════════════════
   LAYOUT BLOCK — видимая рамка секций
═══════════════════════════════════════════ */
.section {
    padding: 72px 0;
}

/* Обёртка-блок для контентных секций */
.section > .page-container {
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: 20px;
    padding: 52px 40px;
    box-shadow: var(--shadow-card);
}

[data-theme="dark"] .section > .page-container {
    background: var(--bg-secondary);
}



/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--block-border);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-orange));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-logo-icon svg { color: #fff; }

.header-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.header-brand-main {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--accent-orange);
    text-transform: uppercase;
}

.header-brand-sub {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-nav-link {
    display: none;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 7px;
    transition: var(--transition);
    letter-spacing: 0.03em;
}

.header-nav-link:hover {
    color: var(--text-primary);
    background: var(--glass);
}

@media (min-width: 640px) {
    .header-nav-link { display: flex; }
}

.theme-toggle {
    width: 40px; height: 40px;
    border: 1px solid var(--block-border);
    border-radius: 8px;
    background: var(--glass);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
    margin-left: 4px;
}

.theme-toggle:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

[data-theme="dark"] .theme-toggle:hover {
    box-shadow: var(--neon-blue-border);
}

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
/* Базовые стили для мобильных устройств (Mobile First) */
.hero {
    position: relative;
    height: 100vh;
    min-height: 300px;
    max-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Стили для планшетов */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero {
        min-height: 400px;
        max-height: 600px;
    }
}

/* Стили для десктопов */
@media (min-width: 1025px) {
    .hero {
        min-height: 500px;
        max-height: 700px;
    }
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('/img/bg-index.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
            180deg,
            rgba(10,12,18,0.65) 0%,
            rgba(10,12,18,0.45) 40%,
            rgba(10,12,18,0.88) 100%
    );
}

[data-theme="light"] .hero-bg::after {
    background: linear-gradient(
            180deg,
            rgba(20,25,50,0.55) 0%,
            rgba(20,25,50,0.35) 40%,
            rgba(20,25,50,0.72) 100%
    );
}

#heroCanvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid rgba(255,106,0,0.7);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #ff8c38;
    text-transform: uppercase;
    margin-bottom: 20px;
    background: rgba(255,106,0,0.12);
    backdrop-filter: blur(8px);
}

.hero-title {
    font-size: clamp(30px, 5.5vw, 64px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

.hero-title .blue {
    color: #6aaaff;
}

.hero-title .orange {
    color: #ff8c38;
}

.hero-subtitle {
    font-size: clamp(14px, 1.8vw, 18px);
    color: rgba(255,255,255,0.75);
    max-width: 540px;
    margin: 0 auto 28px;
}

.hero-address {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(10px);
}

.hero-address svg { color: #ff8c38; }

.hero-scroll {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,0.45);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: scrollBounce 2s infinite;
    white-space: nowrap;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(7px); }
}

/* ═══════════════════════════════════════════
   STATS BAR
═══════════════════════════════════════════ */
.stats-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 28px 0;
    margin-top: 64px;
}

[data-theme="light"] .stats-bar {
    background: #eef0f7;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 480px) {
    .stats-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item {
    text-align: center;
    padding: 8px 12px;
}

.stat-number {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 900;
    letter-spacing: -0.02em;
    background: var(--accent-orange);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ═══════════════════════════════════════════
   SECTION HEADER
═══════════════════════════════════════════ */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(22px, 3.5vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-primary);
}

.section-title .accent-orange { color: var(--accent-orange); }
.section-title .accent-blue   { color: var(--accent-blue); }

/* ═══════════════════════════════════════════
   SERVICES SECTION
═══════════════════════════════════════════ */
.services-section {
    background: var(--bg-primary);
}

[data-theme="light"] .services-section {
    background: #f0f2f9;
}

.services-section > .page-container {
    background: var(--bg-secondary);
}

[data-theme="light"] .services-section > .page-container {
    background: #f8f9fd;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

@media (max-width: 500px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── SERVICE CARD ── */
.service-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    /* FIX: убираем background с карточки, чтобы card-bg был виден */
    background: #0d1020;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 460px;
    box-shadow: var(--shadow-card);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-hover);
}

[data-theme="dark"] .service-card:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(26,107,255,0.4);
}


.service-card:hover::before {
    opacity: 0.7;
}

[data-theme="light"] .service-card:hover::before {
    opacity: 0.5;
}

/* ── FIX: card-bg — фоновое изображение ── */
.card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s ease;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.card-wrapper {
    margin-top: 30px;
}


.service-card:hover .card-bg {
    transform: scale(1.06);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( 180deg, rgb(8, 10, 18) 0%, rgba(8, 10, 18, 0.72) 25%, rgba(8,10,18,0.94) 100% );
    z-index: 1;
    transition: var(--transition);
}

.service-card:hover .card-overlay {
    background: linear-gradient(
            180deg,
            rgba(8,10,18,0.10) 0%,
            rgba(8,10,18,0.52) 42%,
            rgba(8,10,18,0.92) 100%
    );
}

[data-theme="light"] .card-overlay {
    background: linear-gradient( 180deg, rgb(10, 14, 30) 0%, rgba(10,14,30,0.68) 50%, rgba(10,14,30,0.95) 100% );
}

[data-theme="light"] .service-card:hover .card-overlay {
    background: linear-gradient(
            180deg,
            rgba(10,14,30,0.16) 0%,
            rgba(10,14,30,0.60) 44%,
            rgba(10,14,30,0.94) 100%
    );
}

.card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 18px;
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: auto;
}

.card-number {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #ff8c38;
    background: rgba(255,106,0,0.15);
    border: 1px solid rgba(255,106,0,0.35);
    padding: 3px 8px;
    border-radius: 4px;
}

/* ══════════════════════════════════════════
   CARD VIDEO BTN — красный + эффект волны
══════════════════════════════════════════ */
.card-video-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    /* Красный цвет — сразу читается как «Play» */
    border: 2px solid rgba(220, 38, 38, 0.8);
    background: rgba(220, 38, 38, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
    overflow: visible;
    /* Небольшая подсказка через тень */
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5);
}

/* Пульсирующая волна — ::before и ::after */
.card-video-btn::before,
.card-video-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(220, 38, 38, 0.6);
    animation: video-btn-ripple 2s ease-out infinite;
    pointer-events: none;
}

.card-video-btn::after {
    inset: -9px;
    border-color: rgba(220, 38, 38, 0.3);
    animation-delay: 0.6s;
}

@keyframes video-btn-ripple {
    0%   { opacity: 1; transform: scale(0.85); }
    70%  { opacity: 0.4; transform: scale(1.25); }
    100% { opacity: 0; transform: scale(1.5); }
}

/* Tooltip-подсказка под кнопкой */
.card-video-btn::before {
    /* переопределяем ::before только для волны,
       tooltip делаем через атрибут title — браузерный, без лишнего кода */
}

.card-video-btn:hover {
    background: rgba(239, 68, 68, 0.95);
    border-color: #ef4444;
    transform: scale(1.12);
    box-shadow: 0 0 18px rgba(220, 38, 38, 0.65);
}

/* Иконка play чуть сдвинута вправо для оптического баланса */
.card-video-btn svg {
    margin-left: 2px;
    width: 16px;
    height: 16px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

/* Метка "▶ ВИДЕО" рядом с кнопкой для максимальной ясности */
.card-video-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: rgba(255, 100, 100, 0.9);
    text-transform: uppercase;
    margin-top: 4px;
    text-align: center;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    pointer-events: none;
}

/* Обёртка кнопки + метки */
.card-video-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.grag {
    color: var(--accent-blue); display: block;
}

/* ══════════════════════════════════════════
   CARD BOTTOM
══════════════════════════════════════════ */
.card-bottom {
    margin-top: 260px;
}

.card-logo-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.card-logo-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-blue);
    flex-shrink: 0;
}

.card-name {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    text-transform: uppercase;
    line-height: 1.1;
}

.card-services {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.55;
    margin-bottom: 20px;
    min-height: 96px;
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

/* ── BUTTONS ── */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(26,107,255,0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,107,255,0.45);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: var(--neon-blue), 0 6px 20px rgba(26,107,255,0.4);
}

/* ══════════════════════════════════════════
   CARD CONTACTS — улучшенный блок телефона
══════════════════════════════════════════ */
.card-contacts {
    display: flex;
    gap: 6px;
    /* FIX: фоновая плашка для всего блока контактов */
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 9px;
    padding: 4px;
}

/* btn-phone — выделен заметнее */
.btn-phone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
    /* FIX: более заметный фон — тёмно-синий с лёгким свечением */
    background: rgba(26, 107, 255, 0.18);
    border: 1px solid rgba(26, 107, 255, 0.40);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Лёгкое свечение под номером */
    box-shadow: inset 0 0 0 0 rgba(26,107,255,0);
    letter-spacing: 0.03em;
}

.btn-phone:hover {
    background: rgba(26, 107, 255, 0.38);
    border-color: rgba(26, 107, 255, 0.75);
    box-shadow: 0 0 12px rgba(26,107,255,0.3);
    transform: translateY(-1px);
}

/* Иконка телефона — отдельный цвет */
.btn-phone svg {
    color: #7db8ff;
    flex-shrink: 0;
}

/* Telegram */
.btn-tg {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(38, 170, 253, 0.14);
    border: 1px solid rgba(38, 170, 253, 0.32);
    border-radius: 6px;
    color: #26aafd;
    transition: var(--transition);
    text-decoration: none;
}

.btn-tg:hover {
    background: rgba(38, 170, 253, 0.30);
    border-color: rgba(38, 170, 253, 0.65);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(38,170,253,0.25);
}

/* WhatsApp */
.btn-wa {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 211, 102, 0.14);
    border: 1px solid rgba(37, 211, 102, 0.32);
    border-radius: 6px;
    color: #25d366;
    transition: var(--transition);
    text-decoration: none;
}

.btn-wa:hover {
    background: rgba(37, 211, 102, 0.30);
    border-color: rgba(37, 211, 102, 0.65);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,211,102,0.25);
}

/* ══════════════════════════════════════════
   BTN-VK — новая фиолетовая кнопка ВКонтакте
══════════════════════════════════════════ */
.btn-vk {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 60, 200, 0.14);
    border: 1px solid rgba(100, 60, 200, 0.35);
    border-radius: 6px;
    color: #a97eff;
    transition: var(--transition);
    text-decoration: none;
}

.btn-vk:hover {
    background: rgba(100, 60, 200, 0.32);
    border-color: rgba(130, 80, 255, 0.70);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 60, 200, 0.35);
    color: #c4a0ff;
}

/* SVG-иконка ВК (встроенная, не Lucide) */
.btn-vk svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}


/* Общие настройки для блоков действий */
.card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Увеличил зазор между строками */
}

/* Стилизация блока с ТЕЛЕФОНОМ */
.card-phone-wrap {
    display: flex;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    padding: 4px;
}

.btn-phone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(26, 107, 255, 0.15);
    border: 1px solid rgba(26, 107, 255, 0.3);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

.btn-phone:hover {
    background: rgba(26, 107, 255, 0.25);
    border-color: rgba(26, 107, 255, 0.6);
    transform: translateY(-1px);
}

/* Стилизация блока с СОЦСЕТЯМИ */
.card-socials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Три равные колонки */
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    padding: 4px;
}

/* Общие стили для кнопок соцсетей, чтобы они тянулись во всю ширину ячейки */
.card-socials-grid a {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-tg {
    background: rgba(38, 170, 253, 0.14);
    border: 1px solid rgba(38, 170, 253, 0.32);
    color: #26aafd;
}
.btn-tg:hover { background: rgba(38, 170, 253, 0.3); border-color: #26aafd; transform: translateY(-1px); }

.btn-wa {
    background: rgba(37, 211, 102, 0.14);
    border: 1px solid rgba(37, 211, 102, 0.32);
    color: #25d366;
}
.btn-wa:hover { background: rgba(37, 211, 102, 0.3); border-color: #25d366; transform: translateY(-1px); }

.btn-vk {
    background: rgba(100, 60, 200, 0.14);
    border: 1px solid rgba(100, 60, 200, 0.35);
    color: #a97eff;
}
.btn-vk:hover { background: rgba(100, 60, 200, 0.32); border-color: #a97eff; transform: translateY(-1px); }

.btn-vk svg { width: 18px; height: 18px; fill: currentColor; }


/* ══════════════════════════════════════════
   КНОПКА ГАЛЕРЕИ
══════════════════════════════════════════ */
.btn-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding: 11px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-gallery::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,106,0,0.08), rgba(26,107,255,0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-gallery:hover {
    border-color: var(--accent-orange);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,106,0,0.15);
}

.btn-gallery:hover::before {
    opacity: 1;
}

[data-theme="dark"] .btn-gallery:hover {
    box-shadow: 0 6px 20px rgba(255,106,0,0.2), 0 0 0 1px rgba(255,106,0,0.25);
}

.btn-gallery svg {
    flex-shrink: 0;
    color: var(--accent-orange);
    transition: transform 0.3s ease;
}

.btn-gallery:hover svg {
    transform: scale(1.15);
}

.btn-gallery-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255,106,0,0.2);
    border: 1px solid rgba(255,106,0,0.4);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-orange-light);
    margin-left: auto;
    transition: var(--transition);
}

.btn-gallery:hover .btn-gallery-count {
    background: rgba(255,106,0,0.35);
    border-color: rgba(255,106,0,0.7);
}

/* ══════════════════════════════════════════
   GALLERY MODAL OVERLAY
══════════════════════════════════════════ */
.gallery-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gallery-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ── BOX ── */
.gallery-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6);
    transform: scale(0.94) translateY(16px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.gallery-overlay.active .gallery-box {
    transform: scale(1) translateY(0);
}

/* ── HEADER ── */
.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.gallery-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.04em;
}

.gallery-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--glass);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-close:hover {
    background: rgba(255, 60, 60, 0.15);
    border-color: rgba(255, 60, 60, 0.4);
    color: #ff5555;
    transform: scale(1.08);
}

/* ── VIEWER ── */
.gallery-viewer {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-height: 0;
    padding: 16px 8px;
    background: rgba(0,0,0,0.2);
}

.gallery-main-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    height: 100%;
    min-height: 280px;
    max-height: 60vh;
}

.gallery-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    transition: opacity 0.25s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.gallery-main-img.loading {
    opacity: 0;
}

/* Loader спиннер */
.gallery-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.gallery-loader.visible {
    opacity: 1;
}

.gallery-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: gallery-spin 0.75s linear infinite;
}

@keyframes gallery-spin {
    to { transform: rotate(360deg); }
}

/* Счётчик фото */
.gallery-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* ── NAV BUTTONS ── */
.gallery-nav {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    margin: 0 4px;
}

.gallery-nav:hover {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(255,106,0,0.35);
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* ── THUMBNAILS ── */
.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    flex-shrink: 0;
    border-top: 1px solid var(--border-color);
    scrollbar-width: thin;
    scrollbar-color: var(--accent-orange) transparent;
}

.gallery-thumbs::-webkit-scrollbar {
    height: 3px;
}

.gallery-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--accent-orange);
    border-radius: 3px;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 48px;
    border-radius: 7px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.55;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-thumb:hover {
    opacity: 0.85;
    border-color: var(--border-hover);
}

.gallery-thumb:hover img {
    transform: scale(1.08);
}

.gallery-thumb.active {
    border-color: var(--accent-orange);
    opacity: 1;
    box-shadow: 0 0 0 1px rgba(255,106,0,0.4), 0 4px 12px rgba(255,106,0,0.25);
}

/* ══════════════════════════════════════════
   АДАПТИВ ДЛЯ ГАЛЕРЕИ
══════════════════════════════════════════ */
@media (max-width: 600px) {
    .gallery-box {
        max-height: 95vh;
        border-radius: 14px;
    }

    .gallery-viewer {
        padding: 10px 4px;
    }

    .gallery-main-wrap {
        min-height: 220px;
        max-height: 45vh;
    }

    .gallery-nav {
        width: 36px;
        height: 36px;
        margin: 0 2px;
    }

    .gallery-thumb {
        width: 52px;
        height: 40px;
    }

    .gallery-title {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .gallery-main-wrap {
        min-height: 180px;
        max-height: 38vh;
    }

    .gallery-nav {
        width: 32px;
        height: 32px;
    }
}


/* ═══════════════════════════════════════════
   MAP SECTION
═══════════════════════════════════════════ */
.map-info {
    color: var(--text-muted);
    font-weight: normal;
}

.map-section {
    background: var(--bg-primary);
}

.map-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

@media (min-width: 768px) {
    .map-wrapper {
        grid-template-columns: 280px 1fr;
    }
}

.map-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 18px;
    transition: var(--transition);
}

.map-info-card:hover {
    border-color: var(--border-hover);
}

[data-theme="dark"] .map-info-card:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--neon-blue-border);
}

.map-info-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.map-info-label svg { color: var(--accent-orange); }

.map-info-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.5;
}

.map-info-value.small {
    font-size: 13px;
}

.btn-route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-light));
    color: #fff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(255,106,0,0.28);
}

.btn-route:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,106,0,0.38);
}

[data-theme="dark"] .btn-route:hover {
    box-shadow: var(--neon-orange), 0 8px 24px rgba(255,106,0,0.4);
}

.map-container {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    height: 400px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

@media (min-width: 600px) {
    .footer-top { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    .footer-top { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-brand h3 {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-orange);
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 280px;
}

.footer-col h4 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-contact-item svg {
    color: var(--accent-blue);
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-contact-item div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fc-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.fc-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.fc-value a {
    color: var(--text-primary);
    transition: color 0.2s;
}

.fc-value a:hover {
    color: var(--accent-blue);
}

.fc-value--muted {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-copy {
    font-size: 11px;
    color: var(--text-muted);
}

.footer-copy span { color: var(--accent-orange); }

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    font-size: 11px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent-blue); }

/* ═══════════════════════════════════════════
   VIDEO MODAL
═══════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.modal-box {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
    max-width: 420px;
    width: 100%;
    transform: scale(0.92);
    transition: transform 0.3s;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.modal-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-orange);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-close {
    width: 30px; height: 30px;
    flex-shrink: 0;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.modal-video {
    width: 100%;
    display: block;
    background: #000;
    max-height: 65vh;
}

.modal-no-video {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-up   { animation: fadeUp 0.6s ease forwards; }
.fade-up-1 { animation-delay: 0.08s; opacity: 0; }
.fade-up-2 { animation-delay: 0.18s; opacity: 0; }
.fade-up-3 { animation-delay: 0.28s; opacity: 0; }
.fade-up-4 { animation-delay: 0.38s; opacity: 0; }

/* ═══════════════════════════════════════════
   MOBILE ADJUSTMENTS
═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .section > .page-container {
        padding: 36px 20px;
        border-radius: 16px;
    }
}

@media (max-width: 600px) {
    .site-header { padding: 0 14px; }
    .header-brand-main { font-size: 11px; }
    .header-brand-sub { font-size: 8px; }

    .page-container { padding: 0 14px; }

    .section { padding: 48px 0; }

    .section > .page-container {
        padding: 28px 16px;
        border-radius: 12px;
    }

    .stats-bar { padding: 20px 0; }
    .stat-number { font-size: 22px; }

    .service-card { min-height: 400px; }
    .card-name { font-size: 15px; }
    .card-services { font-size: 11px; min-height: 44px; }
    .btn-phone { font-size: 10px; padding: 7px 7px; }

    .map-container { height: 300px; }

    .footer-brand p { max-width: 100%; }
}

@media (max-width: 380px) {
    .hero-title { font-size: 26px; }
    .card-contacts { gap: 4px; }
    .btn-tg, .btn-wa { width: 30px; height: 30px; }
}