/* Mobile Menu Button */
.mobile-menu-btn {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 1rem;
}

.mobile-menu-btn svg {
    display: block;
}
/* ============================================================
   Quantivus Technology - Global Styles
   Premium dark theme with futuristic tech aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
    --hyphens: none;
    --color-bg: #0A0A0A;
    --color-bg-secondary: #111111;
    --color-bg-card: #0F0F0F;
    --color-bg-hover: #1A1A1A;
    --color-primary: #1F6FFF;
    --color-primary-hover: #1557CC;
    --color-primary-light: rgba(31, 111, 255, 0.1);
    --color-accent: #00E5FF;
    --color-accent-light: rgba(0, 229, 255, 0.1);
    --color-text: #FFFFFF;
    --color-text-secondary: #B0B0B0;
    --color-text-muted: #666666;
    --color-border: #1E1E1E;
    --color-border-hover: #333333;
    --color-success: #00C896;
    --color-warning: #FFB800;
    --color-error: #FF4444;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --shadow-glow-primary: 0 0 20px rgba(31, 111, 255, 0.3);
    --shadow-glow-accent: 0 0 20px rgba(0, 229, 255, 0.3);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
    --nav-height: 72px;

    /* FontAwesome DuoTone Colors */
    --fa-primary-color: #1F6FFF;
    --fa-secondary-color: #00E5FF;
    --fa-primary-opacity: 1.0;
    --fa-secondary-opacity: 0.5;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    /* Ensure text wrapping on mobile */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Global text wrapping for mobile optimization */
h1, h2, h3, h4, h5, h6, p, span, li, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Enhanced hyphenation for different languages */
:lang(en) {
    hyphens: var(--hyphens);
    -webkit-hyphens: var(--hyphens);
    -ms-hyphens: var(--hyphens);
    list-style: none;
}

:lang(de) {
    hyphens: var(--hyphens);
    -webkit-hyphens: var(--hyphens);
    -ms-hyphens: var(--hyphens);
    /* Better line breaking for German compound words */
    word-break: break-word;
    list-style: none;
}

:lang(pt) {
    hyphens: var(--hyphens);
    -webkit-hyphens: var(--hyphens);
    -ms-hyphens: var(--hyphens);
    list-style: none;
}

/* ============================================================
   Accessibility (a11y) Styles
   ============================================================ */

/* Screen reader only - visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip links for keyboard navigation */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    padding: 1rem 2rem;
    background: var(--color-primary);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* Enhanced focus styles for keyboard navigation */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Focus styles for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(0, 229, 255, 0.2);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-text: #FFFFFF;
        --color-text-secondary: #E0E0E0;
        --color-bg: #000000;
        --color-bg-secondary: #0A0A0A;
        --color-border: #FFFFFF;
        --color-primary: #5BA3FF;
        --color-accent: #00FFFF;
    }

    a, button {
        text-decoration: underline;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Forced colors mode (Windows High Contrast) */
@media (forced-colors: active) {
    .btn {
        border: 2px solid ButtonText;
    }

    .card {
        border: 2px solid CanvasText;
    }

    a:focus-visible,
    button:focus-visible {
        outline: 3px solid Highlight;
    }
}

/* Minimum touch target size (44x44px for WCAG 2.5.5) */
button,
a.btn,
.lang-btn,
.mobile-menu-btn,
.nav-link {
    min-height: 44px;
    min-width: 44px;
}

/* ============================================================
   Links
   ============================================================ */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

/* External link indicator for screen readers (handled in component) */
a[target="_blank"]::after {
    content: "";
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-hover);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }

code, pre, .mono {
    font-family: var(--font-mono);
}

