/* Main CSS file for Call Center Landing */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* Performance optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* CSS Variables - Фирменная цветовая палитра */
:root {
    /* Основные цвета */
    --primary-color: #00D9FF;
    --primary-hover: #00B8D9;
    --primary-light: #e8f9f1;
    --secondary-color: #202a34;
    --text-color: #8c90a9;
    --white: #fff;
    --light-gray: #f8f9fa;
    --border-color: #eaeaea;

    /* Тени */
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-primary: rgba(0, 217, 255, 0.15);
    --shadow-primary-hover: rgba(0, 217, 255, 0.25);

    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #00D9FF, #00B8D9);
    --gradient-secondary: linear-gradient(135deg, #202a34, #2a3441);

    /* Переходы */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

/* Video optimization */
video {
    transform: translateZ(0);
    /* GPU acceleration */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--gradient-secondary);
    color: var(--white);
    overflow-x: hidden;
}

.font-display {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* Gradient text effect */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced button styles */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    /* GPU acceleration */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    outline: none;
    will-change: transform;
}

.btn-enhanced:focus,
.btn-enhanced:active {
    outline: none;
    box-shadow: none;
}

.btn-enhanced:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 20px 40px var(--shadow-primary-hover);
}

.btn-enhanced:active {
    transform: translateY(-1px);
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease-in-out;
}

.btn-enhanced:hover::before {
    left: 100%;
}

/* Card hover effects */
.card-hover {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    transform: translateZ(0);
    /* GPU acceleration */
}

.card-hover:hover {
    transform: translate3d(0, -8px, 0);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Background patterns */
.parallax-bg {
    background: var(--gradient-secondary);
}

.hero-bg {
    background: var(--gradient-secondary);
    position: relative;
    overflow: hidden;
}

/* Glass morphism effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
.animate-float {
    animation: float 6s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
    /* GPU acceleration */
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    will-change: transform, opacity;
    transform: translateZ(0);
    /* GPU acceleration */
}

/* Scroll reveal animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation styles */
.nav-glass {
    background: rgba(15, 27, 36, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease-in-out;
}

/* Mobile header hide on scroll */
.nav-glass.hidden-mobile {
    transform: translateY(-100%);
}

/* Desktop header hide on scroll */
.nav-glass.hidden-desktop {
    transform: translateY(-100%);
}

/* Ensure mobile header is hidden on desktop */
@media (min-width: 768px) {
    .md\:hidden {
        display: none !important;
    }
}

/* Hero section styles */
.hero-bg {
    background: linear-gradient(135deg, #0f1b24 0%, #1a2a3a 50%, #0f1b24 100%);
    position: relative;
    overflow: hidden;
    padding-top: 4rem;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 20%, rgba(0, 217, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 217, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Section backgrounds */
.section-bg-light {
    background: rgba(32, 42, 52, 0.5);
}

.section-bg-dark {
    background: rgba(0, 217, 255, 0.05);
}

/* Button variants */
.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    border: none;
    transition: all var(--transition-normal);
    outline: none;
    box-sizing: border-box;
}

.btn-primary:focus,
.btn-primary:active {
    outline: none;
    box-shadow: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--shadow-primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    transition: all var(--transition-normal);
    outline: none;
    box-sizing: border-box;
}

.btn-secondary:focus,
.btn-secondary:active {
    outline: none;
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Hero buttons - одинаковый размер на десктопе */
#hero .btn-enhanced.btn-primary,
#hero .btn-enhanced.btn-secondary {
    box-sizing: border-box;
}

#hero .btn-enhanced.btn-secondary {
    padding: calc(1rem - 2px) calc(2rem - 2px);
}

#hero .btn-enhanced.btn-primary {
    padding: 1rem 2rem;
}

/* Card styles */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-4px);
}

/* Mobile Menu Styles */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

.mobile-menu.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Burger icon animation */
#mobileMenuBtn {
    transition: all 0.3s ease;
    position: relative;
    width: 24px;
    height: 24px;
}

#mobileMenuBtn i {
    transition: all 0.3s ease;
}

/* Burger to X animation */
#mobileMenuBtn.burger-open i:before {
    content: "\f00d";
    /* FontAwesome X icon */
}

#mobileMenuBtn.burger-open i {
    transform: rotate(180deg);
}

