/* ============================================
   aivan.vn - Landing Page Styles
   Optimized version with fixes
   ============================================ */

/* CSS Custom Properties */
:root {
    --color-primary: #ec6d13;
    --color-accent-red: #ff3b30;
    --color-surface: #1d1d1f;
    --color-surface-hover: #2c2c2e;
    --color-surface-dark: #231f1a;
    --color-surface-highlight: #2f2924;
    --color-background-dark: #181411;
    --color-background-light: #f8f7f6;
    --color-text-secondary: #a0a0a5;
    --color-border: #392f28;
    --color-border-hover: #54453b;

    /* Animation Tokens - Design System */
    --transition-fast: 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-base: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-medium: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.7s ease;
    --transition-spring: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--color-background-dark);
    color: #f5f5f7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Lock scroll for iOS app-like pages */
html.ios-app-mode {
    overflow: hidden !important;
}

body.ios-app-mode {
    overflow: hidden !important;
}

/* Selection */
::selection {
    background-color: var(--color-primary);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-background-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-hover);
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Glass Effects - Optimized for Performance */
.glass-nav {
    background-color: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* backdrop-filter disabled on scroll for performance - see JS */
}

@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
    .glass-nav {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        background-color: rgba(0, 0, 0, 0.7);
    }

    /* Disable backdrop-filter on low-power devices or when reduced motion is preferred */
    @media (prefers-reduced-motion: reduce) {
        .glass-nav {
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            background-color: rgba(0, 0, 0, 0.95);
        }
    }
}

.glass-card {
    background: rgba(39, 32, 28, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover */
.card-hover {
    transition: transform var(--transition-base), background-color var(--transition-base);
    will-change: transform;
}

.card-hover:hover {
    transform: scale(1.02);
    background-color: var(--color-surface-hover);
}

/* Page Transitions - Optimized for GPU */
.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--transition-medium), transform var(--transition-medium), visibility var(--transition-medium);
    padding-top: 3.5rem;
    will-change: opacity, transform;
    pointer-events: none;
}

.page.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    min-height: auto;
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s var(--ease-out-expo) forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s var(--ease-out-expo) forwards;
}

/* Stagger animation delays for card grids */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* Loading Skeleton */
.loading-skeleton {
    background: linear-gradient(90deg, var(--color-surface-dark) 25%, var(--color-surface-highlight) 50%, var(--color-surface-dark) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Reduced Motion - Comprehensive Support */
@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;
    }

    .page {
        transition: none;
        transform: none;
    }

    .page.active {
        transform: none;
    }

    .toast {
        animation: none !important;
    }

    .modal__content {
        transition: none;
        transform: none;
    }

    .modal--active .modal__content {
        transform: none;
    }

    .roi-slider::-webkit-slider-thumb {
        transition: none;
    }

    .fab__menu {
        transition: none;
    }

    .quick-form {
        animation: none;
    }

    .workflow-step__connector::after {
        transition: none;
    }
}

/* ============================================
   PHASE 1: FOUNDATION - UX/UI IMPROVEMENTS
   ============================================ */

/* 1. Button Ripple Effect - CSS Only */
.ripple-container {
    position: relative;
    overflow: hidden;
}

.ripple-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 0;
    border-radius: 100%;
    transform: translate(-50%, -50%);
    transform-origin: center;
}

.ripple-container:active::after {
    animation: ripple-pulse 0.6s ease-out;
}

@keyframes ripple-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(20);
        opacity: 0;
    }
}

/* Legacy ripple support */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 2. Enhanced Hover States */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(236, 109, 19, 0.3);
}

/* 5. Skip Links Enhancement */
.skip-links {
    position: fixed;
    top: -100%;
    left: 0;
    z-index: 1000;
    transition: top 0.2s;
}

.skip-links:focus-within {
    top: 0;
}

.skip-link {
    display: block;
    background: var(--color-primary);
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.skip-link:hover,
.skip-link:focus {
    background: #d55f0f;
    color: white;
}

/* 6. ARIA Live Regions - Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Screen reader only - alternative for modern browsers */
.sr-only-focusable:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* 7. Focus Indicator Improvements */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

button:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 4px;
    box-shadow: 0 0 0 6px rgba(236, 109, 19, 0.2);
}

/* Form Validation Styles (Task 3) */
.form__input--error {
    border-color: #ff3b30 !important;
    background-color: rgba(255, 59, 48, 0.05) !important;
}

.form__input--success {
    border-color: #34c759 !important;
    background-color: rgba(52, 199, 89, 0.05) !important;
}

