/* ============================================
   Nesterov | TechART — Студия 3D визуализации
   Дизайн вдохновлен hot-walls.ru
   ============================================ */

/* Переменные для цветов и эффектов - Минималистичный дизайн */
:root {
    --color-primary: #000000;
    --color-primary-light: #1a1a1a;
    --color-accent: #000000;
    --color-accent-hover: #1a1a1a;
    --color-text: #1a1a1a;
    --color-text-light: #6b7280;
    --color-bg: #ffffff;
    --color-bg-alt: #fafafa;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --border-radius: 16px;
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 300;
    /* Фиксы для Safari iOS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

/* Плавные анимации появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Утилиты для анимаций */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

/* Header и навигация - Минималистичный */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10000;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    background: #000000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-size: 0.875rem;
    font-weight: 300;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 300;
    transition: var(--transition);
    position: relative;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.2;
    display: flex;
    align-items: center;
}

.btn.btn-header-write {
    padding: 0.667rem 1.667rem;
    font-size: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    background-position: 0% 50%;
    animation: gradient-flow 3s ease infinite;
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 400;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

@keyframes rgb-gradient-flow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.btn-header-write:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Header Social Icons - скрыты по умолчанию */
.header-social {
    display: none;
}

/* Header mobile adaptation for screens less than 786px (Safari iOS/Telegram WebView) */
@media (max-width: 786px) {
    .nav-container {
        padding: 0.5rem 1rem !important;
        gap: 1rem !important;
        flex-wrap: nowrap !important;
    }

    .logo {
        font-size: 0.7rem !important;
        flex-shrink: 1;
    }

    .nav-links {
        display: none !important;
    }

    .btn-header-write {
        display: none !important;
    }

    .header-social {
        display: flex !important;
        gap: 0.75rem;
        align-items: center;
        flex-shrink: 0;
        margin-left: auto;
    }

    .header-social .social-link {
        width: 28px;
        height: 28px;
        color: rgba(255, 255, 255, 0.8);
        transition: var(--transition);
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.05);
    }

    .header-social .social-link:hover {
        color: white;
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-1px);
    }

    .header-social .social-link svg {
        width: 16px;
        height: 16px;
    }

    .header-social .social-link-behance .behance-text {
        font-size: 0.625rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        color: currentColor;
    }
}

/* Hero секция - Минималистичный дизайн */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 53px; /* Учитываем уменьшенный header (80px / 1.5) */
    background: transparent; /* Прозрачный фон, чтобы видео было видно */
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 0, 0, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 2; /* Поверх видео, но под контентом */
}

/* Оверлей с затемнением над видео для лучшей читаемости текста */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3); /* Полупрозрачный черный оверлей */
    pointer-events: none;
    z-index: 1; /* Поверх видео, но под ::before и контентом */
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.hero-content {
    max-width: 900px;
    text-align: center;
    position: relative;
    z-index: 3; /* Поверх видео, ::after и ::before */
    padding: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    color: #ffffff;
    font-family: var(--font-primary);
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.375rem);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3.5rem;
    font-weight: 400;
    line-height: 1.8;
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-boost-text {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 300;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2rem;
    margin-bottom: 0;
    letter-spacing: 0.01em;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: #0a0a0a !important; /* Однотонный цвет, немного светлее черного */
}

.hero-video video,
.hero-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1; /* Полная непрозрачность для видео */
    display: block; /* Убеждаемся, что элемент отображается */
    position: relative;
    z-index: 1; /* Видео поверх черного фона */
    filter: grayscale(30%) brightness(0.7); /* Десатурация и затемнение для лучшей читаемости текста */
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    color: var(--color-text-light);
    font-size: 1rem;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    font-weight: 400;
    letter-spacing: 0.02em;
    border: none;
    padding: 1.125rem 3rem;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    animation: gradient-flow 3s ease infinite;
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 0;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-primary span,
.btn-primary {
    position: relative;
    z-index: 1;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Секции */
.section {
    padding: 6rem 2rem;
    position: relative;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    color: var(--color-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.125rem;
    margin-bottom: 5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
    line-height: 1.7;
    letter-spacing: -0.01em;
}

/* Карточки услуг */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: none;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.service-card p {
    color: var(--color-text-light);
    line-height: 1.8;
    font-weight: 300;
}

/* Портфолио - Улучшенный современный дизайн */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.portfolio-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 4/3;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.portfolio-item:hover::before {
    opacity: 1;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(37, 99, 235, 0.2);
}

.portfolio-item:hover img {
    transform: scale(1.08);
}

.portfolio-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.portfolio-item:hover::after {
    opacity: 1;
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    color: white;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    pointer-events: none;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.portfolio-info p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.portfolio-item-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.image-count {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 3;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.portfolio-item:hover .image-count {
    background: rgba(37, 99, 235, 0.9);
    transform: scale(1.05);
}

.portfolio-category {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.375rem 1rem;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-category {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-light);
    font-size: 1.125rem;
}

.no-projects {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-light);
}

/* Карточки категорий */
.category-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 4/3;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

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

.category-card-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(37, 99, 235, 0.2);
}

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

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.category-card:hover::after {
    opacity: 1;
}

.category-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    color: white;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    pointer-events: none;
}

.category-card:hover .category-card-info {
    transform: translateY(0);
    opacity: 1;
}

.category-card-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.category-card-info .preview-project-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.category-card-image .no-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-light);
    font-size: 1.125rem;
}

/* Модальное окно категории */
.category-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.95); /* Немного светлее черного */
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.category-modal.active {
    opacity: 1;
    pointer-events: all;
}

.category-modal-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    min-height: 100vh;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
}

.category-modal-close {
    position: fixed;
    top: 6rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.category-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.category-modal-header {
    margin-bottom: 2rem;
    text-align: center;
}

.category-modal-title {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
}

/* Фильтры категории */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.category-filter-btn {
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #667eea 100%);
    background-size: 300% 300%;
    background-position: 0% 50%;
    animation: gradient-flow 3s ease infinite;
    border: 1px solid transparent;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

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

.category-filter-btn:hover {
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
    color: #ffffff;
}

.category-filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradient-flow 2s ease infinite;
    color: #ffffff;
    font-weight: 400;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.6);
}

/* Сетка подкатегорий в стиле New Projects */
.subcategories-grid-new {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    width: calc(100% + 4rem);
    max-width: 100vw;
    margin: 0 -2rem;
    padding: 0;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
}

.subcategory-card-new {
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: var(--color-bg);
    box-shadow: none;
    border: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.subcategories-grid-new > .subcategory-card-new:nth-of-type(2n) {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.subcategory-card-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    margin-bottom: 0;
    flex-shrink: 0;
}

.subcategory-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.subcategory-card-new:hover .subcategory-card-image img {
    transform: scale(1.05);
}

.subcategory-card-info {
    position: static;
    padding: 1.5rem 2rem;
    background: #ffffff;
    transform: none;
    opacity: 1;
    color: #ffffff;
    pointer-events: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.subcategory-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
    color: #ffffff;
    text-shadow: none;
}

.subcategory-card-count {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    line-height: 1.5;
    text-shadow: none;
    margin: 0;
}

/* Сетка проектов категории в стиле New Projects */
.category-projects-grid-new {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    width: calc(100% + 4rem);
    max-width: 100vw;
    margin: 0 -2rem;
    padding: 0;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
}

.category-project-card-new {
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    box-shadow: none;
    border: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.category-projects-grid-new > .category-project-card-new:nth-of-type(2n) {
    border-left: 1px solid #000000;
}

.category-project-card-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    margin-bottom: 0;
    flex-shrink: 0;
}

.category-project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-project-card-new:hover .category-project-card-image img {
    transform: scale(1.05);
}

.category-project-card-title-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    z-index: 2;
}

.category-project-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.01em;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.category-project-card-info {
    position: static;
    padding: 1.5rem 2rem;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    color: #ffffff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-project-card-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    line-height: 1.5;
    margin: 0;
}

.category-project-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.category-project-card-year,
.category-project-card-client {
    color: rgba(255, 255, 255, 0.7);
}