/* Background Elements Z-Index */
.particle-container {
    z-index: 1;
    contain: layout style paint;
    will-change: contents;
}

.absolute.inset-0.pointer-events-none {
    z-index: 1;
}

/* Enhanced Interactive Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 40px rgba(0, 217, 255, 0.6);
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Interactive Elements */
.floating-element {
    animation: float 6s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
    /* GPU acceleration */
}

.glow-element {
    animation: glow 3s ease-in-out infinite;
    will-change: transform, box-shadow;
    transform: translateZ(0);
    /* GPU acceleration */
}

.animate-pulse-glow {
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes button-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.animate-button-shimmer {
    background: linear-gradient(90deg, #00D9FF, #00B8D9, #00D9FF);
    background-size: 200% 100%;
    animation: button-shimmer 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.animate-button-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer-sweep 2s ease-in-out infinite;
}

@keyframes shimmer-sweep {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.animate-button-shimmer-pulse {
    background: linear-gradient(90deg, #00D9FF, #00B8D9, #00D9FF);
    background-size: 200% 100%;
    animation: button-shimmer 3s ease-in-out infinite, pulse-glow 4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.animate-button-shimmer-pulse::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer-sweep 2s ease-in-out infinite;
}

.shimmer-effect {
    position: relative;
    overflow: hidden;
}

.shimmer-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.rotate-slow {
    animation: rotate-slow 20s linear infinite;
}

.pulse-glow {
    animation: pulse-glow 4s ease-in-out infinite;
}

/* Enhanced Card Hover Effects */
.enhanced-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.enhanced-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.1), transparent);
    transition: left 0.6s;
}

.enhanced-card:hover::before {
    left: 100%;
}

.enhanced-card:hover {
    transform: translateY(-8px) scale(1.02) translateZ(0);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.2);
}

/* Interactive Background Particles */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
    z-index: 1;
    will-change: transform;
    transform: translateZ(0);
    /* GPU acceleration */
    contain: layout style paint;
}

.particle:nth-child(odd) {
    animation-direction: reverse;
    animation-duration: 10s;
}

.particle:nth-child(3n) {
    animation-duration: 12s;
    animation-delay: -2s;
}

/* Utility classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.border-gradient-primary {
    border: 2px solid transparent;
    background: var(--gradient-secondary) padding-box,
        var(--gradient-primary) border-box;
}

/* Hero title improvements */
.hero-title {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
    margin-top: 2rem;
}

.hero-title .gradient-text {
    text-shadow: 0 4px 8px rgba(0, 217, 255, 0.3);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-weight: 700;
    font-size: 22px;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 4px rgba(0, 217, 255, 0.5));
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 217, 255, 0.4);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
}

.back-to-top:active {
    transform: translateY(0);
}

/* Stats in CTA card */
.cta-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cta-card-stats .stat-item {
    text-align: center;
}

.cta-card-stats .stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-card-stats .stat-label {
    font-size: 0.75rem;
    color: var(--text-color);
}

/* Soon label for social icons */
.social-icon {
    position: relative;
}

.soon-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.social-icon:hover .soon-label {
    opacity: 1;
    visibility: visible;
}

/* Popup styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-overlay.show {
    display: flex;
}

.popup-content {
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
    padding: 0;
    max-width: 550px;
    width: 95%;
    max-height: 95vh;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 217, 255, 0.1);
    backdrop-filter: blur(20px);
    transition: max-height 0.3s ease;
}

/* Когда форма открыта - popup становится выше */
.popup-content.form-open {
    max-height: 98vh;
    max-width: 600px;
}

.popup-content iframe {
    width: 100%;
    min-height: 550px;
    height: 65vh;
    border: none;
    display: block;
    background: transparent;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 32px;
    font-weight: bold;
    color: #00D9FF;
    cursor: pointer;
    transition: transform 0.2s ease, text-shadow 0.3s ease;
    z-index: 10002;
    pointer-events: auto;
}

.popup-close:hover {
    transform: scale(1.1);
    text-shadow: 0 0 8px rgba(0, 217, 255, 0.5);
}

/* Popup Menu Styles */
.popup-menu {
    padding: 40px 32px;
    display: block;
}

.popup-menu-content {
    text-align: center;
}