.form__error {
    color: #ff3b30;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    min-height: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Only show error icon when there's actual error content */
.form__error:not(:empty)::before {
    content: 'error';
    font-family: 'Material Symbols Outlined';
    font-size: 0.875rem;
}

/* Touch Target Sizing (Task 13 - Mobile Optimization) */
@media (pointer: coarse) {
    button, a, input, select, textarea, [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* Increase spacing between touch targets */
    .nav-link {
        padding: 0.75rem 0.5rem;
    }

    /* Form inputs need larger touch area */
    .form__input,
    .form__select,
    .form__textarea {
        min-height: 48px;
        padding: 0.875rem 1rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    /* Service card buttons */
    .service-card__toggle,
    .service-card button {
        padding: 0.75rem;
        margin: -0.25rem; /* Compensate for padding increase */
    }

    /* Industry cards need larger tap area */
    .industry-card__content {
        padding: 1.5rem;
    }
}

@supports (padding: max(0px)) {
    .fab-container {
        bottom: max(1.5rem, env(safe-area-inset-bottom));
    }
}

/* ============================================
   PHASE 2: NAVIGATION & FLOW
   ============================================ */

/* 8. Active Section Indicator */
.nav-link {
    position: relative;
    transition: color var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.nav-link.active,
.nav-link:hover {
    color: white;
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

/* 9. Sticky CTA Bar */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-surface-dark);
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    z-index: 80;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-cta--visible {
    transform: translateY(0);
}

.sticky-cta__content {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sticky-cta__title {
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
}

.sticky-cta__button {
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.sticky-cta__button:hover {
    background: #d55f0f;
    transform: scale(1.05);
}

/* Hide sticky CTA when FAB is open */
.fab-container--active ~ .sticky-cta {
    transform: translateY(100%) !important;
}

/* 10. Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 5rem;
    left: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 70;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top--visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.back-to-top .material-symbols-outlined {
    font-size: 20px;
}

/* Adjust back-to-top when sticky CTA is visible */
body.has-sticky-cta .back-to-top {
    bottom: 5.5rem;
}

@media (max-width: 640px) {
    .back-to-top {
        bottom: 1.5rem;
        left: 1rem;
        width: 44px;
        height: 44px;
    }

    body.has-sticky-cta .back-to-top {
        bottom: 5rem;
    }

    /* Fix form inputs on mobile */
    .form__input,
    .form__select,
    .form__textarea {
        font-size: 16px; /* Prevent iOS zoom on focus */
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    }

    .form__icon {
        font-size: 1rem;
        left: 0.75rem;
    }

    /* Hide icons only in regular text inputs (keep for select and textarea) */
    .form__input-wrapper:has(.form__input) .form__icon {
        display: none;
    }

    /* Remove left padding for inputs without icons */
    .form__input-wrapper:has(.form__input) .form__input {
        padding-left: 0.875rem;
    }

    /* Hide browser validation tooltips */
    .form__input:invalid,
    .form__select:invalid {
        box-shadow: none;
    }

    .form {
        padding: 1rem;
    }
}

/* 11. Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.breadcrumb__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb__link {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition-base);
}

.breadcrumb__link:hover {
    color: white;
}

.breadcrumb__separator {
    opacity: 0.5;
}

.breadcrumb__current {
    color: white;
    font-weight: 500;
}

/* Adjust main content padding when sticky CTA is visible */
body:has(.sticky-cta--visible) #main-content {
    padding-bottom: 4rem;
}

/* Adjust main content padding when sticky summary is visible */
body:has(.sticky-summary.visible) #main-content {
    padding-bottom: 5rem;
}

/* ============================================
   PHASE 3: CONVERSION & POLISH
   ============================================ */

/* 14. Exit-Intent Modal */
.exit-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.exit-modal--active {
    opacity: 1;
    visibility: visible;
}

.exit-modal__content {
    background: var(--color-surface-dark);
    border: 1px solid var(--color-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    max-width: 480px;
    margin: 1rem;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.exit-modal--active .exit-modal__content {
    transform: scale(1) translateY(0);
}

.exit-modal__icon {
    width: 64px;
    height: 64px;
    background: rgba(236, 109, 19, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--color-primary);
}

.exit-modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
}

.exit-modal__text {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.exit-modal__buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.exit-modal__buttons .btn {
    min-width: 140px;
}

@media (max-width: 480px) {
    .exit-modal__buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .exit-modal__buttons .btn {
        width: 100%;
    }
}

/* 16. Trust Badges Section */
.trust-badges {
    padding: 3rem 0;
    text-align: center;
}

.trust-badges__label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.trust-badges__grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

.trust-badge .material-symbols-outlined {
    color: var(--color-primary);
    font-size: 1.25rem;
}

/* 17. Comparison Table */
.comparison-section {
    padding: 4rem 0;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table td {
    color: white;
    font-size: 0.9375rem;
    vertical-align: middle;
}

.comparison-table__without {
    color: #ff6b6b;
    font-weight: 500;
}

.comparison-table__with {
    color: #4ade80;
    font-weight: 600;
}

.comparison-table__check,
.comparison-table__cross {
    font-size: 1.25rem;
    line-height: 1;
    vertical-align: -3px;
    margin-right: 0.5rem;
}

.comparison-table__check {
    color: #4ade80;
}

.comparison-table__cross {
    color: #ff6b6b;
}

/* 18. Floating Form Labels - DISABLED */
/* Floating labels disabled to prevent overlap with form icons */
/* Form already has placeholders for user guidance */

/* 19. Skeleton Screens */
.skeleton {
    background: linear-gradient(90deg, var(--color-surface-dark) 25%, var(--color-surface-highlight) 50%, var(--color-surface-dark) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton--text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton--title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton--avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton--card {
    height: 200px;
}

/* 20. Success Checkmark Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.success-checkmark__circle {
    stroke: #22c55e;
    stroke-width: 3;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: checkmark-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark__check {
    stroke: #22c55e;
    stroke-width: 3;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: checkmark-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

@keyframes checkmark-stroke {
    100% { stroke-dashoffset: 0; }
}

.success-message {
    text-align: center;
    padding: 2rem;
}

.success-message__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.success-message__text {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
}

/* ============================================
   END PHASE 3
   ============================================ */

/* ============================================
   PHASE 4: ADVANCED UX
   ============================================ */

/* 21. Bottom Sheet Modals (Mobile) */
@media (max-width: 640px) {
    .modal__content {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        max-height: 90vh;
        border-radius: 1.5rem 1.5rem 0 0;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        margin: 0;
        width: 100%;
        overflow-y: auto;
        touch-action: pan-y;
        will-change: transform;
    }

    .modal--active .modal__content {
        transform: translateY(0);
    }

    .modal__handle {
        display: block;
        width: 40px;
        height: 4px;
        background: var(--color-border);
        border-radius: 2px;
        margin: 0.75rem auto 1rem;
        flex-shrink: 0;
    }
}

.modal__handle {
    display: none;
}

/* 22. Image Blur-up Loading */
.img-blur-up {
    position: relative;
    background: var(--color-surface-dark);
    overflow: hidden;
}

.img-blur-up__placeholder {
    position: absolute;
    inset: 0;
    filter: blur(20px);
    transform: scale(1.1);
    transition: opacity 0.5s ease-out;
}

.img-blur-up__img {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.img-blur-up__img.loaded {
    opacity: 1;
}

.img-blur-up__img.loaded + .img-blur-up__placeholder {
    opacity: 0;
}

/* 23. Smooth Page Transitions */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--color-background-dark);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.page-transition--active {
    opacity: 1;
    pointer-events: auto;
}

/* Enhanced page transitions */
.page {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.98);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.page.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* 25. Character Counter */
.char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

.char-counter--warning {
    color: #f59e0b;
}

.char-counter--error {
    color: #ef4444;
}

/* 26. Better Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.empty-state__icon {
    width: 64px;
    height: 64px;
    background: var(--color-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--color-text-secondary);
}

.empty-state__icon .material-symbols-outlined {
    font-size: 32px;
}

.empty-state__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.empty-state__description {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.empty-state__action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.empty-state__action:hover {
    color: white;
}

/* 27. Error Boundaries */
.error-boundary {
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    background: var(--color-surface-dark);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
}

.error-boundary__icon {
    width: 64px;
    height: 64px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #ef4444;
}

.error-boundary__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
}

.error-boundary__message {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.error-boundary__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 28. Tooltips for Icons */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: var(--color-surface-dark);
    border: 1px solid var(--color-border);
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--color-surface-dark);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Tooltip positions */
[data-tooltip-position="bottom"]::before {
    bottom: auto;
    top: calc(100% + 8px);
}

[data-tooltip-position="bottom"]::after {
    bottom: auto;
    top: calc(100% + 3px);
    border-top-color: transparent;
    border-bottom-color: var(--color-surface-dark);
}

[data-tooltip-position="left"]::before {
    bottom: auto;
    left: auto;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

[data-tooltip-position="left"]::after {
    bottom: auto;
    left: auto;
    right: calc(100% + 3px);
    top: 50%;
    transform: translateY(-50%);
    border-top-color: transparent;
    border-left-color: var(--color-surface-dark);
}

[data-tooltip-position="right"]::before {
    bottom: auto;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

[data-tooltip-position="right"]::after {
    bottom: auto;
    left: calc(100% + 3px);
    top: 50%;
    transform: translateY(-50%);
    border-top-color: transparent;
    border-right-color: var(--color-surface-dark);
}

/* ============================================
   END PHASE 4
   ============================================ */

/* Print Styles */
@media print {
    nav, footer, button, .page:not(.active) {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .page.active {
        display: block !important;
    }
}

/* Utility Classes */
.bg-hero-glow {
    background: radial-gradient(circle at 50% 50%, rgba(236, 109, 19, 0.15) 0%, rgba(0, 0, 0, 0) 50%);
}

/* Image Container - Reduced Motion Support */
.img-container {
    position: relative;
    overflow: hidden;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
    .img-container img {
        transition: transform var(--transition-slow);
    }

    .img-container:hover img {
        transform: scale(1.05);
    }
}

/* Button Base */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 9999px;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: #d55f0f;
    transform: scale(1.05);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid currentColor;
}

.btn-secondary:hover {
    color: white;
}

/* Service Card */
.service-card {
    position: relative;
    background-color: var(--color-surface);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform var(--transition-base), background-color var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    will-change: transform;
}

.service-card:hover {
    background-color: var(--color-surface-hover);
    transform: scale(1.02);
}

.service-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: rgba(236, 109, 19, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    transition: all var(--transition-base);
}

.service-card:hover .service-card__icon {
    background-color: var(--color-primary);
    color: white;
}

/* Industry Selection Card */
.industry-card {
    position: relative;
    cursor: pointer;
}

.industry-card__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.industry-card__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border-radius: 1rem;
    border: 1px solid var(--color-border);
    background-color: #221810;
    padding: 1.25rem 1rem;
    transition: all var(--transition-base);
}

@media (min-width: 640px) {
    .industry-card__content {
        gap: 1.25rem;
        padding: 2rem;
    }
}

.industry-card:hover .industry-card__content {
    transform: translateY(-4px);
    border-color: var(--color-border-hover);
    box-shadow: 0 0 30px -10px rgba(236, 109, 19, 0.15);
}

.industry-card__input:checked + .industry-card__content,
.industry-card__input:focus + .industry-card__content {
    border-color: var(--color-primary);
    background-color: #2e241e;
    box-shadow: 0 0 0 1px var(--color-primary);
}

.industry-card__check {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0;
    transition: opacity var(--transition-base);
    color: var(--color-primary);
}

.industry-card__input:checked ~ .industry-card__check,
.industry-card__input:focus ~ .industry-card__check {
    opacity: 1;
}

/* Tool Card */
.tool-card {
    background-color: var(--color-surface-dark);
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 140px;
}

.tool-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-card:hover {
    background-color: var(--color-surface-highlight);
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

/* ============================================
   WORKFLOW - Improved Card-Based Design
   ============================================ */

/* Container - Horizontal scroll on mobile, grid on larger screens */
#results-workflow-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0.5rem;
}

#results-workflow-container::-webkit-scrollbar {
    display: none;
}

#results-workflow-container > * {
    flex: 0 0 85%;
    min-width: 260px;
    max-width: 320px;
    scroll-snap-align: start;
}

/* Tablet: 2 columns grid */
@media (min-width: 640px) {
    #results-workflow-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        overflow-x: visible;
    }

    #results-workflow-container > * {
        flex: none;
        min-width: 0;
        max-width: none;
    }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
    #results-workflow-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Workflow Step - Card Style with Equal Height */
.workflow-step {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    transition: all var(--transition-base);
    height: 100%;
    min-height: 200px;
}

@media (min-width: 640px) {
    .workflow-step {
        padding: 1.5rem;
        min-height: 280px;
    }
}

.workflow-step:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Step Number Badge - Hidden */
.workflow-step::before {
    display: none;
}

/* Card Content Layout - Push tools to bottom */
.workflow-step > .flex-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Icon Container */
.workflow-step__icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-base);
    position: relative;
    margin-bottom: 1rem;
}

.workflow-step:hover .workflow-step__icon {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-color: var(--step-color, rgba(255, 255, 255, 0.15));
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Title Styling */
.workflow-step h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
}

/* Description */
.workflow-step p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Tool Tags Container - Always at bottom */
.workflow-step__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    align-self: flex-start;
}

@media (max-width: 640px) {
    .workflow-step__tools {
        gap: 0.375rem;
        padding-top: 0.75rem;
    }
}

/* Tool Tags - Visual Hierarchy */
.workflow-step .tag {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-fast);
}

@media (max-width: 640px) {
    .workflow-step .tag {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }
}

.workflow-step .tag:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Primary Tool Tag */
.workflow-step .tag--primary {
    background: rgba(236, 109, 19, 0.15);
    border-color: rgba(236, 109, 19, 0.25);
    color: var(--color-primary);
}

.workflow-step .tag--primary:hover {
    background: rgba(236, 109, 19, 0.2);
    border-color: rgba(236, 109, 19, 0.35);
}

/* "Đề xuất tối ưu" Badge */
.badge-recommendation {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, rgba(236, 109, 19, 0.12) 0%, rgba(236, 109, 19, 0.05) 100%);
    border: 1px solid rgba(236, 109, 19, 0.2);
    border-radius: 9999px;
    color: var(--color-primary);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
    transition: all var(--transition-base);
}

.badge-recommendation:hover {
    background: linear-gradient(135deg, rgba(236, 109, 19, 0.18) 0%, rgba(236, 109, 19, 0.08) 100%);
    border-color: rgba(236, 109, 19, 0.3);
}

.badge-recommendation::before {
    content: '✦';
    font-size: 0.625rem;
}

/* Progress indicator (Step X/3) */
.workflow-step__progress {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--step-color, var(--color-primary));
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

/* Workflow section animation on load */
.workflow-step {
    opacity: 0;
    transform: translateY(20px);
    animation: workflowStepIn 0.5s var(--ease-out-expo) forwards;
    will-change: opacity, transform;
}

.workflow-step:nth-child(1) { animation-delay: 0.1s; }
.workflow-step:nth-child(2) { animation-delay: 0.25s; }
.workflow-step:nth-child(3) { animation-delay: 0.4s; }

/* Reduced motion support for workflow */
@media (prefers-reduced-motion: reduce) {
    .workflow-step {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

@keyframes workflowStepIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion support for workflow */
@media (prefers-reduced-motion: reduce) {
    .workflow-step {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Connector Line - Horizontal (Desktop 3 columns) */
.workflow-step__connector {
    display: none;
}

@media (min-width: 1024px) {
    /* Hide connector arrows on desktop */
    .workflow-step__connector {
        display: none;
    }
}

/* Tablet (2 columns): Connector for first item */
@media (min-width: 640px) and (max-width: 1023px) {
    .workflow-step__connector {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        right: -1.75rem;
        width: 1.5rem;
        height: 1.5rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }

    .workflow-step__connector::before {
        content: '→';
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.4);
    }

    /* Only show connector for odd items (1st, 3rd, 5th...) */
    .workflow-step:nth-child(even) .workflow-step__connector {
        display: none;
    }
}

/* Mobile: Hide vertical connector */
@media (max-width: 639px) {
    .workflow-step {
        min-height: auto;
    }

    .workflow-step:not(:last-child) {
        margin-bottom: 0;
    }

    /* Hide connector circle and arrow on mobile */
    .workflow-step:not(:last-child)::after,
    .workflow-step:not(:last-child)::before {
        display: none !important;
    }
}

/* Tag */
.tag {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-base);
}

.tool-card:hover .tag {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Placeholder Notice */
.placeholder-notice {
    font-size: 11px;
    color: var(--color-text-secondary);
    font-style: italic;
}

/* Coming Soon Link */
.coming-soon {
    position: relative;
    cursor: help;
}

.coming-soon::after {
    content: ' (Sắp ra mắt)';
    font-size: 10px;
    color: var(--color-text-secondary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.coming-soon:hover::after {
    opacity: 1;
}

/* Error Fallback */
.error-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-surface-dark);
    color: var(--color-primary);
    font-size: 14px;
    text-align: center;
    padding: 2rem;
}

/* ============================================
   TIMELINE - Scroll-linked Animations
   ============================================ */

.timeline-container {
    position: relative;
}

.timeline-line {
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        var(--color-primary) var(--timeline-progress, 0%),
        rgba(255, 255, 255, 0.1) var(--timeline-progress, 0%)
    );
    transition: --timeline-progress 0.3s ease-out;
}

@media (min-width: 768px) {
    .timeline-line {
        left: 50%;
        transform: translateX(-50%);
    }
}

.timeline-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.timeline-item:nth-child(even) {
    transform: translateX(20px);
}

.timeline-item--visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot {
    transform: scale(0);
    transition: transform 0.4s var(--ease-out-expo) 0.2s;
}

.timeline-item--visible .timeline-dot {
    transform: scale(1);
}

/* Motion preference support for timeline */
@media (prefers-reduced-motion: reduce) {
    .timeline-item {
        opacity: 1;
        transform: none;
    }

    .timeline-dot {
        transform: scale(1);
    }
}

/* ============================================
   FORMS & MODALS - Phase 2
   ============================================ */

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal[hidden] {
    display: none;
}

.modal--active {
    opacity: 1;
    visibility: visible;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.modal__content {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    background: var(--color-surface-dark);
    border: 1px solid var(--color-border);
    border-radius: 1.5rem;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal--active .modal__content {
    transform: scale(1) translateY(0);
}

.modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.5rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.modal__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.modal__subtitle {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.modal__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.modal__close:hover {
    background: var(--color-surface-highlight);
    border-color: var(--color-border-hover);
    color: white;
}

/* Form */
.form {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

/* Hide browser default validation tooltips */
.form__input:invalid,
.form__select:invalid,
.form__textarea:invalid {
    box-shadow: none;
}

/* Hide browser validation message */
.form__input::-webkit-validation-bubble-message,
.form__select::-webkit-validation-bubble-message,
.form__textarea::-webkit-validation-bubble-message {
    display: none;
}

.form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 480px) {
    .form__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form__group--full {
    grid-column: 1 / -1;
}

.form__label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form__required {
    color: var(--color-accent-red);
}

.form__input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form__icon {
    position: absolute;
    left: 0.875rem;
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    pointer-events: none;
}

/* Hide icons only in regular text inputs (keep for select and textarea) */
.form__input-wrapper:has(.form__input) .form__icon {
    display: none;
}

/* Remove left padding for inputs without icons */
.form__input-wrapper:has(.form__input) .form__input {
    padding-left: 0.875rem;
}

.form__input,
.form__select,
.form__textarea {
    width: 100%;
    padding: 0.75rem 0.875rem 0.75rem 3rem;
    background: rgba(0, 0, 0, 0.3) !important;  /* Override Tailwind Forms plugin */
    border: 1px solid var(--color-border);
    border-radius: 0.75rem !important;
    color: white;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.form__input::placeholder,
.form__textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(0, 0, 0, 0.5);
}

.form__input--error,
.form__select--error,
.form__textarea--error {
    border-color: var(--color-accent-red);
}

.form__select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2386868b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.form__select option {
    background: var(--color-surface-dark);
    color: white;
}

.form__input-wrapper--textarea .form__icon {
    top: 0.875rem;
}

.form__textarea {
    resize: vertical;
    min-height: 80px;
    padding-left: 2.75rem;
}

.form__error {
    font-size: 0.75rem;
    color: var(--color-accent-red);
    min-height: 1rem;
}

/* Radio Group */
.form__radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.form__radio {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1.5px solid var(--color-border);
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.form__radio:hover {
    border-color: var(--color-border-hover);
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-1px);
}

/* Custom Radio Indicator */
.form__radio-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.form__radio-indicator::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form__radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form__radio:has(input:checked) {
    border-color: var(--color-primary);
    background: rgba(236, 109, 19, 0.08);
    box-shadow: 0 0 0 1px var(--color-primary), 0 4px 12px rgba(236, 109, 19, 0.15);
}

.form__radio:has(input:checked) .form__radio-indicator {
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.form__radio:has(input:checked) .form__radio-indicator::after {
    transform: scale(1);
}

.form__radio:has(input:focus-visible) {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.form__radio-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s;
}

.form__radio:has(input:checked) .form__radio-label {
    color: white;
}

/* Form Actions */
.form__actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.form__submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--color-primary);
    border: none;
    border-radius: 0.875rem;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.form__submit:hover:not(:disabled) {
    background: #d55f0f;
    transform: translateY(-1px);
}

.form__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form__submit-spinner {
    display: inline-flex;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.form__privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.form__privacy .material-symbols-outlined {
    font-size: 0.875rem;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-dark) 100%);
    border-top: 1px solid var(--color-border);
    padding: 2.5rem 1.5rem;
}

.newsletter-section__container {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .newsletter-section__container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.newsletter-section__content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.newsletter-section__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(236, 109, 19, 0.15);
    border-radius: 1rem;
    color: var(--color-primary);
    font-size: 1.5rem;
}

.newsletter-section__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.newsletter-section__desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.newsletter-section__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-section__input-group {
    display: flex;
    gap: 0.5rem;
}

.newsletter-section__input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3) !important;  /* Override Tailwind Forms plugin */
    border: 1px solid var(--color-border);
    border-radius: 0.75rem !important;
    color: white;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.newsletter-section__input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.newsletter-section__button {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1.25rem;
    background: var(--color-primary);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.newsletter-section__button:hover {
    background: #d55f0f;
}

.newsletter-section__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.newsletter-section__tag {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
}

.newsletter-section__tag:hover {
    border-color: var(--color-border-hover);
}

.newsletter-section__tag:has(input:checked) {
    background: rgba(236, 109, 19, 0.15);
    border-color: var(--color-primary);
}

.newsletter-section__tag input {
    display: none;
}

.newsletter-section__tag .checkbox-icon {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.2s;
}

.newsletter-section__tag:has(input:checked) .checkbox-icon {
    color: var(--color-primary);
}

.newsletter-section__tag .checkbox-icon--checked {
    display: none;
}

.newsletter-section__tag:has(input:checked) .checkbox-icon--unchecked {
    display: none;
}

.newsletter-section__tag:has(input:checked) .checkbox-icon--checked {
    display: inline-block;
}

.newsletter-section__tag span {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
}

/* FAB - Floating Action Button */
.fab-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

/* Adjust FAB position when sticky CTA is visible */
body.has-sticky-cta .fab-container {
    bottom: 5rem;
}

/* Mobile FAB adjustments */
@media (max-width: 640px) {
    .fab-container {
        bottom: 1rem;
        right: 1rem;
    }

    /* Hide FAB when sticky CTA is visible to prevent overlap */
    body.has-sticky-cta .fab-container {
        opacity: 0;
        pointer-events: none;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .fab {
        width: 52px;
        height: 52px;
    }

    .fab__icon {
        font-size: 1.25rem;
    }
}

.fab {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(236, 109, 19, 0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(236, 109, 19, 0.5);
}

.fab--main {
    position: relative;
    z-index: 2;
}

.fab__icon {
    font-size: 1.5rem;
    transition: all 0.3s;
}

.fab__icon--close {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg);
}

.fab-container--active .fab__icon--open {
    opacity: 0;
    transform: rotate(90deg);
}

.fab-container--active .fab__icon--close {
    opacity: 1;
    transform: rotate(0);
}

.fab__menu {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transform: translateY(20px) scale(0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fab-container--active .fab__menu {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.fab--action {
    position: relative;
    width: 48px;
    height: 48px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.fab--action:hover {
    background: var(--color-surface-highlight);
}

.fab__tooltip {
    position: absolute;
    right: calc(100% + 0.75rem);
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.fab--action:hover .fab__tooltip {
    opacity: 1;
    visibility: visible;
}

/* Quick Form */
.quick-form {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    width: 320px;
    background: var(--color-surface-dark);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 89;
    transform-origin: bottom right;
    animation: quickFormIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes quickFormIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.quick-form__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.quick-form__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
}

.quick-form__close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-form__close:hover {
    background: var(--color-surface-highlight);
    color: white;
}

.quick-form__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-form__input,
.quick-form__textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: rgba(0, 0, 0, 0.3) !important;  /* Override Tailwind Forms plugin */
    border: 1px solid var(--color-border);
    border-radius: 0.625rem !important;
    color: white;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.quick-form__input:focus,
.quick-form__textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.quick-form__textarea {
    resize: vertical;
    min-height: 60px;
}

.quick-form__footer {
    padding: 0 1rem 1rem;
}

.quick-form__submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem;
    background: var(--color-primary);
    border: none;
    border-radius: 0.625rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-form__submit:hover {
    background: #d55f0f;
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--color-surface-dark);
    border: 1px solid var(--color-border);
    border-radius: 0.875rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    font-size: 0.9375rem;
    color: white;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.toast--success {
    border-color: rgba(34, 197, 94, 0.3);
}

.toast--error {
    border-color: rgba(239, 68, 68, 0.3);
}

.toast__icon {
    font-size: 1.25rem;
}

.toast--success .toast__icon {
    color: #22c55e;
}

.toast--error .toast__icon {
    color: #ef4444;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast--out {
    animation: toastOut var(--transition-base) var(--ease-out-expo) forwards;
}

/* Reduced motion variant for toast */
@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .toast--out {
        animation: toastOutReduced 0.01ms forwards;
    }

    @keyframes toastOutReduced {
        to {
            opacity: 0;
        }
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ============================================
   ROI CALCULATOR - Additional Styles
   ============================================ */

/* Range Slider */
.roi-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    outline: none;
    cursor: pointer;
}

.roi-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--color-background-dark);
    box-shadow: 0 0 15px rgba(236, 109, 19, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.roi-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(236, 109, 19, 0.7);
}

.roi-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--color-background-dark);
    box-shadow: 0 0 15px rgba(236, 109, 19, 0.5);
}

/* ROI Results Animation */
.roi-number {
    opacity: 0;
    transform: translateY(10px);
}

.roi-number--animated {
    animation: roiCountUp 0.6s ease-out forwards;
}

@keyframes roiCountUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* ============================================
   CASE STUDIES - Additional Styles
   ============================================ */

/* Filter Buttons */
.case-filter {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
    transition: all 0.2s;
}

.case-filter:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.case-filter.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Case Card */
.case-card {
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 0.5s ease-out forwards;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.case-card.hidden {
    display: none !important;
}

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

/* Quiz Option Button */
#quiz-options button {
    transition: all 0.2s;
}

#quiz-options button:hover {
    transform: translateX(4px);
}

/* ============================================
   LOADING STATES & SKELETONS - Phase 5
   ============================================ */

/* Button Loading State */
.btn--loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn--loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-surface-dark) 25%,
        var(--color-surface-highlight) 50%,
        var(--color-surface-dark) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton--text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton--text:last-child {
    width: 80%;
}

.skeleton--title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.skeleton--avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton--card {
    height: 200px;
    border-radius: 1rem;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Page Loading Overlay */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--color-background-dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader--hidden {
    opacity: 0;
    visibility: hidden;
}

.page-loader__spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(236, 109, 19, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.page-loader__text {
    margin-top: 1rem;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

/* Form Loading State */
.form--loading {
    position: relative;
    pointer-events: none;
}

.form--loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(24, 20, 17, 0.7);
    backdrop-filter: blur(2px);
    border-radius: inherit;
}

/* Content Placeholder Shimmer */
.shimmer {
    position: relative;
    overflow: hidden;
    background: var(--color-surface-dark);
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* Lazy Loading Image Placeholder */
.img-loading {
    background: var(--color-surface-dark);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Smooth scroll behavior for anchor links */
html {
    scroll-behavior: smooth;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Reduced motion preference - Complete Coverage */
@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;
    }

    .skeleton,
    .shimmer,
    .page-loader__spinner,
    .img-loading,
    .loading-skeleton {
        animation: none !important;
    }

    /* Ensure visibility for reduced motion */
    .page:not(.active) {
        opacity: 0;
    }

    .page.active {
        opacity: 1;
    }
}

/* Print styles */
@media print {
    .fab-container,
    .modal,
    .toast-container,
    .page-loader {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .page {
        display: block !important;
        opacity: 1 !important;
    }
}

/* ============================================
   Tab Navigation Styles for Interactive Tools
   ============================================ */

/* Tab Buttons */
.tab-btn {
    color: var(--color-text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: white;
    background: var(--color-primary);
    box-shadow: 0 4px 12px rgba(236, 109, 19, 0.3);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Trust Badges Section */
.trust-badges {
    background-color: var(--color-surface);
}

.trust-badges__label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trust-badge {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.trust-badge:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

/* ============================================
   Social Proof Section Styles
   ============================================ */

#social-proof {
    position: relative;
}

#social-proof::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(236, 109, 19, 0.3), transparent);
}

/* Testimonial Cards */
#testimonials-container article {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

#testimonials-container article:hover {
    transform: translateY(-4px);
    border-color: rgba(236, 109, 19, 0.3);
}

/* ============================================
   Sticky Summary for Results Page
   ============================================ */

.sticky-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(29, 29, 31, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    z-index: 40;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sticky-summary.visible {
    transform: translateY(0);
}

.sticky-summary__content {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (max-width: 640px) {
    .sticky-summary__content {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================================
   Industry Card Hover Preview
   ============================================ */

.industry-card {
    position: relative;
}

.industry-card__preview {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 280px;
    background: #1d1d1f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 8px;
}

.industry-card:hover .industry-card__preview {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

.industry-card__preview::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #1d1d1f;
}

/* Mobile: Disable hover preview */
@media (max-width: 768px) {
    .industry-card__preview {
        display: none;
    }
}

/* ============================================
   iOS APP-LIKE VIEWPORT LAYOUT SYSTEM
   ============================================ */

/* Viewport Layout Custom Properties */
:root {
    --nav-height: 56px;
    --bottom-bar-height: 80px;
    --bottom-bar-height-mobile: 120px;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}

/* Page Viewport Layout - iOS App Style */
.page-viewport {
    height: 100svh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
    padding-top: var(--nav-height);
}

/* Prevent body scroll when in viewport mode */
body:has(.page-viewport.active) {
    overflow: hidden;
    height: 100svh;
}

html:has(.page-viewport.active) {
    overflow: hidden;
    height: 100svh;
}

/* Ensure page-viewport is visible when active - Override base .page styles */
.page.active.page-viewport,
#page-home.active,
#page-services.active,
#page-results.active {
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    height: 100svh !important;
    min-height: 100svh !important;
    width: 100% !important;
}

/* CSS fallback for direct hash navigation - hide home when other page is targeted */
:root:has(#page-services.active) #page-home:not(.active),
:root:has(#page-results.active) #page-home:not(.active) {
    display: none !important;
}

/* Hide inactive pages explicitly */
#page-home:not(.active),
#page-services:not(.active),
#page-results:not(.active) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Show target page directly via CSS (fallback if JS Router fails) */
#page-services.active,
#page-results.active {
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    height: 100svh !important;
}

/* Force child elements to be visible when page is active */
.page.active .page-content,
.page.active .page-main,
.page:target .page-content,
.page:target .page-main {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Page Content Container */
.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Main Content Area - Scrollable if needed but designed to fit */
.page-main {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem 1.5rem;
    padding-bottom: var(--bottom-bar-height);
}

@media (max-width: 640px) {
    .page-main {
        padding-bottom: var(--bottom-bar-height-mobile);
    }
}

/* Allow internal scroll for specific sections */
.page-main--scrollable {
    overflow-y: auto;
    justify-content: flex-start;
    padding-top: 1rem;
    -webkit-overflow-scrolling: touch;
}

/* Results page scroll container */
.results-page-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.results-scroll-container {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Override overflow hidden for results page */
#page-results.active .results-page-content {
    overflow: hidden;
}

/* Responsive Typography with clamp() */
.headline-responsive {
    font-size: clamp(1.25rem, 4vw + 0.5rem, 3rem);
    line-height: 1.2;
    font-weight: 700;
}

@media (max-width: 640px) {
    .headline-responsive {
        font-size: 1.5rem;
        line-height: 1.25;
    }
}

.subheadline-responsive {
    font-size: clamp(0.875rem, 2vw + 0.5rem, 1.5rem);
    line-height: 1.4;
}

/* Compact Section Spacing */
.section-compact {
    padding: 1rem 0;
}

.section-compact--xs {
    padding: 0.5rem 0;
}

/* Responsive Container */
.container-viewport {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container-viewport {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-viewport {
        padding: 0 2rem;
    }
}

/* Flex utilities for viewport layouts */
.flex-viewport {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.flex-viewport-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Grid utilities for viewport layouts */
.grid-viewport-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .grid-viewport-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Responsive visibility based on viewport height */
.hide-on-short-viewport {
    display: block;
}

.show-on-short-viewport {
    display: none;
}

@media (max-height: 700px) {
    .hide-on-short-viewport {
        display: none !important;
    }

    .show-on-short-viewport {
        display: block !important;
    }
}

/* Very short viewport (landscape phones) - Allow scroll */
@media (max-height: 500px) {
    .page-viewport {
        height: auto;
        min-height: 100svh;
        overflow: visible;
    }

    .page-content {
        height: auto;
        min-height: calc(100svh - var(--nav-height) - var(--bottom-bar-height));
    }

    .page-main {
        overflow: visible;
    }
}

/* ============================================
   BOTTOM ACTION BAR - iOS App Style
   ============================================ */

.bottom-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(24, 20, 17, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.5rem;
    padding-bottom: calc(1rem + var(--safe-area-bottom));
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* Desktop: inline buttons */
@media (min-width: 640px) {
    .bottom-action-bar {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem 2rem;
        padding-bottom: calc(1rem + var(--safe-area-bottom));
        position: relative;
    }

    .bottom-action-bar .page-dots {
        position: absolute;
        right: 2rem;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Action Bar Content Container */
.bottom-action-bar__content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .bottom-action-bar__content {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
}

/* Action Bar Buttons */
.bottom-action-bar__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 48px;
}

.bottom-action-bar__btn--primary {
    background: var(--color-primary);
    color: white;
    border: none;
}

.bottom-action-bar__btn--primary:hover {
    background: #d55f0f;
    transform: scale(1.02);
}

.bottom-action-bar__btn--secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bottom-action-bar__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Buttons Container */
.bottom-action-bar__buttons {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    width: 100%;
}

@media (max-width: 640px) {
    .bottom-action-bar__buttons {
        gap: 0.5rem;
    }
}

/* Page Indicator Dots */
.page-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all var(--transition-base);
}

.page-dot--active,
.page-dot.active {
    background: var(--color-primary);
    transform: scale(1.25);
}

.page-dot:hover:not(.page-dot--active):not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

/* ============================================
   CAROUSEL / SLIDER COMPONENT
   ============================================ */

.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 1rem;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel__item {
    flex: 0 0 auto;
    scroll-snap-align: center;
    width: 100%;
}

/* Show partial next item on mobile */
@media (max-width: 640px) {
    .carousel__item {
        width: 85%;
    }
}

/* Show 2 items on tablet */
@media (min-width: 640px) and (max-width: 1023px) {
    .carousel__item {
        width: 45%;
    }
}

/* Show 3 items on desktop */
@media (min-width: 1024px) {
    .carousel__item {
        width: 30%;
    }
}

/* Carousel Navigation Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
}

@media (max-width: 640px) {
    /* Only hide carousel-dots on results page */
    #page-results .carousel-dots {
        display: none;
    }
}

/* Swipe hint indicator */
.swipe-hint {
    font-size: 0.65rem;
    color: var(--color-primary);
    margin-left: 0.5rem;
    animation: swipe-hint 1.5s ease-in-out infinite;
    font-weight: 500;
}

/* Scroll Arrow Hint for Mobile */
.scroll-arrow-hint {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    width: 24px;
    height: 24px;
    background: linear-gradient(to right, transparent, var(--color-surface-dark) 30%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.25rem;
}

.scroll-arrow-hint .material-symbols-outlined {
    font-size: 1.25rem;
    color: var(--color-primary);
    animation: bounce-right 1s ease-in-out infinite;
}

@keyframes bounce-right {
    0%, 100% { transform: translateX(0); opacity: 0.7; }
    50% { transform: translateX(4px); opacity: 1; }
}

@keyframes swipe-hint {
    0%, 100% { opacity: 0.6; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(4px); }
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all var(--transition-base);
}

.carousel-dot--active {
    background: var(--color-primary);
    width: 24px;
    border-radius: 4px;
}

.carousel-dot:hover:not(.carousel-dot--active) {
    background: rgba(255, 255, 255, 0.5);
}

/* Carousel Navigation Arrows */
.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.carousel-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all var(--transition-base);
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Horizontal Scroll Container (for tools) */
.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 1rem;
    padding: 0.5rem 0;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll__item {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

/* Tools Horizontal Scroll - Results Page */
.tools-horizontal-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.25rem 0;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.tools-horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.tools-scroll-track {
    display: flex;
    gap: 0.75rem;
}

.tools-scroll-track > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 180px;
    min-width: 180px;
}

@media (min-width: 640px) {
    .tools-scroll-track > * {
        width: 200px;
        min-width: 200px;
    }
}

@media (min-width: 1024px) {
    .tools-horizontal-scroll {
        overflow-x: visible;
    }

    .tools-scroll-track {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .tools-scroll-track > * {
        width: auto;
        min-width: 0;
    }
}

/* Tools Section - Ensure visibility */
.tools-horizontal-scroll {
    padding-bottom: 0.5rem;
}

/* Results page - desktop fit viewport */
@media (min-width: 641px) {
    #page-results .results-scroll-container {
        overflow: hidden;
    }

    #page-results .grid {
        flex: 1;
        min-height: 0;
    }

    /* Workflow section fills available space */
    #page-results section[aria-labelledby="workflow-heading"] {
        flex: 1;
        min-height: 0;
        max-height: 100%;
    }

    /* Stats container */
    #page-results #results-stats-container {
        flex: 1;
        min-height: 0;
    }

    /* Tools section compact */
    #page-results section[aria-labelledby="tools-heading"] {
        flex-shrink: 0;
    }
}

/* Results page - mobile optimizations - BALANCED COMPACT */
@media (max-width: 640px) {
    /* Allow minimal scroll if needed */
    #page-results .results-scroll-container {
        overflow-y: auto;
        height: calc(100svh - var(--nav-height) - var(--bottom-bar-height-mobile, 120px));
    }

    /* Title */
    #page-results .headline-responsive {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem;
    }

    /* Grid gaps */
    #page-results .grid {
        gap: 0.5rem !important;
    }

    /* Workflow section - taller */
    #page-results section[aria-labelledby="workflow-heading"] {
        padding: 0.5rem;
        position: relative;
        min-height: 360px;
    }

    /* Scroll hint - fade gradient on right */
    #page-results section[aria-labelledby="workflow-heading"]::after {
        content: '';
        position: absolute;
        right: 0;
        top: 2.5rem;
        bottom: 0.5rem;
        width: 40px;
        background: linear-gradient(to right, transparent, var(--color-surface-dark));
        pointer-events: none;
        z-index: 20;
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    /* Hide fade when scrolled to end */
    #page-results section[aria-labelledby="workflow-heading"].scroll-end::after {
        opacity: 0;
    }

    #page-results section[aria-labelledby="workflow-heading"] h3 {
        font-size: 0.8rem;
    }

    /* Workflow cards - show one at a time, compact */
    #page-results #results-workflow-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 0.5rem;
    }

    #page-results #results-workflow-container > * {
        flex: 0 0 100%;
        scroll-snap-align: start;
        min-width: 100%;
        max-width: 100%;
    }

    #page-results .workflow-step {
        padding: 0.5rem;
        min-height: auto;
    }

    #page-results .workflow-step .w-10,
    #page-results .workflow-step .w-12 {
        width: 2rem !important;
        height: 2rem !important;
    }

    #page-results .workflow-step .material-symbols-outlined {
        font-size: 1rem !important;
    }

    #page-results .workflow-step h4 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    #page-results .workflow-step p {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.4;
    }

    #page-results .workflow-step .tag {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }

    #page-results .workflow-step__tools {
        padding-top: 0.5rem;
        gap: 0.375rem;
    }

    /* Hide step badge on mobile */
    #page-results .workflow-step .text-xs.font-semibold {
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
    }

    /* Stats section - taller */
    #page-results #results-stats-container {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        gap: 0.5rem;
        min-height: 100px;
    }

    #page-results #results-stats-container > div {
        padding: 0.625rem !important;
    }

    #page-results #results-stat-efficiency {
        font-size: 2rem !important;
    }

    #page-results #results-stat-desc {
        font-size: 0.65rem !important;
        line-height: 1.3;
    }

    #page-results #results-stats-container h4 {
        font-size: 0.6rem !important;
        margin-bottom: 0.25rem;
    }

    /* Tools section - improved mobile UX */
    #page-results section[aria-labelledby="tools-heading"] {
        margin-top: 0.5rem;
        position: relative;
    }

    #page-results section[aria-labelledby="tools-heading"] h3 {
        font-size: 0.8rem;
    }

    /* Fade hint on right */
    #page-results section[aria-labelledby="tools-heading"]::after {
        content: '';
        position: absolute;
        right: 0;
        top: 2rem;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to right, transparent, var(--color-background-dark));
        pointer-events: none;
        z-index: 10;
    }

    #page-results .tools-scroll-track {
        gap: 0.5rem;
        padding-right: 1rem;
    }

    #page-results .tools-scroll-track > * {
        width: 64px !important;
        min-width: 64px !important;
    }

    /* Tool card - centered icon + name only */
    #page-results .tool-card {
        padding: 0.375rem;
        min-height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.25rem;
        position: relative;
    }

    /* Hide tag and header row */
    #page-results .tool-card .tag,
    #page-results .tool-card .flex.items-start.justify-between {
        display: none !important;
    }

    /* Icon centered and larger */
    #page-results .tool-card .w-12 {
        width: 2rem !important;
        height: 2rem !important;
        margin: 0 auto;
        border-radius: 0.5rem !important;
    }

    #page-results .tool-card .material-symbols-outlined {
        font-size: 1rem !important;
    }

    /* Tool name */
    #page-results .tool-card h4 {
        font-size: 0.6rem;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        line-height: 1.2;
    }

    /* Hide description */
    #page-results .tool-card p {
        display: none;
    }
}

