/* ========== GLOBAL STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

:root {
    --primary-color: #4cc0e7;
    --primary-light: #6bcff0;
    --primary-dark: #2a9dc7;
    --primary-glow: rgba(76, 192, 231, 0.4);
    --text-light: #ffffff;
    --text-dark: #d1d5db;
    --text-muted: #9ca3af;
    --background: #000000;
    --card-bg: #111111;
    --card-bg-hover: #1a1a1a;
    --border-color: #2d2d2d;
    --border-light: #404040;
    
    --gradient-1: linear-gradient(135deg, #4cc0e7 0%, #2a9dc7 100%);
    --gradient-2: linear-gradient(135deg, #4cc0e7 0%, #6bcff0 100%);
    --gradient-3: linear-gradient(135deg, #2a9dc7 0%, #4cc0e7 100%);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px var(--primary-glow);
    
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.27, 1.55);
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    color: var(--text-light);
    overflow-x: hidden;
    background: var(--background);
    scroll-behavior: smooth;
    line-height: 1.6;
    font-size: 16px;
    width: 100%;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* ========== HEADER & NAVIGATION ========== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    transition: all 0.4s var(--ease-out);
    border-bottom: 1px solid transparent;
}

header.scrolled {
    padding: var(--space-sm) 0;
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: transform 0.3s var(--ease-out);
    padding: var(--space-xs);
    z-index: 1001;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    border-radius: 8px;
}

.logo h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -0.5px;
}

.logo span {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    position: relative;
}

.menu-icon {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s var(--ease-out);
    padding: var(--space-sm);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    display: none;
    z-index: 1001;
}

.menu-icon:hover {
    color: var(--primary-color);
    background: rgba(76, 192, 231, 0.1);
    transform: rotate(90deg);
}

.menu-icon.active {
    transform: rotate(90deg);
}

nav {
    position: relative;
}

nav ul {
    display: flex;
    gap: var(--space-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul.active {
    display: flex;
}

nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s var(--ease-out);
    position: relative;
    padding: var(--space-xs) var(--space-sm);
    white-space: nowrap;
}

nav a:hover {
    color: var(--primary-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.4s var(--ease-out);
    border-radius: 2px;
}

nav a:hover::after {
    width: 80%;
}

.contact-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.contact-header a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: all 0.3s var(--ease-out);
    padding: var(--space-sm) var(--space-md);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    white-space: nowrap;
}

.contact-header a:hover {
    color: var(--primary-color);
    background: rgba(76, 192, 231, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.contact-header i {
    color: var(--primary-color);
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.language-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-light);
    padding: var(--space-sm) var(--space-md);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    transition: all 0.3s var(--ease-out);
    font-weight: 500;
    white-space: nowrap;
    width: auto;
    height: 44px;
}

.language-btn:hover {
    background: rgba(76, 192, 231, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 180px;
    margin-top: var(--space-xs);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s var(--ease-out);
    z-index: 1001;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.language-option {
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    border-bottom: 1px solid var(--border-light);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: rgba(76, 192, 231, 0.1);
    padding-left: var(--space-lg);
}

.language-option.active {
    color: var(--primary-color);
    background: rgba(76, 192, 231, 0.15);
}

.language-option .bx-check {
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
}

.language-option.active .bx-check {
    opacity: 1;
}

/* ========== HERO SECTION ========== */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12rem 0 6rem;
    gap: var(--space-xl);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(76, 192, 231, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(76, 192, 231, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.hero-content {
    flex: 1;
    max-width: 650px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content h1 span {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-dark);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.btn {
    padding: var(--space-md) var(--space-lg);
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all 0.4s var(--ease-out);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    text-align: center;
    justify-content: center;
}

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

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

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-glow), 0 15px 30px rgba(76, 192, 231, 0.4);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-glow);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: var(--gradient-1);
    border-radius: 20px;
    filter: blur(40px);
    opacity: 0.3;
    z-index: -1;
    animation: glowPulse 4s infinite var(--ease-in-out);
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.hero-image img {
    max-width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    animation: float 6s infinite var(--ease-in-out);
    filter: brightness(1.1) contrast(1.1);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(1deg);
    }
}

