/* Стили для страниц кейсов */

:root {
    --bg: #f9fafe;
    --bg-soft: #ffffff;
    --text: #1b1e21;
    --muted: #4a5568;
    --primary: #6090f0;
    --primary-600: #4a7bd9;
    --accent: #a31c05;
    --brand-blue: #6190f0;
    --card: #ffffff;
    --line: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --accent-color: #ff0030;
    --footer-bg: #242424;
    --gradient-footer: linear-gradient(135deg, #242424 0%, #2a2a2a 100%);
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Hero секция кейса */
.case-hero {
    position: relative;
    background: linear-gradient(180deg, var(--bg-soft), var(--bg));
    color: var(--text);
    padding: 80px 0 40px 0;
    margin-bottom: 30px;
    overflow: hidden;
}

/* Декоративные элементы для hero */
.case-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(96, 144, 240, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 4s ease-in-out infinite;
}

.case-hero::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 0, 48, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 5s ease-in-out infinite reverse;
}

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

/* Сетка на фоне */
.hero-decor-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    background-image: 
        linear-gradient(rgba(96, 144, 240, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 144, 240, 0.5) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 12s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.case-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.2;
    color: var(--text);
    animation: slideInUp 0.5s ease-out;
    max-width: 800px;
}

.case-subtitle {
    font-size: 18px;
    color: var(--muted);
    margin-bottom: 24px;
    line-height: 1.6;
    animation: slideInUp 0.5s ease-out 0.1s both;
    max-width: 700px;
}

.case-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    animation: slideInUp 0.5s ease-out 0.2s both;
    align-items: center;
    justify-content: flex-start;
    max-width: 100%;
}

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

.case-category,
.case-duration,
.case-team {
    position: relative;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    animation: fadeInScale 0.4s ease-out both;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.case-category {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f3ff 100%);
    color: #1e40af;
    border: 2px solid #dbeafe;
    animation-delay: 0.3s;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.1);
    padding: 10px 16px;
}

.case-duration {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border: 2px solid #fecaca;
    animation-delay: 0.4s;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.1);
    padding: 10px 16px;
}

.case-team {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #16a34a;
    border: 2px solid #bbf7d0;
    animation-delay: 0.5s;
    box-shadow: 0 4px 20px rgba(22, 163, 74, 0.1);
    padding: 10px 16px;
}

/* Иконки для тегов */
.case-category::before,
.case-duration::before,
.case-team::before {
    content: '';
    width: 14px;
    height: 14px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
    flex-shrink: 0;
}

.case-category::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e40af' stroke-width='2'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M18.7 8l-5.1 5.2-2.8-2.7L7 14.3'/%3E%3C/svg%3E");
}

.case-duration::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12,6 12,12 16,14'/%3E%3C/svg%3E");
}

.case-team::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Эффект свечения при наведении */
.case-category::after,
.case-duration::after,
.case-team::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 10px;
    pointer-events: none;
}

.case-category:hover::after,
.case-duration:hover::after,
.case-team:hover::after {
    opacity: 1;
}

/* Hover эффекты */
.case-category:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.15);
    border-color: #93c5fd;
}

.case-duration:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
    border-color: #f87171;
}

.case-team:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.15);
    border-color: #86efac;
}

/* Активное состояние */
.case-category:active,
.case-duration:active,
.case-team:active {
    transform: translateY(-1px) scale(0.99);
}

