/* ===================================
   IBIZA WEDDING FILMS - Animations
   =================================== */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide In Left Animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right Animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Staggered Animation Delays */
.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
.fade-in:nth-child(5) { animation-delay: 0.5s; }
.fade-in:nth-child(6) { animation-delay: 0.6s; }
.fade-in:nth-child(7) { animation-delay: 0.7s; }
.fade-in:nth-child(8) { animation-delay: 0.8s; }

/* Base Fade In Class */
.fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

/* Hero Animations */
.hero-content h1 {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.hero-content p {
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-video-bg {
    animation: scaleIn 1.5s ease forwards;
    transform: scale(1.1);
}

/* Feature Cards - Staggered Fade Up */
.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.3s; }
.feature-card:nth-child(3) { animation-delay: 0.5s; }

/* Testimonial Cards */
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card:nth-child(1) { transition-delay: 0.1s; }
.testimonial-card:nth-child(2) { transition-delay: 0.2s; }
.testimonial-card:nth-child(3) { transition-delay: 0.3s; }
.testimonial-card:nth-child(4) { transition-delay: 0.4s; }

/* Package Cards */
.package-card {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s ease;
}

.package-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.package-card:nth-child(1) { transition-delay: 0.1s; }
.package-card:nth-child(2) { transition-delay: 0.2s; }
.package-card:nth-child(3) { transition-delay: 0.3s; }

/* Package Card Hover Effects */
.package-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
}

.package-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.package-card.featured:hover {
    transform: scale(1.05) translateY(-15px);
}

/* Video Item Hover */
.video-item {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.video-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.video-item .video-wrapper iframe {
    transition: transform 0.4s ease;
}

.video-item:hover .video-wrapper iframe {
    transform: scale(1.02);
}

/* About Image Animation */
.about-image-col {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.about-image-col.visible {
    opacity: 1;
    transform: translateX(0);
}

/* About Text Animation */
.about-text {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.about-text.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Contact Form Animation */
.contact-form-wrapper {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.contact-form-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-info {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease 0.2s;
}

.contact-info.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Button Hover Animation */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.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 ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Navbar Scroll Effect */
.navbar {
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255,255,255,0.98);
    padding: 15px 40px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar.scrolled .logo {
    color: var(--dark);
}

.navbar.scrolled .nav-links a {
    color: var(--dark);
}

/* Mobile Menu Animation */
.nav-links {
    transition: right 0.4s ease, opacity 0.4s ease;
}

.nav-links.active {
    opacity: 1;
}

.hamburger {
    transition: transform 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.1);
}

/* Icon Circle Hover */
.feature-icon-circle {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-circle {
    background: var(--gold);
    color: #fff;
    transform: rotate(360deg);
}

/* Quote Icon Animation */
.quote-icon {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.testimonial-card:hover .quote-icon {
    transform: scale(1.2) rotate(-10deg);
    opacity: 0.5;
}

/* Calculator Toggle Animation */
.switch .slider {
    transition: all 0.3s ease;
}

.switch:hover .slider {
    box-shadow: 0 0 10px rgba(166, 139, 108, 0.3);
}

/* Price Animation */
.est-price {
    transition: all 0.3s ease;
}

.est-price.updating {
    transform: scale(1.1);
    color: var(--light-gold);
}

/* Footer Link Animation */
.footer-nav a {
    position: relative;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.footer-nav a:hover::after {
    width: 100%;
}

/* Scroll Progress Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gold);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Loading Animation */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-content .logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    letter-spacing: 3px;
    color: var(--dark);
    margin-bottom: 20px;
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Smooth Image Loading */
img {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

img.loading {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* Section Transitions */
section {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* CTA Section Animation */
.cta-section h2,
.cta-section p,
.cta-section .btn {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.cta-section.visible h2,
.cta-section.visible p,
.cta-section.visible .btn {
    opacity: 1;
    transform: translateY(0);
}

.cta-section.visible p { transition-delay: 0.1s; }
.cta-section.visible .btn { transition-delay: 0.2s; }

/* FAQ Item Animation */
.faq-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.faq-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.faq-item:nth-child(1) { transition-delay: 0.1s; }
.faq-item:nth-child(2) { transition-delay: 0.2s; }
.faq-item:nth-child(3) { transition-delay: 0.3s; }
.faq-item:nth-child(4) { transition-delay: 0.4s; }

/* Video Play Button Animation */
.video-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-item:hover .video-wrapper::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Privacy Content Animation */
.privacy-content h2 {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.privacy-content h2.visible {
    opacity: 1;
    transform: translateX(0);
}

.privacy-content p,
.privacy-content ul {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.privacy-content p.visible,
.privacy-content ul.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Map Section Animation */
.map-placeholder {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.6s ease;
}

.map-placeholder.visible {
    opacity: 1;
    transform: scale(1);
}

/* Calculator CTA Animation */
.calculator-cta {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.calculator-cta.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .fade-in {
        animation-duration: 0.5s;
    }
    
    .package-card.featured:hover {
        transform: scale(1.02);
    }
}