/* ========== STATS SECTION ========== */
.stats {
    padding: var(--space-2xl) 0;
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    position: relative;
    z-index: 2;
}

.stat-card {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    background: var(--background);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-feature-settings: "tnum";
}

.stat-text {
    color: var(--text-muted);
    font-size: 1.125rem;
    font-weight: 500;
}

/* ========== SERVICES SECTION ========== */
.services {
    padding: var(--space-2xl) 0;
    position: relative;
    width: 100%;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
    width: 100%;
}

.section-title h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-lg);
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.6;
    padding: 0 var(--space-sm);
}

/* ========== SERVICES SECTION - FIXED HEIGHT ========== */
.services {
    padding: var(--space-2xl) 0;
    position: relative;
    width: 100%;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: var(--space-lg);
    width: 100%;
    align-items: stretch;
}

.service-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.4s var(--ease-out);
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px; /* Фиксированная минимальная высота */
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
}

/* Фиксированный контейнер для иконки */
.service-icon-container {
    flex-shrink: 0;
    margin-bottom: var(--space-lg);
}

.service-icon {
    width: 90px;
    height: 90px;
    background: rgba(76, 192, 231, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 2px solid transparent;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.service-card:hover .service-icon {
    transform: rotateY(180deg) scale(1.1);
    border-color: transparent;
}

.service-icon i {
    font-size: 2.5rem;
    color: var(--primary-color);
    transition: all 0.4s var(--ease-out);
    position: relative;
    z-index: 2;
}

.service-card:hover .service-icon i {
    color: white;
    transform: rotateY(-180deg);
}

/* Контентная часть с автоматической высотой */
.service-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
}

.service-header {
    flex-shrink: 0;
    margin-bottom: var(--space-md);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    font-weight: 700;
    line-height: 1.3;
    min-height: 2.6em; /* Фиксированная высота для заголовка (2 строки) */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Основной текст - занимает всё доступное пространство */
.service-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1rem;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto; /* Прокрутка если текст слишком длинный */
    max-height: 120px; /* Максимальная высота для текста */
    padding: 0 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

/* Стилизация скроллбара для текста */
.service-card p::-webkit-scrollbar {
    width: 4px;
}

.service-card p::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 2px;
}

.service-card p::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.service-card p::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Футер карточки */
.service-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: all 0.3s var(--ease-out);
    position: relative;
    padding: var(--space-xs) 0;
}

.service-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s var(--ease-out);
}

.service-link:hover {
    gap: var(--space-sm);
}

.service-link:hover::after {
    width: 100%;
}

/* Альтернативный вариант с автоматической высотой */
.services-grid.auto-height .service-card {
    min-height: auto;
    height: auto;
}

.services-grid.auto-height .service-text {
    min-height: 120px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 991px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
        gap: var(--space-md);
    }
    
    .service-card {
        padding: var(--space-lg);
        min-height: 380px;
    }
    
    .service-icon {
        width: 80px;
        height: 80px;
        margin-bottom: var(--space-md);
    }
    
    .service-icon i {
        font-size: 2rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
        min-height: 2.4em;
    }
    
    .service-card p {
        font-size: 0.95rem;
        max-height: 110px;
    }
}

@media (max-width: 767px) {
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .service-card {
        min-height: 360px;
        padding: var(--space-md);
    }
    
    .service-card h3 {
        font-size: 1.25rem;
        min-height: 2.2em;
    }
    
    .service-card p {
        font-size: 0.95rem;
        max-height: 100px;
        line-height: 1.5;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
        margin-bottom: var(--space-md);
    }
    
    .service-icon i {
        font-size: 1.75rem;
    }
    
    .service-footer {
        padding-top: var(--space-sm);
    }
}

@media (max-width: 575px) {
    .service-card {
        min-height: 340px;
        padding: var(--space-md);
    }
    
    .service-card h3 {
        font-size: 1.125rem;
        min-height: 2em;
        margin-bottom: var(--space-sm);
    }
    
    .service-card p {
        font-size: 0.9rem;
        max-height: 90px;
        line-height: 1.5;
        margin-bottom: var(--space-sm);
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        border-radius: 16px;
        margin-bottom: var(--space-sm);
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    .service-footer {
        padding-top: var(--space-sm);
    }
}

/* Гарантия одинакового выравнивания для всех карточек */
.services-grid {
    align-items: stretch;
}

/* Фикс для очень длинных заголовков */
.service-card h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Фикс для очень длинного текста */
.service-card p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
}