/* Адаптивность для case-meta */
@media (max-width: 780px) {
    .case-meta {
        gap: 16px;
        margin-bottom: 32px;
        justify-content: center;
    }
    
    .case-category,
    .case-duration,
    .case-team {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .case-category::before,
    .case-duration::before,
    .case-team::before {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .case-meta {
        gap: 12px;
        margin-bottom: 28px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .case-category,
    .case-duration,
    .case-team {
        padding: 12px 16px;
        font-size: 14px;
        justify-content: center;
        text-align: center;
    }
    
    .case-category::before,
    .case-duration::before,
    .case-team::before {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 360px) {
    .case-meta {
        gap: 10px;
        margin-bottom: 24px;
    }
    
    .case-category,
    .case-duration,
    .case-team {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* Адаптивность для case-header */
@media (max-width: 1024px) {
    .case-header h1 {
        font-size: 36px;
        max-width: 100%;
    }
    
    .case-subtitle {
        font-size: 17px;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .case-header h1 {
        font-size: 32px;
        margin-bottom: 16px;
    }
    
    .case-subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .case-meta {
        margin-bottom: 28px;
    }
}

@media (max-width: 480px) {
    .case-header h1 {
        font-size: 28px;
        margin-bottom: 14px;
    }
    
    .case-subtitle {
        font-size: 15px;
        margin-bottom: 18px;
    }
    
    .case-meta {
        margin-bottom: 24px;
        gap: 12px;
    }
    
    .case-hero {
        padding: 60px 0 30px 0;
        margin-bottom: 25px;
    }
}

@media (max-width: 360px) {
    .case-hero {
        padding: 50px 0 25px 0;
        margin-bottom: 20px;
    }
}

.case-category:hover {
    box-shadow: 0 8px 30px rgba(96, 144, 240, 0.25);
    border-color: var(--primary);
}

.case-duration {
    background: var(--card);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.case-duration:hover {
    box-shadow: 0 8px 30px rgba(255, 0, 48, 0.25);
    border-color: var(--accent-color);
}

.case-team {
    background: var(--card);
    color: var(--brand-blue);
    border-color: var(--brand-blue);
}

.case-team:hover {
    box-shadow: 0 8px 30px rgba(97, 144, 240, 0.25);
    border-color: var(--brand-blue);
}

/* Hero decorative elements */
.hero-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-decor-grid::before {
    content: '';
    position: absolute;
    inset: -50px;
    background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(500px 300px at 50% 10%, black, transparent 70%);
}

.hero-decor-glow::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(closest-side, rgba(96,144,240,0.25), rgba(96,144,240,0) 70%);
    filter: blur(10px);
}

.case-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--accent-color);
    color: #ffffff;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(96, 144, 240, 0.4);
    background: linear-gradient(135deg, #7ba3f2 0%, #6090f0 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.12) 100%);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 14px 28px;
    border-radius: 26px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

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

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

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.2) 100%);
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

.case-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
    justify-content: center;
}

.filter-pill {
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.12) 100%);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

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

.filter-pill:hover::before {
    left: 100%;
}

.filter-pill:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.2) 100%);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.filter-pill.is-active {
    background: linear-gradient(135deg, rgba(96,144,240,0.3) 0%, rgba(96,144,240,0.4) 100%);
    border-color: rgba(96,144,240,0.5);
    box-shadow: 0 8px 25px rgba(96, 144, 240, 0.2);
    transform: translateY(-2px);
}

/* Детальная страница кейса */
.case-details {
    padding: 80px 0;
    background: #ffffff;
}

.case-details .container {
    max-width: 900px;
}

.case-content {
    background: #ffffff;
    border-radius: 24px;
    padding: 60px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(96, 144, 240, 0.1);
}

.case-section {
    margin-bottom: 50px;
}

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

.case-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1b1e21;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.case-section h3 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    margin-top: 30px;
}

.case-section p {
    font-size: 18px;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 20px;
}

.case-section ul,
.case-section ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.case-section li {
    font-size: 16px;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 12px;
}

.case-section strong {
    color: #1b1e21;
    font-weight: 600;
}

/* Обзор проекта */
.case-overview {
    padding: 60px 0;
    background: #f8f9fa;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.overview-item {
    background: var(--card);
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}

.overview-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 144, 240, 0.05), transparent);
    transition: left 0.5s ease;
}

.overview-item:hover::before {
    left: 100%;
}

.overview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.overview-item h3 {
    color: var(--text);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.overview-item p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 16px;
    position: relative;
    z-index: 1;
}

/* Таймлайн */
.case-timeline {
    padding: 80px 0;
}