.popup-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #00D9FF 0%, #00B8D9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-subtitle {
    font-size: 16px;
    color: #8c90a9;
    margin-bottom: 32px;
    font-weight: 400;
}

.messengers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.messenger-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    min-height: 140px;
}

.messenger-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.messenger-whatsapp::before {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.2) 0%, rgba(18, 140, 126, 0.2) 100%);
}

.messenger-telegram::before {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.2) 0%, rgba(0, 102, 170, 0.2) 100%);
}

.messenger-max::before {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(247, 147, 30, 0.2) 100%);
}

.messenger-card:hover::before {
    opacity: 1;
}

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

.messenger-icon {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 48px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    color: #ffffff;
}

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

.messenger-whatsapp .messenger-icon {
    color: #25D366;
}

.messenger-telegram .messenger-icon {
    color: #0088cc;
}

.messenger-max .messenger-icon {
    color: #FF6B35;
}

.messenger-svg-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: brightness(1.2);
}

.messenger-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.popup-menu,
.popup-form {
    animation: fadeIn 0.3s ease-in-out;
}

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

.popup-form {
    padding: 0;
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    z-index: 1;
}

.popup-content {
    position: relative;
    z-index: 1;
}

.popup-back-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 217, 255, 0.3);
    color: #00D9FF;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    pointer-events: auto;
}

.popup-back-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: rgba(0, 217, 255, 0.6);
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

.popup-form iframe {
    width: 100%;
    min-height: 550px;
    height: 75vh;
    border: none;
    display: block;
    background: #ffffff;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

/* Когда форма открыта - iframe занимает больше места */
.popup-form[style*="display: block"] iframe,
#bitrixForm[style*="display: block"] iframe {
    height: 85vh;
    min-height: 600px;
}

/* Remove focus/active borders from all buttons */
button:focus,
button:active,
.btn-enhanced:focus,
.btn-enhanced:active,
.btn-primary:focus,
.btn-primary:active,
.btn-secondary:focus,
.btn-secondary:active,
.back-to-top:focus,
.back-to-top:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* ===========================================
   RESPONSIVE DESIGN - ОПТИМИЗИРОВАННАЯ СТРУКТУРА
   =========================================== */

/* Desktop Enhancements - от 768px и выше */
@media (min-width: 768px) {
    .popup-content {
        max-width: 550px;
        width: 95%;
        max-height: 95vh;
        overflow-y: auto;
    }

    .popup-content iframe {
        min-height: 800px;
        height: 80vh;
    }
    
    .popup-menu {
        padding: 48px 40px;
    }
    
    .messengers-grid {
        gap: 20px;
    }
    
    .messenger-card {
        padding: 32px 20px;
    }
}

/* Mobile optimizations - до 640px */
@media (max-width: 640px) {
    .popup-content {
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
        align-self: flex-end;
    }
    
    /* Когда форма открыта на мобильных - popup становится выше и по центру */
    .popup-content.form-open {
        max-height: 98vh;
        border-radius: 20px;
        margin-top: 0;
        align-self: center;
    }
    
    .popup-close {
        top: 10px;
        right: 12px;
        font-size: 28px;
    }
    
    .popup-menu {
        padding: 28px 20px;
    }
    
    .popup-title {
        font-size: 22px;
        margin-bottom: 6px;
    }
    
    .popup-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }
    
    .popup-menu-content .btn-enhanced {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .messengers-grid {
        gap: 10px;
        margin-top: 20px;
    }
    
    .messenger-card {
        padding: 20px 12px;
        min-height: 110px;
        border-radius: 16px;
    }
    
    .messenger-icon {
        height: 56px;
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .messenger-svg-icon {
        width: 44px;
        height: 44px;
    }
    
    .messenger-name {
        font-size: 11px;
        font-weight: 500;
    }
    
    .popup-form {
        border-radius: 20px;
    }
    
    .popup-back-btn {
        top: 10px;
        left: 10px;
        padding: 8px 14px;
        font-size: 13px;
        z-index: 10002;
        pointer-events: auto;
    }
    
    .popup-close {
        z-index: 10002;
        pointer-events: auto;
        font-size: 28px;
    }
    
    .popup-content iframe {
        min-height: 600px;
        height: 80vh;
        border-radius: 20px;
    }
    
    /* Когда форма открыта - iframe занимает больше места на мобильных */
    .popup-form[style*="display: block"] iframe,
    #bitrixForm[style*="display: block"] iframe {
        height: 90vh;
        min-height: 650px;
    }
}

