/* Animations */

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide In From Top */
@keyframes slideInFromTop {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide In From Bottom */
@keyframes slideInFromBottom {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide In From Left */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide In From Right */
@keyframes slideInFromRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scale Up */
@keyframes scaleUp {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pulse */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Floating */
@keyframes floating {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Shake */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Gradient Animation */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Apply animations to elements */

/* Header Animation */
.main-header {
    animation: slideInFromTop 0.5s ease-out;
}

/* Logo Animation */
.logo img {
    animation: scaleUp 0.6s ease-out;
}

/* Hero Section Animation */
.hero h1 {
    animation: fadeIn 0.8s ease-out;
}

.hero .subtitle {
    animation: fadeIn 1s ease-out 0.3s forwards;
    opacity: 0;
}

.hero .btn-primary {
    animation: fadeIn 1.2s ease-out 0.6s forwards;
    opacity: 0;
    background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 70%, var(--color-secondary)));
    background-size: 200% 200%;
    animation: fadeIn 1.2s ease-out 0.6s forwards, gradientFlow 4s ease infinite;
}

/* About Section Animation */
.about-content {
    animation: fadeIn 0.8s ease-out;
}

.about-image {
    overflow: hidden;
}

.about-image img {
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Subscription Cards Animation */
.card {
    animation: fadeIn 0.8s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.featured {
    animation: pulse 2s infinite;
}

/* Testimonial Animation */
.testimonial {
    animation: fadeIn 0.8s ease-out;
    transition: transform 0.3s ease;
}

.testimonial:hover {
    transform: translateY(-5px);
}

/* Gallery Animation */
.gallery-item {
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

.gallery-item img {
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Form Animation */
.form-group input,
.form-group select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(123, 0, 255, 0.2);
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::after {
    width: 300%;
    height: 300%;
}

/* Footer Animation */
.footer-links a,
.footer-legal a {
    position: relative;
}

.footer-links a::after,
.footer-legal a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-secondary);
    transition: width 0.3s ease;
}

.footer-links a:hover::after,
.footer-legal a:hover::after {
    width: 100%;
}

/* Cookie Popup Animation */
.cookie-popup {
    animation: slideInFromBottom 0.5s ease-out;
}

/* Form Shake Animation for Validation */
.form-group.error input,
.form-group.error select {
    animation: shake 0.5s;
    border-color: #FF4136;
}

/* Thank You Page Animation */
.thank-you-icon {
    animation: scaleUp 0.6s ease-out;
}

.thank-you-content h1 {
    animation: fadeIn 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.thank-you-content p {
    animation: fadeIn 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.action-buttons {
    animation: fadeIn 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

/* Menu Toggle Animation */
.menu-toggle:checked + .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle:checked + .menu-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle:checked + .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Reduce animations based on user preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01s !important;
        scroll-behavior: auto !important;
    }
} 