.case-timeline h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text);
    position: relative;
}

.case-timeline h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(135deg, #6090f0 0%, #7ba3f2 100%);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-date {
    background: linear-gradient(135deg, #6090f0 0%, #7ba3f2 100%);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 20px rgba(96, 144, 240, 0.3);
}

.timeline-content {
    background: var(--card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 0 40px;
    flex: 1;
    position: relative;
    border: 1px solid var(--line);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -20px;
    border-left-color: var(--card);
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -20px;
    border-right-color: var(--card);
}

.timeline-content h4 {
    color: var(--text);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-content p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 16px;
}

/* Технологии */
.case-tech {
    padding: 80px 0;
    background: #f8f9fa;
}

.case-tech h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text);
    position: relative;
}

.case-tech h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tech-category {
    background: var(--card);
    padding: 30px 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}

.tech-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 144, 240, 0.05), transparent);
    transition: left 0.5s ease;
}

.tech-category:hover::before {
    left: 100%;
}

.tech-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.tech-icon {
    width: 60px;
    height: 60px;
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.tech-category:hover .tech-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.tech-icon svg {
    width: 28px;
    height: 28px;
    transition: all 0.3s ease;
}

.tech-category:hover .tech-icon svg {
    transform: scale(1.1);
}

.tech-icon svg {
    width: 28px;
    height: 28px;
}

.tech-category h4 {
    color: var(--primary);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.tech-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}

.tech-category li {
    color: var(--muted);
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.tech-category li::before {
    content: '▸';
    color: var(--primary);
    margin-right: 8px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.tech-category:hover li::before {
    opacity: 1;
    transform: translateX(0);
}

.tech-category li:hover {
    color: var(--text);
    padding-left: 8px;
}

/* Анимация для иконок технологий */
.tech-icon {
    animation: iconFloat 3s ease-in-out infinite;
}

.tech-category:nth-child(2) .tech-icon {
    animation-delay: 0.5s;
}

.tech-category:nth-child(3) .tech-icon {
    animation-delay: 1s;
}

.tech-category:nth-child(4) .tech-icon {
    animation-delay: 1.5s;
}

.tech-category:nth-child(5) .tech-icon {
    animation-delay: 2s;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.tech-category li:last-child {
    border-bottom: none;
}

.case-team h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text);
    position: relative;
}

.case-team h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.team-member {
    text-align: center;
    padding: 30px 20px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--line);
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.member-icon {
    width: 60px;
    height: 60px;
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.team-member:hover .member-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* Анимация для иконок команды */
.member-icon {
    animation: memberIconFloat 4s ease-in-out infinite;
}

.team-member:nth-child(2) .member-icon {
    animation-delay: 0.5s;
}

.team-member:nth-child(3) .member-icon {
    animation-delay: 1s;
}

.team-member:nth-child(4) .member-icon {
    animation-delay: 1.5s;
}

.team-member:nth-child(5) .member-icon {
    animation-delay: 2s;
}

@keyframes memberIconFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(180deg); }
}

.member-icon svg {
    width: 28px;
    height: 28px;
}

.team-member h4 {
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.team-member p {
    color: var(--muted);
    font-size: 14px;
}

/* Особенности */
.case-features {
    padding: 80px 0;
    background: #f8f9fa;
}

.case-features h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text);
    position: relative;
}

.case-features h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-item {
    background: var(--card);
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 144, 240, 0.05), transparent);
    transition: left 0.5s ease;
}

