/* =============================================================================
   HESS CONSULTANCY SERVICES - ENHANCED MOBILE & RESPONSIVE STYLES
   Comprehensive optimization for all devices and breakpoints
============================================================================= */

/* =============================================================================
   CORE CSS VARIABLES & ROOT OPTIMIZATION
============================================================================= */
:root {
    /* Viewport height fix for mobile browsers */
    --vh: 1vh;
    
    /* Medical Brand Colors - Optimized for accessibility */
    --medical-navy: #0f172a;
    --medical-blue: #1e40af;
    --trust-green: #059669;
    --premium-gold: #f59e0b;
    --medical-accent: #3b82f6;
    --professional-gray: #334155;
    --subtle-gray: #64748b;
    --light-medical: #f8fafc;
    
    /* Typography Scale - Optimized for readability */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Source Serif 4', serif;
    
    /* Professional Shadows - Performance optimized */
    --shadow-professional: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-elegant: 0 10px 30px rgba(16, 29, 66, 0.08);
    --shadow-elevated: 0 20px 60px rgba(16, 29, 66, 0.15);
    --shadow-trust: 0 8px 24px rgba(5, 150, 105, 0.15);
    
    /* Professional Gradients */
    --gradient-professional: linear-gradient(135deg, #0f172a 0%, #1e40af 50%, #3b82f6 100%);
    --gradient-medical: linear-gradient(145deg, #ffffff, #f8fafc);
    --gradient-trust: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
}

/* =============================================================================
   GLOBAL OPTIMIZATIONS & PERFORMANCE FIXES
============================================================================= */

/* Enhanced font loading performance */
@font-face {
    font-family: 'Inter';
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiA.woff2') format('woff2');
}

@font-face {
    font-family: 'Playfair Display';
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/playfairdisplay/v30/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDXbtXK-F2qO0isEw.woff2') format('woff2');
}

/* Global performance optimizations */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* iOS zoom prevention for forms */
input, select, textarea {
    font-size: 16px !important;
}

/* =============================================================================
   ENHANCED MOBILE MENU SYSTEM - ALL BREAKPOINTS
============================================================================= */

/* Mobile Menu Button - Enhanced for all devices */
#mobile-menu-button {
    position: relative;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    padding: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

#mobile-menu-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#mobile-menu-button:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile Menu Container - Enhanced */
#mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
}

#mobile-menu.max-h-screen {
    max-height: 100vh;
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Menu Links - Enhanced */
.nav-link-mobile {
    display: block;
    position: relative;
    padding: 1rem 1.5rem;
    color: white;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.75rem;
    margin: 0.25rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.nav-link-mobile::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.2), transparent);
    transition: left 0.6s ease;
}

.nav-link-mobile:hover::before,
.nav-link-mobile:focus::before {
    left: 100%;
}

.nav-link-mobile:hover,
.nav-link-mobile:focus {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateX(5px);
    color: #fbbf24;
}

.nav-link-mobile:active {
    transform: translateX(5px) scale(0.98);
    background: rgba(245, 158, 11, 0.25);
}

/* =============================================================================
   OPTIMIZED MOBILE HEADER SYSTEM - ALL DEVICES
============================================================================= */

/* Global header optimizations */
header {
    will-change: transform, background-color;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    contain: layout style paint;
}