/* ============================================
   MODAL / DRAWER COMPONENT - iOS Style
   ============================================ */

/* Full Modal Overlay */
.ios-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.ios-modal--active {
    opacity: 1;
    visibility: visible;
}

.ios-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ios-modal__content {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    margin: 1rem;
    background: var(--color-surface-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ios-modal--active .ios-modal__content {
    transform: scale(1) translateY(0);
}

.ios-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ios-modal__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
}

.ios-modal__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all var(--transition-base);
}

.ios-modal__close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.ios-modal__body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(85vh - 120px);
}

/* Bottom Drawer - Mobile */
.ios-drawer {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.ios-drawer--active {
    opacity: 1;
    visibility: visible;
}

.ios-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ios-drawer__content {
    position: relative;
    width: 100%;
    max-height: 90vh;
    background: var(--color-surface-dark);
    border-radius: 1.5rem 1.5rem 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding-bottom: var(--safe-area-bottom);
}

.ios-drawer--active .ios-drawer__content {
    transform: translateY(0);
}

/* Drawer Handle */
.ios-drawer__handle {
    width: 36px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin: 0.75rem auto;
}

.ios-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ios-drawer__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
}

.ios-drawer__close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all var(--transition-base);
}

.ios-drawer__close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.ios-drawer__body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