.feature-item:hover::before {
    left: 100%;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* Анимация для иконок особенностей */
.feature-icon {
    animation: featureIconPulse 5s ease-in-out infinite;
}

.feature-item:nth-child(2) .feature-icon {
    animation-delay: 1s;
}

.feature-item:nth-child(3) .feature-icon {
    animation-delay: 2s;
}

@keyframes featureIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.feature-icon svg {
    width: 36px;
    height: 36px;
}

.feature-item h4 {
    color: var(--text);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.feature-item p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 16px;
    position: relative;
    z-index: 1;
}

/* CTA секция */
.case-cta {
    padding: 100px 0;
    background: var(--bg);
    color: var(--text);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.case-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(600px 200px at 50% 50%, rgba(96, 144, 240, 0.08), transparent 70%);
    pointer-events: none;
}

.case-cta h2 {
    font-size: 44px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.case-cta p {
    font-size: 20px;
    color: var(--muted);
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.case-cta button {
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 18px 48px;
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

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

.case-cta button:hover::before {
    left: 100%;
}

.case-cta button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 60px rgba(96, 144, 240, 0.4);
    background: linear-gradient(135deg, #7ba3f2 0%, #6090f0 100%);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .navbar-nav {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .dropdown.mega {
        left: 0;
        transform: translateY(-10px);
        min-width: 300px;
    }
    
    .nav-item:hover .dropdown.mega {
        transform: translateY(0);
    }
    
    .dropdown.mega::after {
        left: 20px;
        transform: rotate(45deg);
    }
}

@media (max-width: 780px) {
    .case-header h1 {
        font-size: 36px;
    }
    
    .case-subtitle {
        font-size: 18px;
    }
    
    .case-meta {
        justify-content: center;
    }
    .case-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    .case-filters {
        justify-content: center;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 50px;
    }
    
    .timeline-date {
        margin-bottom: 20px;
    }
    
    .timeline-content {
        margin: 0;
        width: 100%;
    }
    
    .timeline-content::before {
        display: none;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 520px) {
    .case-hero {
        padding: 80px 0 50px 0;
    }
    
    .case-header h1 {
        font-size: 28px;
    }
    
    .case-subtitle {
        font-size: 16px;
    }
    
    .case-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .case-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .overview-item,
    .tech-category,
    .team-member,
    .feature-item {
        padding: 25px 20px;
    }
    
    .timeline-item {
        padding-left: 40px;
    }
    
    .case-timeline h2,
    .case-tech h2,
    .case-team h2,
    .case-features h2,
    .case-cta h2 {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .case-cta {
        padding: 60px 0;
    }
    
    .case-cta button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* Стили для главной страницы кейсов */
.cases-grid-section {
    padding: 80px 0;
}

/* Header and Footer Styles */
.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text);
}

.logo .separator {
    width: 1px;
    height: 24px;
    background: var(--line);
}

.logo .description span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

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

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: var(--bg-soft);
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
    background: var(--bg-soft);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown.mega {
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    min-width: 400px;
    padding: 1.5rem;
}

.nav-item:hover .dropdown.mega {
    transform: translateX(-50%) translateY(0);
}

.dropdown.mega.services-mega {
    max-width: 600px;
    min-width: 500px;
}

.dropdown.mega.services-mega .group {
    min-width: 250px;
}

.dropdown.mega::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--card);
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
}

.group {
    margin-bottom: 1.5rem;
}

.group:last-child {
    margin-bottom: 0;
}

.group .title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 14px;
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger div {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

/* Mobile Menu */
.menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card);
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.menu.active {
    transform: translateX(0);
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--line);
}

.menu-content {
    padding: 2rem;
}

.menu-section {
    margin-bottom: 2rem;
}

.menu-section h3 {
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.menu-section a {
    display: block;
    color: var(--muted);
    text-decoration: none;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
    transition: color 0.3s ease;
}

.menu-section a:hover {
    color: var(--primary);
}

.close-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.close-menu div {
    width: 24px;
    height: 2px;
    background: var(--text);
    transform: rotate(45deg);
    position: relative;
}

.close-menu div::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text);
    transform: rotate(-90deg);
}

