/* ============================================
   FANAVAR HERO DESIGN - SCOPED STYLES
   Scope: Homepage hero section only (#hero-section)
   Framework: Porto template
   Tested: ✓ Homepage desktop, ✓ Homepage mobile, ✓ RTL support
   ============================================ */

/* 1. VISUAL INTEGRITY & ISOLATION */
/* Override all inherited Porto theme hero styles using specific layers and !important where necessary to prevent leakage */
:where(#hero-section) .fanavar-hero-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Explicitly hide the "METAL" text watermark from Porto theme */
#hero-section .custom-heading-1,
#hero-section #hero-bg-text {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Base Hero Section - Allow inline background image, only set fallback color */
#hero-section {
    background-color: #0a0a0a; /* Fallback dark background */
    position: relative;
    z-index: 1;
}

#hero-section::before,
#hero-section::after {
    display: none !important; /* Remove any pseudoelement overlays that might contain textures */
}

/* When no inline background is set, use gradient fallback */
#hero-section:not([style*="background-image"]) {
    background-image: linear-gradient(180deg, rgba(10, 10, 10, 0.8) 0%, #0a0a0a 100%);
    background-size: cover;
    background-position: center;
}

#hero-section .fanavar-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 1024px) {
    #hero-section .fanavar-hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

/* Hero Content */
#hero-section .fanavar-hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    /* Typography colors: Headlines in pure white, subtext in gray-200 */
    color: #E5E7EB; 
}

#hero-section .fanavar-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05); /* Lighter dark background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    
    letter-spacing: 0.12em;
    color: #E5E7EB; /* Light text instead of dark */
    width: fit-content;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

#hero-section .fanavar-hero-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #FFD700; /* Fanavar Yellow */
    border-radius: 50%;
    animation: pulse 2.5s ease-in-out infinite;
}

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

#hero-section .fanavar-hero-headline {
    font-weight: 800;
    font-size: clamp(36px, 8vw, 60px);
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: #FFFFFF; /* Pure white */
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
    opacity: 0;
}

#hero-section .fanavar-hero-headline .highlight {
    color: #FFD700; /* Fanavar Yellow */
}

#hero-section .fanavar-hero-subheadline {
    font-weight: 400;
    font-size: 17px;
    line-height: 27px;
    color: #E5E7EB; /* gray-200 */
    max-width: 520px;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
    opacity: 0;
}

/* Value Props */
#hero-section .fanavar-hero-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
    opacity: 0;
}

#hero-section .fanavar-value-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #E5E7EB; /* Light text */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#hero-section .fanavar-value-item:hover {
    background: rgba(255, 215, 0, 0.06); /* Yellow tint on hover */
    border-color: rgba(255, 215, 0, 0.2);
}

#hero-section .fanavar-value-item svg {
    width: 14px;
    height: 14px;
    color: #FFD700; /* Fanavar Yellow */
    flex-shrink: 0;
}

/* CTA Buttons */
#hero-section .fanavar-hero-ctas {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
    opacity: 0;
}

@media (min-width: 480px) {
    #hero-section .fanavar-hero-ctas {
        flex-direction: row;
        gap: 1rem;
    }
}

#hero-section .fanavar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 28px;
    font-size: 13px;
    font-weight: 800;
    line-height: 13px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    white-space: nowrap;
}

#hero-section .fanavar-btn-primary {
    background: #FFD700; /* Fanavar Yellow */
    color: #0a0a0a; /* Dark text for contrast on yellow */
}

#hero-section .fanavar-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.25);
    color: #0a0a0a;
}

#hero-section .fanavar-btn-secondary {
    background: transparent;
    color: #FFFFFF; /* Pure white */
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#hero-section .fanavar-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
    color: #FFFFFF;
}

#hero-section .fanavar-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

#hero-section .fanavar-btn:hover svg {
    transform: translateX(3px);
}

[dir="rtl"] #hero-section .fanavar-btn:hover svg {
    transform: translateX(-3px);
}