/* Анимация загрузки для контента */
.service-content {
    opacity: 0;
    transform: translateY(20px);
    animation: serviceContentFadeIn 0.6s var(--ease-out) forwards;
}

@keyframes serviceContentFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Задержка для анимации карточек */
.service-card:nth-child(1) .service-content { animation-delay: 0.1s; }
.service-card:nth-child(2) .service-content { animation-delay: 0.2s; }
.service-card:nth-child(3) .service-content { animation-delay: 0.3s; }
.service-card:nth-child(4) .service-content { animation-delay: 0.4s; }
.service-card:nth-child(5) .service-content { animation-delay: 0.5s; }
.service-card:nth-child(6) .service-content { animation-delay: 0.6s; }

/* Вариант с прокруткой для очень длинных текстов */
.service-card.scrollable .service-text {
    flex: 1;
    overflow-y: auto;
}

.service-card.scrollable p {
    max-height: none;
    overflow-y: visible;
}

/* Вариант с фиксированным количеством строк */
.service-card.fixed-lines p {
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Максимум 5 строк */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 8em; /* 5 строк * 1.6 line-height */
    overflow-y: hidden;
}

/* ========== ABOUT SECTION ========== */
.about {
    padding: var(--space-2xl) 0;
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.about-content {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    position: relative;
    z-index: 2;
    width: 100%;
}

.about-image {
    flex: 1;
    position: relative;
}

.about-image img {
    max-width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    transition: transform 0.4s var(--ease-out);
}

.about-image:hover img {
    transform: scale(1.02) rotate(1deg);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-lg);
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.about-text h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient-2);
    border-radius: 2px;
}

.about-text p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    font-size: 1.0625rem;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    width: 100%;
}

.feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    border-radius: 12px;
    transition: all 0.3s var(--ease-out);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.feature:hover {
    background: rgba(76, 192, 231, 0.1);
    border-color: var(--primary-color);
    transform: translateX(8px);
}

.feature i {
    color: var(--primary-color);
    font-size: 1.25rem;
    width: 24px;
    flex-shrink: 0;
}

/* ========== CARS SECTION - UPDATED ========== */
.cars {
    padding: var(--space-2xl) 0;
    position: relative;
    width: 100%;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    width: 100%;
}

.car-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s var(--ease-out);
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 580px;
}

.car-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-3);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
    z-index: 2;
}

.car-card:hover::before {
    transform: scaleX(1);
}

.car-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
}

/* ОБНОВЛЕННЫЙ СТИЛЬ ДЛЯ ИЗОБРАЖЕНИЯ */
.car-image {
    height: 60%; /* Картинка занимает 60% высоты карточки */
    min-height: 240px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.car-card:hover .car-image img {
    transform: scale(1.08);
}

.car-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: var(--shadow-md);
    line-height: 1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Контентная часть - 40% карточки */
.car-info {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: var(--space-sm);
    height: 40%;
}

.car-header {
    margin-bottom: var(--space-sm);
}

.car-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    color: var(--text-light);
}

.car-year {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.car-info p {
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-sm);
    flex-shrink: 0;
    font-size: 0.95rem;
}

.car-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: var(--space-md);
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
    line-height: 1;
}

.car-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.car-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 6px 0;
}

.car-feature i {
    font-size: 1.1rem;
    color: var(--primary-color);
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.car-feature span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.car-actions {
    margin-top: auto;
    flex-shrink: 0;
}

.car-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
}

.car-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    background: var(--gradient-2);
}