/* Small mobile - до 480px */
@media (max-width: 480px) {
    .popup-content {
        border-radius: 16px 16px 0 0;
        margin-top: auto;
        align-self: flex-end;
    }
    
    /* Когда форма открыта на маленьких мобильных - popup по центру */
    .popup-content.form-open {
        border-radius: 20px;
        margin-top: 0;
        align-self: center;
    }
    
    /* Когда форма открыта на маленьких мобильных - popup становится выше */
    .popup-content.form-open {
        max-height: 98vh;
    }
    
    .popup-menu {
        padding: 24px 16px;
    }
    
    .popup-title {
        font-size: 20px;
        line-height: 1.2;
    }
    
    .popup-subtitle {
        font-size: 12px;
        margin-bottom: 20px;
        line-height: 1.4;
    }
    
    .popup-menu-content .btn-enhanced {
        padding: 12px 16px;
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .popup-menu-content .btn-enhanced i {
        font-size: 14px;
        margin-right: 6px;
    }
    
    .popup-menu-content .btn-enhanced {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .messengers-grid {
        gap: 8px;
        margin-top: 16px;
    }
    
    .messenger-card {
        padding: 16px 10px;
        min-height: 100px;
        border-radius: 14px;
    }
    
    .messenger-icon {
        height: 48px;
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .messenger-svg-icon {
        width: 40px;
        height: 40px;
    }
    
    .messenger-name {
        font-size: 10px;
    }
    
    .popup-back-btn {
        top: 8px;
        left: 8px;
        padding: 6px 12px;
        font-size: 12px;
        z-index: 10002;
        pointer-events: auto;
    }
    
    .popup-back-btn i {
        font-size: 10px;
    }
    
    .popup-close {
        z-index: 10002;
        pointer-events: auto;
        top: 10px;
        right: 12px;
        font-size: 28px;
    }
    
    .popup-content iframe {
        min-height: 550px;
        height: 75vh;
        border-radius: 20px;
    }
    
    /* Когда форма открыта - iframe занимает больше места на маленьких мобильных */
    .popup-form[style*="display: block"] iframe,
    #bitrixForm[style*="display: block"] iframe {
        height: 88vh;
        min-height: 600px;
    }
}

/* Footer Legal Information - Mobile Adaptations */
@media (max-width: 640px) {
    .legal-info {
        margin-top: 24px !important;
        padding-top: 20px !important;
    }
    
    .legal-info-content {
        font-size: 9px !important;
        line-height: 1.5 !important;
        gap: 12px !important;
    }
    
    .legal-info-content span {
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .legal-info {
        margin-top: 20px !important;
        padding-top: 16px !important;
    }
    
    .legal-info-content {
        font-size: 8px !important;
        line-height: 1.6 !important;
        gap: 10px !important;
    }
    
    .legal-info-content .fa-map-marker-alt {
        font-size: 9px !important;
        margin-top: 2px;
    }
    
    .legal-info-content span[itemprop="address"] {
        display: block;
        margin-top: 8px;
        line-height: 1.5;
    }
    
    .legal-info-content > div:first-child {
        margin-bottom: 8px;
    }
}

/* Скрытие виджета Bitrix24 на мобильных при открытом popup */
@media (max-width: 768px) {
    /* Меню контактов видно по умолчанию */
    .popup-menu,
    #contactMenu {
        display: block !important;
    }
    
    /* Форма должна быть скрыта по умолчанию на мобильных */
    .popup-form,
    #bitrixForm {
        display: none !important;
    }
    
    /* Показываем форму только когда она явно показана через JavaScript */
    .popup-form[style*="display: block"],
    #bitrixForm[style*="display: block"] {
        display: block !important;
    }
    
    /* Скрываем меню когда форма показана */
    #contactMenu[style*="display: none"] {
        display: none !important;
    }
    
    /* Скрываем только виджет-кнопку Bitrix24 (плавающую кнопку), но НЕ форму внутри popup */
    body.popup-open-mobile .b24-widget-button,
    body.popup-open-mobile .b24-widget-button-wrapper,
    body.popup-open-mobile [class*="b24-widget"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        z-index: -1 !important;
    }
    
    /* Явно показываем форму внутри popup только когда она открыта через кнопку */
    body.popup-open-mobile .popup-overlay.show .popup-form[style*="display: block"],
    body.popup-open-mobile .popup-overlay.show #bitrixForm[style*="display: block"] {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 1 !important;
    }
    
    body.popup-open-mobile .popup-overlay.show .popup-form[style*="display: block"] iframe,
    body.popup-open-mobile .popup-overlay.show #bitrixForm[style*="display: block"] iframe {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 1 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 550px !important;
    }
}