/* Mobile header optimizations */
@media screen and (max-width: 1023px) {
    header {
        position: fixed !important;
        top: 0 !important;
        z-index: 9999 !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    /* Ensure main content has proper spacing */
    main {
        padding-top: 4rem;
    }
    
    /* Enhanced mobile menu */
    #mobile-menu {
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    /* Mobile menu button enhanced visibility */
    #mobile-menu-button {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Enhanced touch targets for mobile menu items */
    .nav-link-mobile {
        min-height: 44px;
        display: flex;
        align-items: center;
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
}

/* =============================================================================
   COMPREHENSIVE BREAKPOINT SYSTEM - OPTIMIZED
============================================================================= */

/* Ultra Small Mobile - 320px-374px (iPhone SE 1st gen, small Android) */
@media screen and (max-width: 374px) {
    :root {
        --container-padding: 1rem;
        --text-scale: 0.875;
        --spacing-scale: 0.75;
    }
    
    .container {
        padding-left: var(--container-padding) !important;
        padding-right: var(--container-padding) !important;
        max-width: 100% !important;
    }
    
    /* Header specific optimizations */
    header {
        top: 0px !important;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    header .h-20, header .h-16, header .h-18 {
        height: 3.25rem !important;
    }
    
    header #company-name {
        font-size: 0.875rem !important;
        font-weight: 600 !important;
        line-height: 1.1 !important;
    }
    
    header #company-tagline {
        font-size: 0.625rem !important;
        margin-top: 0.125rem;
    }
    
    /* Enhanced mobile menu for small screens */
    #mobile-menu {
        max-height: calc(100vh - 3.25rem);
        padding: 1rem;
    }
    
    .nav-link-mobile {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
        margin: 0.25rem 0;
        border-radius: 0.625rem;
    }
    
    /* Mobile menu button optimization */
    #mobile-menu-button {
        padding: 0.625rem;
        min-width: 40px;
        min-height: 40px;
    }
    
    #mobile-menu-button svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    /* Typography optimizations */
    .text-6xl, .text-5xl { font-size: 2rem !important; line-height: 1.1 !important; }
    .text-4xl { font-size: 1.75rem !important; line-height: 1.1 !important; }
    .text-3xl { font-size: 1.5rem !important; line-height: 1.2 !important; }
    .text-2xl { font-size: 1.25rem !important; line-height: 1.3 !important; }
    .text-xl { font-size: 1.125rem !important; line-height: 1.4 !important; }
    .text-lg { font-size: 1rem !important; line-height: 1.5 !important; }
    
    /* Button optimizations */
    .btn, button, [role="button"] {
        font-size: 0.875rem !important;
        padding: 0.75rem 1.5rem !important;
        min-height: 44px !important;
        border-radius: 0.75rem !important;
    }
    
    /* Form optimizations */
    .iframe-container {
        min-height: 90vh !important;
        height: 90vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .iframe-container iframe {
        min-height: 90vh !important;
        height: 90vh !important;
    }
    
    /* Grid optimizations */
    .grid.md\\:grid-cols-2, .grid.md\\:grid-cols-3, .grid.lg\\:grid-cols-2, .grid.lg\\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
        gap: 1rem !important;
    }
}

/* Small Mobile - 375px-413px (Most iPhones, Pixel) */
@media screen and (min-width: 375px) and (max-width: 413px) {
    :root {
        --container-padding: 1.25rem;
        --text-scale: 0.9375;
        --spacing-scale: 0.875;
    }
    
    .container {
        padding-left: var(--container-padding) !important;
        padding-right: var(--container-padding) !important;
    }
    
    /* Header optimizations */
    header {
        top: 0px !important;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    header .h-20, header .h-16, header .h-18 {
        height: 3.5rem !important;
    }
    
    header #company-name {
        font-size: 0.9375rem !important;
        font-weight: 600 !important;
        line-height: 1.1 !important;
    }
    
    header #company-tagline {
        font-size: 0.6875rem !important;
        margin-top: 0.1875rem;
    }
    
    /* Enhanced mobile menu */
    #mobile-menu {
        max-height: calc(100vh - 3.5rem);
        padding: 1.25rem;
    }
    
    .nav-link-mobile {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
        margin: 0.375rem 0;
    }
    
    /* Mobile menu button */
    #mobile-menu-button {
        padding: 0.75rem;
        min-width: 42px;
        min-height: 42px;
    }
    
    #mobile-menu-button svg {
        width: 1.375rem;
        height: 1.375rem;
    }
    
    /* Enhanced typography scaling */
    .text-6xl, .text-5xl { font-size: clamp(2.25rem, 6vw, 2.75rem) !important; }
    .text-4xl { font-size: clamp(1.875rem, 5vw, 2.25rem) !important; }
    .text-3xl { font-size: clamp(1.5rem, 4vw, 1.875rem) !important; }
    .text-2xl { font-size: clamp(1.25rem, 3.5vw, 1.5rem) !important; }
    .text-xl { font-size: clamp(1.125rem, 3vw, 1.375rem) !important; }
    .text-lg { font-size: clamp(1rem, 2.5vw, 1.25rem) !important; }
    
    /* Form optimizations */
    .iframe-container {
        min-height: 85vh !important;
        height: auto !important;
        overflow-y: auto !important;
    }
    
    .iframe-container iframe {
        min-height: 85vh !important;
        height: auto !important;
    }
    
    /* Grid optimizations */
    .grid.md\\:grid-cols-2 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
        gap: 1.5rem !important;
    }
    
    .grid.md\\:grid-cols-3, .grid.lg\\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
        gap: 1.25rem !important;
    }
}