/* Карусель проектов с центральным элементом */
.projects-carousel-wrapper {
    margin-top: 2rem;
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

.projects-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 3rem 0;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Добавляем отступы по краям для центрирования первого и последнего элементов */
.projects-carousel::before,
.projects-carousel::after {
    content: '';
    flex: 0 0 calc(50% - 250px);
    min-width: calc(50% - 250px);
}

.projects-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.carousel-item {
    flex: 0 0 auto;
    width: 300px;
    height: 400px;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    scroll-snap-align: center;
    opacity: 0.2;
    transform: scale(0.65);
    z-index: 1;
}

.carousel-item.center {
    width: 500px;
    height: 600px;
    opacity: 1 !important;
    transform: scale(1) !important;
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.carousel-item.side {
    z-index: 5;
}

.carousel-item:hover {
    z-index: 15 !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
}

.carousel-item.center:hover {
    transform: scale(1.05) !important;
}

.carousel-item-image {
    position: relative;
    width: 100%;
    height: 70%;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.carousel-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item:hover .carousel-item-image img {
    transform: scale(1.1);
}

.carousel-item-info {
    padding: 1.5rem;
    background: #ffffff;
    height: 30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.carousel-item-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
}

.carousel-item.center .carousel-item-info h3 {
    font-size: 1.5rem;
}

.carousel-item-info p {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-item.center .carousel-item-info p {
    font-size: 1rem;
    -webkit-line-clamp: 3;
}

.carousel-item .image-count {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 3;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-item.center .image-count {
    background: rgba(37, 99, 235, 0.9);
    font-size: 1rem;
    padding: 0.625rem 1.25rem;
}

/* Модальное окно проекта */
.project-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.95); /* Немного светлее черного */
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.project-modal.active {
    opacity: 1;
    pointer-events: all;
}

.project-modal-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    width: 100%;
}

.project-modal-close {
    position: fixed;
    top: 6rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.project-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.project-modal-header {
    margin-bottom: 2rem;
    color: white;
}

.project-modal-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.project-modal-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
}

/* Главное изображение в модальном окне - на полный экран */
.project-modal-main-image {
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    min-height: 70vh;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-modal-main-image img {
    width: 100%;
    max-width: 100vw;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

/* Контейнер для видео (после главного изображения) */
.project-modal-videos-container {
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-modal-video-item {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin-bottom: 2rem;
}

.project-modal-video-item[data-video-type="local"] {
    min-height: 400px;
    cursor: pointer;
}

.project-modal-video-item[data-video-type="vk"],
.project-modal-video-item[data-video-type="rutube"],
.project-modal-video-item[data-video-type="youtube"] {
    min-height: 0;
    cursor: default;
}

.video-preview-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-modal-video-preview {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 80vh;
    min-height: 400px;
    object-fit: contain;
    display: block;
    outline: none;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    pointer-events: none;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
    pointer-events: none;
}

.project-modal-video-item:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.video-play-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    pointer-events: all;
    transition: transform 0.2s ease;
    outline: none;
}

.video-play-button:hover {
    transform: scale(1.1);
}

.video-play-button:active {
    transform: scale(0.95);
}

.video-play-button svg {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.project-modal-video-player {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 80vh;
    min-height: 400px;
    object-fit: contain;
    display: block;
    outline: none;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
}

/* Улучшаем отображение controls для видео */
.project-modal-video-player::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.7);
}

.project-modal-video-player::-webkit-media-controls-play-button,
.project-modal-video-player::-webkit-media-controls-fullscreen-button {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
}

/* Встроенные видео (VK, Rutube, YouTube) */
.video-embed-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (YouTube формат) */
    position: relative;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    border-radius: 8px;
    overflow: hidden;
    min-height: 400px; /* Минимальная высота для мобильных */
    display: block;
}

@media (min-width: 768px) {
    .video-embed-wrapper {
        min-height: 0; /* Убираем минимальную высоту на десктопе */
    }
}

.video-embed-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    z-index: 1;
}

/* Превью для внешних видео */
.video-embed-preview {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.video-embed-preview:hover {
    opacity: 0.95;
}

.video-embed-play-button {
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.video-embed-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 0, 0, 1) !important;
}

.video-embed-play-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

/* Анимация загрузки для видео */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-embed-loading {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Улучшаем отображение видео контейнера */
.project-modal-video-item[data-video-type="vk"],
.project-modal-video-item[data-video-type="rutube"],
.project-modal-video-item[data-video-type="youtube"] {
    min-height: 0;
    cursor: default;
    background: transparent;
    padding: 0;
}

.project-modal-video-item[data-video-type="vk"] .video-embed-wrapper,
.project-modal-video-item[data-video-type="rutube"] .video-embed-wrapper,
.project-modal-video-item[data-video-type="youtube"] .video-embed-wrapper {
    margin: 0 auto;
    max-width: 100%;
}

/* Вертикальная колонка дополнительных изображений */
.project-modal-additional-strip {
    width: 100%;
    margin-bottom: 2rem;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
}

.additional-strip-scroll {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.additional-strip-item {
    width: 100%;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.additional-strip-item:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.additional-strip-item.active {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.additional-strip-item img,
.additional-strip-item video {
    width: 100%;
    max-width: 100vw;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.additional-strip-item video {
    pointer-events: none;
}

/* Тело модального окна */
.project-modal-body {
    color: white;
    line-height: 1.8;
}

.project-modal-description {
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.project-modal-description h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.project-modal-description p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.project-modal-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.meta-item {
    color: rgba(255, 255, 255, 0.9);
}

.meta-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 600;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .project-modal-content {
        padding: 1rem;
    }

    .project-modal-main-image {
        min-height: 50vh;
    }

    .project-modal-main-image img {
        max-height: 70vh;
    }

    .project-modal-main-video {
        min-height: 50vh;
    }

    .project-modal-main-video video {
        max-height: 70vh;
    }

    .additional-strip-item {
        min-height: 50vh;
    }

    .additional-strip-item img,
    .additional-strip-item video {
        max-height: 70vh;
    }

    .project-modal-close {
        top: 5rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }



    .project-modal-meta {
        grid-template-columns: 1fr;
    }

    /* Адаптивная карусель проектов */
    .projects-carousel {
        padding: 2rem 0;
        gap: 1.5rem;
    }

    .projects-carousel::before,
    .projects-carousel::after {
        flex: 0 0 calc(50% - 150px);
        min-width: calc(50% - 150px);
    }

    .carousel-item {
        width: 250px;
        height: 350px;
    }

    .carousel-item.center {
        width: 350px;
        height: 450px;
    }

    .carousel-item-info h3 {
        font-size: 1.125rem;
    }

    .carousel-item.center .carousel-item-info h3 {
        font-size: 1.25rem;
    }

    .carousel-item-info {
        padding: 1rem;
    }

    .subcategory-title {
        font-size: 1.5rem;
    }
}

/* Форма */
.contact-form {
    max-width: 768px;
    margin: 0 auto;
    background: #ffffff;
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.form-input.error,
.form-textarea.error {
    border-color: #ef4444;
}

.form-input.error + .form-error,
.form-textarea.error + .form-error {
    display: block;
}

/* Модальное окно */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.95); /* Немного светлее черного */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* New Projects Section */
.new-projects-section {
    padding: 8rem 2rem 8rem;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
}

.new-projects-section .container {
    margin-bottom: 0;
    padding-bottom: 0;
}

.new-projects-title {
    text-align: center;
    margin-bottom: 0;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
    padding: 50px 2rem 2rem;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
}

.projects-grid-new {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0 0 2rem;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
}

.projects-grid-new .portfolio-item,
.projects-grid-new .new-project-card {
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: #0a0a0a !important; /* Однотонный цвет, немного светлее черного */
    box-shadow: none;
    border: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Вертикальное разделение между колонками - каждый четный .portfolio-item (2-й, 4-й, 6-й проект) */
.projects-grid-new > .portfolio-item:nth-of-type(2n) {
    border-left: 1px solid #000000;
}

/* Разделитель между рядами */
.projects-grid-new > .project-row-separator {
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    grid-column: 1 / -1;
}

.project-separator-info {
    width: 50%;
    padding: 0 1rem;
}

.project-separator-info:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.project-separator-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
    color: #ffffff;
    text-shadow: none;
}

.project-separator-info p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    line-height: 1.5;
    text-shadow: none;
    margin: 0;
}

.new-project-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.new-project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.new-project-card:hover .new-project-card-image img {
    transform: scale(1.02);
}

.new-project-card-info {
    padding: 1.5rem 2rem;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    color: #ffffff;
}

.new-project-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.new-project-card-meta {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.new-project-card-description {
    font-size: 0.95rem;
    color: var(--color-text-light);
    font-weight: 300;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.projects-grid-new .portfolio-item:hover,
.projects-grid-new .new-project-card:hover {
    transform: none;
}

.projects-grid-new .portfolio-item::after,
.projects-grid-new .new-project-card::after {
    display: none;
}

.projects-grid-new .portfolio-item-image,
.projects-grid-new .new-project-card .portfolio-item-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    margin-bottom: 0;
    width: 100%;
    flex-shrink: 0;
    background: #0a0a0a; /* Темный фон вместо светлого градиента */
}

.projects-grid-new .portfolio-item-image img,
.projects-grid-new .new-project-card .portfolio-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.projects-grid-new .portfolio-item:hover .portfolio-item-image img,
.projects-grid-new .new-project-card:hover .portfolio-item-image img {
    transform: scale(1.05);
}

.projects-grid-new .portfolio-info,
.projects-grid-new .new-project-card .portfolio-info {
    position: static;
    padding: 1.5rem 2rem;
    background: #0a0a0a !important; /* Однотонный цвет, немного светлее черного */
    transform: none;
    opacity: 1;
    color: #ffffff !important;
    pointer-events: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.projects-grid-new .portfolio-info h3,
.projects-grid-new .new-project-card .portfolio-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
    color: #ffffff;
    text-shadow: none;
}

.projects-grid-new .portfolio-info p,
.projects-grid-new .new-project-card .portfolio-info p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    line-height: 1.5;
    text-shadow: none;
}

/* Пагинация для новых проектов */
.new-projects-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 2rem;
    background: #0a0a0a !important; /* Однотонный цвет, немного светлее черного */
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 0;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.pagination-page:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.pagination-page.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    font-weight: 500;
}

.pagination-ellipsis {
    color: rgba(255, 255, 255, 0.5);
    padding: 0 0.5rem;
    font-size: 0.875rem;
}

.load-more-btn {
    display: block;
    margin: 4rem auto 0;
    padding: 1rem 3rem;
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.load-more-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* About Section - Nesterov TechART */
.about-section {
    padding: 0;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    height: 100vh;
    width: 100%;
    position: relative;
}

.about-section .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    height: 100%;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0;
    text-align: center;
    height: 100%;
}

.about-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    margin: 0;
}

.about-video {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.about-video video,
.about-video img.about-media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(50%) brightness(0.7) contrast(1.1); /* 50% насыщенности */
}

.about-video .video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    color: #888;
    font-size: 1.2rem;
    font-weight: 300;
}

.about-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    padding-top: 0;
    z-index: 2;
    pointer-events: none;
}

/* About Facts List - без размытого фона */
.about-facts-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    position: relative;
    z-index: 3;
    margin-top: 0.5rem;
    margin-bottom: 12rem;
    padding: 2rem 3rem;
}

/* Скрываем мобильный блок с фактами на десктопе */
.about-facts-mobile {
    display: none;
}

.about-fact-item {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
}

.about-fact-number {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    background-position: 0% 50%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1.2;
    font-family: var(--font-primary);
    animation: gradient-flow 3s ease infinite;
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.5));
}

