/* Dynamic Hero Section Styles */

/* Enhanced hero section for dynamic behavior */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    margin: calc(80px + var(--mobile-padding)) var(--mobile-padding) var(--mobile-padding);
    padding: 2rem var(--mobile-padding);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: min-height, max-height, transform;
    /* Stabilize height to avoid layout shifts before JS sets sizes */
    min-height: 75vh;
    max-height: 75vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--boanalyst-gold), transparent);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Hero content container */
.hero-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

/* Hero states */
.hero-section.hero-minimized {
    border-radius: 16px;
    margin: calc(80px + 0.5rem) 0.5rem 0.5rem;
    padding: 1rem;
}

.hero-section.hero-minimized::before {
    opacity: 0.5;
}

.hero-section.hero-hidden {
    border-radius: 8px;
    margin: calc(80px + 0.25rem) 0.25rem 0.25rem;
    padding: 0.5rem;
    box-shadow: var(--glass-shadow-light);
}

.hero-section.hero-hidden::before {
    opacity: 0;
}

/* Enhanced hero title with dynamic scaling */
.hero-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, var(--boanalyst-text-light) 0%, var(--boanalyst-gold) 50%, var(--boanalyst-text-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

/* Enhanced hero subtitle */
.hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.25rem);
    line-height: 1.6;
    color: var(--boanalyst-text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

/* Enhanced hero CTA buttons */
.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.hero-cta .btn-primary,
.hero-cta .btn-secondary {
    width: 100%;
    max-width: 280px;
    min-height: var(--touch-target-large);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .hero-section {
        margin: calc(70px + 1rem) 1rem 1rem;
        padding: 2rem 1rem;
        border-radius: 20px;
    }
    
    .hero-section.hero-minimized {
        margin: calc(70px + 0.5rem) 0.5rem 0.5rem;
        padding: 1rem 0.5rem;
        border-radius: 12px;
    }
    
    .hero-section.hero-hidden {
        margin: calc(70px + 0.25rem) 0.25rem 0.25rem;
        padding: 0.5rem 0.25rem;
        border-radius: 8px;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        margin-bottom: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: clamp(0.875rem, 3vw, 1.125rem);
        margin-bottom: 1.5rem;
    }
    
    .hero-cta {
        gap: 0.75rem;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section {
        margin: calc(80px + 1.5rem) 1.5rem 1.5rem;
        padding: 2.5rem 1.5rem;
    }
    
    .hero-cta {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }
    
    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        width: auto;
        min-width: 200px;
    }
}

/* Desktop adjustments */
@media (min-width: 1025px) {
    .hero-section {
        margin: calc(80px + 2rem) 2rem 2rem;
        padding: 3rem 2rem;
    }
    
    .hero-cta {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
    
    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        width: auto;
        min-width: 220px;
    }
}

/* Smooth animations for hero state changes */
@keyframes heroExpand {
    from {
        min-height: 0;
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        min-height: 75vh;
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes heroCollapse {
    from {
        min-height: 75vh;
        opacity: 1;
        transform: scale(1);
    }
    to {
        min-height: 0;
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Performance optimizations */
.hero-section,
.hero-content,
.hero-title,
.hero-subtitle,
.hero-cta {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hero-section,
    .hero-content,
    .hero-title,
    .hero-subtitle,
    .hero-cta {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .hero-section {
        background: rgba(0, 0, 0, 0.9) !important;
        border: 2px solid var(--boanalyst-gold) !important;
    }
    
    .hero-title {
        background: var(--boanalyst-gold) !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: unset !important;
        background-clip: unset !important;
        color: var(--boanalyst-gold) !important;
    }
}

/* Loading state for hero section */
.hero-section.loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section.loading .hero-content {
    opacity: 0.5;
}

/* Parallax effect for background elements */
.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 70%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    transition: transform 0.3s ease;
    will-change: transform;
}

/* Interactive hover effects for desktop */
@media (min-width: 1025px) {
    .hero-section:hover::after {
        transform: scale(1.1) rotate(1deg);
    }
    
    .hero-section:hover .hero-title {
        transform: translateY(-2px);
    }
    
    .hero-section:hover .hero-cta .btn-primary,
    .hero-section:hover .hero-cta .btn-secondary {
        transform: translateY(-1px);
    }
}