/* Анимация появления изображений */
@keyframes imageFadeIn {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.car-image img {
    animation: imageFadeIn 0.6s var(--ease-out);
}

/* Адаптивность */
@media (max-width: 767px) {
    .cars-grid {
        grid-template-columns: 1fr;
    }
    
    .car-card {
        min-height: 520px;
    }
    
    .car-image {
        height: 50%;
        border-radius: 20px;
    }
    
    .car-info {
        height: 50%;
    }
}

@media (max-width: 575px) {
    .car-card {
        min-height: 480px;
    }
    
    .car-image {
        height: 45%;
        border-radius: 20px;
    }
    
    .car-info {
        height: 55%;
    }
}
/* External Car Platforms Section */
.external-platforms {
    background: var(--card-bg);
    border-radius: 20px;
    padding: var(--space-xl);
    margin-top: var(--space-xl);
    border: 1px solid var(--border-color);
    text-align: center;
    width: 100%;
}

.external-platforms h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--text-light);
}

.external-platforms p {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--space-sm);
}

.platform-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.platform-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s var(--ease-out);
    border: 2px solid transparent;
    box-shadow: var(--shadow-md);
}

.platform-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.platform-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* ========== TESTIMONIALS SECTION - FIXED WIDTH ========== */
.testimonials {
    padding: var(--space-2xl) 0;
    background: var(--background);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.testimonials-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Фиксированная минимальная ширина */
    gap: var(--space-lg);
    position: relative;
    z-index: 2;
    width: 100%;
    align-items: stretch; /* Выравнивание по высоте */
}

.testimonial-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.4s var(--ease-out);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
    width: 100%; /* Фиксированная ширина */
    max-width: 100%; /* Предотвращает растягивание */
}

/* Альтернативный вариант с фиксированной шириной через flex */
.testimonials-container.fixed-width {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg);
}

.testimonials-container.fixed-width .testimonial-card {
    flex: 0 0 320px; /* Фиксированная ширина 320px */
    max-width: 320px;
    min-width: 320px;
}

/* Гарантия одинаковой ширины */
.testimonial-card {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    margin: 0 auto; /* Центрирование если используется flex */
}

.testimonial-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.testimonial-rating {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-md);
    flex-shrink: 0;
}

.testimonial-rating i {
    color: #ffc107;
    font-size: 1rem;
}

.testimonial-text {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    font-style: italic;
    font-size: 0.95rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    min-height: 80px; /* Минимальная высота для текста */
}

/* Фиксированная высота для контента */
.testimonial-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 180px; /* Минимальная высота контента */
}

/* Градиент для длинного текста */
.testimonial-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, var(--card-bg));
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
}

.testimonial-card:hover .testimonial-text::after {
    opacity: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    flex-shrink: 0;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease-out);
    flex-shrink: 0;
    background-color: white;
}

.testimonial-card:hover .author-avatar {
    transform: scale(1.1);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    flex-grow: 1;
    min-width: 0;
}

.author-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-info p {
    color: var(--text-muted);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.testimonial-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.testimonial-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.testimonial-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
}

.testimonial-link:hover {
    gap: 8px;
}

/* ========== RESPONSIVE DESIGN FOR TESTIMONIALS ========== */
@media (max-width: 1200px) {
    .testimonials-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 991px) {
    .testimonials-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .testimonial-card {
        min-height: 260px;
        padding: var(--space-md);
    }
}

