/* Блок этапов сотрудничества */
.services-container {
    max-width: var(--content-width);
    margin: 0 auto;
    width: 100%;
}

.section-title {
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 2s ease forwards;
    text-align: left;
   
    
}

.section-title h1 {
    font-size: 34px;
    line-height: 1.3;
    margin-bottom: 50px;
    color: var(--text-color);
    text-transform: uppercase;
    font-family: Arial, sans-serif;
    text-align: left;
}

.cooperation-section h1 {
    font-family: Arial, sans-serif;
    font-size: 34px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-color);
    margin-bottom: 50px;
    text-align: left;
    width: 100%;
    padding: 0 20px;
    line-height: 1.3;
}

.section-title:nth-child(1) {
    animation-delay: 0s;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: 10px;
    padding: 40px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--coordination-shadow);
    position: relative;
    overflow: visible;
    cursor: default;
    text-decoration: none;
    color: inherit;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: scale(1);
}

.service-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Стили для подписи при наведении на image-card */
.image-card {
    position: relative;
    padding: 0 !important;
}

.image-card::after {
    content: attr(data-title);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(228, 78, 59, 0.95);
    color: var(--white);
    padding: 15px 20px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    opacity: 0; /* Скрываем по умолчанию */
    transform: translateY(100%); /* Прячем снизу */
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    box-sizing: border-box;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
    transition: all var(--transition);
}

/* На десктопе показываем при наведении */
@media (min-width: 769px) {
    .image-card:hover::after {
        opacity: 1;
        transform: translateY(0);
    }
}

/* На мобильных устройствах полностью скрываем подписи */
@media (max-width: 768px) {
    .image-card::after {
        display: none; /* Полностью убираем подписи с мобильных */
    }
}

.text-card {
    justify-content: space-between;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.image-card {
    overflow: hidden;
    background: var(--red-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideUpWithImage 1s ease-out forwards;
    opacity: 0;
    transform: translateY(100px);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.image-card:hover img {
    transform: scale(1.05);
}

.card-number {
    font-family: Arial, sans-serif;
    font-size: 120px;
    font-weight: 800;
    color: #ee968a;
    line-height: 0.8;
    transition: all var(--transition);
    position: absolute;
    top: -35px;
    left: 30px;
    z-index: 10;
    text-shadow: 0px 0px 0px rgba(228, 78, 59, 0.15);
    opacity: 0.9;
}

.service-card:hover .card-number {
    color: var(--red-accent);
    transform: scale(1.1) translateY(-5px);
    text-shadow: 8px 8px 0px rgba(228, 78, 59, 0.25);
}

.card-content {
    position: relative;
    z-index: 2;
    margin-top: 30px;
}

.service-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-color);
    line-height: 1;
}

.service-description {
    font-size: 16px;
    color: var(--gray-text);
    line-height: 1.6;
    margin-bottom: 30px;
}

.card-pattern {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--red-accent) 0%, #ff3333 100%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.service-card:hover .card-pattern {
    opacity: 0.1;
}

/* Анимации для карточек по очереди */
.service-card:nth-child(1) { animation-delay: 0.2s; }
.service-card:nth-child(2) { animation-delay: 0.4s; }
.service-card:nth-child(3) { animation-delay: 0.6s; }
.service-card:nth-child(4) { animation-delay: 0.8s; }
.service-card:nth-child(5) { animation-delay: 1.0s; }
.service-card:nth-child(6) { animation-delay: 1.2s; }
.service-card:nth-child(7) { animation-delay: 1.4s; }
.service-card:nth-child(8) { animation-delay: 1.6s; }

/* Эффект для изображений */
.image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(228, 78, 59, 0.1) 0%, rgba(237, 140, 126, 0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 1;
}

.image-card:hover::before {
    opacity: 1;
}

/* Адаптивность для блока сотрудничества */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .service-card {
        min-height: 280px;
        padding: 35px;
        height: auto;
    }
    
    .card-number {
        font-size: 100px;
        top: -30px;
        left: 20px;
    }
    
    .service-title {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .cooperation-section {
        padding: 60px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
    }
    
    .service-card {
        min-height: auto;
        height: auto;
        padding: 25px;
        margin: 0 15px;
    }
    
    .card-number {
        font-size: 80px;
        top: -25px;
        left: 15px;
    }
    
    .service-title {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .service-description {
        font-size: 15px;
        margin-bottom: 15px;
        line-height: 1.5;
    }
    
    .card-content {
        margin-top: 20px;
    }
    
    /* Подписи всегда видны на мобильных */
    .image-card::after {
        font-size: 14px;
        padding: 12px 15px;
        min-height: 50px;
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Упрощаем ховер-эффекты для мобильных */
    .service-card:hover {
        transform: translateY(-5px) scale(1.02);
    }
    
    .image-card:hover img {
        transform: scale(1.03);
    }
}

@media (max-width: 480px) {
    .cooperation-section {
        padding: 40px 0;
    }
    
    .section-title {
        margin-bottom: 30px;
        font-family: Arial, sans-serif; 
        padding: 0 15px;
    }
    
    .section-title h1 {
        font-size: 28px;
       font-family: Arial, sans-serif; 
        margin-bottom: 30px;
        text-align: center;
    }
    
    .service-card {
        padding: 20px;
        margin: 0 10px;
        min-height: auto;
    }
    
    .card-number {
        font-size: 70px;
        top: -20px;
        left: 10px;
    }
    
    .service-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .service-description {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .image-card::after {
        font-size: 13px;
        padding: 10px 12px;
        min-height: 45px;
    }
    
    /* Уменьшаем задержки анимаций для мобильных */
    .service-card:nth-child(1) { animation-delay: 0.1s; }
    .service-card:nth-child(2) { animation-delay: 0.2s; }
    .service-card:nth-child(3) { animation-delay: 0.3s; }
    .service-card:nth-child(4) { animation-delay: 0.4s; }
    .service-card:nth-child(5) { animation-delay: 0.5s; }
    .service-card:nth-child(6) { animation-delay: 0.6s; }
    .service-card:nth-child(7) { animation-delay: 0.7s; }
    .service-card:nth-child(8) { animation-delay: 0.8s; }
}

/* Стили для блока сотрудничества */
.text-card {
    animation: fadeInUp 0.8s ease-out forwards;
}

.image-card {
    animation: slideUpWithImage 1s ease-out forwards;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    opacity: 0;
    animation: imageFadeIn 0.8s ease-out 0.3s forwards;
}

/* Исправление для корректного отображения на мобильных */
.cooperation-section .service-card {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Убедимся, что блок виден на мобильных */
.cooperation-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Исправления для отображения заголовка на мобильных */
@media (max-width: 768px) {
    .cooperation-section .section-title {
        opacity: 1 !important;
        transform: translateY(0) !important;
        animation: none !important;
        display: block !important;
        visibility: visible !important;
    }
    
    .cooperation-section .section-title h1 {
        font-size: 28px;
        text-align: center;
        padding: 0 15px;
    }
    
    /* Гарантируем видимость всего блока */
    .cooperation-section {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .cooperation-section .section-title h1 {
        font-size: 24px;
    }
}

/* Принудительное отображение заголовка */
.cooperation-section .section-title {
    opacity: 1 !important;
}