.about-fact-text {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.01em;
    line-height: 1.4;
    text-transform: lowercase;
    font-family: var(--font-primary);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.about-title-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    max-width: 900px;
    padding: 0 4rem;
    z-index: 3;
    margin-top: 0;
}

.about-video-main-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    color: #ffffff;
    font-family: var(--font-primary);
    text-transform: lowercase;
    text-align: center;
}

.about-video-title {
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    font-weight: 300;
    color: #ffffff;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: 0;
    font-family: 'Helvetica Neue', 'Arial', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.4;
    white-space: nowrap;
}

.about-video-additional-text {
    font-size: clamp(0.875rem, 1.3vw, 1rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.6;
    max-width: 700px;
    margin: 1.5rem auto 0;
    font-family: var(--font-primary);
}

.about-cta-wrapper {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 3;
    width: 100%;
    max-width: 900px;
    padding: 0 2rem;
    pointer-events: auto;
}

.btn-about-cta {
    padding: 0.7rem 1.6rem;
    font-size: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    background-position: 0% 50%;
    animation: gradient-flow 3s ease infinite;
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 400;
    transition: var(--transition);
    display: inline-block;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.btn-about-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.btn-about-cta:hover::before {
    opacity: 1;
}

.btn-about-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-about-cta span {
    position: relative;
    z-index: 1;
}

.btn-about-cta:active {
    transform: translateY(0);
}

.about-cta-subtitle {
    font-size: clamp(0.75rem, 1.1vw, 0.875rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.01em;
    text-align: center;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
    font-family: var(--font-primary);
}

/* Categories Section */
.categories-section {
    padding: 4rem 0 !important;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    width: 100%;
    overflow: hidden;
}

.categories-section .container {
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.categories-section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
}

.categories-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    overflow: visible !important;
    padding: 0 !important;
    position: relative;
    width: 100% !important;
    min-height: 300px;
}

.category-link-item {
    position: relative !important;
    aspect-ratio: 16/9 !important;
    overflow: hidden !important;
    cursor: pointer !important;
    background: #0a0a0a !important; /* Однотонный цвет, немного светлее черного */
    transition: transform 0.3s ease;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 200px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 1 !important;
    pointer-events: auto !important;
}

.category-link-item:hover {
    transform: scale(1.02);
}

.category-link-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    display: block;
    pointer-events: none;
    aspect-ratio: 16/9;
}

.category-link-item:hover img {
    opacity: 0.9;
}

.category-placeholder {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Карусель категорий - навигация */

.category-link-title {
    position: absolute;
    top: 0;
    left: 0;
    padding: 1.5rem 2rem;
    background: transparent;
    color: white;
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    border-radius: 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 2;
}

.category-link-item.center .category-link-title {
    font-size: 1.125rem;
    padding: 1.5rem 2rem;
}

/* Разделитель категорий - скрыт на десктопе */
.category-separator {
    display: none;
}

/* Адаптивность для Safari iOS и Telegram WebView (786px) */
@media (max-width: 786px) {
    /* Фиксы для Safari/WebKit */
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-links {
        display: none;
    }
    
    .section {
        padding: 4rem 1rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-info {
        padding: 2rem 1.5rem;
    }
    
    .portfolio-info h3 {
        font-size: 1.5rem;
    }

    /* New Projects адаптивность */
    .new-projects-section {
        padding: 2rem 1rem 4rem;
    }

    .new-projects-section .container {
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .new-projects-title {
        font-size: 0.875rem;
        padding: 25px 1rem 0.5rem !important; /* Уменьшили padding-top на 50% (с 50px до 25px) и padding-bottom */
        margin-bottom: 0.5rem !important; /* Уменьшили отступ снизу для приближения к карточкам на 50% */
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    .projects-grid-new {
        grid-template-columns: 1fr;
        gap: 0;
        width: calc(100% + 2rem);
        margin: 0 -1rem;
        padding-top: 0.5rem; /* Уменьшили отступ сверху для приближения к заголовку */
    }

    .projects-grid-new .portfolio-item:nth-child(2n) {
        border-left: none;
    }

    .projects-grid-new .portfolio-item:nth-child(n+2) {
        border-top: none;
    }

    .projects-grid-new .portfolio-info {
        padding: 1rem 1rem; /* Уменьшили padding для мобильных */
    }

    .projects-grid-new .portfolio-info h3 {
        font-size: 1rem;
    }

    .projects-grid-new .portfolio-info p {
        font-size: 0.8125rem;
    }

    /* Адаптация изображений карточек на мобильных */
    .projects-grid-new .portfolio-item-image,
    .projects-grid-new .new-project-card .portfolio-item-image {
        aspect-ratio: 16/9; /* Более широкий формат для мобильных */
        background: #0a0a0a !important; /* Темный фон вместо светлого градиента */
    }

    /* Разделители для мобильных устройств */
    .project-separator-mobile {
        background: #000000 !important;
        padding: 1.25rem 1rem;
    }

    .project-separator-info-mobile {
        width: 100% !important;
        padding: 0;
    }

    .project-separator-info-mobile:first-child {
        border-right: none !important;
    }

    .project-separator-info-mobile h3 {
        font-size: 0.9375rem;
        font-weight: 500;
        margin-bottom: 0.375rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #ffffff;
    }

    .project-separator-info-mobile p {
        font-size: 0.8125rem;
        color: rgba(255, 255, 255, 0.6);
        font-weight: 300;
        line-height: 1.4;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Стили для карточек проектов на мобильных */
    /* Скрываем информацию в карточке на мобильных, так как она отображается в разделителе */
    .new-project-card-info {
        display: none;
    }

    .new-project-card-title {
        font-size: 0.9375rem;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .new-project-card-meta {
        font-size: 0.8125rem;
        color: rgba(255, 255, 255, 0.6);
        font-weight: 300;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Пагинация адаптивность */
    .new-projects-pagination {
        padding: 0.25rem 1rem 0.75rem !important;
        gap: 0.375rem !important;
        margin-top: 0 !important;
    }

    .pagination-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .pagination-page {
        min-width: 28px;
        height: 28px;
        padding: 0 0.375rem;
        font-size: 0.75rem;
    }

    .pagination-pages {
        gap: 0.25rem;
    }

    .pagination-ellipsis {
        padding: 0 0.25rem;
        font-size: 0.75rem;
    }

    /* About секция адаптивность */
    .about-section {
        padding: 0;
        min-height: auto;
        height: auto;
    }

    .about-section .container {
        height: auto;
    }

    .about-content {
        height: auto;
        display: flex;
        flex-direction: column;
    }

    .about-video-wrapper {
        margin-bottom: 0;
        height: 50vh;
        min-height: 350px;
        aspect-ratio: 16/9;
    }

    .about-video {
        height: 100%;
    }

    /* Горизонтальное масштабирование изображения на мобильных */
    .about-video video,
    .about-video img.about-media-image {
        object-fit: cover;
        object-position: center;
        width: 100%;
        height: 100%;
    }

    .about-video-overlay {        padding: 0;        display: flex;        flex-direction: column;        justify-content: space-between;        align-items: center;    }

    /* Скрываем факты в overlay на мобильных */
    .about-facts-desktop {
        display: none !important;
    }

    /* Показываем мобильный блок с фактами */
    .about-facts-mobile {
        display: flex;
        flex-direction: row;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
        background: #0a0a0a;
        width: 100%;
        justify-content: center;
    }

    .about-facts-mobile-column {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        flex: 1;
        max-width: 50%;
        align-items: center;
    }

    .about-facts-mobile-column:last-child {
        align-items: center;
    }

    .about-facts-mobile-column:last-child .about-fact-item {
        justify-content: center;
    }

    .about-facts-mobile-column:last-child .about-fact-number {
        min-width: auto;
        width: auto;
    }

    .about-facts-mobile .about-facts-mobile-column .about-fact-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: baseline !important;
        gap: 0 !important;
        justify-content: center !important;
        width: auto;
    }

    .about-facts-mobile .about-fact-number {
        font-size: clamp(1.125rem, 4vw, 1.5rem);
        font-weight: 300;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
        background-size: 200% 200%;
        background-position: 0% 50%;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: -0.02em;
        line-height: 1.2;
        font-family: var(--font-primary);
        animation: gradient-flow 3s ease infinite;
        filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.5));
        white-space: nowrap;
        display: inline-block;
        min-width: auto !important;
        width: auto !important;
        text-align: left;
        margin-right: 0.25rem !important;
    }

    .about-facts-mobile-column:last-child .about-fact-number {
        margin-right: 0.25rem !important;
        min-width: auto !important;
        width: auto !important;
    }

    .about-facts-mobile .about-fact-number .about-fact-unit {
        font-size: 0.65em;
        vertical-align: baseline;
        display: inline-block;
    }

    .about-facts-mobile .about-fact-text {
        font-size: clamp(0.625rem, 1.8vw, 0.75rem);
        font-weight: 300;
        color: rgba(255, 255, 255, 0.65);
        letter-spacing: 0.01em;
        line-height: 1.4;
        text-transform: lowercase;
        font-family: var(--font-primary);
        margin-left: 0;
    }

    .about-title-wrapper {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin-top: auto;
        margin-bottom: auto;
        padding: 2rem 2rem 1rem;
        width: 100%;
        max-width: 100%;
        z-index: 3;
    }

    .about-video-main-title {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
        margin-bottom: 0.75rem;
    }

    .about-video-title {
        font-size: clamp(1rem, 3vw, 1.5rem);
        font-weight: 300;
        white-space: normal;
    }

    .about-video-additional-text {
        font-size: clamp(0.75rem, 2vw, 0.9375rem);
        margin-top: 1rem;
        padding: 0 1rem;
    }

    .about-cta-wrapper {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: auto;
        padding: 1rem 1.5rem 2rem;
        width: 100%;
        max-width: 100%;
        z-index: 3;
    }

    .btn-about-cta {
        padding: 0.6rem 1.2rem;
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
    }

    .about-cta-subtitle {
        font-size: clamp(0.6875rem, 2vw, 0.8125rem);
        padding: 0 1rem;
    }

}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Утилиты */
.bg-alt {
    background: var(--color-bg-alt);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Дополнительные улучшения */
.service-card.text-center h3,
.service-card.text-center p {
    text-align: center;
}

/* Audit CTA Section */
.audit-cta-section {
    position: relative;
    padding: 2rem 2rem; /* Уменьшено для узкой полоски */
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    overflow: hidden;
    min-height: 150px; /* Уменьшено для узкой полоски */
    display: flex;
    align-items: center;
}

/* Если изображение загружено, используем градиент (изображения больше не загружаются) */
.audit-cta-section.has-background-image {
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
}

/* Фоновое изображение (общее с блоком Team) */
.audit-cta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* Убеждаемся, что текст всегда виден */
.audit-cta-section .container {
    position: relative;
    z-index: 10;
}

/* Контейнер для последнего блока */
.audit-cta-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.audit-cta-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(70%) brightness(0.4);
    position: relative;
    z-index: -1;
}

/* Стили A/B теста удалены - больше не используются */

/* Затемнение для читаемости текста */
.audit-cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.75) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Дополнительный серый оверлей для большего затемнения */
.audit-cta-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(50, 50, 50, 0.3);
    z-index: 1;
    pointer-events: none;
}

.audit-cta-form {
    position: relative;
    z-index: 10;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

/* Стили текста */
.audit-cta-title {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 300;
    color: #1a1a1a !important;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    letter-spacing: 0.01em;
    position: relative;
    z-index: 10;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Белый текст когда есть фоновое изображение */
.audit-cta-section.has-background-image .audit-cta-title {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.audit-cta-title strong {
    font-weight: 400;
}

/* Стили заголовка */
.audit-cta-heading {
    font-size: clamp(1.5rem, 3vw, 2rem); /* Уменьшено для узкой полоски */
    font-weight: 400;
    color: #ffffff; /* Белый текст по умолчанию */
    margin-bottom: 0.75rem;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* Белый текст когда есть фоновое изображение */
.audit-cta-section.has-background-image .audit-cta-heading {
    color: #ffffff !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* Стили подзаголовка */
.audit-cta-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem); /* Возвращено к исходному размеру */
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9) !important; /* Белый текст по умолчанию */
    margin-bottom: 2rem;
    line-height: 1.5;
    letter-spacing: 0.01em;
    opacity: 0.9;
    position: relative;
    z-index: 10;
    display: block !important;
    visibility: visible !important;
}

/* Белый текст когда есть фоновое изображение */
.audit-cta-section.has-background-image .audit-cta-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
    opacity: 1;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.btn-audit-telegram {
    display: block;
    padding: 1.25rem 2rem;
    font-size: 1.125rem; /* Возвращено к исходному размеру */
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #4c1d95 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    backdrop-filter: blur(10px);
    width: auto;
    max-width: fit-content;
    margin: 0 auto;
}

.btn-audit-telegram span {
    color: white;
    display: inline-block;
    font-size: 1.125rem; /* Возвращено к исходному размеру */
    font-weight: 500;
    line-height: 1.4;
}

.btn-audit-telegram:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #818cf8 50%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.6);
}

.btn-audit-telegram:hover span {
    color: white;
}

/* Audit CTA Video Section */
.audit-cta-video-section {
    position: relative;
    width: 100%;
    min-height: 600px;
    overflow: hidden;
}

.audit-cta-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 600px;
}

.audit-cta-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.audit-cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 4rem 3rem; /* Возвращено к исходному */
}

.audit-cta-content {
    max-width: 500px;
}

.audit-cta-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 300;
    color: white;
    margin-bottom: 2.5rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.audit-cta-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audit-form-group {
    position: relative;
}

.audit-phone-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.phone-flag {
    font-size: 1.25rem;
    line-height: 1;
}

.audit-phone-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-text);
    outline: none;
    padding: 0;
}