/* Large Mobile - 414px-767px (iPhone Plus, Pro Max, large Android) */
@media screen and (min-width: 414px) and (max-width: 767px) {
    :root {
        --container-padding: 1.5rem;
        --text-scale: 1;
        --spacing-scale: 1;
    }
    
    .container {
        padding-left: var(--container-padding) !important;
        padding-right: var(--container-padding) !important;
    }
    
    /* Header optimizations */
    header {
        top: 0px !important;
        padding-top: 0.625rem;
        padding-bottom: 0.625rem;
    }
    
    header .h-20, header .h-16, header .h-18 {
        height: 3.75rem !important;
    }
    
    header #company-name {
        font-size: 1rem !important;
        font-weight: 600 !important;
        line-height: 1.1 !important;
    }
    
    header #company-tagline {
        font-size: 0.75rem !important;
        margin-top: 0.1875rem;
    }
    
    /* Enhanced mobile menu for large phones */
    #mobile-menu {
        max-height: calc(100vh - 3.75rem);
        padding: 1.5rem;
        border-radius: 0 0 1rem 1rem;
    }
    
    .nav-link-mobile {
        padding: 1.125rem 1.5rem;
        font-size: 1rem;
        margin: 0.5rem 0;
        border-radius: 0.875rem;
    }
    
    /* Mobile menu button large screen */
    #mobile-menu-button {
        padding: 0.875rem;
        min-width: 44px;
        min-height: 44px;
    }
    
    #mobile-menu-button svg {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    /* Optimized typography */
    .text-6xl, .text-5xl { font-size: clamp(2.5rem, 7vw, 3.25rem) !important; }
    .text-4xl { font-size: clamp(2rem, 6vw, 2.75rem) !important; }
    .text-3xl { font-size: clamp(1.625rem, 5vw, 2.125rem) !important; }
    .text-2xl { font-size: clamp(1.375rem, 4vw, 1.75rem) !important; }
    .text-xl { font-size: clamp(1.25rem, 3.5vw, 1.5rem) !important; }
    .text-lg { font-size: clamp(1.125rem, 3vw, 1.375rem) !important; }
    
    /* Enhanced form experience */
    .iframe-container {
        min-height: 80vh !important;
        height: auto !important;
        overflow-y: auto !important;
        border-radius: 1rem !important;
    }
    
    .iframe-container iframe {
        min-height: 80vh !important;
        height: auto !important;
        border-radius: 1rem !important;
    }
    
    /* Grid optimizations for larger mobile */
    .grid.md\\:grid-cols-2 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
        gap: 2rem !important;
    }
    
    .grid.md\\:grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1.5rem !important;
    }
}

/* =============================================================================
   LANDSCAPE ORIENTATION OPTIMIZATIONS
============================================================================= */

@media screen and (max-width: 1023px) and (orientation: landscape) {
    /* Header height optimization for landscape */
    header {
        top: 0 !important;
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
    }
    
    header .h-20, header .h-16, header .h-18 {
        height: 3rem !important;
    }
    
    header #company-name {
        font-size: 0.875rem !important;
    }
    
    header #company-tagline {
        font-size: 0.625rem !important;
    }
    
    /* Main content adjustments */
    main {
        padding-top: 3rem !important;
    }
    
    /* Mobile menu landscape optimization */
    #mobile-menu {
        max-height: calc(100vh - 3rem);
        padding: 1rem;
    }
    
    .nav-link-mobile {
        padding: 0.75rem 1.25rem;
        margin: 0.25rem 0;
        font-size: 0.9rem;
    }
    
    /* Form optimizations for landscape */
    .iframe-container {
        min-height: 75vh !important;
        height: 75vh !important;
        overflow-y: auto !important;
    }
    
    .iframe-container iframe {
        min-height: 75vh !important;
        height: 75vh !important;
    }
    
    /* Section padding optimization */
    .pt-24 { padding-top: 2rem !important; }
    .pb-16 { padding-bottom: 2rem !important; }
    .py-16, .py-20, .py-24 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
}

