/* EGKits Showcase - Hero Background Images */

/* Base hero section styling with background image support */
.hero-section {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(0,0,0,0.08), rgba(0,0,0,0.12));
}

.hero-section .hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

/* Ensure all direct children of hero sections sit above the ::before overlay */
.hero-section > .mud-container {
    position: relative;
    z-index: 2;
}

/* Override MudBlazor typography color for hero content */
.hero-section .hero-content .mud-typography {
    color: inherit;
}

.hero-section .hero-content .mud-secondary-text {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Enhanced Hero Section for Index page */
.hero-main {
    position: relative;
    display: flex;
    overflow: hidden;
    align-items: center;
    min-height: 90vh;
}

/* ── ImageHero component base styles ──────────────────────────────── */
.image-hero {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.image-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.image-hero__content {
    position: relative;
    z-index: 2;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.image-hero__title {
    color: white !important;
    font-weight: 700;
}

.image-hero__subtitle {
    color: rgba(255, 255, 255, 0.85) !important;
}

.image-hero__description {
    color: rgba(255, 255, 255, 0.8) !important;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.image-hero__breadcrumb-nav {
    justify-content: center;
}

.image-hero__breadcrumb-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

.image-hero__breadcrumb-link:hover {
    color: white !important;
}

.image-hero__breadcrumb-current {
    color: white !important;
    font-weight: 600;
}

.image-hero__actions {
    margin-top: 1.5rem;
}

/* ── Unified gradient for ALL hero sections ───────────────────────────
   Uses `background` shorthand + `!important` to reliably override
   MudBlazor theme styles that set background-color on containers.
   Lightened palette for better text readability.
   ──────────────────────────────────────────────────────────────────── */
.hero-main,
.industries-hero,
.security-hero,
.status-hero,
.features-hero,
.pricing-hero,
.solutions-hero,
.support-hero,
.contact-hero,
.about-hero,
.documentation-hero,
.sales-hero,
.demo-hero,
.partners-hero,
.blog-hero,
.resources-hero,
.kb-hero,
.sitemap-hero,
.signup-hero,
.changelog-hero,
.docs-hero,
.privacy-hero,
.terms-hero {
    /* Single themeable brand gradient (derives from the MudBlazor palette via
       tokens.css), replacing the former hard-coded navy-to-purple ramp. */
    background: var(--egk-gradient-brand) !important;
}

/* ── Hero Text Contrast
   Only hero sections that actually render with dark gradient backgrounds
   need white text. Many pages override their hero CSS class with light
   rgba(0.05) backgrounds in page-level <style> blocks — those are excluded.
   ───────────────────────────────────────────────────────────────────── */
.hero-section,
.hero-main,
.industries-hero,
.solutions-hero,
.sales-hero,
.security-hero,
.status-hero,
.features-hero,
.pricing-hero,
.support-hero,
.contact-hero,
.about-hero,
.documentation-hero,
.demo-hero,
.partners-hero,
.blog-hero,
.resources-hero,
.kb-hero,
.sitemap-hero,
.signup-hero,
.changelog-hero,
.docs-hero,
.privacy-hero,
.terms-hero {
    color: #fff;
}

/* MudBlazor .mud-typography inherits parent color but may be reset by
   .mud-layout or .mud-main-content. Force inheritance within dark heroes. */
.hero-section .mud-typography,
.hero-main .mud-typography,
.industries-hero .mud-typography,
.solutions-hero .mud-typography,
.sales-hero .mud-typography,
.security-hero .mud-typography,
.status-hero .mud-typography,
.features-hero .mud-typography,
.pricing-hero .mud-typography,
.support-hero .mud-typography,
.contact-hero .mud-typography,
.about-hero .mud-typography,
.documentation-hero .mud-typography,
.demo-hero .mud-typography,
.partners-hero .mud-typography,
.blog-hero .mud-typography,
.resources-hero .mud-typography,
.kb-hero .mud-typography,
.sitemap-hero .mud-typography,
.signup-hero .mud-typography,
.changelog-hero .mud-typography,
.docs-hero .mud-typography,
.privacy-hero .mud-typography,
.terms-hero .mud-typography {
    color: inherit;
}

/* MudBlazor Color="Color.Secondary" adds .mud-secondary-text which sets
   color via CSS variable. Override to a readable semi-transparent white. */
.hero-section .mud-secondary-text,
.hero-main .mud-secondary-text,
.industries-hero .mud-secondary-text,
.solutions-hero .mud-secondary-text,
.sales-hero .mud-secondary-text,
.security-hero .mud-secondary-text,
.status-hero .mud-secondary-text,
.features-hero .mud-secondary-text,
.pricing-hero .mud-secondary-text,
.support-hero .mud-secondary-text,
.contact-hero .mud-secondary-text,
.about-hero .mud-secondary-text,
.documentation-hero .mud-secondary-text,
.demo-hero .mud-secondary-text,
.partners-hero .mud-secondary-text,
.blog-hero .mud-secondary-text,
.resources-hero .mud-secondary-text,
.kb-hero .mud-secondary-text,
.sitemap-hero .mud-secondary-text,
.signup-hero .mud-secondary-text,
.changelog-hero .mud-secondary-text,
.docs-hero .mud-secondary-text,
.privacy-hero .mud-secondary-text,
.terms-hero .mud-secondary-text {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* MudPaper resets color to --mud-palette-text-primary.
    For glass-style stat cards (.stat-highlight) inside heroes, keep white. */
.hero-section .stat-highlight,
.hero-main .stat-highlight,
.industries-hero .stat-highlight,
.status-hero .stat-highlight,
.security-hero .stat-highlight {
    color: #fff;
}

.hero-section .stat-highlight .mud-typography,
.hero-main .stat-highlight .mud-typography,
.industries-hero .stat-highlight .mud-typography,
.status-hero .stat-highlight .mud-typography,
.security-hero .stat-highlight .mud-typography {
    color: inherit;
}

/* Override MudBlazor .text-primary utility class inside dark heroes */
.hero-section .text-primary,
.support-hero .text-primary,
.sales-hero .text-primary,
.pricing-hero .text-primary,
.demo-hero .text-primary,
.kb-hero .text-primary,
.signup-hero .text-primary {
    /* Lightened, theme-derived accent that stays readable on the dark gradient */
    color: color-mix(in srgb, var(--mud-palette-primary) 45%, white) !important;
}

/* MudChip overrides inside dark hero sections */
.pricing-hero .mud-chip,
.partners-hero .mud-chip,
.resources-hero .mud-chip,
.kb-hero .mud-chip,
.sitemap-hero .mud-chip,
.demo-hero .mud-chip,
.signup-hero .mud-chip,
.support-hero .mud-chip,
.sales-hero .mud-chip,
.changelog-hero .mud-chip,
.docs-hero .mud-chip,
.privacy-hero .mud-chip,
.terms-hero .mud-chip {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px);
    color: white !important;
}

/* Responsive adjustments */
@media (width <= 768px) {
    .hero-section {
        background-attachment: scroll;
    }

    .industries-hero,
    .security-hero,
    .status-hero,
    .features-hero,
    .pricing-hero,
    .solutions-hero,
    .support-hero,
    .contact-hero,
    .about-hero,
    .documentation-hero,
    .sales-hero,
    .demo-hero,
    .partners-hero,
    .blog-hero,
    .resources-hero,
    .kb-hero,
    .sitemap-hero,
    .signup-hero,
    .changelog-hero,
    .docs-hero,
    .privacy-hero,
    .terms-hero {
        background-attachment: scroll;
    }
}

/* Dark mode adjustments */
.mud-theme-dark .hero-section::before {
    background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.8));
}

/* Parallax effect enhancement */
@media (width >= 769px) {
    .hero-section {
        background-attachment: fixed;
    }
}

/* Animation for hero content */
.hero-content {
    animation: heroContentFadeIn 1.2s ease-out;
}

@keyframes heroContentFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced text readability on backgrounds */
.hero-section .hero-content h1,
.hero-section .hero-content h2,
.hero-section .hero-content h3,
.hero-section .hero-content .mud-typography {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Chip styling on hero backgrounds */
.hero-section .mud-chip {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px);
    color: white !important;
}

/* ── Gradient Section Buttons ────────────────────────────────────
   Override MudBlazor palette CSS custom properties on gradient
   section containers so buttons rendered inside them use readable
   colours.  Use Color="Color.Primary" for filled buttons and
   Color="Color.Inherit" for text/outlined buttons in Razor markup.
   ──────────────────────────────────────────────────────────────── */
.image-hero__actions,
.hero-content,
.demo-intro,
.cta-actions,
.cta-gradient,
.docs-cta,
.security-cta,
.emergency-support {
    /* Inherit-based text/outlined buttons pick up white from here */
    color: white;

    /* Primary filled buttons: white bg + dark readable text. This is a fixed
       constant (not theme-derived) on purpose: --mud-palette-primary is forced
       to white in this scope, so routing the text color through the palette
       would resolve to white-on-white. */
    --mud-palette-primary: white;
    --mud-palette-primary-text: #16294d;
    --mud-palette-primary-darken: rgba(255, 255, 255, 0.85);
    --mud-palette-primary-hover: rgba(255, 255, 255, 0.15);

    /* Default (un-coloured) filled buttons: same treatment */
    --mud-palette-text-primary: #16294d;
    --mud-palette-action-default-hover: white;
    --mud-palette-action-disabled-background: rgba(255, 255, 255, 0.85);
}

/* Fallback: direct property overrides with !important */
.image-hero__actions .mud-button-filled,
.hero-content .mud-button-filled,
.demo-intro .mud-button-filled,
.cta-actions .mud-button-filled,
.cta-gradient .mud-button-filled,
.docs-cta .mud-button-filled,
.security-cta .mud-button-filled,
.emergency-support .mud-button-filled {
    background-color: white !important;
    color: #16294d !important;
}

.image-hero__actions .mud-button-text,
.hero-content .mud-button-text,
.demo-intro .mud-button-text,
.cta-actions .mud-button-text,
.cta-gradient .mud-button-text,
.docs-cta .mud-button-text,
.security-cta .mud-button-text,
.emergency-support .mud-button-text {
    color: white !important;
}

.image-hero__actions .mud-button-outlined,
.hero-content .mud-button-outlined,
.demo-intro .mud-button-outlined,
.cta-actions .mud-button-outlined,
.cta-gradient .mud-button-outlined,
.docs-cta .mud-button-outlined,
.security-cta .mud-button-outlined,
.emergency-support .mud-button-outlined {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}