/* Мобильная версия header */
@media (max-width: 1024px) {
    .navbar-nav {
        display: none;
    }
    
    .hamburger {
        display: flex;
        position: relative;
        height: 44px;
        width: 48px;
        padding: 0;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1002;
        background: none;
        border: none;
        color: var(--text);
    }
    
    .hamburger div {
        width: 24px;
        height: 2px;
        background: currentColor;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .hamburger div:nth-child(1) {
        transform: translateY(-4px);
    }
    
    .hamburger div:nth-child(3) {
        transform: translateY(4px);
    }
    
    .hamburger.active div:nth-child(1) {
        transform: rotate(45deg);
    }
    
    .hamburger.active div:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active div:nth-child(3) {
        transform: rotate(-45deg);
    }
    
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .logo .description {
        display: none;
    }
    
    .logo .separator {
        display: none;
    }
}

@media (max-width: 768px) {
    .landing-header {
        background: rgba(255, 255, 255, 0.98);
    }
    
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .logo a {
        gap: 0.5rem;
    }
    
    .logo img {
        height: 24px;
        width: auto;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem 0.75rem;
    }
    
    .logo img {
        height: 22px;
    }
    
    .hamburger {
        width: 44px;
        height: 40px;
    }
    
    .hamburger div {
        width: 22px;
    }
}

/* Footer Styles */
.landing-footer {
    background: var(--gradient-footer);
    color: #ffffff;
    margin-top: 4rem;
}

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

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    padding: 4rem 0 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo img {
    height: 50px;
    width: auto;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 400px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--brand-blue);
    color: white;
    border-color: var(--brand-blue);
    transform: translateY(-2px);
}

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

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-section h6 {
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 12px;
    color: #ffffff;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-section a:hover {
    color: var(--brand-blue);
}

