/**
 * World Class Hero Section
 * Stunning, animated hero with mesh gradients and badge designs
 */

.affc-hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--aff-gradient-dark);
    overflow: hidden;
    margin-bottom: var(--aff-space-12);
    contain: layout style;
}

/* Mesh Gradient Background */
.affc-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(217, 70, 239, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(34, 197, 94, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.1) 0%, transparent 40%);
    animation: hero-bg-pulse 8s ease-in-out infinite;
    will-change: opacity, transform;
}

@keyframes hero-bg-pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.05);
    }
}

/* Floating Particles */
.affc-hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.affc-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--aff-primary-400);
    border-radius: 9999px;
    opacity: 0.3;
    animation: particle-float 20s linear infinite;
    will-change: transform, opacity;
}

.affc-particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.affc-particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.affc-particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.affc-particle:nth-child(4) { left: 40%; animation-delay: 6s; }
.affc-particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.affc-particle:nth-child(6) { left: 60%; animation-delay: 10s; }
.affc-particle:nth-child(7) { left: 70%; animation-delay: 12s; }
.affc-particle:nth-child(8) { left: 80%; animation-delay: 14s; }
.affc-particle:nth-child(9) { left: 90%; animation-delay: 16s; }
.affc-particle:nth-child(10) { left: 95%; animation-delay: 18s; }

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Hero Content */
.affc-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: var(--aff-space-8);
    animation: affc-slideUp var(--aff-transition-slow) ease-out;
}

.affc-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--aff-space-2);
    padding: var(--aff-space-2) var(--aff-space-4);
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 9999px;
    color: var(--aff-primary-400);
    font-size: var(--aff-text-sm);
    font-weight: var(--aff-font-semibold);
    margin-bottom: var(--aff-space-6);
    animation: affc-fadeIn var(--aff-transition-fast) ease-out 0.2s both;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.3);
}

.affc-hero-badge svg {
    width: 16px;
    height: 16px;
}

.affc-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: var(--aff-font-extrabold);
    line-height: var(--aff-leading-tight);
    color: var(--aff-text-inverse);
    margin-bottom: var(--aff-space-6);
    animation: affc-slideUp var(--aff-transition-fast) ease-out 0.3s both;
}

.affc-hero-title span {
    background: linear-gradient(135deg, var(--aff-primary-400) 0%, var(--aff-accent-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.affc-hero-description {
    font-size: var(--aff-text-lg);
    color: var(--aff-neutral-400);
    margin-bottom: var(--aff-space-8);
    animation: affc-slideUp var(--aff-transition-fast) ease-out 0.4s both;
}

.affc-hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--aff-space-12);
    margin-bottom: var(--aff-space-8);
    animation: affc-slideUp var(--aff-transition-fast) ease-out 0.5s both;
}

.affc-hero-stat {
    text-align: center;
}

.affc-hero-stat-value {
    font-size: var(--aff-text-4xl);
    font-weight: var(--aff-font-bold);
    color: var(--aff-text-inverse);
    margin-bottom: var(--aff-space-1);
}

.affc-hero-stat-label {
    font-size: var(--aff-text-sm);
    color: var(--aff-neutral-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.affc-hero-actions {
    display: flex;
    justify-content: center;
    gap: var(--aff-space-4);
    animation: affc-slideUp var(--aff-transition-fast) ease-out 0.6s both;
}

.affc-hero-actions .btn {
    padding: var(--aff-space-4) var(--aff-space-8);
    font-size: var(--aff-text-base);
}

/* Hero Image */
.affc-hero-image {
    position: absolute;
    right: -10%;
    bottom: -10%;
    width: 50%;
    max-width: 600px;
    opacity: 0.8;
    animation: hero-float 6s ease-in-out infinite;
    will-change: transform;
}

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

/* Search Bar in Hero */
.affc-hero-search {
    position: relative;
    max-width: 600px;
    margin: 0 auto var(--aff-space-8);
    animation: affc-slideUp var(--aff-transition-fast) ease-out 0.7s both;
}

.affc-hero-search-input {
    width: 100%;
    padding: var(--aff-space-5) var(--aff-space-6);
    padding-right: var(--aff-space-16);
    font-size: var(--aff-text-lg);
    font-family: var(--aff-font-sans);
    color: var(--aff-text-primary);
    background: var(--aff-surface-1);
    border: 2px solid var(--aff-border-light);
    border-radius: 9999px;
    transition: var(--aff-transition-fast);
}

.affc-hero-search-input:focus {
    outline: none;
    border-color: var(--aff-primary-500);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 0 20px rgba(99, 102, 241, 0.25);
}

.affc-hero-search-input::placeholder {
    color: var(--aff-text-tertiary);
}

.affc-hero-search-btn {
    position: absolute;
    right: var(--aff-space-2);
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background: var(--aff-gradient-primary);
    border: none;
    color: var(--aff-text-inverse);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--aff-transition-fast);
    will-change: transform;
    backface-visibility: hidden;
}

.affc-hero-search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--aff-shadow-lg);
}

.affc-hero-search-btn:active {
    transform: translateY(-50%) scale(1.05);
}

.affc-hero-search-btn svg {
    width: 24px;
    height: 24px;
}

/* Hero with Image */
.affc-hero.with-image {
    min-height: 700px;
    padding: var(--aff-space-16) 0;
}

.affc-hero.with-image .affc-hero-content {
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: 0;
}

.affc-hero.with-image .affc-hero-image {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Compact Hero */
.affc-hero.compact {
    min-height: 400px;
}

.affc-hero.compact .affc-hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
}

.affc-hero.compact .affc-hero-stats {
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .affc-hero.with-image {
        flex-direction: column;
        text-align: center;
    }

    .affc-hero.with-image .affc-hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .affc-hero.with-image .affc-hero-image {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .affc-hero {
        min-height: 500px;
    }

    .affc-hero-title {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }

    .affc-hero-stats {
        flex-direction: column;
        gap: var(--aff-space-6);
    }

    .affc-hero-actions {
        flex-direction: column;
    }

    .affc-hero-actions .btn {
        width: 100%;
    }

    .affc-hero-image {
        display: none;
    }
}

/* Dark Mode Adjustments */
[data-theme="dark"] .affc-hero {
    background: linear-gradient(135deg, var(--aff-neutral-900) 0%, var(--aff-neutral-800) 100%);
}

[data-theme="dark"] .affc-hero::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(217, 70, 239, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(34, 197, 94, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.15) 0%, transparent 40%);
}

[data-theme="dark"] .affc-hero-search-input {
    background: var(--aff-surface-2);
    border-color: var(--aff-border-medium);
}

[data-theme="dark"] .affc-hero-search-input::placeholder {
    color: var(--aff-text-tertiary);
}

/* GPU-Accelerated Animations */
@keyframes affc-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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