/* Trust Indicators */
#hero-section .fanavar-hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
    opacity: 0;
}

@media (min-width: 480px) {
    #hero-section .fanavar-hero-trust {
        gap: 2.5rem;
    }
}

#hero-section .fanavar-trust-stat {
    display: flex;
    flex-direction: column;
}

#hero-section .fanavar-trust-number {
    font-size: 28px;
    font-weight: 800;
    color: #FFD700; /* Fanavar Yellow */
    line-height: 1;
}

#hero-section .fanavar-trust-label {
    font-size: 11px;
    font-weight: 700;
    color: #9CA3AF; /* gray-400 */
    
    letter-spacing: 0.08em;
    margin-top: 0.375rem;
}

/* Hero Slider */
#hero-section .fanavar-hero-slider {
    position: relative;
    height: 380px;
    perspective: 1000px;
}

@media (min-width: 640px) {
    #hero-section .fanavar-hero-slider {
        height: 450px;
    }
}

@media (min-width: 1024px) {
    #hero-section .fanavar-hero-slider {
        height: 520px;
    }
}

#hero-section .fanavar-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

#hero-section .fanavar-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

#hero-section .fanavar-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(60px) scale(0.92);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

#hero-section .fanavar-slide.fanavar-slide-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 10;
}

#hero-section .fanavar-slide.fanavar-slide-prev {
    opacity: 0.25;
    transform: translateX(-50px) scale(0.88);
    z-index: 5;
}

#hero-section .fanavar-slide.fanavar-slide-next {
    opacity: 0.25;
    transform: translateX(50px) scale(0.88);
    z-index: 5;
}

#hero-section .fanavar-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

#hero-section .fanavar-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#hero-section .fanavar-slide:hover .fanavar-slide-image {
    transform: scale(1.04);
}

#hero-section .fanavar-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
}

@media (min-width: 640px) {
    #hero-section .fanavar-slide-overlay {
        padding: 2rem;
    }
}

#hero-section .fanavar-slide-category {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: #FFD700; /* Fanavar Yellow */
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 800;
    
    letter-spacing: 0.08em;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

#hero-section .fanavar-slide-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

@media (min-width: 640px) {
    #hero-section .fanavar-slide-title {
        font-size: 1.5rem;
    }
}

#hero-section .fanavar-slide-desc {
    font-size: 13px;
    font-weight: 400;
    color: #E5E7EB;
    line-height: 1.5;
}

/* Slider Navigation */
#hero-section .fanavar-slider-nav {
    position: absolute;
    bottom: -52px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.875rem;
    align-items: center;
    z-index: 20;
}

#hero-section .fanavar-slider-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #E5E7EB;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#hero-section .fanavar-slider-btn:hover {
    background: #FFD700;
    border-color: #FFD700;
    color: #0a0a0a;
}

#hero-section .fanavar-slider-btn svg {
    width: 18px;
    height: 18px;
}

#hero-section .fanavar-slider-dots {
    display: flex;
    gap: 0.5rem;
}

#hero-section .fanavar-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#hero-section .fanavar-slider-dot.fanavar-slider-dot-active {
    background: #FFD700;
    width: 20px;
    border-radius: 3px;
}

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

/* RTL Support */
[dir="rtl"] #hero-section .fanavar-hero-grid {
    direction: rtl;
}

[dir="rtl"] #hero-section .fanavar-hero-content {
    order: 2;
}

[dir="rtl"] #hero-section .fanavar-hero-slider {
    order: 1;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    #hero-section .fanavar-hero-badge,
    #hero-section .fanavar-hero-headline,
    #hero-section .fanavar-hero-subheadline,
    #hero-section .fanavar-hero-values,
    #hero-section .fanavar-hero-ctas,
    #hero-section .fanavar-hero-trust {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    
    #hero-section .fanavar-slide,
    #hero-section .fanavar-btn,
    #hero-section .fanavar-value-item,
    #hero-section .fanavar-slider-btn,
    #hero-section .fanavar-slider-dot {
        transition-duration: 0.01ms !important;
    }
}