/* Улучшение контраста для мобильных устройств */
@media (max-width: 780px) {
    .footer-section a {
        color: rgba(255, 255, 255, 0.8);
        font-weight: 600;
    }
    
    .footer-description {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .footer-tagline {
        color: rgba(255, 255, 255, 0.9);
    }
}

@media (max-width: 480px) {
    .footer-section a {
        color: rgba(255, 255, 255, 0.85);
        font-weight: 600;
    }
    
    .footer-description {
        color: rgba(255, 255, 255, 0.85);
    }
    
    .footer-tagline {
        color: rgba(255, 255, 255, 0.95);
    }
    
    .footer-copyright {
        color: rgba(255, 255, 255, 0.75);
    }
}

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

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Адаптивность для подвала */
@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 3rem 0 2rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 780px) {
    .footer-container {
        padding: 0 1.5rem;
    }
    
    .footer-main {
        gap: 2.5rem;
        padding: 2.5rem 0 2rem;
    }
    
    .footer-brand {
        gap: 1.25rem;
    }
    
    .footer-logo img {
        height: 40px;
    }
    
    .footer-description {
        max-width: 100%;
        font-size: 0.95rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h6::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-bottom {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 0 1rem;
    }
    
    .footer-main {
        gap: 2rem;
        padding: 2rem 0 1.5rem;
    }
    
    .footer-brand {
        gap: 1rem;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-logo img {
        height: 35px;
    }
    
    .footer-tagline {
        font-size: 0.9rem;
    }
    
    .footer-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .footer-social {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
    }
    
    .social-link svg {
        width: 18px;
        height: 18px;
    }
    
    .footer-links {
        gap: 1.25rem;
    }
    
    .footer-section h6 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .footer-section li {
        margin-bottom: 0.4rem;
    }
    
    .footer-section a {
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        padding: 1.25rem 0;
    }
    
    .footer-copyright {
        font-size: 0.85rem;
    }
}

/* Дополнительные улучшения для мобильных устройств */
@media (max-width: 360px) {
    .footer-container {
        padding: 0 0.75rem;
    }
    
    .footer-main {
        gap: 1.5rem;
        padding: 1.5rem 0 1rem;
    }
    
    .footer-brand {
        gap: 0.75rem;
    }
    
    .footer-logo img {
        height: 30px;
    }
    
    .footer-tagline {
        font-size: 0.85rem;
    }
    
    .footer-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .footer-social {
        gap: 0.5rem;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
    }
    
    .social-link svg {
        width: 16px;
        height: 16px;
    }
    
    .footer-links {
        gap: 1rem;
    }
    
    .footer-section h6 {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .footer-section li {
        margin-bottom: 0.3rem;
    }
    
    .footer-section a {
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        padding: 1rem 0;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
    }
}

/* Улучшения для очень маленьких экранов */
@media (max-width: 320px) {
    .footer-container {
        padding: 0 0.5rem;
    }
    
    .footer-main {
        gap: 1.25rem;
        padding: 1.25rem 0 0.75rem;
    }
    
    .footer-brand {
        gap: 0.5rem;
    }
    
    .footer-logo img {
        height: 28px;
    }
    
    .footer-tagline {
        font-size: 0.8rem;
    }
    
    .footer-description {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .footer-social {
        gap: 0.4rem;
    }
    
    .social-link {
        width: 30px;
        height: 30px;
    }
    
    .social-link svg {
        width: 15px;
        height: 15px;
    }
    
    .footer-links {
        gap: 0.75rem;
    }
    
    .footer-section h6 {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .footer-section li {
        margin-bottom: 0.25rem;
    }
    
    .footer-section a {
        font-size: 0.8rem;
    }
    
    .footer-bottom {
        padding: 0.75rem 0;
    }
    
    .footer-copyright {
        font-size: 0.75rem;
    }
}

/* Global smooth scroll for modern browsers */
html {
    scroll-behavior: smooth;
}

/* Анимации появления при скролле */
.overview-item,
.tech-category,
.team-member,
.feature-item,
.timeline-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.overview-item.animate,
.tech-category.animate,
.team-member.animate,
.feature-item.animate,
.timeline-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Задержки для анимаций */
.overview-item:nth-child(2) { transition-delay: 0.1s; }
.overview-item:nth-child(3) { transition-delay: 0.2s; }

.tech-category:nth-child(2) { transition-delay: 0.1s; }
.tech-category:nth-child(3) { transition-delay: 0.2s; }
.tech-category:nth-child(4) { transition-delay: 0.3s; }
.tech-category:nth-child(5) { transition-delay: 0.4s; }

.team-member:nth-child(2) { transition-delay: 0.1s; }
.team-member:nth-child(3) { transition-delay: 0.2s; }
.team-member:nth-child(4) { transition-delay: 0.3s; }
.team-member:nth-child(5) { transition-delay: 0.4s; }

.feature-item:nth-child(2) { transition-delay: 0.1s; }
.feature-item:nth-child(3) { transition-delay: 0.2s; }

.timeline-item:nth-child(2) { transition-delay: 0.1s; }
.timeline-item:nth-child(3) { transition-delay: 0.2s; }
.timeline-item:nth-child(4) { transition-delay: 0.3s; }
.timeline-item:nth-child(5) { transition-delay: 0.4s; }
.timeline-item:nth-child(6) { transition-delay: 0.5s; }

.cases-grid-section h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: #1b1e21;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.case-card-large {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(96, 144, 240, 0.1);
    position: relative;
}

.case-card-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6090f0, #7ba3f2, #6090f0);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

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

.case-card-large:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 24px 80px rgba(96, 144, 240, 0.15);
    border-color: rgba(96, 144, 240, 0.3);
}

.case-card-image {
    height: 280px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.case-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(96, 144, 240, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.case-card-large:hover .case-card-image::before {
    opacity: 1;
}

.case-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: brightness(0.95);
}

.case-card-large:hover .case-card-image img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

.case-card-content {
    padding: 30px;
}

.case-card-content h3 {
    color: #1b1e21;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.3;
    background: linear-gradient(135deg, #1b1e21 0%, #2d3748 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.case-card-large:hover .case-card-content h3 {
    background: linear-gradient(135deg, #6090f0 0%, #7ba3f2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.case-card-content p {
    color: #4a5568;
    line-height: 1.7;
    font-size: 16px;
    margin-bottom: 24px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.case-card-large:hover .case-card-content p {
    color: #2d3748;
}

.case-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.case-tech-tag {
    background: linear-gradient(135deg, rgba(96, 144, 240, 0.08) 0%, rgba(96, 144, 240, 0.15) 100%);
    color: #6090f0;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(96, 144, 240, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.case-tech-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 144, 240, 0.1), transparent);
    transition: left 0.5s ease;
}

.case-tech-tag:hover::before {
    left: 100%;
}

.case-tech-tag:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(96, 144, 240, 0.15) 0%, rgba(96, 144, 240, 0.25) 100%);
    border-color: rgba(96, 144, 240, 0.4);
    box-shadow: 0 4px 16px rgba(96, 144, 240, 0.2);
}

.case-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.case-duration-tag {
    background: linear-gradient(135deg, rgba(255, 0, 48, 0.08) 0%, rgba(255, 0, 48, 0.15) 100%);
    color: #ff0030;
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 0, 48, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.case-duration-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 48, 0.1), transparent);
    transition: left 0.5s ease;
}

.case-duration-tag:hover::before {
    left: 100%;
}

.case-duration-tag:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(255, 0, 48, 0.15) 0%, rgba(255, 0, 48, 0.25) 100%);
    border-color: rgba(255, 0, 48, 0.4);
    box-shadow: 0 4px 16px rgba(255, 0, 48, 0.2);
}

.case-link-btn {
    background: linear-gradient(135deg, #6090f0 0%, #7ba3f2 100%);
    color: #ffffff;
    text-decoration: none;
    padding: 10px 22px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(96, 144, 240, 0.3);
    position: relative;
    overflow: hidden;
}

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

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

.case-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(96, 144, 240, 0.4);
    background: linear-gradient(135deg, #7ba3f2 0%, #6090f0 100%);
}

.case-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(96, 144, 240, 0.3);
}

/* Статистика */
.case-stats {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.case-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(800px 400px at 50% 50%, rgba(96, 144, 240, 0.05), transparent 70%);
    pointer-events: none;
}

.case-stats h2 {
    text-align: center;
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 80px;
    color: #1b1e21;
    background: linear-gradient(135deg, #1b1e21 0%, #2d3748 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-item {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(96, 144, 240, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6090f0, #7ba3f2, #6090f0);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.stat-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 60px rgba(96, 144, 240, 0.15);
    border-color: rgba(96, 144, 240, 0.3);
}

.stat-number {
    font-size: 56px;
    font-weight: 800;
    background: linear-gradient(135deg, #6090f0 0%, #7ba3f2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1;
    transition: all 0.3s ease;
}

.stat-item:hover .stat-number {
    background: linear-gradient(135deg, #7ba3f2 0%, #6090f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #4a5568;
    font-size: 18px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.stat-item:hover .stat-label {
    color: #2d3748;
}

/* Адаптивность для главной страницы кейсов */
@media (max-width: 780px) {
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .case-card-large {
        margin: 0 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-item {
        padding: 30px 15px;
    }
    
    .stat-number {
        font-size: 36px;
    }
}

@media (max-width: 520px) {
    .cases-grid-section h2,
    .case-stats h2 {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .case-card-content {
        padding: 20px;
    }
    
    .case-card-content h3 {
        font-size: 20px;
    }
    
    .case-card-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-item {
        padding: 25px 15px;
    }
    
    /* Адаптивность для детальных страниц */
    .case-content {
        padding: 30px 20px;
        margin: 0 20px;
    }
    
    .case-section h2 {
        font-size: 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .case-section h3 {
        font-size: 20px;
    }
    
        .case-section p {
        font-size: 16px;
    }
    
    .stat-number {
        font-size: 32px;
    }
}

/* Базовые стили для reveal анимаций */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible,
.reveal.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Обратная совместимость для класса animate */
.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 
 * Классы анимаций для обеспечения совместимости:
 * - .is-visible - основной класс для IntersectionObserver
 * - .animate - обратная совместимость для старых скриптов
 * - .revealed - альтернативный класс (если используется)
 * 
 * Все классы обеспечивают одинаковый результат:
 * opacity: 1 и transform: translateY(0)
 */

/* Стили для анимаций отдельных элементов */
.overview-item,
.tech-category,
.team-member,
.feature-item,
.timeline-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.overview-item.is-visible,
.tech-category.is-visible,
.team-member.is-visible,
.feature-item.is-visible,
.timeline-item.is-visible,
.overview-item.animate,
.tech-category.animate,
.team-member.animate,
.feature-item.animate,
.timeline-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Задержки для последовательной анимации */
.overview-item:nth-child(1) { transition-delay: 0.1s; }
.overview-item:nth-child(2) { transition-delay: 0.2s; }
.overview-item:nth-child(3) { transition-delay: 0.3s; }

.tech-category:nth-child(1) { transition-delay: 0.1s; }
.tech-category:nth-child(2) { transition-delay: 0.2s; }
.tech-category:nth-child(3) { transition-delay: 0.3s; }
.tech-category:nth-child(4) { transition-delay: 0.4s; }

.team-member:nth-child(1) { transition-delay: 0.1s; }
.team-member:nth-child(2) { transition-delay: 0.2s; }
.team-member:nth-child(3) { transition-delay: 0.3s; }
.team-member:nth-child(4) { transition-delay: 0.4s; }

.feature-item:nth-child(1) { transition-delay: 0.1s; }
.feature-item:nth-child(2) { transition-delay: 0.2s; }
.feature-item:nth-child(3) { transition-delay: 0.3s; }
.feature-item:nth-child(4) { transition-delay: 0.4s; }

/* Стили для галереи проекта */
.case-gallery {
    padding: 80px 0;
    background: var(--bg-soft);
}

.case-gallery h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 50px;
    position: relative;
}

.case-gallery h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Контейнер для горизонтальной прокрутки */
.gallery-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    margin: 0 -20px;
}

.gallery-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.gallery-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.gallery-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.gallery-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.gallery-scroll {
    display: flex;
    gap: 30px;
    padding: 0 20px;
    min-width: max-content;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    background: var(--card);
    border: 1px solid var(--line);
    min-width: 350px;
    max-width: 350px;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

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

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: white;
}

.gallery-overlay p {
    font-size: 14px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

/* Адаптивность для галереи */
@media (max-width: 780px) {
    .gallery-scroll-container {
        margin: 0 -15px;
    }
    
    .gallery-scroll {
        padding: 0 15px;
        gap: 20px;
    }
    
    .gallery-item {
        min-width: 300px;
        max-width: 300px;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .gallery-overlay {
        padding: 20px 15px 15px;
    }
}

@media (max-width: 480px) {
    .case-gallery {
        padding: 60px 0;
    }
    
    .case-gallery h2 {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .gallery-scroll-container {
        margin: 0 -10px;
    }
    
    .gallery-scroll {
        padding: 0 10px;
        gap: 15px;
    }
    
    .gallery-item {
        min-width: 280px;
        max-width: 280px;
    }
    
    .gallery-item img {
        height: 180px;
    }
}

/* Стили для модального окна галереи */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-modal .modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.2);
}

.modal-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
    max-height: 80%;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-info {
    text-align: center;
    margin-top: 20px;
    color: white;
}

.modal-info h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: white;
}

.modal-info p {
    font-size: 16px;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

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

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

/* Анимации для модального окна */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-modal.active .modal-content {
    animation: modalFadeIn 0.3s ease;
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
    .modal-content {
        padding: 15px;
    }
    
    .modal-close {
        top: 15px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
    
    .modal-info h3 {
        font-size: 20px;
    }
    
    .modal-info p {
        font-size: 14px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .nav-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .modal-navigation {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 10px;
    }
    
    .modal-close {
        top: 10px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 25px;
    }
    
    .modal-info h3 {
        font-size: 18px;
    }
    
    .modal-info p {
        font-size: 13px;
    }
    
    .nav-btn {
        width: 35px;
        height: 35px;
    }
    
    .nav-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .modal-navigation {
        padding: 0 10px;
    }
} 