/* Large Desktop - от 1024px и выше */
@media (min-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-title .gradient-text {
        font-size: 3rem;
    }
}

/* ===========================================
   MOBILE STYLES - Каскадная оптимизация
   =========================================== */

/* Tablet/Mobile - до 768px */
@media (max-width: 768px) {

    /* Navigation */
    .nav-glass .flex.items-center.space-x-2 img {
        height: 2rem;
    }

    .nav-glass .text-sm {
        font-size: 0.875rem;
    }

    .nav-glass .text-xs {
        font-size: 0.75rem;
    }

    .nav-glass .hidden.md\:block {
        display: none !important;
    }

    /* Mobile header is already visible by default */

    /* Ensure mobile header takes full width */
    .nav-glass .md\:hidden.w-full {
        width: 100% !important;
    }

    /* Ensure mobile header flex container takes full width */
    .nav-glass .md\:hidden .flex.items-center.justify-between {
        width: 100% !important;
    }

    /* Ensure mobile menu takes full width */
    .mobile-menu {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* Mobile menu button */
    #mobileMenuBtn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 2rem !important;
        width: 2rem !important;
        padding: 0.25rem !important;
    }

    #mobileMenuBtn i {
        font-size: 1rem !important;
    }

    /* Hero Section */
    .hero-bg {
        padding: 1.5rem 0 2rem 0;
        min-height: 100vh;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
        margin-top: 0.5rem;
    }

    .hero-title .text-white {
        font-size: 2rem !important;
        line-height: 1.3;
    }

    .hero-title .gradient-text {
        font-size: 2rem !important;
    }

    .hero-title .text-2xl {
        font-size: 2rem !important;
    }

    /* Buttons */
    .btn-enhanced {
        font-size: 1.25rem !important;
        padding: 0.75rem 1.25rem;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
    }

    .btn-enhanced.btn-primary,
    .btn-enhanced.btn-secondary {
        white-space: nowrap !important;
        width: 100% !important;
        text-align: center !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.75rem !important;
    }

    .btn-enhanced.btn-primary.flex-1,
    .btn-enhanced.btn-secondary.flex-1 {
        flex: 1 !important;
    }

    /* Hero buttons - одинаковый размер на мобильных */
    #hero .btn-enhanced.btn-primary,
    #hero .btn-enhanced.btn-secondary,
    #hero .btn-enhanced,
    #hero .btn-enhanced.px-8,
    #hero .btn-enhanced.py-4,
    #hero .btn-enhanced.text-lg,
    #hero a.btn-enhanced,
    #hero button.btn-enhanced {
        padding: 0.875rem 1.5rem !important;
        font-size: 0.875rem !important;
        width: 100% !important;
        height: 51px !important;
        min-height: 51px !important;
        max-height: 51px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: normal !important;
        line-height: 1.4 !important;
        box-sizing: border-box !important;
    }

    /* Возвращаем border у btn-secondary, но компенсируем через padding для одинаковой высоты */
    #hero .btn-enhanced.btn-secondary {
        border: 2px solid var(--primary-color) !important;
        padding: calc(0.875rem - 2px) 1.5rem !important;
    }

    /* У btn-primary нет border, поэтому padding остается как есть */
    #hero .btn-enhanced.btn-primary {
        border: none !important;
        padding: 0.875rem 1.5rem !important;
    }

    /* About section buttons - одинаковый размер на мобильных */
    #about .btn-enhanced.btn-primary,
    #about .btn-enhanced.btn-secondary,
    #about .btn-enhanced {
        box-sizing: border-box !important;
        min-height: 48px !important;
        height: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #about .btn-enhanced.btn-secondary {
        border: 2px solid var(--primary-color) !important;
        padding: calc(0.75rem - 2px) calc(1.5rem - 2px) !important;
    }

    #about .btn-enhanced.btn-primary {
        border: none !important;
        padding: 0.75rem 1.5rem !important;
    }

    /* Убираем дефолтные стили браузера для ссылок и кнопок */
    #hero a.btn-enhanced {
        text-decoration: none !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    #hero button.btn-enhanced {
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    .btn-enhanced.btn-primary.w-full,
    .btn-enhanced.btn-secondary.w-full {
        width: 100% !important;
    }

    /* Cards */
    .card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }

    .glass-effect {
        padding: 1.25rem;
    }

    .enhanced-card h3.text-2xl {
        font-size: 1.125rem !important;
        /* 18px */
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }

    .enhanced-card p.text-lg {
        font-size: 0.875rem !important;
        /* 14px */
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .enhanced-card .text-white.font-medium:not(.grid .text-white) {
        font-size: 0.875rem !important;
        /* 14px */
        text-wrap: pretty;
        line-height: 1.5;
    }

    /* Force services list text to 12px on mobile */
    .enhanced-card .text-white.font-medium {
        font-size: 0.75rem !important;
        /* 12px */
        line-height: 1.5;
        hyphens: none;
        word-break: normal;
        overflow-wrap: break-word;
        white-space: normal;
    }

    /* Hide decorative dots on mobile and adjust spacing */
    .enhanced-card .space-y-4>div .w-3.h-3.bg-gradient-to-r {
        display: none;
    }

    .enhanced-card .space-y-4>div.flex {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* Remove gap from space-x-4 class on mobile */
    .enhanced-card .space-y-4>div.flex.space-x-4 {
        gap: 0 !important;
        column-gap: 0 !important;
    }

    .enhanced-card .space-y-4>div.flex .text-white.font-medium {
        margin-left: 0 !important;
        text-align: left;
    }

    /* Align flex items to left */
    .enhanced-card .space-y-4>div.flex {
        justify-content: flex-start;
        text-align: left;
        position: relative;
    }

    /* Add checkmark pseudo-element in top-right corner */
    .enhanced-card .space-y-4>div.flex::before {
        content: "✓";
        position: absolute;
        top: 0.5rem;
        right: 0.75rem;
        color: #00D9FF;
        font-size: 1.25rem;
        font-weight: bold;
        line-height: 1;
    }

    /* Remove height alignment on mobile for cards - let them be natural height */
    .enhanced-card.flex.flex-col.h-full {
        height: auto !important;
        align-items: flex-start !important;
    }

    /* Remove flex column alignment on mobile */
    .enhanced-card.flex.flex-col {
        align-items: flex-start !important;
    }

    /* Remove height alignment from card titles on mobile */
    .enhanced-card h3.h-16.flex.items-start.justify-center {
        height: auto !important;
        display: block !important;
        text-align: center !important;
        width: 100%;
    }

    .enhanced-card .text-gray-300 {
        font-size: 0.875rem !important;
        /* 14px */
        line-height: 1.6;
    }

    .enhanced-card .text-gray-300.italic {
        font-size: 0.875rem !important;
        /* 14px */
        line-height: 1.6;
    }

    /* Grid layouts */
    .grid.lg\:grid-cols-2,
    .grid.md\:grid-cols-2,
    .grid.md\:grid-cols-3,
    .grid.lg\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Typography */
    h2.text-4xl.lg\:text-5xl.font-bold.mb-6 {
        font-size: 1.5rem !important;
    }

    .text-4xl:not(h2.text-4xl.lg\:text-5xl.font-bold.mb-6) {
        font-size: 1.75rem;
    }

    .text-5xl {
        font-size: 2rem;
    }

    .text-6xl {
        font-size: 2.5rem;
    }

    .text-3xl {
        font-size: 1.5rem;
    }

    .text-2xl:not(.grid .text-2xl) {
        font-size: 1.125rem;
    }

    .text-xl {
        font-size: 1.125rem;
    }

    .text-xl.text-gray-300.max-w-3xl {
        font-size: 0.875rem !important;
        /* 14px */
        line-height: 1.4;
    }

    .bg-black\/20 .text-gray-100.text-lg {
        font-size: 0.875rem !important;
    }

    .text-gray-300.mb-6 {
        font-size: 0.875rem !important;
    }

    /* Spacing */
    .py-20 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .py-12 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    /* Reduce footer padding on mobile */
    footer.py-12 {
        padding-top: 1rem !important;
        /* 16px */
        padding-bottom: 1rem !important;
        /* 16px */
    }

    .mb-16 {
        margin-bottom: 1.25rem;
    }

    /* Reduce margin for "Почему мы?" section on mobile */
    .text-center.mb-16.scroll-reveal {
        margin-bottom: 1rem !important;
        /* 16px instead of 64px */
    }

    /* Reduce margin between title and subtitle */
    .text-center.mb-16.scroll-reveal h2.mb-6 {
        margin-bottom: 1rem !important;
        /* 16px instead of 24px */
    }

    .mb-8 {
        margin-bottom: 1rem;
    }

    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Footer */
    footer .flex.items-center.space-x-2 img {
        height: 2rem;
    }

    footer .text-sm {
        font-size: 0.875rem;
    }

    footer .text-xs {
        font-size: 0.75rem;
    }

    /* Footer text sizing on mobile */
    footer .text-cyan-400 {
        font-size: 0.875rem !important;
        /* 14px */
    }

    footer .text-gray-400 {
        font-size: 0.75rem !important;
        /* 12px */
    }

    /* Back to top */
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 48px;
        height: 48px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }

    /* Stats */
    .grid.grid-cols-3 .text-xs {
        font-size: 0.7rem !important;
        text-align: right;
    }
}