@media (max-width: 767px) {
    .testimonials-container {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .testimonial-card {
        min-height: auto;
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Альтернативный вариант для мобильных */
    .testimonials-container.mobile-fixed .testimonial-card {
        width: 100%;
        max-width: 400px;
        min-width: auto;
    }
}

@media (max-width: 575px) {
    .testimonials-container {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        padding: var(--space-md);
        min-height: auto;
    }
    
    .testimonial-author {
        gap: var(--space-sm);
    }
    
    .author-avatar {
        width: 44px;
        height: 44px;
    }
    
    .testimonial-text {
        min-height: 70px;
        font-size: 0.9rem;
    }
}

/* Фикс для очень длинных текстов */
.author-info h4,
.author-info p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Гарантируем одинаковое выравнивание */
.testimonial-card {
    align-content: flex-start;
}

/* Анимация появления */
.testimonial-card {
    animation: fadeInUp 0.6s var(--ease-out) forwards;
}

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

/* Задержка для анимации карточек */
.testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonial-card:nth-child(2) { animation-delay: 0.2s; }
.testimonial-card:nth-child(3) { animation-delay: 0.3s; }
.testimonial-card:nth-child(4) { animation-delay: 0.4s; }
/* ========== CONTACT SECTION ========== */
.contact {
    padding: var(--space-2xl) 0;
    position: relative;
    width: 100%;
}

.contact-content {
    display: flex;
    gap: var(--space-xl);
    width: 100%;
}

.contact-info {
    flex: 1;
}

.contact-info h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-lg);
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.contact-info h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
    font-size: 1.0625rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    width: 100%;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: 16px;
    transition: all 0.3s var(--ease-out);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.contact-detail:hover {
    background: rgba(76, 192, 231, 0.1);
    border-color: var(--primary-color);
    transform: translateX(8px);
}

.contact-detail i {
    width: 56px;
    height: 56px;
    background: rgba(76, 192, 231, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    border: 1px solid var(--primary-color);
    flex-shrink: 0;
    transition: all 0.3s var(--ease-out);
}

.contact-detail:hover i {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.contact-form {
    flex: 1;
    background: var(--card-bg);
    padding: var(--space-xl);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    transition: all 0.3s var(--ease-out);
}

.contact-form:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
}

.form-group {
    margin-bottom: var(--space-lg);
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--text-light);
}

.form-control {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s var(--ease-out);
    color: var(--text-light);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(76, 192, 231, 0.05);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
    min-height: 160px;
    resize: vertical;
    line-height: 1.5;
}

/* ========== FOOTER ========== */
footer {
    background: var(--card-bg);
    color: white;
    padding: var(--space-2xl) 0 var(--space-lg);
    border-top: 1px solid var(--border-color);
    position: relative;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    position: relative;
    z-index: 2;
    gap: var(--space-xl);
    width: 100%;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h3 {
    font-size: 1.375rem;
    margin-bottom: var(--space-lg);
    position: relative;
    padding-bottom: var(--space-sm);
    font-weight: 700;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.footer-column p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) 0;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(8px);
}

.social-links {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
    border: 1px solid var(--border-light);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-glow);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* ========== SCROLL TO TOP BUTTON ========== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    border: none;
}

.scroll-to-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-glow), 0 15px 30px rgba(76, 192, 231, 0.4);
}

/* ========== LOADING SCREEN ========== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: var(--space-md);
}

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

/* ========== LIGHTBOX ========== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
}

.lightbox-prev, .lightbox-next {
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background: var(--primary-color);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1200px) {
    .container {
        padding: 0 var(--space-md);
    }
}

@media (max-width: 991px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 10rem 0 5rem;
        gap: var(--space-lg);
    }
    
    .about-content {
        flex-direction: column;
        gap: var(--space-xl);
    }
    
    .contact-content {
        flex-direction: column;
        gap: var(--space-xl);
    }
    
    .footer-content {
        flex-wrap: wrap;
        gap: var(--space-lg);
    }
    
    .footer-column {
        flex: 1 1 calc(50% - var(--space-lg));
        min-width: 250px;
    }
    
    .platform-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .platform-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .menu-icon {
        display: flex;
    }
    
    nav ul {
        display: none;
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        padding: var(--space-xl) var(--space-md);
        gap: var(--space-md);
        box-shadow: var(--shadow-xl);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        z-index: 999;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav a {
        width: 100%;
        text-align: center;
        padding: var(--space-md) 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-light);
    }
    
    nav a:last-child {
        border-bottom: none;
    }
    
    .contact-header {
        display: none;
    }
    
    .language-btn span {
        display: none;
    }
}

@media (max-width: 767px) {
    .hero-content h1 {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: var(--space-lg);
    }
    
    .footer-column {
        flex: 1 1 100%;
    }
    
    .testimonial-actions {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: flex-start;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .contact-form {
        padding: var(--space-md);
    }
    
    .service-card, .car-card, .testimonial-card {
        padding: var(--space-lg) var(--space-md);
    }
    
    .stat-card {
        padding: var(--space-lg) var(--space-md);
    }
    
    .hero {
        padding: 8rem 0 4rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .logo h2 {
        font-size: 1.5rem;
    }
    
    .logo img {
        width: 40px;
    }
    
    .language-btn {
        padding: var(--space-sm);
    }
    
    .language-btn span {
        display: none;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .author-info {
        text-align: center;
    }
}
@media (max-width: 991px) {
    .car-card {
        min-height: 480px;
    }
    
   
    
    .testimonial-card {
        min-height: 260px;
        padding: var(--space-md);
    }
}

@media (max-width: 767px) {
    .cars-grid {
        grid-template-columns: 1fr;
    }
    
  
    
    .testimonials-container {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        min-height: auto;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .car-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .car-card {
        min-height: auto;
    }
    
    .car-image {
        height: 160px;
    }
    
    .car-info {
        padding: var(--space-md);
    }
    
    .car-info h3 {
        font-size: 1.125rem;
    }
    
    .car-price {
        font-size: 1.375rem;
    }
    
    .testimonial-card {
        padding: var(--space-md);
        min-height: auto;
    }
    
    .testimonial-author {
        gap: var(--space-sm);
    }
    
    .author-avatar {
        width: 44px;
        height: 44px;
    }
}

/* Фикс для очень длинных текстов */
.car-feature span,
.author-info h4,
.author-info p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Гарантируем одинаковое выравнивание */
.car-info,
.testimonial-card {
    align-content: flex-start;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Prevent horizontal scroll */
body, html {
    max-width: 100%;
    overflow-x: hidden;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* ========== MODAL STYLES ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
    backdrop-filter: blur(10px);
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: var(--space-2xl);
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.4s var(--ease-out);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--primary-color);
    background: rgba(76, 192, 231, 0.1);
    transform: rotate(90deg);
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: rgba(76, 192, 231, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    border: 2px solid var(--primary-color);
}

.modal-icon i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    font-weight: 700;
    color: var(--text-light);
}