/* ============================================================
   Layout
   ============================================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.section-sm {
    padding: 4rem 0;
}

.section-lg {
    padding: 8rem 0;
}

/* ============================================================
   Navigation
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition-base);
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}


.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.navbar-logo:hover {
    color: var(--color-text);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    color: white;
    flex-shrink: 0;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-link {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
    background: var(--color-bg-hover);
}

.nav-link.dropdown-toggle {
    color: var(--color-bg);
}
    .nav-link.dropdown-toggle:hover {
        color: unset;
        cursor: pointer;
    }

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-card);
    z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    flex-direction: column;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.nav-dropdown-item:hover {
    color: var(--color-text);
    background: var(--color-bg-hover);
}

.nav-dropdown-item small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-top: 0.125rem;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lang-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 40px;
    min-height: 40px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--color-text);
    border-color: var(--color-border);
    background: var(--color-bg-hover);
}

.lang-btn:active {
    opacity: 0.7;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.75rem;
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu-btn:active {
    opacity: 0.7;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    white-space: nowrap;
    font-family: var(--font-primary);
    letter-spacing: -0.01em;
}

    .btn .fa-brands {
        padding: 6px 0px 6px 6px;
    }

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow-primary);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border-hover);
}

.btn-outline:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
    border-color: var(--color-text-muted);
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--color-accent);
    color: #000;
}

.btn-accent:hover {
    background: #00C4D8;
    color: #000;
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow-accent);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border: none;
}

.btn-ghost:hover {
    color: var(--color-text);
    background: var(--color-bg-hover);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-icon {
    padding: 0.75rem;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: var(--nav-height);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-canvas {
    width: 100%;
    height: 100%;
    opacity: 0.7;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(31, 111, 255, 0.08) 0%, transparent 70%),
                radial-gradient(ellipse 60% 40% at 80% 50%, rgba(0, 229, 255, 0.05) 0%, transparent 60%),
                linear-gradient(to bottom, transparent 60%, var(--color-bg) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    padding-top: 4rem;
    padding-bottom: 8rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: var(--color-primary-light);
    border: 1px solid rgba(31, 111, 255, 0.25);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    max-width: 900px;
    margin-bottom: 1.5rem;
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.hero-subtitle {
    max-width: 640px;
    font-size: clamp(0.9rem, 2vw, 1.25rem);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
    max-width: 600px;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.hero-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.03em;
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-top: 0.375rem;
}

/* ============================================================
   Section Headers
   ============================================================ */
.section-header {
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.5rem, 3.5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.125rem);
    color: var(--color-text-secondary);
    max-width: 580px;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.card-glow:hover {
    border-color: rgba(31, 111, 255, 0.3);
    box-shadow: 0 8px 40px rgba(31, 111, 255, 0.1);
}