/* =============================================================================
   TABLET OPTIMIZATIONS - 768px-1023px
============================================================================= */

@media screen and (min-width: 768px) and (max-width: 1023px) {
    :root {
        --container-padding: 2rem;
        --text-scale: 1.125;
        --spacing-scale: 1.125;
    }
    
    .container {
        padding-left: var(--container-padding) !important;
        padding-right: var(--container-padding) !important;
    }
    
    /* Header optimizations for tablets */
    header {
        top: 0 !important;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    header .h-20, header .h-16, header .h-18 {
        height: 4rem !important;
    }
    
    header #company-name {
        font-size: 1.125rem !important;
        font-weight: 600 !important;
    }
    
    header #company-tagline {
        font-size: 0.8125rem !important;
        margin-top: 0.1875rem;
    }
    
    /* Enhanced mobile menu for tablets */
    #mobile-menu {
        max-height: calc(100vh - 4rem);
        padding: 2rem;
        border-radius: 0 0 1.5rem 1.5rem;
    }
    
    .nav-link-mobile {
        padding: 1.25rem 2rem;
        font-size: 1.125rem;
        margin: 0.625rem 0;
        border-radius: 1rem;
    }
    
    /* Mobile menu button tablet */
    #mobile-menu-button {
        padding: 1rem;
        min-width: 48px;
        min-height: 48px;
    }
    
    #mobile-menu-button svg {
        width: 1.625rem;
        height: 1.625rem;
    }
    
    /* Typography scaling for tablets */
    .text-6xl, .text-5xl { font-size: clamp(3rem, 8vw, 4rem) !important; }
    .text-4xl { font-size: clamp(2.5rem, 6vw, 3.25rem) !important; }
    .text-3xl { font-size: clamp(2rem, 5vw, 2.75rem) !important; }
    .text-2xl { font-size: clamp(1.75rem, 4vw, 2.25rem) !important; }
    .text-xl { font-size: clamp(1.5rem, 3.5vw, 1.875rem) !important; }
    .text-lg { font-size: clamp(1.375rem, 3vw, 1.625rem) !important; }
    
    /* Form optimizations for tablets */
    .iframe-container {
        min-height: 85vh !important;
        height: auto !important;
        overflow-y: auto !important;
        border-radius: 1.25rem !important;
    }
    
    .iframe-container iframe {
        min-height: 85vh !important;
        height: auto !important;
        border-radius: 1.25rem !important;
    }
    
    /* Grid optimizations for tablets */
    .grid.lg\\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 2.5rem !important;
    }
    
    .grid.md\\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 2rem !important;
    }
    
    /* Enhanced hover effects for tablets */
    .card-modern, .card-professional, .benefit-item {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .card-modern:hover, .card-professional:hover, .benefit-item:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    }
}

/* =============================================================================
   ENHANCED MOBILE MENU ANIMATIONS AND INTERACTIONS
============================================================================= */

/* Touch feedback for mobile menu items */
@media (hover: none) and (pointer: coarse) {
    .nav-link-mobile:active {
        background: rgba(245, 158, 11, 0.3) !important;
        transform: scale(0.98) !important;
        transition: all 0.1s ease !important;
    }
    
    #mobile-menu-button:active {
        transform: scale(0.9) !important;
        background: rgba(255, 255, 255, 0.4) !important;
    }
    
    /* Enhanced touch targets */
    .nav-link-mobile {
        min-height: 48px !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    #mobile-menu-button {
        min-width: 44px !important;
        min-height: 44px !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    #mobile-menu {
        transition: none !important;
    }
    
    .nav-link-mobile {
        transition: none !important;
    }
    
    .nav-link-mobile::before {
        display: none !important;
    }
    
    #mobile-menu-button {
        transition: none !important;
    }
}