.audit-phone-input::placeholder {
    color: var(--color-text-light);
}

.audit-phone-input-wrapper:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.btn-audit-submit {
    padding: 0.875rem 2rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
}

.btn-audit-submit:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-audit-submit:active {
    transform: translateY(0);
}

.audit-cta-form .form-error {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.audit-phone-input.error + .form-error,
.audit-form-group .form-error:has(+ .audit-phone-input-wrapper .audit-phone-input.error) {
    display: block;
}

/* A/B Test Comparison Block */
.ab-test-container {
    margin-top: 4rem;
    padding: 2rem 0;
}

.ab-test-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Простое изображение (если только A.jpeg) */
.ab-test-single-image {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.ab-test-single-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

.ab-test-image-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    background: #000;
}

.ab-test-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ab-test-image-a {
    z-index: 1;
}

.ab-test-image-b {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.ab-test-divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 3;
    cursor: col-resize;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.ab-test-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: grab;
    transition: all 0.2s ease;
}

.ab-test-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(0.95);
}

.ab-test-handle::before,
.ab-test-handle::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 20px;
    background: var(--color-primary);
    border-radius: 2px;
}

.ab-test-handle::before {
    left: 35%;
    transform: translateX(-50%);
}

.ab-test-handle::after {
    right: 35%;
    transform: translateX(50%);
}

.ab-test-labels {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 4;
    pointer-events: none;
}

.ab-test-label {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 400;
    backdrop-filter: blur(10px);
    letter-spacing: 0.02em;
}

.ab-test-label-a {
    margin-right: auto;
}

.ab-test-label-b {
    margin-left: auto;
}

/* Адаптивность для Audit CTA Section */
@media (max-width: 768px) {
    .audit-cta-section.section {
        padding: 0.5rem 0.5rem !important;
        min-height: 50px !important;
        height: auto !important;
    }
    
    .audit-cta-section {
        padding: 0.5rem 0.5rem !important;
        min-height: 50px !important;
        height: auto !important;
    }
    
    .audit-cta-container {
        max-width: 100%;
        padding: 0 0.25rem;
    }
    
    .audit-cta-form {
        padding: 0;
    }
    
    .audit-cta-form {
        display: flex;
        flex-direction: column;
    }
    
    .audit-cta-heading {
        font-size: clamp(0.63rem, 1.89vw, 0.812rem) !important; /* Уменьшено на 30% (было clamp(0.9rem, 2.7vw, 1.16rem)) */
        margin-bottom: 0.2rem !important;
        line-height: 1.2 !important;
        max-width: 100%;
        word-wrap: break-word;
        order: 1;
    }
    
    .btn-audit-telegram {
        padding: 0.441rem 1.008rem !important; /* Увеличено в 1.5 раза */
        font-size: 0.63rem !important; /* Увеличено в 1.5 раза */
        border-radius: 4px !important;
        max-width: 90%;
        margin: 0 auto 0.1rem !important;
        order: 2;
    }
    
    .audit-cta-subtitle {
        font-size: clamp(0.4305rem, 1.148vw, 0.525rem) !important; /* Уменьшено на 30% (было clamp(0.615rem, 1.64vw, 0.75rem)) */
        margin-bottom: 0 !important;
        line-height: 1.2 !important;
        max-width: 100%;
        word-wrap: break-word;
        order: 3;
    }
    
    .btn-audit-telegram span {
        font-size: 0.63rem !important; /* Увеличено в 1.5 раза */
        line-height: 1.3 !important;
        white-space: normal;
        word-wrap: break-word;
    }
}

/* How We Work Section */
.how-we-work-section {
    padding: 8rem 2rem;
    background: #0a0a0a !important; /* Однотонный цвет, немного светлее черного */
}

/* Декоративная полоска-разделитель между секциями - такой же как в футере */
.section-divider {
    width: 100%;
    height: 0;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: block;
    line-height: 0;
    font-size: 0;
}

/* Убираем все псевдоэлементы, которые могут создавать дополнительную визуальную толщину */
.section-divider::before,
.section-divider::after {
    display: none !important;
    content: none !important;
}

.how-we-work-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.how-we-work-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: var(--color-bg-alt);
}

.how-we-work-image img,
.how-we-work-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    color: #888;
    font-size: 1.2rem;
    font-weight: 300;
}