/* Animation keyframes for modal */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        transform: scale(0.95) translateY(20px);
    }
    to {
        transform: scale(1) translateY(0);
    }
}

@keyframes drawerSlideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ============================================
   HEIGHT-RESPONSIVE RULES
   ============================================ */

/* Very short viewport (landscape phones) */
@media (max-height: 500px) {
    .hide-on-landscape {
        display: none !important;
    }

    .bottom-action-bar {
        padding: 0.75rem 1rem;
    }

    .bottom-action-bar__btn {
        padding: 0.625rem 1rem;
        min-height: 40px;
    }

    .page-dots {
        padding: 0.25rem 0;
    }
}

/* Short viewport (small phones) */
@media (max-height: 700px) {
    .hide-on-short {
        display: none !important;
    }

    .section-compact {
        padding: 0.5rem 0;
    }

    .headline-responsive {
        font-size: clamp(1.5rem, 4vw + 0.5rem, 3rem);
    }

    .subheadline-responsive {
        font-size: clamp(0.75rem, 1.5vw + 0.5rem, 1rem);
    }
}

/* Medium viewport */
@media (min-height: 700px) and (max-height: 900px) {
    .show-on-medium-viewport {
        display: block;
    }
}

/* Tall viewport (normal phones and tablets) */
@media (min-height: 900px) {
    .show-on-tall-viewport {
        display: block;
    }

    .section-compact {
        padding: 1.5rem 0;
    }
}