/* Focus states for keyboard navigation */
#mobile-menu-button:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

.nav-link-mobile:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    background: rgba(245, 158, 11, 0.15);
}

/* =============================================================================
   FORM CONTAINER OPTIMIZATIONS FOR ALL MOBILE BREAKPOINTS
============================================================================= */

.form-container, .application-form-container, .bg-white.p-6.rounded-2xl.shadow-lg {
    position: relative;
    width: 100%;
    min-height: 80vh;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.iframe-container {
    position: relative;
    width: 100%;
    min-height: 80vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(16, 29, 66, 0.08);
    border: 2px solid rgba(59, 130, 246, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.iframe-container::before {
    content: 'Loading secure form...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #64748b;
    font-weight: 500;
    z-index: 1;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
    min-height: 994px;
}

.iframe-container.loaded iframe {
    opacity: 1;
}

.iframe-container.loaded::before {
    display: none;
}

/* Loading spinner enhancement */
.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #1e40af;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================================================
   UNIVERSAL MOBILE TOUCH OPTIMIZATIONS
============================================================================= */

/* Optimize all interactive elements for touch */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects that don't work on touch */
    .card-modern:hover, .card-professional:hover, .benefit-item:hover, 
    .nav-link:hover, .btn:hover, button:hover {
        transform: none !important;
        box-shadow: inherit !important;
        background: inherit !important;
    }
    
    /* Add touch feedback */
    .card-modern:active, .card-professional:active, .benefit-item:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
    
    .btn:active, button:active {
        transform: scale(0.95) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* Ensure all interactive elements have proper touch targets */
    .btn, button, a, [role="button"], .nav-link, .nav-link-mobile {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Special handling for mobile menu items */
    .nav-link-mobile {
        padding: 1rem 1.5rem;
        margin: 0.5rem 0;
        border-radius: 0.75rem;
    }
}

/* =============================================================================
   REDUCED MOTION ACCESSIBILITY
============================================================================= */

@media (prefers-reduced-motion: reduce) {
    /* Disable animations for users who prefer reduced motion */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in-up, .is-visible, .particle {
        opacity: 1 !important;
        transform: none !important;
    }
    
    #mobile-menu {
        transition: none !important;
    }
    
    .loading-spinner {
        animation: none !important;
        border-top-color: #1e40af !important;
    }
}

/* =============================================================================
   HIGH DPI DISPLAY OPTIMIZATIONS
============================================================================= */

/* Focus indicators for high contrast */
*:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

/* High DPI optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Crisp borders and shadows on high DPI displays */
    .card-modern, .card-professional, .iframe-container, .form-container {
        border-width: 1px;
    }
    
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Enhance text rendering on high DPI */
    .gradient-text {
        -webkit-text-stroke: 0.5px transparent;
        background-size: 100% 100%;
        background-clip: text;
        -webkit-background-clip: text;
    }
}

/* =============================================================================
   PRINT STYLES
============================================================================= */

@media print {
    /* Hide mobile menu and interactive elements when printing */
    header, footer, .loading-spinner, .iframe-container, .btn, button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt !important;
        line-height: 1.4 !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
    
    .pt-24, .pb-16, .py-16, .py-20, .py-24 {
        padding: 1rem 0 !important;
    }
    
    .card-modern, .card-professional {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }
}

/* =============================================================================
   PERFORMANCE OPTIMIZATIONS
============================================================================= */

/* Layer promotion for smooth animations */
.card-modern, .card-professional, .benefit-item, .iframe-container {
    will-change: transform, opacity;
}

.loading-spinner, .fade-in-up, header {
    will-change: transform;
}

/* Smooth scrolling improvements */
.fade-in-up.is-visible {
    will-change: auto;
}

/* =============================================================================
   UTILITY CLASSES FOR RESPONSIVE DESIGN
============================================================================= */

/* Responsive section padding */
.section-padding-sm { padding: 3rem 0; }
.section-padding-md { padding: 5rem 0; }
.section-padding-lg { padding: 7rem 0; }
.section-padding-xl { padding: 9rem 0; }

/* Color utilities using CSS variables */
.text-medical-navy { color: var(--medical-navy); }
.text-medical-blue { color: var(--medical-blue); }
.text-trust-green { color: var(--trust-green); }
.text-premium-gold { color: var(--premium-gold); }
.text-professional-gray { color: var(--professional-gray); }
.text-subtle-gray { color: var(--subtle-gray); }

/* Background utilities */
.bg-medical-navy { background-color: var(--medical-navy); }
.bg-medical-blue { background-color: var(--medical-blue); }
.bg-trust-green { background-color: var(--trust-green); }
.bg-premium-gold { background-color: var(--premium-gold); }
.bg-light-medical { background-color: var(--light-medical); }

/* Shadow utilities */
.shadow-professional { box-shadow: var(--shadow-professional); }
.shadow-elegant { box-shadow: var(--shadow-elegant); }
.shadow-elevated { box-shadow: var(--shadow-elevated); }
.shadow-trust { box-shadow: var(--shadow-trust); }

/* Gradient utilities */
.gradient-professional { background: var(--gradient-professional); }
.gradient-medical { background: var(--gradient-medical); }
.gradient-trust { background: var(--gradient-trust); }

/* Font utilities */
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

/* Universal serif font application - all elements except H1 */
h2, h3, h4, h5, h6, p, span, div, a, button, input, textarea, label, li, td, th {
    font-family: 'Source Serif 4', serif !important;
    font-optical-sizing: auto;
    letter-spacing: 0.005em;
}

/* Keep H1 tags with display font */
h1 {
    font-family: 'Playfair Display', serif !important;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

/* Enhanced serif typography with improved readability */
body {
    font-family: 'Source Serif 4', serif;
    font-optical-sizing: auto;
    letter-spacing: 0.012em;
    line-height: 1.8;
}

/* Improved paragraph spacing */
p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    letter-spacing: 0.012em;
}

/* Better text readability on desktop */
@media (min-width: 1024px) {
    body {
        line-height: 1.85;
        letter-spacing: 0.015em;
    }
    
    p {
        line-height: 1.85;
        letter-spacing: 0.015em;
        margin-bottom: 1.75rem;
    }
    
    .text-xl {
        line-height: 1.7 !important;
        letter-spacing: 0.01em !important;
    }
    
    .text-2xl {
        line-height: 1.6 !important;
        letter-spacing: 0.008em !important;
    }
}

/* =============================================================================
   FLOATING ANIMATION FOR APPLY SECTION BACKDROP
============================================================================= */

/* Floating animation keyframes */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
        opacity: 0.9;
    }
    66% {
        transform: translateY(-60px) rotate(240deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.7;
    }
}

/* Float animation class */
.animate-float {
    animation: float 15s ease-in-out infinite;
    will-change: transform, opacity;
    transform-origin: center;
}

/* Enhanced animation performance with staggered delays */
@media (prefers-reduced-motion: no-preference) {
    .animate-float:nth-child(1) {
        animation-duration: 20s;
        animation-delay: 0s;
    }
    
    .animate-float:nth-child(2) {
        animation-duration: 25s;
        animation-delay: -5s;
    }
    
    .animate-float:nth-child(3) {
        animation-duration: 18s;
        animation-delay: -10s;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .animate-float {
        animation: none;
        opacity: 0.3;
    }
    
    .animate-pulse {
        animation: none;
        opacity: 1;
    }
}

/* Glass effect enhancement for apply section */
.glass-effect {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.glass-effect:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

/* Apply section specific optimizations */
#apply {
    position: relative;
    isolation: isolate;
}

#apply .absolute {
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Performance optimizations for background animations */
#apply .animate-float {
    backface-visibility: hidden;
    transform-style: flat;
    will-change: transform, opacity;
}

/* =============================================================================
   NAVIGATION ACTIVE STATE STYLING
============================================================================= */

/* Active navigation link styling */
.nav-link.active {
    color: #f59e0b !important; /* premium-gold */
    font-weight: 600 !important;
}

.nav-link.active .nav-indicator {
    width: 100% !important;
    background-color: #f59e0b !important; /* premium-gold */
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4) !important;
}

