/* Базові анімації */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.3);
    }
}

@keyframes rotateIn {
    from {
        transform: rotate(-200deg);
        opacity: 0;
    }
    to {
        transform: rotate(0);
        opacity: 1;
    }
}

@keyframes rotateOut {
    from {
        transform: rotate(0);
        opacity: 1;
    }
    to {
        transform: rotate(200deg);
        opacity: 0;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Класи анімацій */
.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-fade-out {
    animation: fadeOut 0.3s ease;
}

.animate-slide-up {
    animation: slideInUp 0.3s ease;
}

.animate-slide-down {
    animation: slideInDown 0.3s ease;
}

.animate-slide-left {
    animation: slideInLeft 0.3s ease;
}

.animate-slide-right {
    animation: slideInRight 0.3s ease;
}

.animate-zoom-in {
    animation: zoomIn 0.3s ease;
}

.animate-zoom-out {
    animation: zoomOut 0.3s ease;
}

.animate-rotate-in {
    animation: rotateIn 0.3s ease;
}

.animate-rotate-out {
    animation: rotateOut 0.3s ease;
}

.animate-bounce {
    animation: bounce 1s ease infinite;
}

.animate-pulse {
    animation: pulse 1s ease infinite;
}

.animate-shake {
    animation: shake 0.5s ease;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Тривалість анімацій */
.animate-fast {
    animation-duration: 0.2s;
}

.animate-slow {
    animation-duration: 0.5s;
}

.animate-slower {
    animation-duration: 1s;
}

/* Затримка анімацій */
.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.animate-delay-4 {
    animation-delay: 0.4s;
}

.animate-delay-5 {
    animation-delay: 0.5s;
}

/* Напрямок анімацій */
.animate-reverse {
    animation-direction: reverse;
}

.animate-alternate {
    animation-direction: alternate;
}

.animate-alternate-reverse {
    animation-direction: alternate-reverse;
}

/* Заповнення анімацій */
.animate-forwards {
    animation-fill-mode: forwards;
}

.animate-backwards {
    animation-fill-mode: backwards;
}

.animate-both {
    animation-fill-mode: both;
}

/* Таймінг-функції анімацій */
.animate-linear {
    animation-timing-function: linear;
}

.animate-ease {
    animation-timing-function: ease;
}

.animate-ease-in {
    animation-timing-function: ease-in;
}

.animate-ease-out {
    animation-timing-function: ease-out;
}

.animate-ease-in-out {
    animation-timing-function: ease-in-out;
}

/* Повторення анімацій */
.animate-infinite {
    animation-iteration-count: infinite;
}

.animate-repeat-2 {
    animation-iteration-count: 2;
}

.animate-repeat-3 {
    animation-iteration-count: 3;
}

/* Призупинення анімацій */
.animate-pause {
    animation-play-state: paused;
}

.animate-play {
    animation-play-state: running;
}

/* Медіа-запити для анімацій */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in,
    .animate-fade-out,
    .animate-slide-up,
    .animate-slide-down,
    .animate-slide-left,
    .animate-slide-right,
    .animate-zoom-in,
    .animate-zoom-out,
    .animate-rotate-in,
    .animate-rotate-out,
    .animate-bounce,
    .animate-pulse,
    .animate-shake,
    .animate-spin {
        animation: none;
    }
}

/* Підтримка RTL */
[dir="rtl"] .animate-slide-left {
    animation-name: slideInRight;
}

[dir="rtl"] .animate-slide-right {
    animation-name: slideInLeft;
}

/* Додаткові анімації */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
}

@keyframes wave {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(15deg);
    }
    50% {
        transform: rotate(0deg);
    }
    75% {
        transform: rotate(-15deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-wave {
    animation: wave 1s ease-in-out infinite;
    transform-origin: 70% 70%;
}

/* Анімації при наведенні */
.hover-scale {
    transition: transform 0.3s ease;
}

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

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Анімації затримки */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* Анімації тривалості */
.duration-300 {
    animation-duration: 0.3s;
}

.duration-500 {
    animation-duration: 0.5s;
}

.duration-700 {
    animation-duration: 0.7s;
}

.duration-1000 {
    animation-duration: 1s;
}

/* Анімації для кнопок */
.btn-animate {
    position: relative;
    overflow: hidden;
}

.btn-animate::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-animate:hover::after {
    width: 300px;
    height: 300px;
}

/* Анімації для карток */
.card-animate {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-animate:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Анімації для іконок */
.icon-animate {
    transition: transform 0.3s ease;
}

.icon-animate:hover {
    transform: rotate(360deg);
}

/* Анімації для меню */
.menu-item-animate {
    position: relative;
}

.menu-item-animate::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bs-primary);
    transition: width 0.3s ease;
}

.menu-item-animate:hover::after {
    width: 100%;
}

/* Анімації для форм */
.form-control-animate {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control-animate:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Анімації для модальних вікон */
.modal-animate {
    animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Анімації для завантаження */
.loading-animate {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--bs-gray-200);
    border-top-color: var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Анімації для повідомлень */
.alert-animate {
    animation: alertSlideIn 0.3s ease forwards;
}

@keyframes alertSlideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Анімації для галереї */
.gallery-item-animate {
    transition: transform 0.3s ease;
}

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

/* Анімації для слайдера */
.slider-animate {
    transition: transform 0.5s ease;
}

/* Анімації для навігації */
.nav-animate {
    transition: background-color 0.3s ease, color 0.3s ease;
}





/* Анімації для кнопок прокрутки - стилі перенесені в components.css */

/* Анімації для кнопок прокрутки */
.scroll-to-top-animate {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-to-top-animate:hover {
    transform: translateY(-3px);
}

/* Анімації для мобільного меню */
.mobile-menu-animate {
    transition: transform 0.3s ease;
}

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

/* Анімації для пошуку */
.search-animate {
    transition: width 0.3s ease;
}

.search-animate:focus {
    width: 100%;
}

/* Анімації для фільтрів */
.filter-animate {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.filter-animate.active {
    background-color: var(--bs-primary);
    color: var(--bs-white);
} 