/* Дополнительные стили для анимаций страницы About */

/* Плавное появление страницы */
body {
    opacity: 0;
    animation: pageLoad 0.3s ease-in-out 0.1s forwards;
}

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

/* Улучшения для timeline секции */
.timeline {
    position: relative;
    overflow: hidden;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    max-height: 2px;
    width: 100%;
    max-width: 100%;
    background: linear-gradient(90deg, #417CFF, #87CEEB, #417CFF);
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

.timeline .cards li {
    /* Оставляем только базовые переходы, не перекрывая функциональность */
    transition: transform 0.2s ease;
}

/* Улучшения для слайдера лидеров */
.testimonial-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid rgba(65, 124, 255, 0.1);
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(65, 124, 255, 0.05), rgba(135, 206, 235, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.pfp-leader img {
    border: 3px solid transparent;
    background: linear-gradient(45deg, #417CFF, #87CEEB) padding-box, 
                linear-gradient(45deg, #417CFF, #87CEEB) border-box;
}

.testimonial-card:hover .pfp-leader img {
    transform: scale(1.05) rotate(5deg);
    border-color: #417CFF;
}

.slide-caption h3 {
    position: relative;
    transition: all 0.3s ease;
}

.slide-caption h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #417CFF, #87CEEB);
    transition: width 0.3s ease;
}

.testimonial-card:hover .slide-caption h3::after {
    width: 100%;
}

.achievements li {
    position: relative;
    padding-left: 20px;
    transition: all 0.3s ease;
}

.achievements li::before {
    content: '★';
    position: absolute;
    left: 0;
    color: #417CFF;
    font-size: 14px;
    transition: all 0.3s ease;
}

.achievements li:hover::before {
    color: #87CEEB;
    transform: scale(1.2);
}

.stat-item {
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 8px;
    background: rgba(65, 124, 255, 0.1);
}

.stat-item:hover {
    background: rgba(65, 124, 255, 0.2);
    transform: scale(1.05);
}

.stat-item .number {
    background: linear-gradient(45deg, #417CFF, #87CEEB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

/* Улучшения для секции истории */
.history-section {
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.history-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(65, 124, 255, 0.2), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(135, 206, 235, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(65, 124, 255, 0.3), transparent);
    background-repeat: repeat;
    background-size: 150px 100px;
    animation: floatParticles 30s linear infinite;
    pointer-events: none;
    opacity: 0.3;
}

@keyframes floatParticles {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-150px); }
}

.history-header h2 {
    background: linear-gradient(45deg, #417CFF, #87CEEB, #417CFF);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.history-item {
    position: relative;
    padding: 20px;
    border-radius: 12px;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(65, 124, 255, 0.1);
    transition: all 0.3s ease;
}

.history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #417CFF, #87CEEB);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s ease;
}

.history-item:hover::before {
    transform: scaleY(1);
}

.history-item:hover {
    background: rgba(65, 124, 255, 0.1);
    border-color: rgba(65, 124, 255, 0.3);
    transform: translateX(10px);
}

.history-year {
    background: linear-gradient(45deg, #417CFF, #87CEEB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 1.2rem;
}

.philosophy-item {
    position: relative;
    padding: 25px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(42, 42, 42, 0.9));
    border: 1px solid rgba(65, 124, 255, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}

.philosophy-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #417CFF, #87CEEB);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.philosophy-item:hover::before {
    transform: scaleX(1);
}

.philosophy-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(65, 124, 255, 0.2);
}

.philosophy-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(65, 124, 255, 0.5));
}

.founder-tribute {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border-radius: 20px;
    padding: 40px;
    border: 2px solid rgba(65, 124, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.founder-tribute::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(65, 124, 255, 0.05), rgba(135, 206, 235, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.founder-tribute:hover::before {
    opacity: 1;
}

.founder-photo img {
    border-radius: 15px;
    border: 3px solid #417CFF;
    box-shadow: 0 0 20px rgba(65, 124, 255, 0.3);
    transition: all 0.3s ease;
}

.founder-tribute:hover .founder-photo img {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(65, 124, 255, 0.5);
}

.founder-quote blockquote {
    position: relative;
    font-style: italic;
    color: #87CEEB;
    border-left: 4px solid #417CFF;
    padding-left: 20px;
    margin: 20px 0;
}

/* Улучшения для карточек дисциплин */
.info .card, .info2 .card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid rgba(65, 124, 255, 0.1);
    border-radius: 15px;
}

.info .card::before, .info2 .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #417CFF, #87CEEB);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.info .card:hover::before, .info2 .card:hover::before {
    transform: scaleX(1);
}

.info .card:hover, .info2 .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(65, 124, 255, 0.2);
    border-color: rgba(65, 124, 255, 0.3);
}

.card-image {
    position: relative;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 100%);
    transition: background 0.3s ease;
}