/* Mobile navigation active state */
.mobile-nav-link.active {
    color: #f59e0b !important; /* premium-gold */
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    font-weight: 600 !important;
}

/* Enhanced active state animations */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
    background-size: 200% 100%;
    animation: goldShimmer 2s ease-in-out infinite;
}

@keyframes goldShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Click effect for navigation links */
.nav-link:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.mobile-nav-link:active {
    transform: scale(0.98);
    background: rgba(245, 158, 11, 0.2) !important;
    transition: all 0.1s ease;
}

/* =============================================================================
   DROPDOWN NAVIGATION MENU STYLING
============================================================================= */

/* Dropdown toggle button */
.nav-dropdown-toggle {
    color: #374151 !important; /* gray-700 - always maintain this color */
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

.nav-dropdown-toggle:hover {
    color: #f59e0b !important; /* premium-gold */
}

/* Dropdown menu container */
.nav-dropdown-menu {
    position: fixed;
    top: 5rem; /* Fixed position below header */
    left: 50%;
    transform: translateX(-50%) translateY(0.5rem);
    width: 18rem; /* w-72 */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    overflow: hidden;
    max-height: 600px;
    overflow-y: auto;
}

/* Show dropdown on hover */
.group:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Dropdown menu links */
.nav-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151 !important; /* gray-700 - maintain this color */
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    margin: 0 0.5rem;
}

