/* Custom Animations and Effects */

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes floating-slow {
    0% {
        transform: translateY(0px) rotate(12deg);
    }
    50% {
        transform: translateY(-30px) rotate(15deg);
    }
    100% {
        transform: translateY(0px) rotate(12deg);
    }
}

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

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

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

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

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

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

/* Animation Classes */
.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

.floating-slow {
    animation: floating-slow 4s ease-in-out infinite;
}

.fade-in {
    animation: fadeInUp 1s ease-out forwards;
}

.fade-in-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Scroll Reveal Animation */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #2563eb, #10b981);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #1d4ed8, #059669);
}

/* Navigation Effects */
#navbar {
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #2563eb, #10b981);
    transition: width 0.3s ease;
}

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

/* Product Card Effects */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.product-card:hover::before {
    left: 100%;
}

/* Benefit Card Effects */
.benefit-card {
    position: relative;
    overflow: hidden;
}

.benefit-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.benefit-card:hover::after {
    width: 500px;
    height: 500px;
}

/* Testimonial Card Effects */
.testimonial-card {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
}

/* Button Hover Effects */
button {
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

/* Image Hover Effects */
img {
    transition: transform 0.5s ease, filter 0.5s ease;
}

img:hover {
    filter: brightness(1.1);
}

/* Gradient Text Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text {
    background: linear-gradient(90deg, #123524, #1A4A35, #8BAAAD, #123524);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

/* Dropdown Menu Styles */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.group:hover .group-hover\:visible {
    visibility: visible;
}

/* Floating Text Animation - Static with fade and subtle zoom */
.floating-text-seamless {
    position: absolute;
    white-space: nowrap;
    user-select: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    z-index: 1;
    opacity: 0;
    font-weight: 300;
    will-change: opacity, transform;
}

.floating-text-seamless::before {
    content: attr(data-text);
}

/* Fade in, stay visible, fade out with minimal zoom */
@keyframes fadeStayFade {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    10% {
        opacity: 0.35;
        transform: scale(1);
    }
    /* Stay visible and still from 10% to 80% */
    80% {
        opacity: 0.35;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

.floating-text-seamless.active {
    animation: fadeStayFade 8s ease-in-out;
}

/* Responsive - hide on smaller screens */
@media (max-width: 768px) {
    .floating-text-seamless {
        display: none !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .floating-text-seamless {
        font-size: 0.9rem !important;
    }
}

/* Card Shine Effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.card-shine:hover::before {
    left: 100%;
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}

.ripple:active::after {
    width: 200px;
    height: 200px;
    opacity: 1;
}

/* Parallax Effect */
.parallax {
    transition: transform 0.3s ease;
}

/* Mobile Menu Animations */
#mobileMenu {
    transition: opacity 0.3s ease;
}

#mobileMenu > div {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

#mobileMenu.active {
    display: block;
}

#mobileMenu.active > div {
    transform: translateX(0);
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    border: 3px solid rgba(37, 99, 235, 0.1);
    border-top-color: #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

/* Progress Bar Animation */
@keyframes progress {
    from {
        width: 0;
    }
}

.progress-bar {
    animation: progress 1.5s ease-out forwards;
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
    transition: box-shadow 0.3s ease;
}

.glow:hover {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.8);
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

.text-reveal {
    animation: textReveal 1s ease-out forwards;
}

/* Bounce In Animation */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease-out forwards;
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .animate-blob {
        animation-duration: 10s;
    }
    
    .floating,
    .floating-slow {
        animation-duration: 4s;
    }
}

/* Focus Styles for Accessibility */
button:focus,
a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    body {
        background: white;
        color: black;
    }
}

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

/* Sparkles Animation */
.sparkles-container {
    position: relative;
    display: inline-block;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle-fall 2s linear infinite;
    box-shadow: 0 0 4px #FFD700;
}

.sparkle::before,
.sparkle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
}

.sparkle::before {
    top: -2px;
    left: 2px;
    transform: scale(0.6);
}

.sparkle::after {
    top: 2px;
    left: -2px;
    transform: scale(0.6);
}

@keyframes sparkle-fall {
    0% {
        opacity: 1;
        transform: translateY(-20px) rotate(0deg) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(-10px) rotate(45deg) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(30px) rotate(360deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(40px) rotate(405deg) scale(0);
    }
}

/* Staggered animation delays for sparkles */
.sparkle:nth-child(1) { animation-delay: 0s; left: 10%; }
.sparkle:nth-child(2) { animation-delay: 0.3s; left: 30%; }
.sparkle:nth-child(3) { animation-delay: 0.6s; left: 50%; }
.sparkle:nth-child(4) { animation-delay: 0.9s; left: 70%; }
.sparkle:nth-child(5) { animation-delay: 1.2s; left: 90%; }
.sparkle:nth-child(6) { animation-delay: 1.5s; left: 20%; }
.sparkle:nth-child(7) { animation-delay: 1.8s; left: 60%; }
.sparkle:nth-child(8) { animation-delay: 0.4s; left: 80%; }
