/* Custom CSS - E-Commerce & Digital Marketing Website (3D Animated Edition) */

/* Reset & Base */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    background-color: #f8fafc;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

/* =========================================
   3D & ANIMATED HEADER 
   ========================================= */
.fixed-nav {
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
    transform: translateZ(0); /* Hardware acceleration */
}

/* The scrolled version of the header becomes 3D floating and rounded */
.fixed-nav.scrolled {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    /* Extreme 3D Box Shadow */
    box-shadow: 
        0 15px 35px rgba(37, 99, 235, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.05),
        inset 0 2px 5px rgba(255, 255, 255, 1);
    transform: translateY(10px) rotateX(4deg) translateZ(20px); 
    border-radius: 100px; /* Pill shape */
    margin: 0 2%;
    width: 96%;
}

/* =========================================
   ANIMATIONS & KEYFRAMES
   ========================================= */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg) translateZ(0); }
    50% { transform: translateY(-25px) rotate(3deg) translateZ(20px); }
    100% { transform: translateY(0px) rotate(0deg) translateZ(0); }
}

@keyframes float-reverse {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(20px) rotate(-2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

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

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6); }
    70% { box-shadow: 0 0 0 20px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

@keyframes spin-3d {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

.animate-float {
    animation: float 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.animate-float-reverse {
    animation: float-reverse 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.animate-spin-3d {
    animation: spin-3d 6s linear infinite;
    transform-style: preserve-3d;
}

/* Gradients */
.hero-gradient {
    /* Animated Gradient Background */
    background: linear-gradient(-45deg, #0F172A, #1E3A8A, #2563EB, #0F172A);
    background-size: 300% 300%;
    animation: gradientBG 15s ease infinite;
    position: relative;
    overflow: hidden;
}

.text-gradient {
    background: linear-gradient(to right, #60A5FA, #3B82F6, #2563EB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientBG 4s ease infinite;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    position: relative;
    overflow: hidden;
}

/* Interactive Elements */
.nav-link {
    position: relative;
    overflow: hidden;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: 0;
    left: -100%;
    background: linear-gradient(90deg, transparent, #2563EB, #60A5FA);
    transition: left 0.4s ease;
    border-radius: 5px;
}

.nav-link:hover {
    color: #2563EB;
    transform: scale(1.05) translateZ(5px);
}

.nav-link:hover::before,
.nav-link.active::before {
    left: 100%;
    animation: slideLine 1.5s infinite linear;
}

@keyframes slideLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 3D Button Effects */
.btn-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.15s ease;
    /* 3D shadow trick */
    box-shadow: 0 8px 0 #1e40af, 0 15px 25px rgba(0,0,0,0.3);
    margin-bottom: 8px; /* account for shadow */
}

.btn-3d:hover {
    transform: translateY(4px);
    box-shadow: 0 4px 0 #1e40af, 0 10px 15px rgba(0,0,0,0.25);
    filter: brightness(1.1);
}

.btn-3d:active {
    transform: translateY(8px);
    box-shadow: 0 0px 0 #1e40af, 0 4px 10px rgba(0,0,0,0.2);
}

.btn-glow {
    animation: pulse-glow 2s infinite;
}

/* 3D Card Effects (supplementing vanilla-tilt) */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
}

.card-3d > * {
    /* Make content pop out when card is tilted */
    transform: translateZ(40px); 
}

.card-3d .icon-box-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateZ(60px); /* Extra pop */
}

.card-3d:hover .icon-box-hover {
    background-color: #2563EB;
    color: white;
    transform: scale(1.2) rotate(15deg) translateZ(80px); /* Extreme 3D pop & spin */
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4);
}

/* Animated Background Blobs */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.5;
    animation: spin-slow 25s linear infinite;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    pointer-events: none;
}

@keyframes spin-slow {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.blob-1 { top: -20%; left: -10%; width: 50vw; height: 50vw; background: #3B82F6; }
.blob-2 { bottom: -20%; right: -10%; width: 45vw; height: 45vw; background: #60A5FA; animation-direction: reverse; animation-duration: 35s; }
.blob-3 { top: 30%; left: 30%; width: 30vw; height: 30vw; background: #818CF8; animation-duration: 40s; opacity: 0.3; }

/* Lightbox/Image 3D wrapper */
.img-3d-wrapper {
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* Custom Swiper Styles */
.swiper-pagination-bullet {
    background: #CBD5E1;
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.swiper-pagination-bullet-active {
    background: #2563EB;
    width: 40px;
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.6);
}

/* Footer gradient */
.footer-gradient {
    background: linear-gradient(to bottom, #0F172A, #020617);
    position: relative;
    overflow: hidden;
}
.footer-gradient::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, #1E40AF, #3B82F6, #60A5FA, #3B82F6, #1E40AF);
    background-size: 200% auto;
    animation: gradientBG 3s linear infinite;
}

/* Logo 3D effect */
.logo-3d {
    transition: transform 0.3s ease;
    display: inline-block;
    transform-style: preserve-3d;
}
.group:hover .logo-3d {
    animation: spin-3d 2s ease infinite;
}

/* Animated Footer Links */
.footer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
@media (min-width: 768px) {
    .footer-link {
        justify-content: flex-start;
    }
}
.footer-link:hover {
    color: #fff;
    transform: translateX(5px);
}
.footer-link:hover i {
    opacity: 1;
    margin-left: 0;
}

/* Footer Social Icons 3D Hover */
.social-icon {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}
.social-icon:hover {
    transform: translateY(-8px) rotateX(10deg) rotateY(10deg) scale(1.1);
    background: #2563EB;
    border-color: #3B82F6;
    box-shadow: 0 15px 25px rgba(37, 99, 235, 0.4);
    color: white;
}

/* Slow Pulse Animation for Backgrounds */
@keyframes pulse-slow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 0.8; }
}
.animate-pulse-slow {
    animation: pulse-slow 8s ease-in-out infinite;
}
