/* Apple iPhone Website - Animation Styles */

/* Page Load Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animated Elements */
.hero-title {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-links {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-image img {
    animation: scaleIn 1s ease-out 0.8s both;
}

.section-title {
    animation: fadeInUp 0.6s ease-out both;
}

.product-card {
    animation: fadeInUp 0.6s ease-out both;
}

.product-card:nth-child(2) {
    animation-delay: 0.1s;
}

.product-card:nth-child(3) {
    animation-delay: 0.2s;
}

.feature-item {
    animation: fadeInUp 0.6s ease-out both;
}

.feature-item:nth-child(2) {
    animation-delay: 0.1s;
}

.feature-item:nth-child(3) {
    animation-delay: 0.2s;
}

/* Hover Animations */
.btn {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.feature-item {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.header {
    transition: background-color 0.3s ease;
}

/* Gradient Animation for Hero */
.hero {
    background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 50%, #f0f8ff 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite;
}

/* Navigation Scroll Effect */
.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Button Ripple Effect */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Image Hover Effects */
.hero-image img {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hero-image img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
}

/* Link Hover Animations */
.nav-links a,
.footer-section a {
    position: relative;
}

.nav-links a::after,
.footer-section a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--apple-black);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Smooth transitions for all elements */
* {
    -webkit-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    -moz-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    -o-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero {
        animation: none;
        background: var(--apple-gray-light);
    }
}