.card-accent-glow:hover {
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 8px 40px rgba(0, 229, 255, 0.1);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.card-icon-primary {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.card-icon-accent {
    background: var(--color-accent-light);
    color: var(--color-accent);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.card-description {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100px;
    background: var(--color-bg-hover);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.tag-primary {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: rgba(31, 111, 255, 0.2);
}

.tag-accent {
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-color: rgba(0, 229, 255, 0.2);
}

/* ============================================================
   Grid Layouts
   ============================================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* ============================================================
   Tech Stack Grid
   ============================================================ */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.tech-category {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    transition: all var(--transition-base);
}

.tech-category:hover {
    border-color: rgba(31, 111, 255, 0.3);
    box-shadow: 0 8px 40px rgba(31, 111, 255, 0.08);
}

.tech-category-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-item {
    padding: 0.375rem 0.75rem;
    background: var(--color-bg-hover);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
    transition: all var(--transition-fast);
}

.tech-item:hover {
    border-color: var(--color-primary);
    color: var(--color-text);
}

/* ============================================================
   Feature Lists
   ============================================================ */
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.feature-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
}

/* ============================================================
   Forms
   ============================================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form-control {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: var(--color-text);
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* Admin Pages styles (merged so app.css contains admin UI styles) */
.hierarchy {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.hierarchy .root-drop {
  color: #6b7280;
  font-size: 0.9rem;
  border: 1px dashed transparent;
}

.tree-node {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  transition: background 120ms ease, transform 120ms ease;
  cursor: grab;
  user-select: none;
}

.tree-node .node-box {
  display:flex;
  align-items:center;
  gap:0.6rem;
  width:100%;
  background: #fafafa;
  border: 1px solid rgba(0,0,0,0.06);
  padding:0.5rem;
  border-radius:6px;
}

.tree-node .node-box:hover { background:#f5f7fb; }

.node-children { position:relative; }
.node-children::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0,0,0,0.06);
}

.label { cursor: pointer; }

.tree-node:hover {
  background: rgba(15, 23, 42, 0.03);
}

.tree-node.dragging {
  opacity: 0.5;
  transform: scale(0.995);
}

.tree-node .label {
  flex: 1;
  font-size: 0.95rem;
  color: #0f172a;
  padding-left: 0.25rem;
}

.tree-node .actions {
  display:flex;
  gap:0.4rem;
}

.node-children {
  margin-left: 12px;
  padding-left: 8px;
  border-left: 1px dashed rgba(15,23,42,0.06);
}

.node-list { list-style:none; padding-left:0; margin:0; }
.node-list li { margin-bottom:0.5rem; }
.node-children-list { list-style:none; padding-left:0; margin:0.5rem 0 0 0; }

.tree-node.selected .node-box { border-color: rgba(59,130,246,0.7); box-shadow: 0 2px 8px rgba(59,130,246,0.06); }

.node-box { display:flex; align-items:center; gap:0.75rem; background: linear-gradient(180deg, #ffffff, #fbfdff); border-radius:8px; padding:0.5rem 0.6rem; border:1px solid rgba(15,23,42,0.04); }
.node-box .label { font-weight:600; color:#0f172a; }
.node-box .actions { margin-left:auto; display:flex; gap:0.5rem; }
.node-box .expand-btn { background:transparent; border:none; font-size:0.9rem; cursor:pointer; color:#374151; }

.expand-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  margin-right: 0.35rem;
}

/* ReactFlow-like canvas styles */
.flow-canvas {
  background: linear-gradient(180deg, #0b0b0c, #0f0f10);
  border-radius: 12px;
  padding: 1rem;
  min-height: 320px;
  position: relative;
  overflow: auto;
}

.flow-canvas .node-list { display:flex; flex-direction:column; gap:0.75rem; }

.flow-node-visual {
  background: linear-gradient(180deg, #0f172a, #071126);
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 6px 18px rgba(2,6,23,0.5);
  display:flex;
  align-items:center;
  gap:0.4rem;
  font-size:0.9rem;
}

.flow-node-visual .node-label { font-weight:700; color:#fff; }

.flow-edge { height:2px; background: linear-gradient(90deg, rgba(31,111,255,0.8), rgba(0,229,255,0.8)); margin:4px 0; border-radius:2px; }

.flow-node { min-width:160px; }
.handle { width:8px; height:8px; border-radius:50%; background: rgba(255,255,255,0.08); margin-left:6px; }
.handle-source { border:2px solid rgba(31,111,255,0.9); }
.handle-target { border:2px solid rgba(0,229,255,0.9); }
.flow-node .actions .btn { padding:0.25rem 0.5rem; font-size:0.75rem; }
.flow-node .node-label { font-size:0.95rem; }

.tree-node.level-0 { padding-left: 0.25rem; }
.tree-node.level-1 { padding-left: 0.5rem; }
.tree-node.level-2 { padding-left: 0.75rem; }
.tree-node.level-3 { padding-left: 1rem; }
.tree-node.level-4 { padding-left: 1.25rem; }

.drop-target {
  background: rgba(59,130,246,0.08);
  border-left: 3px solid rgba(59,130,246,0.7);
}

.dragging { opacity: 0.5; transform: scale(0.995); }

/* Two-column layout: tree left, editor right */
.pages-layout {
  display: grid;
  grid-template-columns: 420px 1fr; /* left = tree, right = editor */
  gap: 1.25rem;
}

.tree-column {
  min-width: 340px;
}

.editor-column {
  background: transparent;
}

.editor-panel {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.editor-field {
  margin-bottom: 0.6rem;
}

.editor-field label { display:block; font-size:0.85rem; color:#374151; margin-bottom:0.25rem; }
.editor-field input, .editor-field textarea, .editor-field select { width:100%; padding:0.5rem; border:1px solid #e5e7eb; border-radius:6px; }

.pages-card { padding:1rem; max-width:900px; }
.form-row { display:flex; gap:1rem; flex-wrap:wrap; align-items:center; }
.field-margin-md { margin-top:0.75rem; }
.field-margin-sm { margin-top:0.5rem; }

.hierarchy-panel { padding:0.5rem; border:1px dashed rgba(0,0,0,0.08); margin-bottom:0.5rem; min-height:60px; }
.node-list { list-style:none; padding-left:0; margin:0; }
.page-list-item { display:flex; gap:0.5rem; align-items:center; margin-bottom:0.5rem; }
.page-list-label { flex:1; }
.action-row { margin-top:0.5rem; display:flex; gap:0.5rem; }

.json-editor { width:100%; height:300px; font-family:monospace; }

.structure-table { width:100%; border-collapse:collapse; }
.structure-row { border-bottom:1px solid rgba(0,0,0,0.06); }
.structure-row .cell-left { padding:0.5rem; width:45%; }
.structure-row .cell-mid { padding:0.5rem; width:40%; }
.structure-row .cell-actions { padding:0.5rem; width:15%; }

.component-add-row { margin-top:0.5rem; display:flex; gap:0.5rem; align-items:center; }

.form-control::placeholder {
    color: var(--color-text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

.form-error {
    font-size: 0.8125rem;
    color: var(--color-error);
    margin-top: 0.25rem;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-top: 1rem;
    max-width: 280px;
}

.footer-heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-link {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-text);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* ============================================================
   Page Header
   ============================================================ */
.page-header {
    padding: calc(var(--nav-height) + 4rem) 0 4rem;
    background: linear-gradient(to bottom, rgba(31, 111, 255, 0.04) 0%, transparent 100%);
    border-bottom: 1px solid var(--color-border);
}

.page-header-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.page-header-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.page-header-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    line-height: 1.7;
}

/* ============================================================
   Dividers
   ============================================================ */
.divider {
    height: 1px;
    background: var(--color-border);
    margin: 2rem 0;
}

.divider-gradient {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

/* ============================================================
   Badges & Status
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100px;
}

.badge-primary {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid rgba(31, 111, 255, 0.2);
}

.badge-accent {
    background: var(--color-accent-light);
    color: var(--color-accent);
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.badge-success {
    background: rgba(0, 200, 150, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(0, 200, 150, 0.2);
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(31, 111, 255, 0.3); }
    50% { box-shadow: 0 0 30px rgba(31, 111, 255, 0.6); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-fade-up { animation: fadeInUp 0.6s ease both; }
.animate-fade-in { animation: fadeIn 0.4s ease both; }
.animate-slide-left { animation: slideInLeft 0.5s ease both; }
.animate-glow { animation: glowPulse 3s infinite; }
.animate-float { animation: float 4s ease-in-out infinite; }

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ============================================================
   Utility Classes
   ============================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-mono { font-family: var(--font-mono); }
.w-full { width: 100%; }
.max-w-2xl { max-width: 672px; }
.max-w-3xl { max-width: 768px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.hidden { display: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   Blog
   ============================================================ */
.blog-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.blog-card-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.blog-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.blog-card-excerpt {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
}

/* ============================================================
   Case Studies
   ============================================================ */
.case-study-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all var(--transition-base);
}

.case-study-card:hover {
    border-color: rgba(31, 111, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(31, 111, 255, 0.08);
}

.case-study-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
    background: var(--color-bg-hover);
    border-radius: var(--radius-lg);
    margin-top: 1.5rem;
}

.case-study-metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-accent);
    letter-spacing: -0.03em;
    line-height: 1;
}

.case-study-metric-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: 0.375rem;
}

/* ============================================================
   AI Chat Widget
   ============================================================ */
.chat-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 900;
}

.chat-widget-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(31, 111, 255, 0.4);
    transition: all var(--transition-base);
    font-size: 1.25rem;
}

.chat-widget-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(31, 111, 255, 0.6);
}

.chat-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 360px;
    max-height: 500px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(31, 111, 255, 0.1), rgba(0, 229, 255, 0.05));
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    max-width: 85%;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    line-height: 1.5;
}

.chat-message-bot {
    background: var(--color-bg-hover);
    color: var(--color-text-secondary);
    align-self: flex-start;
}

.chat-message-user {
    background: var(--color-primary);
    color: white;
    align-self: flex-end;
}

.chat-input-area {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    background: var(--color-bg-hover);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--color-text);
    font-family: var(--font-primary);
}

.chat-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* ============================================================
   Loading Skeleton
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--color-bg-secondary) 25%, var(--color-bg-hover) 50%, var(--color-bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* ============================================================
   Blazor specific
   ============================================================ */
#blazor-error-ui {
    background: var(--color-error);
    color: white;
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(255, 68, 68, 0.3);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    right: 0;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
    background: var(--color-error);
    color: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    display: block;
}

/* ============================================================
   Page Transitions
   ============================================================ */
.page-transition {
    animation: fadeInUp 0.4s ease both;
}

/* ============================================================
   Responsive Design
   ============================================================ */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}


/* ============================================================
   Mobile Menu (Consolidated)
   ============================================================ */
.mobile-menu {
    display: none;
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.5rem 2rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    /* Touch optimization */
    touch-action: pan-y;
    pointer-events: auto;
    user-select: none;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
}

.mobile-menu a,
.mobile-menu .nav-link {
    display: flex;
    align-items: center;
    padding: 1.25rem 1rem;
    min-height: 56px;
    min-width: 100%;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background 0.05s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
    position: relative;
    font-size: 1rem;
    /* Sofortige Touch-Reaktion */
    -webkit-user-select: none;
    user-select: none;
}

.mobile-menu a:hover,
.mobile-menu .nav-link:hover {
    color: var(--color-text);
    background: var(--color-bg-hover);
}

.mobile-menu a:active,
.mobile-menu .nav-link:active {
    background: var(--color-primary);
    color: white;
    transform: scale(0.98);
}

/* Mobile Menu Submenu Styles */
.mobile-menu-section {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.mobile-menu-label {
    display: block;
    padding: 1rem 1rem 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    user-select: none;
    touch-action: none;
    pointer-events: none;
}

.mobile-submenu-item {
    display: flex;
    align-items: center;
    padding: 1.125rem 1rem 1.125rem 2rem !important;
    min-height: 56px;
    font-size: 0.9375rem;
    color: var(--color-text-secondary) !important;
    border-left: 3px solid transparent;
    transition: all 0.1s ease;
    -webkit-tap-highlight-color: rgba(31, 111, 255, 0.2);
    /* Remove 300ms delay */
    touch-action: manipulation;
    -ms-touch-action: manipulation;
}

.mobile-submenu-item:hover {
    color: var(--color-text) !important;
    background: var(--color-bg-hover) !important;
    border-left-color: var(--color-primary);
}

.mobile-submenu-item:active {
    background: var(--color-primary) !important;
    color: white !important;
    border-left-color: var(--color-accent);
    transform: scale(0.98);
}

/* Touch active state (from JS) */
.mobile-menu a.touch-active,
.mobile-menu .nav-link.touch-active,
.mobile-submenu-item.touch-active {
    background: var(--color-primary) !important;
    color: white !important;
    border-left-color: var(--color-accent);
    transform: scale(0.98);
    transition: none;
}

/* Ensure touch targets are large enough */
.mobile-menu li {
    min-height: 44px;
}

/* Improve scroll performance */
.mobile-menu::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-menu::-webkit-scrollbar-thumb {
    background: var(--color-border-hover);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .navbar-nav { display: none; }
    .mobile-menu-btn { display: block; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
    .chat-panel { width: calc(100vw - 2rem); right: -0.5rem; }

    .hero-content {
        padding: 0 1rem;
        padding-top: 2rem;
        padding-bottom: 4rem;
    }

    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .card {
        padding: 1.25rem;
    }
}

/* ============================================================
   Mobile Menu
   ============================================================ */
.mobile-menu {
    display: none;
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-menu a {
    display: block;
    padding: 0.875rem 1rem;
    min-height: 44px;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu a:hover {
    color: var(--color-text);
    background: var(--color-bg-hover);
}

.mobile-menu a:active {
    background: var(--color-bg-card);
}

/* Mobile Menu Submenu Styles */
.mobile-menu-section {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.mobile-menu-label {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.mobile-submenu-item {
    display: block;
    padding: 0.75rem 1rem 0.75rem 2rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
}

.mobile-submenu-item:hover {
    color: var(--color-text);
    background: var(--color-bg-hover);
    border-left-color: var(--color-primary);
}

.mobile-submenu-item:active {
    background: var(--color-bg-card);
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .section { padding: 3rem 0; }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .hero-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 0.875rem;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
    }
}

/* ============================================================
   Mobile Menu Panel
   ============================================================ */
.mobile-menu {
    display: none;
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-menu a {
    display: block;
    padding: 0.875rem 1rem;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu a:active {
    background: var(--color-bg-hover);
}


/* ============================================================
   Feature & Value Icons
   ============================================================ */
.feature-icon,
.value-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(31, 111, 255, 0.1), rgba(0, 229, 255, 0.05));
    border: 1px solid rgba(31, 111, 255, 0.2);
    margin-bottom: 1.5rem;
    transition: all var(--transition-base);
}

.feature-icon i,
.value-icon i {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-card:hover .feature-icon,
.value-card:hover .value-icon {
    transform: translateY(-4px);
    background: linear-gradient(135deg, rgba(31, 111, 255, 0.15), rgba(0, 229, 255, 0.1));
    border-color: rgba(31, 111, 255, 0.4);
    box-shadow: var(--shadow-glow-primary);
}

.feature-title,
.value-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.feature-desc,
.value-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.feature-link:hover {
    color: var(--color-accent);
    gap: 0.75rem;
}

.features-grid,
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card,
.value-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all var(--transition-base);
}

.feature-card:hover,
.value-card:hover {
    border-color: rgba(31, 111, 255, 0.4);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}


/* ============================================================
   FontAwesome DuoTone Icon Styles
   ============================================================ */

/* Apply DuoTone colors globally */
.fa-duotone {
    --fa-primary-color: var(--color-primary);
    --fa-secondary-color: var(--color-accent);
    --fa-primary-opacity: 1.0;
    --fa-secondary-opacity: 0.5;
}

/* Alternative class support */
.fad {
    --fa-primary-color: var(--color-primary);
    --fa-secondary-color: var(--color-accent);
    --fa-primary-opacity: 1.0;
    --fa-secondary-opacity: 0.5;
}

/* Icon sizing utilities */
.icon-sm { font-size: 1rem; }
.icon-md { font-size: 1.5rem; }
.icon-lg { font-size: 2rem; }
.icon-xl { font-size: 3rem; }

/* Feature icon styling */
.feature-icon i,
.value-icon i {
    display: block;
    font-size: 2rem;
}

/* Ensure icons in cards are visible */
.card i,
.feature-card i {
    color: var(--color-primary);
}


/* ============================================================
   Page Transition & Skeleton Loader (Anti-Flicker)
   ============================================================ */

/* Smooth page content fade-in */
.page-content-wrapper {
    animation: fadeIn 0.3s ease-in;
}

/* Skeleton loader styles */
.page-skeleton {
    padding-top: var(--nav-height);
    min-height: 100vh;
}

.skeleton-hero,
.skeleton-title,
.skeleton-text,
.skeleton-card {
    background: linear-gradient(
        90deg,
        var(--color-bg-secondary) 25%,
        var(--color-bg-hover) 50%,
        var(--color-bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-lg);
}

/* Prevent layout shift */
.page-content-wrapper,
.page-skeleton {
    min-height: calc(100vh - var(--nav-height));
}

/* Smooth opacity transition for content changes */
@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply to dynamic components */
.page-content-wrapper > * {
    animation: contentFadeIn 0.4s ease-out;
}


/* ============================================================
   Anti-Flicker Optimizations
   ============================================================ */

/* Prevent content shift during load */
html {
    overflow-y: scroll; /* Always show scrollbar */
}

/* Smooth page transitions */
main {
    min-height: calc(100vh - var(--nav-height));
    transition: opacity 0.2s ease-in-out;
}

/* Loading state */
main[aria-busy="true"] {
    opacity: 0.6;
    pointer-events: none;
}

/* Blazor loading optimization */
#app {
    display: contents;
}

/* Prevent FOUC (Flash of Unstyled Content) */
.navbar,
.footer {
    opacity: 1;
    transition: none;
}

/* Ensure fonts are loaded */
@font-face {
    font-display: swap;
}

/* Preload critical content */
.hero,
.page-header {
    contain: layout style;
    will-change: auto;
}
/* Desktop - Force grid layout for larger screens */
@media (min-width: 769px) {
    .footer-grid {
        display: grid !important;
        grid-template-columns: 2fr repeat(3, 1fr) !important;
        gap: 3rem !important;
    }
}








/* Mobile Responsive - CRITICAL */
@media (max-width: 768px) {
    .navbar-nav {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: block !important;
    }
}
