.hero-swiper {
    margin-top: calc(var(--header-height) * -1);
}

/* ===== ANIMATED BLOBS ===== */
.hero-blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.hero-blob-1 {
    width: 500px;
    height: 500px;
    background: hsl(var(--primary-300));
    top: -15%;
    right: -10%;
}

.hero-blob-2 {
    width: 400px;
    height: 400px;
    background: hsl(var(--primary-400));
    bottom: -10%;
    left: -5%;
    animation-duration: 25s;
    animation-direction: reverse;
}

.hero-blob-3 {
    width: 350px;
    height: 350px;
    background: hsl(var(--primary-200));
    top: 40%;
    left: 50%;
    animation-duration: 30s;
}

/* Mobile blob adjustments */
@media (max-width: 768px) {
    .hero-blob-1 {
        width: 300px;
        height: 300px;
        top: -5%;
        right: -20%;
    }

    .hero-blob-2 {
        width: 250px;
        height: 250px;
        bottom: -5%;
        left: -15%;
    }

    .hero-blob-3 {
        width: 200px;
        height: 200px;
    }
}

/* ===== FLOATING STATS ===== */
.hero-accent {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: white;
    border: 1px solid hsl(var(--primary-100));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: float 6s ease-in-out infinite;
}

.dark .hero-accent {
    background: #1f2937;
    border-color: #374151;
}

.hero-accent-1 {
    top: -10px;
    right: -40px;
}

.hero-accent-2 {
    bottom: 60px;
    left: -150px;
    animation-delay: 1s;
}

/* Mobile: Hide floating stats (shown in dedicated section at bottom) */
@media (max-width: 1024px) {
    .hero-accent {
        display: none;
    }
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        hsl(var(--primary-400)),
        hsl(var(--primary-500))
    );
    color: white;
}

@media (min-width: 640px) {
    .stat-icon {
        width: 48px;
        height: 48px;
    }
}

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% {
        transform: translateY(-8px) rotate(-2deg);
    }
    75% {
        transform: translateY(-20px) rotate(1deg);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse-border {
    0%,
    100% {
        box-shadow: 0 0 0 0 hsla(var(--primary-500), 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px hsla(var(--primary-500), 0);
    }
}

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

/* ===== ATTENTION-GRABBING ANIMATIONS ===== */
.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animation-delay-100 {
    animation-delay: 0.1s;
    opacity: 0;
}

.animation-delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
}

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

/* Pulse border effect for illustration container */
.pulse-border {
    animation: pulse-border 3s ease-in-out infinite;
}

/* Card hover effects */
.card-hover {
    animation: slideInCard 0.6s ease-out forwards;
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Hero content animation on slide change */
.hero-content-animate {
    animation: fadeInUp 1s ease-out;
}

.hero-illustration-animate {
    animation: fadeInScale 1s ease-out;
}

/* ===== SWIPER SLIDE TRANSITIONS ===== */
.swiper-slide-active .hero-content-animate,
.swiper-slide-active .hero-illustration-animate {
    animation-play-state: running;
}

/* Add entrance animation for cards in grid */
.swiper-slide-active .card-hover:nth-child(1) {
    animation-delay: 0.1s;
}

.swiper-slide-active .card-hover:nth-child(2) {
    animation-delay: 0.2s;
}

.swiper-slide-active .card-hover:nth-child(3) {
    animation-delay: 0.3s;
}

.swiper-slide-active .card-hover:nth-child(4) {
    animation-delay: 0.4s;
}

.swiper-slide-active .card-hover:nth-child(5) {
    animation-delay: 0.5s;
}

.swiper-slide-active .card-hover:nth-child(6) {
    animation-delay: 0.6s;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Extra small devices (phones, less than 640px) */
@media (max-width: 639px) {
    .hero-swiper {
        margin-top: calc(var(--header-height) * -0.5);
    }

    /* Reduce animation intensity on small screens */
    .hero-blob {
        filter: blur(60px);
        opacity: 0.3;
    }

    .card-hover:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

/* Small devices (landscape phones, 640px and up) */
@media (min-width: 640px) and (max-width: 767px) {
    .hero-accent {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-accent-1 {
        top: 20px;
        right: -30px;
    }

    .hero-accent-2 {
        bottom: 80px;
        left: -100px;
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .hero-content-animate {
        animation-duration: 1.2s;
    }

    .hero-illustration-animate {
        animation-duration: 1.2s;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .hero-blob,
    .hero-accent,
    .animate-fade-in-down,
    .animate-fade-in-up,
    .card-hover,
    .hero-content-animate,
    .hero-illustration-animate,
    .pulse-border {
        animation: none !important;
        transition: none !important;
    }

    .animation-delay-100,
    .animation-delay-200,
    .animation-delay-300 {
        opacity: 1 !important;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.hero-blob,
.hero-accent,
.card-hover {
    will-change: transform;
}

/* GPU acceleration for smooth animations */
.hero-content-animate,
.hero-illustration-animate,
.animate-fade-in-down,
.animate-fade-in-up {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ===== INTERACTIVE ENHANCEMENTS ===== */

/* Navigation buttons with magnetic effect on desktop */
@media (min-width: 1024px) {
    .hero-prev:hover,
    .hero-next:hover {
        transform: scale(1.1);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
}

/* Progress bar animation */
.hero-progress-bar {
    transition: width 0.3s ease-out;
    background: linear-gradient(
        90deg,
        hsl(var(--primary-400)),
        hsl(var(--primary-500)),
        hsl(var(--primary-600))
    );
}

/* Add shimmer effect to primary button */
.group:hover .bg-primary-500::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

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

/* Add focus states for accessibility */
.hero-prev:focus-visible,
.hero-next:focus-visible {
    outline: 3px solid hsl(var(--primary-500));
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* ===== DARK MODE SPECIFIC ADJUSTMENTS ===== */
.dark .hero-blob {
    opacity: 0.25;
}

.dark .pulse-border {
    animation: pulse-border-dark 3s ease-in-out infinite;
}

@keyframes pulse-border-dark {
    0%,
    100% {
        box-shadow: 0 0 0 0 hsla(var(--primary-600), 0.5);
    }
    50% {
        box-shadow: 0 0 0 10px hsla(var(--primary-600), 0);
    }
}
