/* PURPUR Agency - Оптимизированные глобальные стили */

/* ===== БАЗОВЫЕ СБРОС СТИЛЕЙ И ПРЕДОТВРАЩЕНИЕ ПЕРЕПОЛНЕНИЯ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a40 50%, #2d1b69 100%);
    min-height: 100vh;
    overflow-x: hidden;
    font-stretch: condensed;
    letter-spacing: 0.02em;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* ===== ПРЕДОТВРАЩЕНИЕ ПЕРЕПОЛНЕНИЯ ===== */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

pre, code, .whitespace-pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

div, section, main, article, aside, nav, header, footer {
    max-width: 100%;
    box-sizing: border-box;
}

button, .btn, .gradient-btn {
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
}

input, textarea, select {
    max-width: 100%;
    box-sizing: border-box;
}

/* ===== ТИПОГРАФИКА ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: "Allerta Stencil", 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-feature-settings: "kern" 1;
    text-rendering: optimizeLegibility;
    font-display: swap;
    line-height: 1.2;
}

p, span, div, a, button, input, textarea, li, td, th {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-stretch: condensed;
    letter-spacing: 0.02em;
}

/* ===== ЛОГОТИП ===== */
.logo-img {
    width: auto;
    height: 2rem;
    max-height: 2rem;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Allerta Stencil', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

/* ===== ФИКСИРОВАННАЯ ШАПКА ===== */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* ===== НАВИГАЦИЯ ===== */
.desktop-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.desktop-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.desktop-menu a:hover {
    color: #a855f7;
}

/* ===== ГАМБУРГЕР МЕНЮ ===== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    z-index: 1003;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== МОБИЛЬНОЕ МЕНЮ ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1001;
    transition: right 0.3s ease;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.mobile-menu.active {
    right: 0;
    display: flex;
}

.mobile-menu a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: #667eea;
}

.mobile-close {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 1004;
}

/* ===== ГЕРОЙ СЕКЦИЯ ===== */
.hero,
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.hero-video-container iframe,
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.7), rgba(139, 92, 246, 0.3));
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 0 1rem;
    width: 100%;
}

/* ===== ЗАГОЛОВКИ ГЕРОЯ ===== */
.hero-title,
.hero-content h1 {
    font-family: "Allerta Stencil", 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.text-shadow-strong {
    color: #ffffff;
    font-weight: 800;
    text-shadow: 
        2px 2px 0px rgba(0, 0, 0, 0.8),
        -1px -1px 0px rgba(0, 0, 0, 0.8),
        1px -1px 0px rgba(0, 0, 0, 0.8),
        -1px 1px 0px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(0, 0, 0, 0.6);
}

.gradient-text {
    background: linear-gradient(135deg, #ff00ff 0%, #667eea 50%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #ffffff;
    text-shadow: none;
    filter: drop-shadow(0px 1px 0px rgba(0, 0, 0, 0.3));
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #e2e8f0;
    line-height: 1.4;
}

/* ===== КНОПКИ ===== */
.gradient-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-height: 44px;
    min-width: 120px;
}

.gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* ===== ЗАГОЛОВКИ СЕКЦИЙ ===== */
section h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    font-weight: 400;
    text-shadow: 
        0 0 10px rgba(255, 0, 255, 0.4),
        0 0 20px rgba(255, 0, 255, 0.2);
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff00ff 0%, #667eea 100%);
    border-radius: 2px;
}

/* ===== КАРТОЧКИ ===== */
.service-card,
.portfolio-card,
.step-card,
.review-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
}

.service-card:hover,
.portfolio-card:hover,
.step-card:hover,
.review-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.service-card h3,
.portfolio-card h3,
.step-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 
        0 0 8px rgba(255, 0, 255, 0.4),
        0 0 16px rgba(255, 0, 255, 0.2);
}

/* ===== ИКОНКИ ===== */
.service-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: inline-block;
    transition: all 0.3s ease;
}

.service-icon:hover {
    transform: scale(1.1);
}

