/* Портфолио анимации */
.portfolio-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
    opacity: 0;
}

.portfolio-item.filter-show {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-item.filter-hide {
    transform: translateY(-20px);
    opacity: 0;
}

/* Стили для вкладок Bootstrap */
#portfolioTabs {
    border: none;
    margin-bottom: 40px;
}

#portfolioTabs .nav-item {
    margin: 0 5px;
}

#portfolioTabs .nav-link {
    border: none;
    background: transparent;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0.7;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

#portfolioTabs .nav-link::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;
}

#portfolioTabs .nav-link:hover::before {
    left: 100%;
}

#portfolioTabs .nav-link:hover {
    opacity: 1;
    transform: translateY(0) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#portfolioTabs .nav-link.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    opacity: 1;
    transform: translateY(0) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

#portfolioTabs .nav-link.active::before {
    display: none;
}

/* Анимация появления кнопок вкладок */
#portfolioTabs .nav-item:nth-child(1) .nav-link { animation-delay: 0.1s; }
#portfolioTabs .nav-item:nth-child(2) .nav-link { animation-delay: 0.2s; }
#portfolioTabs .nav-item:nth-child(3) .nav-link { animation-delay: 0.3s; }
#portfolioTabs .nav-item:nth-child(4) .nav-link { animation-delay: 0.4s; }
#portfolioTabs .nav-item:nth-child(5) .nav-link { animation-delay: 0.5s; }

/* Анимация появления карточек при загрузке */
.portfolio-item {
    animation: fadeInUp 0.6s ease-out forwards;
}

.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.2s; }
.portfolio-item:nth-child(3) { animation-delay: 0.3s; }
.portfolio-item:nth-child(4) { animation-delay: 0.4s; }
.portfolio-item:nth-child(5) { animation-delay: 0.5s; }
.portfolio-item:nth-child(6) { animation-delay: 0.6s; }
.portfolio-item:nth-child(7) { animation-delay: 0.7s; }
.portfolio-item:nth-child(8) { animation-delay: 0.8s; }
.portfolio-item:nth-child(9) { animation-delay: 0.9s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Анимация кнопок фильтра */
.box-button-filters .btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
}

.box-button-filters .btn.btn-loaded {
    opacity: 1;
    transform: translateY(0);
}

.box-button-filters .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;
}

.box-button-filters .btn:hover::before {
    left: 100%;
}

.box-button-filters .btn.active {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.box-button-filters .btn.btn-clicked {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Анимация карточек при наведении */
.card-news-style-2 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.card-news-style-2:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-news-style-2 .card-image {
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-news-style-2:hover .card-image img {
    transform: scale(1.1);
}

.card-news-style-2 .card-image img {
    transition: transform 0.3s ease;
}

/* Анимация загрузки изображений */
.card-news-style-2 .card-image {
    position: relative;
    overflow: hidden;
}

.card-news-style-2 .card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
    z-index: 1;
}

.card-news-style-2:hover .card-image::before {
    left: 100%;
}

/* Анимация для Masonry */
#masonry {
    transition: height 0.4s ease;
}

/* Улучшенная анимация для кнопок "Подробнее" */
.btn-learmore-2 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.btn-learmore-2:hover {
    transform: translateX(5px);
}

.btn-learmore-2 svg {
    transition: transform 0.3s ease;
}

.btn-learmore-2:hover svg {
    transform: translateX(3px);
}

/* Анимация для тегов */
.btn-tag-sm {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-tag-sm::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.4s;
}

.btn-tag-sm:hover::before {
    left: 100%;
}

.btn-tag-sm:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Плавная анимация для контейнера */
.box-list-news {
    transition: all 0.4s ease;
}

/* Анимация для пустого состояния */
.no-results {
    text-align: center;
    padding: 60px 20px;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .portfolio-item {
        animation-delay: 0.1s !important;
    }
    
    .card-news-style-2:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .box-button-filters .btn {
        margin-bottom: 10px;
    }
    
    #portfolioTabs .nav-item {
        margin: 0 2px;
    }
    
    #portfolioTabs .nav-link {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Анимация для описания карточек */
.card-news-style-2 .card-description {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.card-news-style-2:hover .card-description {
    transform: translateY(-2px);
}

/* Анимация для заголовков карточек */
.card-news-style-2 .card-title a {
    transition: all 0.3s ease;
    position: relative;
}

.card-news-style-2 .card-title a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #498cff;
    transition: width 0.3s ease;
}

.card-news-style-2:hover .card-title a::after {
    width: 100%;
}

/* Анимация для мета-информации */
.card-news-style-2 .card-meta {
    transition: all 0.3s ease;
}

.card-news-style-2:hover .card-meta {
    transform: translateY(-1px);
}

/* Анимация для кнопки "Подробнее" */
.card-news-style-2 .card-more {
    transition: all 0.3s ease;
    opacity: 0.8;
}

.card-news-style-2:hover .card-more {
    opacity: 1;
    transform: translateY(-1px);
}

/* Анимация для пагинации */
.pagination .page-link {
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Анимация для заголовка секции */
.box-content-blog .text-center h3 {
    transition: all 0.3s ease;
}

.box-content-blog .text-center h3:hover {
    transform: scale(1.02);
}

/* Анимация для описания секции */
.box-content-blog .text-center p {
    transition: all 0.3s ease;
}

.box-content-blog .text-center p:hover {
    transform: translateY(-1px);
}

/* Анимация заголовка секции при загрузке */
.box-content-blog .text-center h3 {
    animation: slideInDown 0.8s ease-out forwards;
}

.box-content-blog .text-center p {
    animation: slideInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 