/* Small Tablet/Large Mobile - до 640px */
@media (max-width: 640px) {

    /* Stats grid полностью вертикальный */
    .grid.grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .grid.grid-cols-3>div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem;
    }

    .grid.grid-cols-3 .text-2xl {
        font-size: 1.5rem;
    }

    .grid.grid-cols-3 .text-xs {
        font-size: 0.7rem;
        text-align: right;
    }

    /* CTA card stats */
    .cta-card-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .cta-card-stats .stat-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 0.5rem;
    }

    .cta-card-stats .stat-number {
        font-size: 1.25rem;
    }

    .cta-card-stats .stat-label {
        font-size: 0.7rem;
        text-align: right;
    }
}

/* Small Mobile - до 480px */
@media (max-width: 480px) {

    /* Hero уменьшение */
    .hero-bg {
        padding: 1rem 0 1.5rem 0;
    }

    .hero-title {
        font-size: 1.5rem;
        line-height: 1.1;
    }

    .hero-title .text-white {
        font-size: 1.25rem !important;
        line-height: 1.2;
    }

    .hero-title .gradient-text {
        font-size: 1.25rem !important;
    }

    .hero-title .text-2xl {
        font-size: 1.25rem !important;
    }

    /* Buttons компактнее */
    .btn-enhanced {
        font-size: 1rem !important;
        padding: 0.625rem 1rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.625rem 1rem;
        font-size: 0.75rem;
    }

    /* Typography меньше */
    .text-4xl:not(h2.text-4xl.lg\:text-5xl.font-bold.mb-6) {
        font-size: 1.5rem;
    }

    .text-5xl {
        font-size: 1.75rem;
    }

    .text-3xl {
        font-size: 1.25rem;
    }

    .text-2xl:not(.grid .text-2xl) {
        font-size: 1rem;
    }

    .text-xl {
        font-size: 1rem;
    }

    /* Spacing компактнее */
    .px-6 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .py-20 {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .py-12 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    /* Cards компактнее */
    .card {
        padding: 0.875rem;
    }

    .glass-effect {
        padding: 0.875rem;
    }

    /* Header/Footer минимум */
    .nav-glass .flex.items-center.space-x-2 img,
    footer .flex.items-center.space-x-2 img {
        height: 1.75rem;
    }

    .nav-glass .text-sm,
    footer .text-sm {
        font-size: 0.75rem;
    }

    .nav-glass .text-xs,
    footer .text-xs {
        font-size: 0.625rem;
    }

    /* Stats минимум */
    .grid.grid-cols-3>div {
        padding: 0.5rem;
    }

    .grid.grid-cols-3 .text-2xl {
        font-size: 1.125rem;
    }

    .grid.grid-cols-3 .text-xs {
        font-size: 0.625rem;
    }
}