.how-we-work-info .section-title {
    text-align: left;
    margin-bottom: 3rem;
    color: #ffffff;
}

.work-steps {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.work-step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.step-number {
    font-size: 1.5rem;
    font-weight: 300;
    color: #ffffff;
    line-height: 1.5rem;
    min-width: 50px;
    opacity: 0.4;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    align-self: flex-start;
}

.step-content {
    flex: 1;
}

.step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.step-header h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0;
    color: #ffffff;
    flex: 1;
    line-height: 1.5rem;
}

.step-toggle {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0.6;
    border-radius: 4px;
}

.step-toggle:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.step-toggle-icon {
    transition: transform 0.3s ease;
}

.work-step.expanded .step-toggle-icon {
    transform: rotate(180deg);
}

.step-short {
    color: #ffffff;
    font-weight: 300;
    line-height: 1.7;
    margin: 0;
}

.step-expanded {
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    opacity: 0;
    filter: blur(10px);
    transform: scale(0.96) translateY(-5px);
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, filter, transform;
}

.work-step.expanded .step-expanded {
    max-height: 1000px;
    opacity: 1;
    margin-top: 1rem;
    filter: blur(0);
    transform: scale(1) translateY(0);
}

.step-expanded-content {
    color: #ffffff;
    font-weight: 300;
    line-height: 1.7;
}

.step-expanded-content p {
    margin: 0.5rem 0;
}

.step-expanded-content ul,
.step-expanded-content ol {
    margin: 0.75rem 0;
    padding-left: 2rem;
}

.step-expanded-content ul {
    list-style-type: disc;
}

.step-expanded-content ol {
    list-style-type: decimal;
}

.step-expanded-content li {
    margin: 0.25rem 0;
}

.step-expanded-content h2,
.step-expanded-content h3 {
    margin: 1rem 0 0.5rem 0;
    font-weight: 400;
}

.step-expanded-content h2 {
    font-size: 1.5rem;
}

.step-expanded-content h3 {
    font-size: 1.25rem;
}

.step-expanded-content strong {
    font-weight: 500;
}

.step-expanded-content em {
    font-style: italic;
}

.step-expanded-content u {
    text-decoration: underline;
    filter: blur(0);
    transform: scale(1) translateY(0);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-expanded p {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    line-height: 1.7;
    margin: 0;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Адаптация раздела "Как мы работаем" для мобильных устройств */
@media (max-width: 768px) {
    .how-we-work-section {
        padding: 4rem 1.5rem;
        margin-top: -20%; /* Поднимаем блок выше на 20% ближе к концу блока категорий */
    }

    .how-we-work-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* Перемещаем видео после этапов */
    .how-we-work-image {
        order: 2;
    }

    .how-we-work-info {
        order: 1;
    }

    /* Заголовок "Как мы работаем" - меньше и в одну строчку */
    .how-we-work-info .section-title {
        font-size: clamp(1.2rem, 5vw, 1.6rem);
        white-space: nowrap;
        margin-bottom: 2rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Видео шире по горизонтали */
    .how-we-work-image {
        aspect-ratio: 16/9;
        width: 100%;
    }

    /* Уменьшаем отступы между этапами на 25% */
    .work-steps {
        gap: 1.125rem; /* было 1.5rem, уменьшено на 25% */
    }

    /* Уменьшаем gap между номером и текстом этапа на 15% */
    .work-step {
        gap: 0.6375rem; /* было 0.75rem, уменьшено на 15% */
    }

    /* Уменьшаем размер цифры этапа на 15% */
    .step-number {
        font-size: 0.493rem; /* было 0.58rem, уменьшено на 15% */
        min-width: 17px; /* было 20px, уменьшено на 15% */
        line-height: 0.493rem; /* было 0.58rem, уменьшено на 15% */
    }

    /* Уменьшаем размер заголовка этапа на 15% (еще на 15% меньше) */
    .step-header h3 {
        font-size: 0.39918125rem; /* было 0.469625rem, уменьшено еще на 15% */
        line-height: 0.52200625rem; /* было 0.614125rem, уменьшено еще на 15% */
        color: rgba(255, 255, 255, 0.85);
    }

    /* Уменьшаем размер краткого описания на 15% */
    .step-short {
        font-size: 0.6375rem; /* было 0.75rem, уменьшено на 15% */
        line-height: 1.4;
        color: rgba(255, 255, 255, 0.8);
    }

    /* Уменьшаем размер расширенного описания на 15% */
    .step-expanded-content {
        font-size: 0.6375rem; /* было 0.75rem, уменьшено на 15% */
        line-height: 1.4;
    }

    .step-expanded-content p {
        font-size: 0.6375rem; /* было 0.75rem, уменьшено на 15% */
    }
}

/* Team Section */
.team-section {
    position: relative;
    padding: 0;
    min-height: 44.44vh; /* Уменьшено еще больше (66.67vh / 1.5) */
    overflow: visible;
    background: #0a0a0a; /* Однотонный цвет, немного светлее черного */
    border: none;
    outline: none;
}

.team-background-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    border: none;
    outline: none;
}

.team-background-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Темный оверлей для затемнения фона */
    z-index: 1;
    pointer-events: none;
}

.team-background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%) brightness(0.4); /* Усилено затемнение */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    display: none; /* По умолчанию скрыто, показывается только если загружено */
    border: none;
    outline: none;
}

.team-background-wrapper .image-placeholder {
    display: none; /* Скрываем placeholder, используем градиентный фон */
}

.team-overlay {
    position: relative;
    z-index: 2;
    min-height: 44.44vh; /* Уменьшено еще больше */
    display: flex;
    align-items: center;
    padding: 3.5rem 2rem; /* Уменьшено еще больше */
    background: transparent; /* Прозрачный, чтобы видно было свечение от карточек */
    overflow: visible;
}

.team-overlay .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

.team-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 2.67rem; /* Уменьшено в 1.5 раза */
    width: 100%;
    padding: 0;
    min-height: 80px;
}

.team-header-left {
    position: absolute;
    left: 0;
    top: -1rem; /* Опущено ниже, чтобы не пересекаться с разделителем */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1;
}

.team-label-left {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    padding: 0;
    letter-spacing: 0.02em;
    line-height: 1;
}

.team-header-actions {
    margin-top: 0.25rem;
}

.team-header-center {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.team-section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    text-align: center;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-transform: none;
    line-height: 1.1;
}

.team-section-connector {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 300;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    letter-spacing: 0.02em;
}

.team-section-subtitle {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 600;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

.team-roles-title-wrapper {
    text-align: center;
    width: 100%;
    margin: 0 auto;
    margin-bottom: 2rem;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.team-roles-title {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 300;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    letter-spacing: 0.02em;
}

/* Команда с круглыми миниатюрами */
.team-members-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1rem;
    margin-top: 1rem;
    overflow: visible;
    width: 100%;
    padding: 0 1rem;
}

.team-members-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    width: 100%;
    margin: 0 auto;
    text-align: center;
    flex-wrap: nowrap;
    padding: 1.5rem 1rem;
}

.team-members-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.team-members-container {
    scroll-snap-type: x mandatory;
}

.team-member-avatar {
    display: none; /* По умолчанию скрыты, показываются только если есть фото и данные */
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    position: relative;
    z-index: 1;
    text-align: center;
    flex-shrink: 0;
    scroll-snap-align: start;
    width: 160px;
    height: 280px; /* Фиксированная высота для одинакового размера */
    min-height: 280px;
    max-height: 280px;
    background: linear-gradient(180deg, rgba(15, 15, 25, 0.98) 0%, rgba(10, 10, 20, 1) 100%);
    border: 2px solid rgba(139, 92, 246, 0.6);
    border-radius: 4px;
    overflow: hidden; /* Изменено с visible на hidden для контроля размера */
    box-shadow: 
        0 0 0 1px rgba(139, 92, 246, 0.3),
        0 0 30px rgba(139, 92, 246, 0.5),
        0 0 50px rgba(139, 92, 246, 0.3),
        0 4px 30px rgba(0, 0, 0, 0.8),
        inset 0 0 60px rgba(139, 92, 246, 0.15);
    pointer-events: auto;
}

.team-member-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 50% 30%, rgba(139, 92, 246, 0.25) 0%, transparent 60%),
        radial-gradient(circle at 50% 70%, rgba(168, 85, 247, 0.15) 0%, transparent 60%),
        repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(0, 0, 0, 0.15) 3px, rgba(0, 0, 0, 0.15) 6px);
    opacity: 0.7;
    pointer-events: none;
    z-index: 1;
}

.team-member-avatar::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.9) 0%,
        transparent 20%,
        transparent 80%,
        rgba(168, 85, 247, 0.7) 100%);
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    filter: blur(12px);
}

.team-member-avatar:hover::after {
    opacity: 0.8;
}

/* Убраны все hover-анимации кроме свечения градиента */

.team-avatar-image {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(20, 20, 35, 0.95) 0%, rgba(10, 10, 20, 1) 100%);
    z-index: 2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: inset 0 -10px 30px rgba(139, 92, 246, 0.2);
}

.team-avatar-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
    pointer-events: none;
}

.avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    filter: brightness(0.85) contrast(1.15) saturate(1.1);
    transition: filter 0.3s ease, transform 0.3s ease;
    mix-blend-mode: normal;
}

/* Убраны hover-анимации для avatar-photo */

