/* Hero Marketing Metrics - Metrics-First Design */

/* Hero section with metrics as the star */
.hero-metrics-focused {
    position: relative;
    min-height: 600px;
    background: var(--theme-bg-primary, #ffffff);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

/* Absurd image as subtle background accent */
.hero-background-accent {
    position: absolute;
    top: 0;
    right: -20%;
    width: 60%;
    height: 100%;
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
}

.hero-background-accent img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center left;
    filter: grayscale(100%) contrast(1.2);
    mask-image: linear-gradient(to left, transparent 0%, black 50%, black 100%);
    -webkit-mask-image: linear-gradient(to left, transparent 0%, black 50%, black 100%);
}

/* Dark mode adjustments for background accent */
[data-bs-theme="dark"] .hero-background-accent {
    opacity: 0.05;
}

[data-bs-theme="dark"] .hero-background-accent img {
    filter: grayscale(100%) contrast(0.8) brightness(1.5);
}

/* Content area with high contrast */
.hero-metrics-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Enhanced marketing metrics display */
.marketing-metrics-showcase {
    background: var(--theme-surface-1, rgba(248, 249, 250, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--theme-border-color, rgba(0, 0, 0, 0.1));
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    overflow: hidden;
}

/* Metrics grid - large and prominent */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.metric-card {
    text-align: center;
    padding: 1rem;
    background: var(--theme-bg-primary, #ffffff);
    border-radius: 12px;
    border: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--theme-accent, #00a69c);
}

/* Large, readable metric values */
.metric-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--theme-primary, #3b82f6), var(--theme-accent, #00a69c));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--theme-primary, #3b82f6); /* Fallback for browsers that don't support background-clip */
}

.metric-label {
    font-size: 0.875rem;
    color: var(--theme-text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Specific metric colors */
.metric-card[data-metric="players"] .metric-value {
    background: linear-gradient(135deg, #00a69c, #00d4aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-card[data-metric="events"] .metric-value {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-card[data-metric="prize"] .metric-value {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-card[data-metric="ace"] .metric-value {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* CTA section below metrics */
.metrics-cta {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.1));
}

.metrics-headline {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--theme-text-primary, #1f2937);
    margin-bottom: 1rem;
}

.metrics-subheadline {
    font-size: 1.1rem;
    color: var(--theme-text-secondary, #6b7280);
    margin-bottom: 2rem;
}

/* Responsive design */
@media (max-width: 991px) {
    .hero-background-accent {
        right: -40%;
        width: 80%;
        opacity: 0.05;
    }
    
    .marketing-metrics-showcase {
        padding: 1.5rem;
    }
    
    .metrics-grid {
        gap: 2rem;
    }
    
    .metric-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .hero-metrics-focused {
        padding: 3rem 0;
        min-height: auto;
    }
    
    .hero-background-accent {
        display: none;
    }
    
    .marketing-metrics-showcase {
        border-radius: 12px;
        padding: 1.5rem;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .metric-card {
        padding: 1rem;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    .metric-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .marketing-metrics-showcase {
        padding: 1rem;
    }
}

/* Dark mode enhancements */
[data-bs-theme="dark"] .marketing-metrics-showcase {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .metric-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .metric-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Animation for metrics - reduced for better performance */
@keyframes metricPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Only animate on hover to reduce visual noise */
.metric-card:hover .metric-value {
    animation: metricPulse 2s ease-in-out;
}

/* Removed continuous animation indices for better performance */

/* Primary button styling with guaranteed contrast */
.hero-metrics-focused .btn-primary,
.hero-metrics-focused .btn-hero-primary,
.hero-player-focused .btn-primary,
.hero-player-focused .btn-hero-primary,
.hero-player-focused a[href="/account/auth"],
.hero-director-focused .btn-primary,
.hero-director-focused .btn-hero-primary,
.hero-director-focused a[href="/Add/TournamentImport"] {
    background: linear-gradient(135deg, #00a69c, #00d4aa) !important;
    background-color: #00a69c !important; /* Fallback solid color */
    color: #ffffff !important;
    border: 2px solid transparent !important;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px; /* WCAG touch target */
    position: relative !important;
    z-index: 10 !important;
}

.hero-metrics-focused .btn-primary:hover,
.hero-metrics-focused .btn-hero-primary:hover,
.hero-player-focused .btn-primary:hover,
.hero-player-focused .btn-hero-primary:hover,
.hero-player-focused a[href="/account/auth"]:hover,
.hero-director-focused .btn-primary:hover,
.hero-director-focused .btn-hero-primary:hover,
.hero-director-focused a[href="/Add/TournamentImport"]:hover {
    background: linear-gradient(135deg, #00d4aa, #00a69c) !important;
    background-color: #00d4aa !important; /* Fallback solid color */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: #ffffff !important;
    text-decoration: none;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.hero-metrics-focused .btn-secondary,
.hero-metrics-focused .btn-hero-secondary,
.hero-player-focused .btn-secondary,
.hero-player-focused .btn-hero-secondary,
.hero-player-focused a[href="#upcoming-leagues"],
.hero-director-focused .btn-secondary,
.hero-director-focused .btn-hero-secondary,
.hero-director-focused a[href="#league-benefits"] {
    background: var(--theme-surface-1, #ffffff) !important;
    background-color: #ffffff !important; /* Ensure white background */
    color: var(--theme-text-primary, #1f2937) !important;
    border: 2px solid var(--theme-accent, #00a69c) !important;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px; /* WCAG touch target */
    position: relative !important;
    z-index: 10 !important;
}

.hero-metrics-focused .btn-secondary:hover,
.hero-metrics-focused .btn-hero-secondary:hover,
.hero-metrics-focused a[href*="leagues"]:hover,
.hero-player-focused .btn-secondary:hover,
.hero-player-focused .btn-hero-secondary:hover,
.hero-director-focused .btn-secondary:hover,
.hero-director-focused .btn-hero-secondary:hover {
    background: var(--theme-surface-2, #f3f4f6) !important;
    border-color: var(--theme-accent, #00a69c) !important;
    color: var(--theme-text-primary, #1f2937) !important;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Ensure all links in hero section have proper contrast */
.hero-metrics-focused a {
    text-decoration: none;
}

/* Override any white-on-white issues */
.marketing-metrics-showcase .btn,
.marketing-metrics-showcase a.btn {
    min-height: 48px; /* Accessibility */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}