/* ===== НЕОНОВЫЕ ЭФФЕКТЫ ===== */
.neon-glow {
    text-shadow: 0 0 5px #8b5cf6, 0 0 10px #8b5cf6, 0 0 15px #8b5cf6;
}

.neon-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
    padding: 4px;
    box-shadow: 
        0 0 30px rgba(102, 126, 234, 0.6),
        0 0 60px rgba(102, 126, 234, 0.4);
    animation: neonPulse 3s ease-in-out infinite alternate;
}

.neon-frame iframe {
    border-radius: 16px;
    display: block;
    width: 100%;
    height: 400px;
}

@keyframes neonPulse {
    0% {
        box-shadow: 
            0 0 20px rgba(102, 126, 234, 0.6),
            0 0 40px rgba(102, 126, 234, 0.4);
    }
    100% {
        box-shadow: 
            0 0 30px rgba(102, 126, 234, 0.8),
            0 0 60px rgba(102, 126, 234, 0.6);
    }
}

/* ===== ФОРМЫ ===== */
.form-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px;
    width: 100%;
    color: white;
    margin-bottom: 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    max-width: 100%;
}

/* ===== ВИДЕО КОНТРОЛЛЫ ===== */
.video-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 10px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    transform: scale(1.1);
}

/* ===== АНИМАЦИИ ===== */
.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

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

/* ===== СПЕЦИАЛЬНЫЙ СТИЛЬ ДЛЯ ГЛАВНОГО ЗАГОЛОВКА INDEX.HTM ===== */
/*
 * Специальный стиль для заголовка на главной странице. Пользователь
 * попросила уменьшить размер до уровня h2. Поэтому здесь
 * используется более компактный clamp: минимальный размер 1.2rem,
 * максимальный 2.2rem. Мы также уменьшаем жирность и оставляем
 * мягкое неоновое свечение. Настройка !important помогает
 * переопределить более общие правила `.hero-content h1`.
 */
.index-hero-title {
    font-family: "Allerta Stencil", 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: clamp(1.2rem, 5vw, 2.2rem) !important;
    font-weight: 600;
    line-height: 1.1;
    /* отступ сверху помогает избежать перекрытия заголовка фиксированной шапкой */
    margin-top: 4rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    
    /* Градиентный текст */
    background: linear-gradient(135deg, #ff00ff 0%, #667eea 30%, #764ba2 60%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* Мягкое свечение без жёсткой обводки */
    filter:
        drop-shadow(0 0 4px rgba(0, 0, 0, 0.25))
        drop-shadow(0 0 16px rgba(255, 0, 255, 0.4))
        drop-shadow(0 0 24px rgba(102, 126, 234, 0.35));
    
    /* Анимация пульсации */
    animation: titlePulse 4s ease-in-out infinite alternate;
    
    /* Улучшенная читаемость */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Повышаем специфичность для `.hero-content .index-hero-title`.
   В некоторых медиа-запросах присутствует общий селектор `.hero-content h1`.
   Здесь мы дублируем размер с !important, чтобы он не был переопределён. */
.hero-content .index-hero-title {
    font-size: clamp(1.2rem, 5vw, 2.2rem) !important;
}

/* ===== ИНДИКАТОР ПРОКРУТКИ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ ===== */
/*
 * Стрелка, расположенная в нижней части геро-секции, подсказывает
 * пользователям, что страницу можно скроллить вниз. Иконка
 * полупрозрачная, поэтому не отвлекает от основного контента,
 * и имеет анимацию «подпрыгивания», чтобы привлечь внимание.
 */
.scroll-down-arrow {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    /* делаем стрелку полупрозрачной, но достаточно заметной */
    opacity: 0.6;
    z-index: 100;
    cursor: pointer;
    animation: arrowBounce 2s infinite;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Настройки иконки стрелки */
.scroll-down-arrow i {
    /* Базовый размер; адаптируется в медиазапросах */
    font-size: 3rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.5),
        0 0 16px rgba(255, 255, 255, 0.4) !important;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)) !important;
    transition: transform 0.3s ease;
}