.avatar-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(30, 41, 59, 0.4));
    color: rgba(168, 85, 247, 0.9);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0;
    z-index: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.team-avatar-label {
    font-size: 0.6875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    letter-spacing: 0.03em;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    z-index: 2;
    width: 100%;
    word-wrap: break-word;
    padding: 0.75rem 0.5rem;
    background: linear-gradient(180deg, rgba(10, 10, 20, 0.98) 0%, rgba(5, 5, 15, 1) 100%);
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    flex: 1; /* Занимает оставшееся пространство */
    min-height: 120px; /* Минимальная высота для выравнивания */
    max-height: 120px; /* Максимальная высота для выравнивания */
}

/* Убраны hover-анимации для team-avatar-label */

.team-avatar-role {
    font-weight: 600;
    display: block;
    transition: all 0.3s ease;
    color: rgba(168, 85, 247, 0.95);
    text-transform: uppercase;
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.6), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.team-member-avatar:hover .team-avatar-role {
    color: rgba(192, 132, 252, 1);
    text-shadow: 0 0 12px rgba(168, 85, 247, 0.8), 0 0 20px rgba(139, 92, 246, 0.5);
}

.team-avatar-name {
    font-size: 1.625rem;
    font-weight: 500;
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    min-height: 1.625rem; /* Фиксированная высота для выравнивания */
    line-height: 1.625rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Убраны hover-анимации для team-avatar-name */

.team-avatar-experience {
    font-size: 0.6875rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    display: block;
}

.team-avatar-signature {
    font-size: 0.625rem;
    font-weight: 400;
    color: rgba(168, 85, 247, 0.85);
    display: block;
    margin-top: auto; /* Прижимается к низу */
    padding-top: 0.375rem;
    font-style: italic;
    line-height: 1.4;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.5), 0 1px 2px rgba(0, 0, 0, 0.7);
    min-height: 1.5rem; /* Минимальная высота для выравнивания */
    max-height: 2.5rem; /* Максимальная высота */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.team-member-avatar:hover .team-avatar-signature {
    color: rgba(192, 132, 252, 1);
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.7), 0 0 15px rgba(139, 92, 246, 0.4);
}

/* Углы карточки через псевдоэлементы */
.team-avatar-image::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 24px;
    height: 24px;
    border-top: 2px solid rgba(168, 85, 247, 0.8);
    border-left: 2px solid rgba(168, 85, 247, 0.8);
    border-top-left-radius: 4px;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}

.team-avatar-label::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    border-bottom: 2px solid rgba(168, 85, 247, 0.8);
    border-right: 2px solid rgba(168, 85, 247, 0.8);
    border-bottom-right-radius: 4px;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}

/* Убраны hover-анимации для углов карточки */

/* Новая структура карточек команды */
.team-avatar-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    position: relative;
    z-index: 2;
}

.team-avatar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
    padding: 0;
    margin-top: 0.25rem;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

.team-avatar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.team-avatar-toggle svg {
    transition: transform 0.3s ease;
}

.team-avatar-toggle.active svg {
    transform: rotate(45deg);
}

/* Всплывающее окно - упрощенная версия */
.team-member-popup {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    min-width: 250px;
    max-width: 300px;
    display: none;
    pointer-events: auto;
}

.team-member-popup.active {
    display: block;
}

.team-popup-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.team-popup-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.team-popup-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.team-popup-avatar-small .popup-avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-popup-avatar-small .popup-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.team-popup-name-role {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.team-popup-name-role .popup-role {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
}

.team-popup-name-role .popup-name {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.6);
}

.team-popup-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team-popup-experience {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.popup-experience-label {
    display: none;
}

.popup-experience-text {
    font-size: 0.875rem;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.6;
    text-align: left;
}

/* Кнопки навигации */
.team-nav-btn {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 3;
}

.team-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: scale(1.1);
}

.team-nav-btn:active {
    transform: scale(0.95);
}

.team-nav-btn svg {
    width: 20px;
    height: 20px;
}

/* Кнопка "Подробнее" для команды */
.team-details-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.team-details-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Модальное окно команды */
.team-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.95); /* Немного светлее черного */
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.team-modal.active {
    opacity: 1;
    pointer-events: all;
}

.team-modal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    min-height: 100vh;
}

.team-modal-close {
    position: fixed;
    top: 6rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.team-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.team-modal-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: 0.02em;
}

.team-modal-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.team-modal-item {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-modal-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    position: relative;
}

.team-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-modal-avatar-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    color: rgba(255, 255, 255, 0.7);
    font-size: 2.5rem;
    font-weight: 300;
}

.team-modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.team-modal-role {
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.01em;
}

.team-modal-name {
    font-size: 1.125rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.team-modal-experience {
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.6;
}

.team-modal-signature {
    font-size: 0.9375rem;
    font-weight: 400;
    color: rgba(139, 92, 246, 0.9);
    margin: 0.75rem 0 0 0;
    line-height: 1.6;
    font-style: italic;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
}

/* Стили для категорий и миниатюрных карточек в стиле Dota 2 */
.team-modal-categories {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.team-category-section {
    margin-bottom: 2rem;
}

.team-category-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 0.75rem 0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: left;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.team-category-description {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 1.5rem 0;
    font-weight: 300;
    font-style: italic;
}

.team-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 1.5rem;
    width: 100%;
}

/* Миниатюрная карточка сотрудника */
.team-member-mini-card {
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.team-category-grid .team-member-mini-card:nth-of-type(4n) {
    border-right: none;
}

.team-member-mini-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
}

.team-member-mini-avatar {
    width: 100%;
    aspect-ratio: 21/9;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.95) 0%, rgba(10, 10, 20, 1) 100%);
}

.team-member-mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.9) contrast(1.1);
    transition: filter 0.3s ease;
}

.team-member-mini-card:hover .team-member-mini-avatar img {
    filter: brightness(1.1) contrast(1.15);
}

.team-member-mini-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(30, 41, 59, 0.4));
    color: rgba(168, 85, 247, 0.9);
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.team-member-mini-info {
    padding: 0.75rem;
    background: rgba(10, 10, 20, 0.8);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 60px;
}