.nav-dropdown-link:hover {
    color: #f59e0b !important; /* premium-gold */
    background: rgba(245, 158, 11, 0.05) !important;
    transform: translateX(4px);
}

.nav-dropdown-link:active {
    transform: translateX(4px) scale(0.98);
}

/* Special styling for Apply link in dropdown */
.nav-dropdown-link.text-premium-gold {
    color: #f59e0b !important;
    font-weight: 600;
}

.nav-dropdown-link.text-premium-gold:hover {
    color: #fbbf24 !important; /* gold-accent */
    background: rgba(245, 158, 11, 0.1) !important;
}

/* Dropdown arrow animation */
.group:hover .nav-dropdown-toggle svg {
    transform: rotate(180deg);
}

/* Ensure consistent colors across all states */
.nav-dropdown-toggle,
.nav-dropdown-link {
    color: #374151 !important; /* gray-700 */
}

.nav-dropdown-toggle:hover,
.nav-dropdown-link:hover {
    color: #f59e0b !important; /* premium-gold */
}

/* Active dropdown link styling */
.nav-dropdown-link.active {
    color: #f59e0b !important; /* premium-gold */
    background: rgba(245, 158, 11, 0.1) !important;
    font-weight: 600 !important;
    transform: translateX(4px);
}

.nav-dropdown-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #f59e0b, #fbbf24);
    border-radius: 0 2px 2px 0;
}

/* Mobile dropdown styling */
@media (max-width: 1023px) {
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        width: 100%;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: transparent;
        padding: 0;
        margin: 0;
    }
    
    .nav-dropdown-link {
        margin: 0;
        border-radius: 0.75rem;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* =============================================================================
   HEADER Z-INDEX FIX FOR DROPDOWN AND CONTENT OVERLAP
============================================================================= */

/* Ensure header appears above content but below dropdown */
header {
    z-index: 8000 !important;
}

/* Ensure dropdown button group has proper stacking context */
.group {
    position: relative;
    z-index: 8001;
}

/* Force dropdown to appear on top of everything */
.nav-dropdown-menu {
    position: fixed !important;
    z-index: 9999 !important;
}

/* Ensure main content doesn't overlap header */
main {
    position: relative;
    z-index: 1;
}

/* Ensure all sections have proper spacing from header */
section {
    position: relative;
    z-index: 2;
}

/* Hero section specific fixes */
#home {
    z-index: 2 !important;
    position: relative;
}

/* =============================================================================
   ENHANCED MOBILE MENU STYLING
============================================================================= */

/* Mobile menu improvements */
.mobile-menu {
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
}