/* Hover effects for the arrow container and icon */
.scroll-down-arrow:hover {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.scroll-down-arrow:hover i {
    transform: scale(1.1);
}

/* Responsive adjustments for the scroll-down arrow */
@media screen and (max-width: 768px) {
    .scroll-down-arrow {
        bottom: 1.5rem;
    }
    .scroll-down-arrow i {
        font-size: 2rem !important;
    }
}
@media screen and (max-width: 480px) {
    .scroll-down-arrow {
        bottom: 1rem;
    }
    .scroll-down-arrow i {
        font-size: 1.5rem !important;
    }
}
@media screen and (max-width: 375px) {
    .scroll-down-arrow i {
        font-size: 1.4rem !important;
    }
}

@keyframes arrowBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===== СПЕЦИАЛЬНЫЙ СТИЛЬ ДЛЯ ЗАГОЛОВКА НА СТРАНИЦЕ KOMMUNER ===== */
/*
 * На странице kommuner использован класс .hero-title в сочетании с
 * .gradient-text. По умолчанию общий стиль .hero-title задаёт лишь базовый
 * размер и отступы. Этот блок переопределяет некоторые параметры,
 * обеспечивая одинаковый внешний вид с заголовком на главной странице,
 * но делает его немного меньше и более аккуратным. Мы также добавляем
 * мягкое свечение и анимацию пульсации.
 */
.hero-title {
    /* базовый размер и жирное начертание */
    /* максимальный размер 3rem для заголовка kommuner, чтобы он был компактнее */
    font-size: clamp(2.5rem, 6vw, 3rem);
    font-weight: 700;
    line-height: 1.0;
    margin-top: 4rem;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 0.08em;
    /* мягкое свечение для текста */
    filter:
        drop-shadow(0 0 10px rgba(0, 0, 0, 0.3))
        drop-shadow(0 0 20px rgba(255, 0, 255, 0.5))
        drop-shadow(0 0 30px rgba(102, 126, 234, 0.4));
    /* та же анимация пульсации, что и на главной странице */
    animation: titlePulse 4s ease-in-out infinite alternate;
    /* улучшенная читаемость */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Анимация пульсации для заголовка */
@keyframes titlePulse {
    0% {
        /* Начальное состояние пульсации: ещё мягче и без чёткой обводки */
        filter:
            drop-shadow(0 0 5px rgba(0, 0, 0, 0.3))
            drop-shadow(0 0 20px rgba(255, 0, 255, 0.5))
            drop-shadow(0 0 30px rgba(102, 126, 234, 0.4));
    }
    100% {
        /* Завершающая фаза пульсации: усиливаем цветовые свечения, но
           сохраняем мягкость контура */
        filter:
            drop-shadow(0 0 10px rgba(0, 0, 0, 0.35))
            drop-shadow(0 0 30px rgba(255, 0, 255, 0.7))
            drop-shadow(0 0 45px rgba(102, 126, 234, 0.5));
    }
}

/* Адаптивность для нового стиля */
@media screen and (max-width: 768px) {
    .index-hero-title {
        /* Планшетный размер: максимальный 1.6rem и минимальный 1rem. */
        font-size: clamp(1rem, 7vw, 1.6rem) !important;
        letter-spacing: 0.06em;
        margin-top: 3rem;
        margin-bottom: 1.5rem;
    }

    /* Повышенная специфичность для переопределения .hero-content h1 */
    .hero-content .index-hero-title {
        font-size: clamp(1rem, 7vw, 1.6rem) !important;
    }

    /* Адаптивность заголовка на странице kommuner */
    .hero-title {
        /* ограничиваем максимальный размер до 2.5rem
           и добавляем дополнительный отступ сверху для планшетов */
        font-size: clamp(2rem, 8vw, 2.5rem);
        margin-top: 3rem;
        margin-bottom: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .index-hero-title {
        /* На очень узких экранах заголовок ещё меньше: максимум 1.4rem, минимум 0.9rem. */
        font-size: clamp(0.9rem, 8vw, 1.4rem) !important;
        letter-spacing: 0.04em;
        line-height: 1.1;
        margin-top: 2.5rem;
    }

    /* Повышенная специфичность для мобильных устройств */
    .hero-content .index-hero-title {
        font-size: clamp(0.9rem, 8vw, 1.4rem) !important;
    }

    /* Адаптивность заголовка на странице kommuner для очень узких экранов */
    .hero-title {
        font-size: clamp(1.6rem, 9vw, 2rem);
        margin-top: 2.5rem;
        margin-bottom: 1rem;
    }
}

/* ===== АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ ===== */
@media screen and (max-width: 1024px) {
    .hero-content h1 {
        font-size: clamp(2.5rem, 6vw, 3.5rem);
    }
    
    .neon-frame iframe {
        height: 350px;
    }
}

/* ===== ДВИЖУЩИЙСЯ НЕОНОВЫЙ ГРАДИЕНТ ДЛЯ ЗАГОЛОВКА НА ГЛАВНОЙ СТРАНИЦЕ ===== */
/*
 * Класс .hero-gradient добавляется к блоку hero-content на главной
 * странице. Этот псевдоэлемент ::before создаёт лёгкий, едва заметный
 * неоновый фон, который медленно движется. Градиент мягкий и
 * размыт, поэтому он не конкурирует с текстом, а лишь добавляет
 * динамику. Используем pointer-events: none, чтобы он не мешал
 * взаимодействию с контентом.
 */
.hero-gradient {
    position: relative;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160%;
    height: 160%;
    background: linear-gradient(130deg,
        rgba(255, 0, 255, 0.35) 0%,
        rgba(118, 75, 162, 0.35) 40%,
        rgba(102, 126, 234, 0.35) 80%);
    background-size: 400% 400%;
    /* Позволяем управлять положением градиента через CSS-переменные
       --posX и --posY. По умолчанию центр (50% 50%). */
    background-position: var(--posX, 50%) var(--posY, 50%);
    /* Делаем свечение ещё более лёгким и едва заметным */
    opacity: 0.15;
    filter: blur(120px);
    z-index: -1;
    animation: movingNeonGradient 40s ease-in-out infinite;
    pointer-events: none;
}

@keyframes movingNeonGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ===== */
@media screen and (max-width: 768px) {
    /* Скрыть десктопное меню, показать гамбургер */
    .desktop-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Фиксированная шапка */
    .fixed-header {
        min-height: 70px;
        padding-top: env(safe-area-inset-top);
    }
    
    .fixed-header .container {
        padding: 12px 16px;
        max-width: 100vw;
    }
    
    /* Герой секция */
    .hero,
    .hero-section {
        min-height: 100vh;
        padding-top: 80px;
    }
    
    .hero-content {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        line-height: 1.1;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    /* Мобильное меню */
    .mobile-menu {
        padding-top: calc(70px + env(safe-area-inset-top));
    }
    
    /* Заголовки секций */
    section h2 {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        margin-bottom: 2rem;
    }
    
    /* Карточки */
    .service-card,
    .portfolio-card,
    .step-card,
    .review-card {
        margin-bottom: 2rem;
        padding: 1.5rem;
    }
    
    .service-card h3,
    .portfolio-card h3,
    .step-card h3 {
        font-size: 1.3rem;
    }
    
    /* Видео */
    .neon-frame iframe {
        height: 250px;
    }
    
    .video-controls {
        top: 10px;
        right: 10px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    /* Видео контейнер для мобильных */
    .hero-video-container iframe {
        width: 100vw;
        height: 177.78vw;
        min-height: 100vh;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* ===== МАЛЫЕ МОБИЛЬНЫЕ УСТРОЙСТВА ===== */
@media screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: clamp(1.6rem, 7vw, 2.5rem);
        padding: 0 0.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .gradient-btn,
    .btn {
        max-width: calc(100vw - 32px);
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .service-card,
    .portfolio-card,
    .step-card,
    .review-card {
        padding: 1rem;
    }
    
    .neon-frame iframe {
        height: 200px;
    }
}

/* ===== ОЧЕНЬ МАЛЫЕ ЭКРАНЫ (iPhone SE) ===== */
@media screen and (max-width: 375px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .hero-content h1 {
        font-size: clamp(1.4rem, 8vw, 2rem);
    }

    /* Адаптивность заголовка на странице kommuner для iPhone SE и подобных */
    .hero-title {
        font-size: clamp(1.4rem, 8vw, 1.6rem);
        margin-top: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .fixed-header img {
        height: 24px;
    }
    
    .gradient-btn,
    .btn {
        max-width: calc(100vw - 24px);
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* ===== ОПТИМИЗАЦИИ ДЛЯ iOS ===== */
@supports (-webkit-touch-callout: none) {
    body, p, span, div, a, button, input, textarea, li, td, th {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    h1, h2, h3, h4, h5, h6 {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    button, .gradient-btn, .hamburger {
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.3);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    button:active, .gradient-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* ===== АППАРАТНОЕ УСКОРЕНИЕ ===== */
.fixed-header,
.mobile-menu,
.hero-video,
.gradient-btn {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ===== ВЫСОКИЕ ЭКРАНЫ ===== */
@media screen and (min-height: 900px) {
    .hero,
    .hero-section {
        height: 80vh;
        min-height: 80vh;
    }
}

/* ===== СПЕЦИАЛЬНЫЕ КЛАССЫ ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.flex { display: flex; }
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.flex-col { flex-direction: column; }

/* ===== ПЕЧАТЬ ===== */
@media print {
    .fixed-header,
    .mobile-menu,
    .hamburger,
    .video-controls {
        display: none;
    }
    
    .hero-video-container {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ===== ИНТЕРАКТИВНАЯ НЕОНОВАЯ АНИМАЦИЯ ФОНА ===== */
/*
 * Интерактивный градиентный фон за заголовком на странице kommuner.htm.
 * Реагирует на движение мыши/пальца, создавая плавные неоновые переливы.
 * Градиент едва заметный, чтобы не отвлекать от основного контента.
 */
.interactive-gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.3;
    
    /* Базовый градиент с неоновыми цветами */
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 0, 255, 0.15) 0%,
        rgba(102, 126, 234, 0.1) 25%,
        rgba(118, 75, 162, 0.08) 50%,
        rgba(0, 0, 0, 0) 70%
    );
    
    /* Плавная анимация перехода */
    transition: all 0.3s ease-out;
    
    /* Дополнительные слои для более богатого эффекта */
    background-image: 
        radial-gradient(
            400px circle at var(--mouse-x, 30%) var(--mouse-y, 70%),
            rgba(102, 126, 234, 0.1) 0%,
            rgba(255, 0, 255, 0.05) 40%,
            transparent 70%
        ),
        radial-gradient(
            800px circle at var(--mouse-x, 70%) var(--mouse-y, 30%),
            rgba(118, 75, 162, 0.08) 0%,
            rgba(255, 0, 255, 0.03) 50%,
            transparent 80%
        );
    
    /* Базовая анимация для движения градиента */
    animation: gradientShift 8s ease-in-out infinite alternate;
}

/* Анимация плавного движения градиента */
@keyframes gradientShift {
    0% {
        background-position: 0% 0%, 100% 100%, 50% 50%;
    }
    50% {
        background-position: 100% 50%, 0% 50%, 25% 75%;
    }
    100% {
        background-position: 50% 100%, 50% 0%, 75% 25%;
    }
}

/* Усиление эффекта при hover (для десктопа) */
.hero-section:hover .interactive-gradient-bg {
    opacity: 0.4;
    transition: all 0.5s ease-out;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .interactive-gradient-bg {
        opacity: 0.25;
        
        /* Более мягкие градиенты для мобильных */
        background: radial-gradient(
            400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 0, 255, 0.1) 0%,
            rgba(102, 126, 234, 0.06) 30%,
            rgba(118, 75, 162, 0.04) 60%,
            transparent 80%
        );
    }
}

@media (max-width: 480px) {
    .interactive-gradient-bg {
        opacity: 0.2;
        
        /* Ещё более деликатные эффекты для маленьких экранов */
        background: radial-gradient(
            300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 0, 255, 0.08) 0%,
            rgba(102, 126, 234, 0.04) 40%,
            transparent 70%
        );
    }
}

/* ===== НЕОНОВЫЕ АНИМИРОВАННЫЕ НОМЕРА ШАГОВ ===== */
/*
 * Стильные неоновые кружочки с номерами шагов для секции процесса
 * на странице kommuner.htm. Включают пульсирующее свечение и
 * анимацию появления при скролле.
 */
.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    position: relative;
    flex-shrink: 0;
    
    /* Базовый градиентный фон */
    background: linear-gradient(135deg, #ff00ff 0%, #667eea 50%, #764ba2 100%);
    
    /* Неоновое свечение */
    box-shadow: 
        0 0 20px rgba(255, 0, 255, 0.6),
        0 0 40px rgba(255, 0, 255, 0.4),
        0 0 60px rgba(102, 126, 234, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    
    /* Анимация пульсации */
    animation: neonPulse 3s ease-in-out infinite alternate;
    
    /* Плавные переходы */
    transition: all 0.3s ease;
    
    /* Улучшение читабельности текста */
    text-shadow: 
        0 0 10px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(255, 0, 255, 0.5);
}

/* Анимация неонового пульсирования */
@keyframes neonPulse {
    0% {
        box-shadow: 
            0 0 20px rgba(255, 0, 255, 0.6),
            0 0 40px rgba(255, 0, 255, 0.4),
            0 0 60px rgba(102, 126, 234, 0.3),
            inset 0 0 20px rgba(255, 255, 255, 0.1);
        transform: scale(1);
    }
    100% {
        box-shadow: 
            0 0 30px rgba(255, 0, 255, 0.8),
            0 0 60px rgba(255, 0, 255, 0.6),
            0 0 90px rgba(102, 126, 234, 0.4),
            inset 0 0 30px rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
    }
}

/* Hover эффект для step-number */
.step-number:hover {
    transform: scale(1.1);
    box-shadow: 
        0 0 40px rgba(255, 0, 255, 0.9),
        0 0 80px rgba(255, 0, 255, 0.7),
        0 0 120px rgba(102, 126, 234, 0.5),
        inset 0 0 40px rgba(255, 255, 255, 0.3);
    animation-duration: 1.5s;
}

/* Анимация появления при скролле */
.step-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.step-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Задержки анимации для разных шагов */
.step-card[data-step="1"] {
    transition-delay: 0.1s;
}

.step-card[data-step="2"] {
    transition-delay: 0.2s;
}

.step-card[data-step="3"] {
    transition-delay: 0.3s;
}

.step-card[data-step="4"] {
    transition-delay: 0.4s;
}

.step-card[data-step="5"] {
    transition-delay: 0.5s;
}

/* Дополнительные эффекты для step-card */
.step-card {
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.step-card:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 0, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        
        /* Более мягкое свечение на мобильных */
        box-shadow: 
            0 0 15px rgba(255, 0, 255, 0.5),
            0 0 30px rgba(255, 0, 255, 0.3),
            0 0 45px rgba(102, 126, 234, 0.2),
            inset 0 0 15px rgba(255, 255, 255, 0.1);
    }
    
    .step-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        
        /* Ещё более деликатное свечение для маленьких экранов */
        box-shadow: 
            0 0 10px rgba(255, 0, 255, 0.4),
            0 0 20px rgba(255, 0, 255, 0.2),
            0 0 30px rgba(102, 126, 234, 0.15),
            inset 0 0 10px rgba(255, 255, 255, 0.1);
    }
    
    .step-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}