.card:hover .card-image::after {
    background: linear-gradient(180deg, rgba(65, 124, 255, 0.1) 0%, rgba(0,0,0,0.5) 100%);
}

.card-content h2 {
    position: relative;
    transition: all 0.3s ease;
}

.card-content h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #417CFF, #87CEEB);
    transition: width 0.3s ease;
}

.card:hover .card-content h2::after {
    width: 100%;
}

.decorative-lines span {
    display: block;
    height: 2px;
    background: linear-gradient(90deg, transparent, #417CFF, #87CEEB, transparent);
    margin: 40px auto;
    width: 200px;
    border-radius: 2px;
}

/* Улучшения для секции достижений */
.eventbox {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.achievement-header h2 {
    background: linear-gradient(45deg, #417CFF, #87CEEB, #417CFF);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.milestone {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(65, 124, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.milestone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #417CFF, #87CEEB);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s ease;
}

.milestone:hover::before {
    transform: scaleY(1);
}

.milestone:hover {
    background: rgba(65, 124, 255, 0.1);
    border-color: rgba(65, 124, 255, 0.4);
    transform: translateY(-5px);
}

.milestone .year {
    background: linear-gradient(45deg, #417CFF, #87CEEB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.medal {
    background: radial-gradient(circle at center, rgba(65, 124, 255, 0.1), rgba(26, 26, 26, 0.9));
    border: 2px solid;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.medal.gold {
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.medal.silver {
    border-color: #C0C0C0;
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.3);
}

.medal.bronze {
    border-color: #CD7F32;
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.3);
}

.medal:hover {
    transform: scale(1.1) rotate(15deg);
}

.medal .count {
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(45deg, currentColor, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(42, 42, 42, 0.9));
    border: 1px solid rgba(65, 124, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #417CFF, #87CEEB);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(65, 124, 255, 0.2);
    border-color: rgba(65, 124, 255, 0.4);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(65, 124, 255, 0.5));
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(45deg, #417CFF, #87CEEB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0;
}

/* Адаптивные улучшения */
@media (max-width: 768px) {
    .timeline::before,
    .history-section::before {
        display: none;
    }
    
    .testimonial-card::before,
    .philosophy-item::before,
    .card::before,
    .milestone::before,
    .stat-card::before {
        display: none;
    }
    
    .testimonial-card,
    .card,
    .philosophy-item,
    .milestone,
    .stat-card {
        background: #1a1a1a;
        border: 1px solid #333;
    }
    
    /* Упрощаем анимации на мобильных */
    * {
        transition-duration: 0.2s !important;
        animation-duration: 0.5s !important;
    }
    
    .medal:hover,
    .card:hover,
    .testimonial-card:hover,
    .milestone:hover,
    .stat-card:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .medal {
        width: 100px;
        height: 100px;
    }
    .history-item {
        padding: 0px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .philosophy-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 400px) {
    /* Отключаем сложные анимации для улучшения производительности */
    .timeline::before,
    .history-section::before,
    *::before,
    *::after {
        animation: none !important;
        background-image: none !important;
    }
    
    /* Упрощаем градиенты для лучшей производительности */
    .timeline {
        background: #2a2a2a !important;
        animation: none !important;
    }
    
    /* Убираем тяжелые эффекты */
    .testimonial-card::before,
    .philosophy-item::before,
    .card::before,
    .milestone::before,
    .stat-card::before,
    .history-item::before {
        display: none !important;
    }
    
    /* Упрощаем стили для лучшей читаемости */
    .cards > li > h2 {
        font-size: 1.2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }
    
    .cards > li > p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        padding: 15px !important;
        max-width: 95% !important;
    }
    
    /* Улучшаем видимость лейблов */
    .cards li > label {
        font-size: 0.7rem !important;
        width: 28px !important;
        height: 28px !important;
        border: 2px solid #417CFF !important;
        background: rgba(65, 124, 255, 0.2) !important;
        color: white !important;
    }
    
    /* Оптимизируем размеры контейнера */
    .cards-container {
        --radius: 300vw !important;
        --label-size: 28px !important;
        --label-dot-size: 6px !important;
        --title-top: 1rem !important;
        --info-top: 3.5rem !important;
        --info-width: 95% !important;
    }
    
    /* Убираем ненужные переходы */
    *, *::before, *::after {
        transition: none !important;
        animation-duration: 0s !important;
    }
    
    /* Исключение только для функциональных переходов */
    .cards, .cards li, .swiper-slide {
        transition: transform 0.3s ease !important;
    }
    
    /* Оптимизируем Timeline для маленьких экранов */
    .timeline {
        height: 70vh !important;
        overflow: hidden !important;
    }
    
    /* Улучшаем читаемость текста */
    .cards > li > h2,
    .cards > li > p {
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
        background: rgba(0,0,0,0.7) !important;
        border-radius: 8px !important;
        padding: 10px !important;
    }
    
    /* Оптимизируем swiper для маленьких экранов */
    .swiper {
        height: 500px !important;
        margin: 10px auto !important;
    }
    
    .testimonial-card {
        padding: 10px !important;
        margin: 5px !important;
        font-size: 0.8rem !important;
    }
    
    .testimonial-card h3 {
        font-size: 0.95rem !important;
        line-height: 1.2 !important;
    }
    
    .biography {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
    }
    
    /* Оптимизируем карточки дисциплин */
    .card {
        flex-direction: column !important;
        padding: 15px !important;
        margin: 10px 5px !important;
    }
    
    .card-content h2 {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }
    
    .card-content p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    /* Оптимизируем секцию достижений */
    .achievement-header h2 {
        font-size: 1.3rem !important;
        line-height: 1.2 !important;
    }
    
    .achievement-header h3 {
        font-size: 1rem !important;
    }
    
    .achievement-header p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    .milestone {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }
    
    .milestone .year {
        font-size: 1.1rem !important;
    }
    
    .milestone .achievement {
        font-size: 0.75rem !important;
    }
    
    /* Медали */
    .medal .count {
        font-size: 1.8rem !important;
    }
    
    .medal .type {
        font-size: 0.8rem !important;
    }
    
    /* Статистические карточки */
    .stat-number {
        font-size: 1.5rem !important;
    }
    
    .stat-label {
        font-size: 0.9rem !important;
    }
    
    .stat-description {
        font-size: 0.75rem !important;
    }
    
    /* История секция */
    .history-header h2 {
        font-size: 1.3rem !important;
    }
    
    .history-header h3 {
        font-size: 0.95rem !important;
    }
    
    .history-header p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    .history-item {
        margin-left: 20px !important;
    }
    
    .history-year {
        width: 50px !important;
        height: 50px !important;
        font-size: 0.8rem !important;
        margin-left: -25px !important;
    }
    
    .history-content {
        padding: 15px !important;
    }
    
    .history-content h4 {
        font-size: 0.95rem !important;
    }
    
    .history-content p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    /* Философия */
    .philosophy-item {
        padding: 15px 10px !important;
        margin: 0 5px !important;
    }
    
    .philosophy-item h4 {
        font-size: 0.9rem !important;
    }
    
    .philosophy-item li,
    .philosophy-item p {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
    }
    
    /* Основатель */
    .founder-tribute {
        padding: 15px !important;
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .founder-photo {
        width: 100px !important;
        height: 120px !important;
    }
    
    .founder-info h3 {
        font-size: 1.2rem !important;
    }
    
    .founder-info p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    .founder-quote blockquote {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
}

@media (max-width: 360px) {
    /* Дополнительные оптимизации для очень маленьких экранов */
    .timeline {
        height: 65vh !important;
    }
    
    .cards > li > h2 {
        font-size: 1rem !important;
    }
    
    .cards > li > p {
        font-size: 0.8rem !important;
        padding: 12px !important;
    }
    
    .cards li > label {
        font-size: 0.65rem !important;
        width: 25px !important;
        height: 25px !important;
    }
    
    .cards-container {
        --radius: 350vw !important;
        --label-size: 25px !important;
    }
    
    /* Уменьшаем все тексты */
    .achievement-header h2 {
        font-size: 1.1rem !important;
    }
    
    .card-content h2 {
        font-size: 0.9rem !important;
    }
    
    .card-content p {
        font-size: 0.75rem !important;
    }
    
    .testimonial-card h3 {
        font-size: 0.85rem !important;
    }
    
    .biography {
        font-size: 0.7rem !important;
    }
}

/* Стили для улучшенного скроллинга */
html {
    scroll-behavior: smooth;
}

/* Эффект свечения для активных элементов */
.card:focus,
.testimonial-card:focus,
.stat-card:focus,
.milestone:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(65, 124, 255, 0.3);
}

/* Улучшение для accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