.modal-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

/* ========== FORM SUCCESS/ERROR STATES ========== */
.form-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    padding: var(--space-md);
    border-radius: 12px;
    margin-bottom: var(--space-lg);
    text-align: center;
}

.form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: var(--space-md);
    border-radius: 12px;
    margin-bottom: var(--space-lg);
    text-align: center;
}

.form-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

/* ========== ACCESSIBILITY IMPROVEMENTS ========== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .menu-icon,
    .scroll-to-top,
    .language-switcher,
    .contact-header {
        display: none !important;
    }
    
    header {
        position: static;
        background: white !important;
        color: black !important;
    }
    
    .hero-buttons .btn {
        border: 1px solid #000 !important;
        color: #000 !important;
        background: none !important;
    }
}

/* ========== SEO IMPROVEMENTS ========== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Schema.org markup */
.business-info {
    display: none;
}

/* ========== NEW SECTIONS STYLES ========== */

/* Process Section */
.process {
    padding: var(--space-2xl) 0;
    background: var(--background);
    position: relative;
    width: 100%;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    position: relative;
}

.process-step {
    text-align: center;
    padding: var(--space-xl);
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.4s var(--ease-out);
    position: relative;
}

.process-step:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.125rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: rgba(76, 192, 231, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    border: 2px solid var(--primary-color);
}

.step-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

.process-step h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    font-weight: 700;
}

