
/* ========================================
   КАСТОМНАЯ ГАЛЕРЕЯ ДОСТИЖЕНИЙ
   Используйте класс .achievement-gallery
   ======================================== */

/* Контейнер галереи */
.achievement-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
    padding: 0;
}

/* Элемент галереи (обертка для изображений и ссылок) */
.achievement-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 1 / 1;
}

/* Эффект при наведении */
.achievement-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(255, 111, 97, 0.25);
}

/* Изображения внутри */
.achievement-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
    border-radius: 15px;
}

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

/* Ссылки на PDF/документы */
.achievement-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.achievement-item a:hover {
    background: linear-gradient(135deg, #FF9999 0%, #FF6F61 100%);
    color: #fff;
    transform: none;
}

/* Иконка документа для ссылок */
.achievement-item a::before {
    content: '📄';
    display: block;
    font-size: 40px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.achievement-item a:hover::before {
    transform: scale(1.2) rotateZ(5deg);
}

/* Оверлей для изображений */
.achievement-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 153, 153, 0.8), rgba(255, 111, 97, 0.8));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 15px;
}

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

/* Иконка увеличения для изображений */
.achievement-item img + ::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 32px;
    z-index: 2;
    opacity: 0;
    transition: all 0.4s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Декоративная рамка */
.achievement-item::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0);
    border-radius: 10px;
    transition: all 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.achievement-item:hover::before {
    border-color: rgba(255, 255, 255, 0.8);
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
}

/* Анимация появления */
.achievement-item {
    opacity: 0;
    animation: achievementFadeIn 0.6s ease forwards;
}

.achievement-item:nth-child(1) { animation-delay: 0.05s; }
.achievement-item:nth-child(2) { animation-delay: 0.1s; }
.achievement-item:nth-child(3) { animation-delay: 0.15s; }
.achievement-item:nth-child(4) { animation-delay: 0.2s; }
.achievement-item:nth-child(5) { animation-delay: 0.25s; }
.achievement-item:nth-child(6) { animation-delay: 0.3s; }
.achievement-item:nth-child(7) { animation-delay: 0.35s; }
.achievement-item:nth-child(8) { animation-delay: 0.4s; }
.achievement-item:nth-child(9) { animation-delay: 0.45s; }
.achievement-item:nth-child(10) { animation-delay: 0.5s; }
.achievement-item:nth-child(11) { animation-delay: 0.55s; }
.achievement-item:nth-child(12) { animation-delay: 0.6s; }

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

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */

/* Планшеты (до 1024px) */
@media (max-width: 1024px) {
    .achievement-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* Планшеты и большие телефоны (до 768px) */
@media (max-width: 768px) {
    .achievement-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 20px 0;
    }
    
    .achievement-item {
        border-radius: 12px;
    }
    
    .achievement-item a {
        font-size: 13px;
        padding: 15px;
    }
    
    .achievement-item a::before {
        font-size: 32px;
        margin-bottom: 8px;
    }
}

/* Мобильные устройства (до 480px) */
@media (max-width: 480px) {
    .achievement-gallery {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .achievement-item {
        aspect-ratio: 4 / 3;
        border-radius: 10px;
    }
    
    .achievement-item a {
        font-size: 12px;
        padding: 12px;
    }
    
    .achievement-item a::before {
        font-size: 28px;
    }
}