/* Стилі для анімацій в конструкторі сторінок */

.section-animation {
    padding: 80px 0 20px 0;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    margin-top: 0;
}

.section-animation video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
    cursor: pointer;
}

/* Приховуємо панель контролів відео */
.section-animation video::-webkit-media-controls-panel {
    display: none !important;
}

.section-animation video::-webkit-media-controls {
    display: none !important;
}

.section-animation video::-webkit-media-controls-enclosure {
    display: none !important;
}

.section-animation video::-webkit-media-controls-timeline {
    display: none !important;
}

.section-animation video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.section-animation video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.section-animation video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.section-animation video::-webkit-media-controls-mute-button {
    display: none !important;
}

.section-animation video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

.section-animation video::-webkit-media-controls-overlay-play-button {
    display: none !important;
}

/* Приховуємо стандартні контроли для всіх браузерів */
.section-animation video::-webkit-media-controls-play-button {
    display: none !important;
}

.section-animation video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

/* Стилі для відео з відстеженням миші */
.video-mouse-tracker {
    position: relative;
    display: inline-block;
    cursor: none;
    overflow: hidden;
}

.video-mouse-tracker video {
    transition: all 0.3s ease;
}

/* Ефекти при наведенні миші */
.video-mouse-tracker:hover video {
    filter: brightness(1.05) contrast(1.02);
}

/* Ефекти при взаємодії з мишею */
.video-mouse-tracker video.mouse-interactive {
    filter: brightness(1.1) contrast(1.05) saturate(1.1);
}

/* Вплив на існуючі елементи відео */
.video-mouse-tracker video.mouse-interactive::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                               rgba(255, 255, 255, 0.1) 0%, 
                               transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Анімація хвилі для відео */
@keyframes videoRipple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    50% {
        width: 100px;
        height: 100px;
        opacity: 0.4;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Ефект пульсації при кліку */
.interactive-video-container video:active {
    transform: scale(1.02);
    transition: transform 0.1s ease;
}

/* Стилі для кнопки з посиланням */
.button-section {
    padding: 40px 0;
    text-align: center;
}

.button-section .btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.button-section .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.button-section .btn:active {
    transform: scale(0.98);
}

/* Розміри кнопок */
.button-section .btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.button-section .btn-md {
    padding: 12px 24px;
    font-size: 16px;
}

.button-section .btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

/* Стилі для зображення кнопки */
.button-section img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Інтерактивні ефекти для відео */
.interactive-video-container video {
    position: relative;
    z-index: 1;
}

/* Ефект хвилі при руху миші */
.video-ripple {
    position: absolute;
    pointer-events: none;
    z-index: 1000;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: videoRipple 0.6s ease-out;
}

/* Анімація хвилі при кліку */
@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

/* Плаваючі елементи */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

/* Стилі для плаваючих елементів */
.section-animation video .floating-element {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: float 3s ease-in-out infinite;
}

/* Інтерактивні елементи */
.section-animation video .interactive-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Стилі для клікабельного зображення кнопки */
.button-image-overlay {
    position: relative;
    display: inline-block;
    z-index: 10;
}

.button-image-overlay img {
    opacity: 0.9;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.button-image-overlay:hover img {
    opacity: 1;
    transform: scale(1.05);
}

/* Забезпечуємо, що інші елементи не перекриваються */
.hero-section, .section-animation {
    position: relative;
    z-index: 1;
}

.button-image-overlay {
    z-index: 10;
}

/* Абсолютне позиціонування для кнопки */
.button-image-overlay[style*="position: absolute"] {
    position: absolute !important;
    z-index: 100;
}

.button-image-overlay[style*="position: absolute"] img {
    position: relative;
}

/* Ефект при наведенні на плаваючі елементи */
.section-animation video:hover .floating-element {
    animation-duration: 1s;
    background: rgba(255, 255, 255, 0.6);
}

.section-animation img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.section-animation .css-animation {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Lottie анімації */
.section-animation div[id^="lottie-"] {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* JavaScript анімації */
.section-animation div[id^="js-animation-"] {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Адаптивність */
@media (max-width: 768px) {
    .section-animation {
        padding: 10px 0;
    }
    
    .section-animation video,
    .section-animation img,
    .section-animation .css-animation,
    .section-animation div[id^="lottie-"],
    .section-animation div[id^="js-animation-"] {
        width: 100% !important;
        height: auto !important;
        max-width: 100%;
    }
}

/* Приклади CSS анімацій */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(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.05); }
    100% { transform: scale(1); }
}

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

/* Класи для швидкого використання */
.animation-fade-in {
    animation: fadeIn 2s ease-in-out;
}

.animation-slide-in {
    animation: slideIn 1s ease-out;
}

.animation-bounce {
    animation: bounce 2s infinite;
}

.animation-pulse {
    animation: pulse 2s infinite;
}

.animation-rotate {
    animation: rotate 3s linear infinite;
}