.team-member-mini-role {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(168, 85, 246, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.6), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.team-member-mini-name {
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Адаптивность для миниатюрных карточек */
@media (max-width: 768px) {
    .team-category-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    .team-category-grid .team-member-mini-card:nth-of-type(4n) {
        border-right: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .team-category-grid .team-member-mini-card:nth-of-type(5n) {
        border-right: none !important;
    }
    
    .team-category-title {
        font-size: 1.05rem !important; /* Уменьшено на 30% от 1.5rem */
    }
    
    .team-member-mini-avatar {
        aspect-ratio: 3/4 !important; /* Вертикальный формат вместо горизонтального 21/9 */
    }
    
    .team-member-mini-info {
        padding: 0.25rem !important;
        min-height: 25px !important;
    }
    
    .team-member-mini-role {
        font-size: 0.5rem !important;
    }
    
    .team-member-mini-name {
        font-size: 0.625rem !important;
    }
    
    .team-member-mini-placeholder {
        font-size: 1rem !important; /* Уменьшено в 2 раза от 2rem */
    }
    
    .team-modal-close {
        top: 5rem !important;
        right: 1rem !important;
        width: 40px !important;
        height: 40px !important;
    }
    
    .team-modal-close svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .team-modal-title {
        font-size: clamp(1.6rem, 3.2vw, 2.4rem) !important; /* Уменьшено на 20% */
        margin-top: 1.5rem !important; /* Опущено для выравнивания с кнопкой закрытия */
    }
}

@media (max-width: 480px) {
    .team-category-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .team-modal-content {
        padding: 3rem 1rem;
    }
}

/* Модальное окно с детальной информацией о сотруднике */
.team-member-detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.95);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.team-member-detail-modal.active {
    opacity: 1;
    pointer-events: all;
}

.team-member-detail-content {
    max-width: 768px;
    margin: 2rem auto;
    padding: 3rem 2rem;
    position: relative;
    min-height: calc(100vh - 4rem);
}

.team-member-detail-close {
    position: fixed;
    top: 6rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.team-member-detail-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.team-member-detail-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.team-member-detail-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(139, 92, 246, 0.6);
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
}

.team-member-detail-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-member-detail-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(30, 41, 59, 0.4));
    color: rgba(168, 85, 247, 0.9);
    font-size: 5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.team-member-detail-title {
    flex: 1;
}

.team-member-detail-role {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: rgba(168, 85, 247, 0.95);
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

.team-member-detail-name {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.team-member-detail-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.team-member-detail-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.team-member-detail-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(168, 85, 247, 0.95);
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    padding-bottom: 0.5rem;
}

.team-member-detail-section-text {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.6;
}

.team-member-detail-signature {
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
}

.team-member-detail-about {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    white-space: pre-wrap; /* Сохраняем переносы строк */
}

/* Адаптивность для детального модального окна */
@media (max-width: 768px) {
    .team-member-detail-header {
        flex-direction: column;
        text-align: center;
    }
    
    .team-member-detail-avatar {
        width: 150px;
        height: 150px;
    }
    
    .team-member-detail-content {
        padding: 2rem 1rem;
        margin: 1rem auto;
    }
    
    .team-member-detail-close {
        top: 4rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* Адаптивность Team Section */
@media (max-width: 768px) {
    /* Горизонтальная адаптация для мобильных устройств */
    .team-section {
        min-height: 30vh; /* Уменьшена высота для горизонтального блока */
    }

    .team-background-wrapper {
        height: 100%;
    }

    .team-background-image {
        object-fit: cover;
        object-position: center center; /* Фокус на центре для горизонтального отображения */
    }

    .team-overlay {
        padding: 2rem 0; /* Убраны боковые отступы, чтобы карточки не обрезались */
        min-height: 30vh; /* Уменьшена высота */
    }

    .team-overlay .container {
        padding: 0 0.5rem !important; /* Отступы от краев экрана */
    }

    .team-header {
        margin-bottom: 1.5rem;
        min-height: 60px;
    }

    .team-header-left {
        top: -1.35rem !important; /* Поднято еще выше в 2 раза */
        flex-direction: column;
        gap: 0.05rem !important; /* Минимальный gap между Team и кнопкой */
    }

    .team-label-left {
        font-size: clamp(1rem, 2.5vw, 1.5rem) !important; /* Уменьшен размер */
    }

    .team-header-actions {
        margin-top: 0 !important; /* Кнопка максимально близко к Team */
    }

    .team-details-btn {
        padding: 0.2rem 0.4rem !important; /* Уменьшен размер */
        font-size: 0.45rem !important; /* Уменьшен размер */
    }

    .team-section-title {
        font-size: clamp(1.2rem, 3.2vw, 2rem) !important; /* Уменьшен пропорционально */
        margin-bottom: 0.375rem;
    }

    .team-section-connector {
        font-size: clamp(0.7rem, 1.2vw, 0.8rem) !important; /* Уменьшен пропорционально */
        margin-bottom: 0.375rem;
    }

    .team-section-subtitle {
        font-size: clamp(0.8rem, 2vw, 1rem) !important; /* Уменьшен пропорционально */
    }

    .team-roles-title-wrapper {
        margin-bottom: 0.2rem !important; /* Минимальный отступ, чтобы текст был ближе к карточкам */
        margin-top: 0.5rem;
    }

    .team-roles-title {
        font-size: clamp(0.7rem, 1.2vw, 0.8rem) !important; /* Уменьшен пропорционально */
    }

    .team-members-wrapper {
        gap: 0 !important;
        margin-top: 0.5rem !important;
        padding: 0 !important; /* Убраны отступы для увеличения ширины карточек */
        position: relative !important;
        align-items: center !important;
    }

    .team-members-container {
        gap: 0.2rem !important; /* УВЕЛИЧЕН отступ между карточками */
        padding: 0.5rem 0 !important; /* Убраны боковые отступы */
        width: 100% !important;
        margin: 0 !important;
        flex: 1 !important;
        overflow-x: visible !important; /* Убран горизонтальный скролл */
        overflow-y: visible !important;
        justify-content: center !important; /* Центрируем карточки */
    }

    /* Карточки в одну линию, прямоугольные, 5 штук - ШИРОКИЕ с отступами от краев */
    .team-member-avatar {
        width: calc(((100% - 1rem - 0.8rem) / 5) * 1.2) !important; /* 5 карточек: padding контейнера 0.5rem*2=1rem + 4 gap по 0.2rem=0.8rem. Ширина увеличена на 20% */
        min-width: 0 !important;
        max-width: none !important;
        aspect-ratio: 0.55 !important; /* Более высокие прямоугольные карточки */
        height: auto !important;
        min-height: 120px !important; /* Увеличена минимальная высота */
        max-height: 180px !important; /* Увеличена максимальная высота */
        border-width: 1px !important;
        border-radius: 4px !important;
        flex-shrink: 0 !important;
    }

    .team-avatar-image {
        height: 60% !important; /* Изображение занимает 60% высоты карточки */
        min-height: 50px !important;
        flex-shrink: 0 !important;
    }

    .team-avatar-image .avatar-photo {
        object-fit: cover !important; /* Сохраняем пропорции изображения */
        width: 100% !important;
        height: 100% !important;
    }

    .avatar-placeholder {
        font-size: 1.5rem !important; /* Увеличен размер для читаемости */
    }

    .team-avatar-label {
        font-size: 0.5rem !important; /* Увеличен размер для читаемости */
        padding: 0.25rem 0.15rem !important;
        gap: 0.1rem !important;
        min-height: auto !important;
        max-height: none !important;
        line-height: 1.2;
        white-space: nowrap; /* Без переноса текста */
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .team-avatar-role {
        font-size: 0.5rem !important; /* Увеличен размер */
        line-height: 1.2;
    }

    .team-avatar-name {
        font-size: 0.6rem !important; /* Увеличен размер */
        line-height: 1.2;
        white-space: nowrap; /* Без переноса текста */
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Кнопки перелистывания скрыты - не нужны, карточки умещаются */
    .team-nav-btn {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .team-overlay {
        padding: 4rem 1.5rem; /* Уменьшено в 1.5 раза */
        min-height: 66.67vh;
    }

    .team-section {
        min-height: 66.67vh;
    }

    .team-header {
        margin-bottom: 2rem; /* Уменьшено в 1.5 раза */
        position: relative;
    }
    
    .team-header {
        min-height: 70px;
    }

    .team-header-left {
        top: -2rem; /* Опущено вниз для мобильных */
    }

    .team-label-left {
        font-size: clamp(1.25rem, 2.5vw, 2rem);
    }

    .team-details-btn {
        padding: 0.35rem 0.625rem;
        font-size: 0.625rem;
    }

    .team-section-title {
        margin-bottom: 0.5rem;
    }

    .team-section-connector {
        margin-bottom: 0.5rem;
        font-size: 0.9375rem;
    }

    .team-section-subtitle {
        font-size: clamp(1rem, 2vw, 1.25rem);
        font-weight: 600;
    }

    .team-members-wrapper {
        gap: 0 !important;
        padding: 0 0.2rem !important; /* Минимальные боковые отступы */
    }

    .team-members-container {
        gap: 0.2rem !important; /* УВЕЛИЧЕН отступ между карточками */
        padding: 0.5rem 0 !important; /* Убраны боковые отступы */
        overflow-x: visible !important; /* Убран горизонтальный скролл */
    }

    .team-member-avatar {
        width: calc(((100% - 1rem - 0.8rem) / 5) * 1.2) !important; /* 5 карточек: padding контейнера 0.5rem*2=1rem + 4 gap по 0.2rem=0.8rem. Ширина увеличена на 20% */
        min-height: 120px !important;
        max-height: 180px !important;
        aspect-ratio: 0.55 !important;
    }

    .team-avatar-image {
        height: 120px;
    }

    .avatar-placeholder {
        font-size: 2.5rem;
    }

    .team-avatar-label {
        font-size: 0.625rem;
        padding: 0.625rem 0.4rem;
        gap: 0.25rem;
    }

    .team-avatar-role {
        font-size: 0.5625rem;
    }

    .team-avatar-name {
        font-size: 0.75rem;
    }

    .team-nav-btn {
        width: 48px;
        height: 48px;
    }

    .team-nav-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .team-overlay {
        padding: 2rem 1rem; /* Уменьшено еще больше */
        min-height: 44.44vh;
    }

    .team-section {
        min-height: 44.44vh;
    }

    .team-header {
        margin-bottom: 1.25rem; /* Уменьшено еще больше */
        min-height: 60px;
    }

    .team-header-left {
        top: -5rem;
    }

    .team-label-left {
        font-size: clamp(1.5rem, 3vw, 2.5rem);
        font-weight: 400;
    }

    .team-details-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.5625rem;
    }

    .team-section-title {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
        margin-bottom: 0.5rem;
    }

    .team-section-connector {
        margin-bottom: 0.375rem;
        font-size: 0.875rem;
    }

    .team-section-subtitle {
        font-size: clamp(0.9375rem, 2vw, 1.125rem);
        font-weight: 600;
    }

    .team-roles-title-wrapper {
        margin-bottom: 1.25rem;
        margin-top: 0.5rem;
    }

    .team-roles-title {
        font-size: 0.875rem;
    }

    .team-members-wrapper {
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .team-members-container {
        gap: 1.25rem;
        padding: 1rem 0.5rem;
    }

    .team-member-avatar {
        width: 120px;
        min-height: 180px;
    }

    .team-avatar-image {
        height: 100px;
    }

    .avatar-placeholder {
        font-size: 2rem;
    }

    .team-avatar-label {
        font-size: 0.5625rem;
        padding: 0.5rem 0.35rem;
        gap: 0.2rem;
    }

    .team-avatar-role {
        font-size: 0.5rem;
    }

    .team-avatar-name {
        font-size: 0.6875rem;
    }

    .team-avatar-label {
        font-size: 0.625rem;
        margin-top: 0.5rem;
    }

    .team-nav-btn {
        width: 36px;
        height: 36px;
    }

    .team-nav-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Footer */
.footer {
    background: rgba(10, 10, 10, 0.95); /* Немного светлее черного */
    backdrop-filter: blur(20px);
    color: rgba(255, 255, 255, 0.9);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: start;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-section:last-child {
    align-items: flex-start;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 400;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 300;
    transition: var(--transition);
    font-size: 1rem;
}

.footer-link:hover {
    color: white;
}

.btn-footer-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #229ED9 50%, #0088cc 100%);
    background-size: 200% 200%;
    background-position: 0% 50%;
    animation: gradient-flow 3s ease infinite;
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-weight: 400;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: var(--transition);
    max-width: 200px;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
}

.btn-footer-telegram:hover {
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.5);
    color: white;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: flex-start;
}

.social-link {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.social-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.social-link-behance .behance-text {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: currentColor;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    font-weight: 300;
}

/* Footer mobile adaptation for screens less than 768px */
@media (max-width: 768px) {
    .footer {
        padding: 3.2rem 2rem 2.2rem !important; /* Уменьшаем верхний padding на 20%: было 4rem (4 * 0.8 = 3.2), нижний увеличен на 10%: было 2rem (2 * 1.1 = 2.2) */
    }

    .footer-content {
        grid-template-columns: 1fr 1fr !important; /* Две колонки: контакты слева, соц сети справа */
        margin-top: -2.4rem !important; /* Поднимаем контент выше на 20%: было -2rem (-2 * 1.2 = -2.4) */
        margin-bottom: 1rem !important; /* Уменьшаем отступ снизу, чтобы поднять footer-bottom выше */
        gap: 0 !important; /* Убираем gap между колонками для равномерных отступов */
    }

    .footer-section:first-child {
        gap: 0.3rem !important; /* Небольшой отступ между заголовком и контактами */
        align-items: flex-start !important; /* Выравниваем по левому краю */
        padding-right: 0.5rem !important; /* Отступ справа для блока "Напишите нам" */
    }

    .footer-section:last-child {
        gap: 0.3rem !important; /* Небольшой отступ между заголовком и иконками соц сетей */
        align-items: center !important; /* Центрируем содержимое */
        padding-left: 0 !important; /* Убираем padding слева */
        margin-left: 25% !important; /* Сдвигаем блок вправо на 25% */
    }

    .footer-section:last-child .footer-title {
        padding-left: 0 !important; /* Убираем дополнительный отступ заголовка */
        text-align: center !important; /* Центрируем заголовок "Соц. сети" */
    }

    .footer-title {
        font-size: 0.85rem !important; /* Немного уменьшаем размер текста */
        margin-bottom: 0 !important;
        line-height: 1 !important; /* Уменьшаем line-height для более компактного заголовка */
        padding-bottom: 0 !important;
        text-align: left !important; /* Выравниваем заголовки по левому краю */
    }

    .footer-contacts {
        gap: 0.15rem !important; /* Gap между email и телефоном */
        margin-top: 0 !important; /* Убираем отрицательный margin */
        align-items: flex-start !important; /* Выравниваем контакты по левому краю */
    }

    .footer-link {
        font-size: 0.638rem !important; /* Уменьшаем на 15%: было 0.75rem (0.75 * 0.85 = 0.6375) */
    }

    .btn-footer-telegram {
        display: none; /* Убираем кнопку "Напишите нам" */
    }

    .footer-section:last-child .footer-social {
        justify-content: center !important; /* Центрируем иконки под заголовком */
        gap: 0.75rem !important; /* Уменьшаем gap между иконками: было 1.5rem */
    }

    .social-link {
        width: 22px !important; /* Увеличиваем на 10%: было 20px */
        height: 22px !important; /* Увеличиваем на 10%: было 20px */
    }

    .social-link svg {
        width: 13px !important; /* Увеличиваем SVG на 10%: было 12px (округлено) */
        height: 13px !important; /* Увеличиваем SVG на 10%: было 12px (округлено) */
    }

    .social-link-behance .behance-text {
        font-size: 0.48rem !important; /* Увеличиваем на 10%: было 0.4375rem */
    }

    .footer-bottom {
        padding-top: 0.55rem !important; /* Увеличиваем на 10%: было 0.5rem (0.5 * 1.1 = 0.55) */
        margin-top: -0.5rem !important; /* Поднимаем footer-bottom выше */
    }

    .footer-bottom p {
        font-size: 0.583rem; /* Уменьшаем в 1.5 раза (0.875rem / 1.5) */
    }
}

/* Hero Section адаптация для экранов до 768px */
@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(1.8rem, 4vw, 3.2rem) !important; /* Уменьшена главная надпись */
    }

    .hero-subtitle {
        font-size: clamp(0.75rem, 1.35vw, 1.03125rem) !important; /* Уменьшен на 25% */
    }

    .hero .btn-primary {
        padding: 0.646875rem 1.5rem !important; /* Увеличен вертикальный padding на 15% (0.5625rem * 1.15 = 0.646875rem) */
        font-size: 0.5rem !important;
    }

    .hero-boost-text {
        font-size: clamp(0.85rem, 1.275vw, 1.0625rem) !important; /* Пропорционально уменьшен */
        margin-top: 1rem !important; /* Аккуратное размещение под кнопкой */
    }
}

/* Responsive Footer and New Sections */
@media (max-width: 768px) {
    .header {
        top: 0;
    }
    
    .hero {
        padding-top: 53px;
    }
    
    /* Стили хедера удалены - используются стили из @media (max-width: 768px) выше */

    /* Audit CTA Section стили удалены - используются стили из @media (max-width: 768px) выше */

    /* Стили A/B теста удалены */

    .audit-cta-video-section {
        min-height: 500px;
    }

    .audit-cta-overlay {
        padding: 2rem 1.5rem;
    }

    .audit-cta-content {
        max-width: 100%;
    }

    .how-we-work-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .how-we-work-info .section-title {
        text-align: center;
    }

    .work-steps {
        gap: 2rem;
    }

    .step-number {
        min-width: 45px;
        font-size: 1.25rem;
        line-height: 1.25rem;
    }
    
    .step-header h3 {
        font-size: 1.25rem;
        line-height: 1.25rem;
    }
    
    .step-toggle {
        padding: 0.4rem;
    }
    
    .step-toggle-icon {
        width: 18px;
        height: 18px;
    }

    /* Стили футера удалены - используются стили из @media (max-width: 768px) выше */

    /* Адаптивность категорий */
    .categories-section .container {
        padding: 0 0.5rem !important;
    }

    .categories-section-title {
        margin-bottom: 1rem !important;
    }

    .categories-grid {
        grid-template-columns: 1fr !important;
        padding: 0 !important;
        gap: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .category-link-item {
        width: 100% !important;
        aspect-ratio: 16/9 !important;
        margin: 0 !important;
        min-height: auto !important;
        height: auto !important;
    }

    .category-link-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .category-link-title {
        font-size: 0.875rem;
        padding: 1rem 1.5rem;
        font-weight: 400;
    }

    /* Разделитель категорий для мобильных */
    .category-separator {
        display: block !important;
    }
    
    .category-separator-mobile {
        width: 100%;
        height: 4px;
        background: #0a0a0a;
        margin: 0;
        padding: 0;
        border: none;
        flex-shrink: 0;
    }

    /* Адаптивность модального окна категории */
    .category-modal-content {
        padding: 2rem 1rem;
    }

    .category-modal-close {
        top: 5rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }

    .category-modal-header {
        margin-bottom: 2rem;
    }

    .subcategories-grid-new {
        grid-template-columns: 1fr;
        width: calc(100% + 2rem);
        margin: 0 -1rem;
    }

    .subcategories-grid-new > .subcategory-card-new:nth-of-type(2n) {
        border-left: none;
    }

    .subcategories-grid-new > .subcategory-card-new:nth-of-type(n+2) {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .subcategory-card-info {
        padding: 1.25rem 1rem;
    }

    .subcategory-card-title {
        font-size: 1rem;
    }

    .subcategory-card-count {
        font-size: 0.8125rem;
    }

    /* Адаптивность сетки проектов категории */
    .category-projects-grid-new {
        grid-template-columns: 1fr;
        width: calc(100% + 2rem);
        margin: 0 -1rem;
    }

    .category-projects-grid-new > .category-project-card-new:nth-of-type(2n) {
        border-left: none;
    }

    .category-projects-grid-new > .category-project-card-new:nth-of-type(n+2) {
        border-top: 1px solid #000000;
    }

    .category-project-card-info {
        padding: 1.25rem 1rem;
    }

    .category-project-card-title {
        font-size: 1rem;
    }

    .category-project-card-description {
        font-size: 0.8125rem;
    }

    .category-project-card-meta {
        font-size: 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Адаптация категорий для экранов меньше 768px */
@media (max-width: 768px) {
    /* Уменьшаем кнопки фильтров - разрешаем перенос на 2 ряда */
    .category-filters {
        flex-wrap: wrap;
        gap: 0.4rem;
        padding: 0 1rem;
        margin-bottom: 0.8rem; /* Опущено ниже, ближе к проектам */
        justify-content: center;
    }

    .category-filter-btn {
        padding: 0.28rem 0.79rem; /* Уменьшено еще на 10% */
        font-size: 0.55rem; /* Уменьшено еще на 10% */
        white-space: nowrap;
        flex-shrink: 1;
        flex-basis: auto;
        min-width: fit-content;
    }

    /* Второй ряд кнопок - чуть меньше */
    .category-filter-btn:nth-child(n+5) {
        padding: 0.25rem 0.7rem;
        font-size: 0.5rem;
    }

    /* Уменьшаем крестик закрытия на 30% и поднимаем выше */
    .category-modal-close {
        top: 2.8rem; /* Поднято выше на 30% (4rem * 0.7 = 2.8rem) */
        width: 35px; /* Уменьшено на 30% (50px * 0.7) */
        height: 35px; /* Уменьшено на 30% (50px * 0.7) */
    }

    .category-modal-close svg {
        width: 16.8px; /* Уменьшено на 30% (24px * 0.7) */
        height: 16.8px; /* Уменьшено на 30% (24px * 0.7) */
    }

    /* Заголовок категории - уменьшаем на 30% и опускаем ниже */
    .category-modal-header {
        margin-top: 1.58rem; /* Опускаем ниже */
        margin-bottom: 1.5rem;
    }

    .category-modal-title {
        font-size: clamp(0.7rem, 1.05vw, 0.875rem); /* Уменьшено на 30% */
    }
}