/* Print styles for new components */
@media print {
    .bottom-action-bar,
    .ios-modal,
    .ios-drawer,
    .carousel-dots,
    .page-dots {
        display: none !important;
    }
}

/* ============================================
   UX/UI IMPROVEMENTS - Mobile Optimizations
   ============================================ */

/* 1. Fix Page Dots size on mobile - They appear too large */
@media (max-width: 640px) {
    .page-dots {
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .page-dot {
        width: 8px !important;
        height: 8px !important;
        min-width: 8px !important;
        min-height: 8px !important;
        border-radius: 50% !important;
    }

    .page-dot.active,
    .page-dot--active {
        width: 20px !important;
        height: 8px !important;
        min-width: 20px !important;
        border-radius: 4px !important;
        transform: none;
    }
}

/* 2. Hide FAB on mobile to avoid blocking content */
@media (max-width: 640px) {
    .fab-container {
        display: none !important;
    }
}

/* Show FAB only on desktop */
@media (min-width: 641px) {
    .fab-container {
        display: flex;
    }
}

/* 3. Show badge on mobile */
.hero-badge-mobile {
    display: none;
}

@media (max-width: 640px) {
    .hero-badge-mobile {
        display: inline-flex;
    }
}

/* 4. Ensure trust indicator visible on mobile */
@media (max-width: 640px) {
    .trust-indicator-compact {
        font-size: 0.75rem;
        padding: 0.25rem 0;
    }

    .trust-indicator-compact .stars {
        font-size: 0.875rem;
    }
}

/* 5. Optimize stats bar on mobile - prevent FAB overlap */
@media (max-width: 640px) {
    .stats-bar-compact {
        padding-right: 60px; /* Space for FAB */
    }
}

/* 6. Better spacing for mobile content */
@media (max-width: 640px) {
    .page-main {
        padding: 0.5rem 1rem;
        justify-content: center;
        align-items: center;
    }

    .headline-responsive {
        font-size: clamp(1.5rem, 6vw, 2.25rem);
        line-height: 1.15;
        margin-bottom: 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .subheadline-responsive {
        font-size: 0.8125rem;
        line-height: 1.4;
        display: block;
        margin-bottom: 1rem;
    }

    /* Center container content */
    .container-viewport {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    /* Scrollable page main on services page */
    .page-main--scrollable .container-viewport {
        justify-content: flex-start;
    }

    /* Stats bar compact on mobile */
    .stats-bar-compact {
        width: 100%;
        max-width: 400px;
        margin-bottom: 0.75rem;
    }

    .stats-bar-compact .grid {
        gap: 0.5rem;
    }

    .stats-bar-compact > div > div {
        padding: 0.5rem;
    }

    /* Industry cards horizontal layout on mobile */
    .industry-card__content {
        flex-direction: row;
        gap: 0.75rem;
        padding: 1rem;
        justify-content: flex-start;
    }

    .industry-card__content > div:last-child {
        text-align: left;
    }

    .industry-card__check {
        top: 50%;
        right: 0.75rem;
        transform: translateY(-50%);
    }
}

/* 7. Bottom action bar improvements */
@media (max-width: 640px) {
    .bottom-action-bar__content {
        gap: 0.5rem;
    }

    .bottom-action-bar__buttons {
        gap: 0.5rem;
    }

    .bottom-action-bar__btn {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
}

/* 9. Ensure visible content hierarchy on short screens */
@media (max-height: 500px) {
    .stats-bar-compact {
        display: none;
    }

    .hero-badge,
    .hero-badge-mobile {
        display: none;
    }

    .page-main {
        justify-content: center;
    }

    .hide-on-very-short {
        display: none !important;
    }
}

/* Very short screens - hide more elements */
@media (max-height: 450px) {
    .hide-on-very-short {
        display: none !important;
    }

    .trust-indicator-compact {
        display: none !important;
    }

    .subheadline-responsive {
        display: none !important;
    }
}

/* Very small width screens */
@media (max-width: 380px) {
    .stats-bar-compact .grid {
        gap: 0.25rem;
    }

    .stats-bar-compact p {
        font-size: 8px;
    }
}

/* 10. Add subtle visual interest with gradient overlay */
/* Disabled - was causing display issues
.page-viewport::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: radial-gradient(ellipse at 50% 0%, rgba(236, 109, 19, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.page-viewport > * {
    position: relative;
    z-index: 1;
}
*/