.process-step p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* FAQ Section */
.faq {
    padding: var(--space-2xl) 0;
    background: var(--card-bg);
    position: relative;
    width: 100%;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--background);
    border-radius: 16px;
    margin-bottom: var(--space-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    padding: var(--space-lg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s var(--ease-out);
}

.faq-question:hover {
    background: rgba(76, 192, 231, 0.05);
}

.faq-question h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.faq-question i {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: transform 0.3s var(--ease-out);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 var(--space-lg);
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}

.faq-item.active .faq-answer {
    padding: 0 var(--space-lg) var(--space-lg);
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* CTA Section */
.cta {
    padding: var(--space-2xl) 0;
    background: var(--gradient-1);
    position: relative;
    width: 100%;
    color: white;
    text-align: center;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.1"><polygon points="1000,100 1000,0 0,100"></polygon></svg>');
    background-size: cover;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-lg);
    font-weight: 800;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: var(--space-xl);
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-outline {
    border-color: white;
    color: white;
}

.cta .btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* Hero Badge */
.hero-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: var(--space-sm);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: bounce 2s infinite;
}

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

.badge-content {
    text-align: center;
}

.badge-text {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.875rem;
    display: block;
    margin-bottom: 4px;
}

.badge-stars {
    display: flex;
    gap: 2px;
    justify-content: center;
}

.badge-stars i {
    color: #ffc107;
    font-size: 0.75rem;
}

/* Hero Features */
.hero-features {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.3s var(--ease-out);
}

.hero-feature:hover {
    background: rgba(76, 192, 231, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.hero-feature i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.hero-feature span {
    font-weight: 500;
    font-size: 0.875rem;
}

/* About Experience */
.about-experience {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--gradient-1);
    color: white;
    padding: var(--space-md);
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.experience-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.experience-text {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Social Buttons */
.social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.social-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s var(--ease-out);
    border: 1px solid var(--border-light);
}

.social-btn.instagram {
    background: linear-gradient(45deg, #E1306C, #F77737);
    color: white;
}

.social-btn.tiktok {
    background: #000000;
    color: white;
}

.social-btn.whatsapp {
    background: #25D366;
    color: white;
}

.social-btn.telegram {
    background: #0088cc;
    color: white;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Contact Modal */
.contact-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.btn-success {
    background: #22c55e;
    color: white;
}

.btn-success:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

.btn-telegram {
    background: #0088cc;
    color: white;
}

.btn-telegram:hover {
    background: #0077b5;
    transform: translateY(-2px);
}

/* Additional Button Styles */
.btn-secondary {
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: var(--text-muted);
    color: var(--background);
    border-color: var(--text-muted);
}

/* ========== RESPONSIVE DESIGN UPDATES ========== */
@media (max-width: 991px) {
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-features {
        justify-content: center;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-badge {
        position: relative;
        top: auto;
        right: auto;
        margin-top: var(--space-md);
        align-self: center;
    }
}

@media (max-width: 575px) {
    .process-step {
        padding: var(--space-lg);
    }
    
    .faq-question {
        padding: var(--space-md);
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-feature {
        width: 100%;
        justify-content: center;
    }
}

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

/* Loading animations */
.fade-in {
    animation: fadeInUp 0.6s var(--ease-out);
}

/* Hover effects enhancement */
.service-card, .car-card, .testimonial-card, .process-step {
    transition: all 0.4s var(--ease-out);
}

/* Focus states for accessibility */
button:focus, a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles improvement */
@media print {
    .cta, .hero-badge, .social-buttons {
        display: none !important;
    }
}





/* ========== LEGAL MODALS STYLES ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 4000;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: var(--space-md);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
    backdrop-filter: blur(10px);
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content.legal-modal {
    background: var(--card-bg);
    border-radius: 20px;
    padding: var(--space-2xl);
    max-width: 800px;
    width: 95%;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    animation: modalSlideInLegal 0.4s var(--ease-out);
    margin: var(--space-2xl) auto;
}

@keyframes modalSlideInLegal {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content.legal-modal h2 {
    font-size: 2rem;
    margin-bottom: var(--space-xl);
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    position: relative;
    padding-bottom: var(--space-md);
}

.modal-content.legal-modal h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    z-index: 10;
}

.modal-close:hover {
    color: var(--primary-color);
    background: rgba(76, 192, 231, 0.1);
    border-color: var(--primary-color);
    transform: rotate(90deg);
}

.legal-content {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
}

.legal-content h3 {
    color: var(--text-light);
    margin: var(--space-xl) 0 var(--space-md);
    font-size: 1.375rem;
    font-weight: 700;
    position: relative;
    padding-left: var(--space-md);
}

.legal-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.legal-content h4 {
    color: var(--text-light);
    margin: var(--space-lg) 0 var(--space-sm);
    font-size: 1.125rem;
    font-weight: 600;
}

.legal-content p {
    margin-bottom: var(--space-md);
    text-align: justify;
}

.legal-content strong {
    color: var(--text-light);
    font-weight: 600;
}

.legal-content ul, .legal-content ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.legal-content li {
    margin-bottom: var(--space-xs);
    position: relative;
}

.legal-content ul li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: -15px;
}

.legal-content ol {
    counter-reset: legal-counter;
}

.legal-content ol li {
    counter-increment: legal-counter;
    padding-left: var(--space-sm);
}

.legal-content ol li::before {
    content: counter(legal-counter) '.';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: -20px;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
    border-bottom: 1px solid transparent;
}

.legal-content a:hover {
    border-bottom-color: var(--primary-color);
}

/* Legal Sections Styling */
.legal-section {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.3s var(--ease-out);
}

.legal-section:hover {
    border-color: var(--primary-color);
    background: rgba(76, 192, 231, 0.03);
}

.legal-section:last-child {
    margin-bottom: 0;
}

/* Contact Info Box in Legal */
.contact-info-box {
    background: rgba(76, 192, 231, 0.05);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    position: relative;
    overflow: hidden;
}

.contact-info-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-1);
}

.contact-info-box h4 {
    color: var(--primary-color);
    margin-bottom: var(--space-sm);
    font-size: 1.125rem;
}

.contact-info-box p {
    margin-bottom: var(--space-xs);
    line-height: 1.6;
}

.contact-info-box strong {
    color: var(--text-light);
}

/* Highlight important legal paragraphs */
.legal-content p strong {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Legal Table Styling */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

.legal-table th,
.legal-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.legal-table th {
    background: rgba(76, 192, 231, 0.1);
    color: var(--text-light);
    font-weight: 600;
}

.legal-table tr:last-child td {
    border-bottom: none;
}

.legal-table tr:hover {
    background: rgba(76, 192, 231, 0.05);
}

/* Print Styles for Legal */
@media print {
    .modal {
        position: static;
        background: white;
        display: block !important;
        opacity: 1;
        padding: 0;
    }
    
    .modal-content.legal-modal {
        box-shadow: none;
        border: 1px solid #ddd;
        margin: 0;
        max-width: none;
    }
    
    .modal-close {
        display: none;
    }
}

/* Responsive Design for Legal Modals */
@media (max-width: 991px) {
    .modal {
        padding: var(--space-sm);
    }
    
    .modal-content.legal-modal {
        padding: var(--space-xl);
        margin: var(--space-xl) auto;
    }
    
    .modal-content.legal-modal h2 {
        font-size: 1.75rem;
        margin-bottom: var(--space-lg);
    }
    
    .legal-content h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 767px) {
    .modal-content.legal-modal {
        padding: var(--space-lg);
        margin: var(--space-lg) auto;
        width: 98%;
    }
    
    .modal-content.legal-modal h2 {
        font-size: 1.5rem;
        padding-right: var(--space-xl);
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .legal-content {
        font-size: 0.95rem;
    }
    
    .legal-content h3 {
        font-size: 1.125rem;
        margin: var(--space-lg) 0 var(--space-sm);
    }
    
    .legal-section {
        padding: var(--space-md);
    }
    
    .contact-info-box {
        padding: var(--space-md);
    }
}

@media (max-width: 575px) {
    .modal {
        padding: var(--space-xs);
    }
    
    .modal-content.legal-modal {
        padding: var(--space-md);
        margin: var(--space-md) auto;
        border-radius: 16px;
    }
    
    .modal-content.legal-modal h2 {
        font-size: 1.375rem;
        margin-bottom: var(--space-md);
    }
    
    .legal-content h3 {
        font-size: 1.0625rem;
        padding-left: var(--space-sm);
    }
    
    .legal-content h3::before {
        width: 3px;
        height: 16px;
    }
    
    .legal-content ul, .legal-content ol {
        padding-left: var(--space-md);
    }
    
    .legal-table th,
    .legal-table td {
        padding: var(--space-sm);
        font-size: 0.875rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .modal {
        transition: none;
    }
    
    .modal-content.legal-modal {
        animation: none;
    }
    
    .modal-close:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modal-content.legal-modal {
        border: 2px solid var(--text-light);
    }
    
    .legal-section {
        border: 1px solid var(--text-light);
    }
    
    .contact-info-box {
        border: 2px solid var(--primary-color);
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .modal-content.legal-modal {
        background: var(--card-bg);
    }
    
    .legal-section {
        background: rgba(255, 255, 255, 0.03);
    }
}

/* Focus styles for accessibility */
.modal-close:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.legal-content a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Scrollbar styling for legal content */
.modal-content.legal-modal::-webkit-scrollbar {
    width: 8px;
}

.modal-content.legal-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-content.legal-modal::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.modal-content.legal-modal::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}