/* Enhanced mobile nav links */
.mobile-nav-link {
    transform: translateX(-20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateX(4px) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.mobile-nav-link.active {
    background: rgba(245, 158, 11, 0.2) !important;
    border-left: 4px solid #f59e0b;
    color: #f59e0b !important;
}

/* Mobile menu gradient icons */
.mobile-nav-link .w-10 {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.mobile-nav-link:hover .w-10 {
    transform: scale(1.1);
}

/* Enhanced mobile menu buttons */
.mobile-menu .btn-modern {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-menu .btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.mobile-menu .btn-modern:hover::before {
    left: 100%;
}

/* Contact info card styling */
.mobile-menu .bg-white\/10 {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mobile-menu .bg-white\/10:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.3);
}

/* Responsive header text colors for smaller screens */
@media (max-width: 1023px) {
    .text-medical-navy.lg\\:text-medical-navy {
        color: white !important;
    }
    
    .text-gray-600.lg\\:text-gray-600 {
        color: #d1d5db !important; /* gray-300 */
    }
}

/* Mobile menu animation performance */
.mobile-menu * {
    will-change: transform, opacity;
}

/* =============================================================================
   ENHANCED TEXT SPACING AND READABILITY IMPROVEMENTS
============================================================================= */

/* Better spacing for all text elements */
h2, h3, h4, h5, h6, p, span, div, a, button, input, textarea, label, li, td, th {
    line-height: 1.75;
    letter-spacing: 0.01em;
}

/* Section-specific improvements */
.text-center.max-w-4xl p,
.text-center.max-w-5xl p {
    line-height: 1.8;
    letter-spacing: 0.012em;
    margin-bottom: 1.5rem;
}

/* Card content improvements */
.card-modern p,
.card-professional p {
    line-height: 1.75;
    letter-spacing: 0.01em;
    margin-bottom: 1.25rem;
}

/* List items spacing */
li {
    line-height: 1.7;
    letter-spacing: 0.008em;
    margin-bottom: 0.75rem;
}

/* Testimonial text improvements */
.card-professional .text-gray-700 {
    line-height: 1.8;
    letter-spacing: 0.01em;
}

/* Button text improvements */
button, .btn-modern, .btn-professional {
    letter-spacing: 0.025em;
}

/* Enhanced desktop readability */
@media (min-width: 1024px) {
    /* Larger text elements need more space */
    .text-3xl, .text-4xl, .text-5xl {
        line-height: 1.3;
        letter-spacing: -0.005em;
        margin-bottom: 2rem;
    }
    
    /* Section descriptions */
    .text-center.max-w-4xl p,
    .text-center.max-w-5xl p {
        line-height: 1.85;
        letter-spacing: 0.015em;
        margin-bottom: 2rem;
        font-size: 1.1em;
    }
    
    /* Card content for better readability */
    .card-modern p,
    .card-professional p {
        line-height: 1.8;
        letter-spacing: 0.012em;
        margin-bottom: 1.5rem;
        font-size: 1.05em;
    }
    
    /* List spacing improvements */
    ul li, ol li {
        line-height: 1.75;
        margin-bottom: 1rem;
        letter-spacing: 0.01em;
    }
}

/* =============================================================================
   PREMIUM GOLD BUTTON ANIMATIONS
============================================================================= */

/* Enhanced gold button styling */
.btn-professional.bg-gradient-to-r {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.btn-professional.bg-gradient-to-r:hover {
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.5);
    transform: translateY(-3px) scale(1.05);
}

/* Gold shimmer effect */
.btn-professional.bg-gradient-to-r::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent
    );
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.btn-professional.bg-gradient-to-r:hover::before {
    left: 100%;
}

/* Pulsing gold glow */
@keyframes goldPulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 15px 40px rgba(245, 158, 11, 0.6);
    }
}

.btn-professional.bg-gradient-to-r:hover {
    animation: goldPulse 2s ease-in-out infinite;
}

/* Icon rotation enhancement */
.btn-professional svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-professional:hover svg {
    transform: rotate(12deg) scale(1.1);
}

/* =============================================================================
   END OF ENHANCED MOBILE STYLES
============================================================================= */ 