/* ============================================
   ANIMATIONS & INTERACTIONS
   ============================================ */

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    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(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(26, 77, 58, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(26, 77, 58, 0.6);
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
}

.fade-in {
    animation: fadeIn 0.6s ease-in;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

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

.scale-in {
    animation: scaleIn 0.5s ease-out;
}

/* Button Animations */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-login {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before,
.btn-secondary::before,
.btn-outline::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;
}

/* No ::before overlay on .btn-login so hover keeps clear text/background contrast */

.btn-primary:hover::before,
.btn-secondary:hover::before,
.btn-outline:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-outline:hover,
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 77, 58, 0.3);
}

.btn-primary:active,
.btn-secondary:active,
.btn-outline:active,
.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(26, 77, 58, 0.2);
}

/* Card Animations */
.service-card,
.launch-item,
.stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.testimonial-card {
    position: relative;
    /* No transitions or hover effects for testimonial cards */
}

.service-card:hover,
.launch-item:hover,
.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.service-card::before,
.launch-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 77, 58, 0.05) 0%, rgba(45, 122, 95, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.service-card:hover::before,
.launch-item:hover::before {
    opacity: 1;
}

/* Form Input Animations */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    animation: pulse 0.3s ease;
    transform: scale(1.02);
}

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    animation: shake 0.5s ease;
    border-color: #e74c3c;
}

.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: var(--accent-color);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Logo Animation */
.logo-img {
    transition: transform 0.3s ease;
}

.logo a:hover .logo-img {
    transform: scale(1.05) rotate(2deg);
}

/* Header Scroll Animation */
.header {
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

/* Mobile Menu Animation */
.nav-menu {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu.active {
    animation: slideIn 0.3s ease-out;
}

.nav-menu li {
    opacity: 1;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-menu.active li {
    opacity: 1;
    transform: translateX(0);
}

.nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
.nav-menu.active li:nth-child(2) { transition-delay: 0.15s; }
.nav-menu.active li:nth-child(3) { transition-delay: 0.2s; }
.nav-menu.active li:nth-child(4) { transition-delay: 0.25s; }
.nav-menu.active li:nth-child(5) { transition-delay: 0.3s; }
.nav-menu.active li:nth-child(6) { transition-delay: 0.35s; }
.nav-menu.active li:nth-child(7) { transition-delay: 0.4s; }

/* Hero Section Animations */
.hero {
    animation: fadeIn 0.8s ease-in;
}

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

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

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

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

.hero-guarantee {
    animation: fadeInUp 0.8s ease-out 1s both;
}

/* Feature Badge Animation */
.feature-badge {
    display: inline-block;
    transition: transform 0.3s ease;
}

.feature-badge:hover {
    transform: scale(1.1);
}

/* Check Icon Animation */
.check-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.hero-feature:hover .check-icon {
    transform: scale(1.2) rotate(360deg);
}

/* Stats Counter Animation */
.stat-number {
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-number {
    transform: scale(1.1);
    color: var(--primary-color);
}

/* Testimonial Animation - Removed to prevent any hover effects */

/* Service Card Stagger Animation */
.service-card {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Page Load Animation */
@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: pageLoad 0.5s ease-out;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(26, 77, 58, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    animation: float 3s ease-in-out infinite;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(26, 77, 58, 0.4);
}

.fab:active {
    transform: scale(0.95);
}

/* Tooltip Animation */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Image Hover Effect */
img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Link Hover Animation */
a {
    position: relative;
    transition: color 0.3s ease;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* a:hover::after {
    width: 100%;
} */

.nav-menu a::after,
.nav-item::after,
.user-dropdown a::after,
.btn-primary::after,
.btn-secondary::after {
    display: none;
}

/* Notification Animation */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideIn 0.3s ease-out, fadeIn 0.3s ease-out;
}

.notification.success {
    border-left: 4px solid var(--accent-color);
}

.notification.error {
    border-left: 4px solid #e74c3c;
}

/* Modal Animation */
.modal {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: scaleIn 0.3s ease-out;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Smooth Transitions for All Interactive Elements */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Disable transitions for performance on scroll */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

