/* Premium Animations and Transitions */
/* Leśna Rezydencja Królewo */

/* Keyframe Animations */

/* Fade animations with subtle movement */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Luxury pulse effect */
@keyframes luxuryPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

/* Gentle float animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Shimmer effect for luxury elements */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Text reveal animation */
@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Line draw animation */
@keyframes drawLine {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Rotation animations */
@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes gentleRotate {
    0%, 100% {
        transform: rotate(-2deg);
    }
    50% {
        transform: rotate(2deg);
    }
}

/* Parallax Classes */
.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-element {
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.parallax-slow {
    transition-duration: 0.8s;
}

.parallax-fast {
    transition-duration: 0.3s;
}

/* Scroll-triggered Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.scroll-animate.in-view {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.scroll-animate-left.in-view {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.scroll-animate-right.in-view {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.scroll-animate-scale.in-view {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Animation Delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Hero Parallax Effects */
.hero-parallax {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    will-change: transform;
}

/* Image Hover Effects */
.image-hover-zoom {
    overflow: hidden;
    position: relative;
}

.image-hover-zoom img {
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.image-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Ken Burns Effect */
.ken-burns {
    animation: kenBurns 20s ease-out infinite alternate;
}

@keyframes kenBurns {
    0% {
        transform: scale(1) translateX(0);
    }
    100% {
        transform: scale(1.2) translateX(-10%);
    }
}

/* Button Animations */
.btn-hover-lift {
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

.btn-hover-glow {
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.btn-hover-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--luxury-gold);
    opacity: 0;
    border-radius: inherit;
    transition: opacity 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: -1;
}

.btn-hover-glow:hover::before {
    opacity: 0.2;
}

/* Text Effects */
.text-shimmer {
    background: linear-gradient(
        90deg,
        var(--forest-green) 0%,
        var(--luxury-gold) 50%,
        var(--forest-green) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

.text-gradient {
    background: linear-gradient(135deg, var(--forest-green) 0%, var(--luxury-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Loading Animations */
.loader-dots {
    display: inline-flex;
    gap: 0.5rem;
}

.loader-dot {
    width: 10px;
    height: 10px;
    background-color: var(--luxury-gold);
    border-radius: 50%;
    animation: loaderDots 1.4s ease-in-out infinite both;
}

.loader-dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dot:nth-child(2) { animation-delay: -0.16s; }
.loader-dot:nth-child(3) { animation-delay: 0; }

@keyframes loaderDots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Reveal Animations */
.reveal-text {
    position: relative;
    overflow: hidden;
}

.reveal-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--warm-white);
    transform: translateX(-100%);
    animation: revealText 1s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes revealText {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Smooth State Transitions */
.smooth-transition {
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.smooth-transition-slow {
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Gallery Animations */
.gallery-item-reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.gallery-item-reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Form Animations */
.form-field-animate {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

.form-field-animate:nth-child(1) { animation-delay: 0.1s; }
.form-field-animate:nth-child(2) { animation-delay: 0.2s; }
.form-field-animate:nth-child(3) { animation-delay: 0.3s; }
.form-field-animate:nth-child(4) { animation-delay: 0.4s; }
.form-field-animate:nth-child(5) { animation-delay: 0.5s; }

/* Success Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.success-checkmark circle {
    stroke: var(--forest-green);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: drawCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark path {
    stroke: var(--forest-green);
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: drawCheck 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes drawCircle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

/* Mouse Follow Effect */
.mouse-follow {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--luxury-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease-out;
    opacity: 0;
}

.mouse-follow.active {
    opacity: 1;
}

/* Luxury Reveal Animation */
.luxury-reveal {
    position: relative;
    overflow: hidden;
}

.luxury-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.3) 50%,
        transparent 100%
    );
    animation: luxuryReveal 2s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
}

@keyframes luxuryReveal {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}