/* Custom styles for Universal Document Converter */

:root {
    /* Modern Brand Color Palette */
    --brand-primary: #1e40af;        /* Deep modern blue - WCAG AA compliant (7.8:1 contrast with white) */
    --brand-secondary: #06b6d4;      /* Cyan accent */
    --brand-accent: #8b5cf6;         /* Purple accent */
    
    /* Semantic Colors */
    --success: #10b981;              /* Green */
    --warning: #f59e0b;              /* Amber */
    --danger: #ef4444;               /* Red */
    --info: var(--brand-secondary);
    
    /* Neutral Palette */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Surface Colors */
    --surface-white: #ffffff;
    --surface-light: var(--gray-50);
    --surface-dark: var(--gray-900);
    
    /* Text Colors - WCAG AA compliant contrast ratios */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-700);  /* Improved from gray-600 for better contrast (4.5:1+) */
    --text-muted: var(--gray-600);      /* Moved gray-600 to muted text only */
    
    /* Border & Shadow */
    --border-light: var(--gray-200);
    --border-medium: var(--gray-300);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing System (8px base) */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.25rem;  /* 20px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    --space-10: 2.5rem;  /* 40px */
    --space-12: 3rem;    /* 48px */
    --space-16: 4rem;    /* 64px */
    --space-20: 5rem;    /* 80px */
    
    /* Border Radius */
    --radius-sm: 0.375rem;  /* 6px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
}

/* Modern Typography System */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: white;
    font-size: 16px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.875rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
h5 { font-size: clamp(1rem, 2vw, 1.25rem); }
h6 { font-size: clamp(0.875rem, 1.5vw, 1.125rem); }

p {
    margin-bottom: var(--space-4);
    line-height: 1.6;
    color: var(--text-secondary);
}

.text-large {
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
    line-height: 1.6;
}

.text-small {
    font-size: clamp(0.875rem, 1.5vw, 0.9375rem);
    line-height: 1.5;
}

/* Utility Classes */
.mb-6 { margin-bottom: var(--space-6) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.gap-3 { gap: var(--space-3) !important; }
.gap-4 { gap: var(--space-4) !important; }

/* Text Color Utilities */
.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--gray-700) !important;
    font-weight: 400;
}

.text-primary {
    color: var(--brand-primary) !important;
}

/* Background Utilities */
.bg-light {
    background-color: white !important;
}

/* Mobile-First Base Styles */
* {
    box-sizing: border-box;
}

/* Improved tap targets */
a, button, .btn, .nav-link, .dropdown-item {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/* Focus states for accessibility */
a:focus,
button:focus,
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Improved readability */
body {
    line-height: 1.6;
    color: var(--text-primary);
    font-size: 16px;
}

/* Modern Hero Section with Blue Gradient */
.hero-section {
    background: linear-gradient(135deg, #4f7bf7 0%, #2563eb 50%, #1d4ed8 100%);
    color: white !important;
    padding: var(--space-16) 0;
    margin: 0;
    text-align: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

.hero-section * {
    position: relative;
    z-index: 1;
}

.hero-section h1,
.hero-section .display-4 {
    color: white !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-section p {
    color: white !important;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    opacity: 0.95 !important;
}

.hero-section .btn {
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    font-weight: 700;
    font-size: clamp(1.125rem, 3vw, 1.25rem);
    min-height: 56px;
    padding: var(--space-5) var(--space-10);
}

/* Modern Card System */
.card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--surface-white);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.card-body {
    padding: var(--space-6);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.card-text {
    color: var(--text-secondary) !important;
    line-height: 1.6;
    font-weight: 400;
}

/* Updated Icon System */
.feature-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}

.step-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}

/* File preview */
#filePreview {
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
}

/* Navbar customization */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Modern Button System */
.btn {
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    padding: var(--space-4) var(--space-8);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 48px; /* Mobile touch target */
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

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

/* Primary Button */
.btn-primary {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
    font-weight: 700;
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: white;
    box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

/* Secondary Button */
.btn-secondary {
    background: var(--surface-white);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

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

/* Success Button */
.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
    color: white;
    box-shadow: var(--shadow-md);
}

/* Large Button */
.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
    min-height: 48px;
    border-radius: var(--radius-lg);
}

/* Small Button */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
    min-height: 36px;
    border-radius: var(--radius-sm);
}

/* Cards */
.card-header {
    background: white;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.card-header h4,
.card-header h5 {
    color: var(--text-primary);
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
}

/* Modern Form Controls */
.form-control,
.form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    padding: var(--space-3) var(--space-4);
    min-height: 44px; /* Mobile touch target */
    background: var(--surface-white);
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

/* List groups */
.list-group-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Supported formats section */
.supported-formats {
    background: white;
    padding: 3rem 2rem;
    border-radius: 15px;
}

.supported-formats h3 {
    color: var(--brand-primary);
}

/* Footer */
footer {
    background: white !important;
    border-top: 1px solid var(--border-light);
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Fluid Grid System */
.fluid-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

.fluid-grid {
    display: grid;
    gap: clamp(1rem, 3vw, 2rem);
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.fluid-grid-2 {
    display: grid;
    gap: clamp(1rem, 3vw, 2rem);
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.fluid-grid-3 {
    display: grid;
    gap: clamp(1rem, 2.5vw, 1.5rem);
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.fluid-grid-4 {
    display: grid;
    gap: clamp(0.75rem, 2vw, 1.25rem);
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
}

/* Flexible flex layouts */
.flex-fluid {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1rem, 3vw, 2rem);
}

.flex-fluid > * {
    flex: 1 1 clamp(280px, 30%, 400px);
}

/* Responsive typography with fluid scaling */
.fluid-text-xl {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
}

.fluid-text-lg {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    line-height: 1.3;
}

.fluid-text-md {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.5;
}

/* Fluid spacing system */
.fluid-spacing-xs { margin: clamp(0.5rem, 2vw, 1rem); }
.fluid-spacing-sm { margin: clamp(1rem, 3vw, 1.5rem); }
.fluid-spacing-md { margin: clamp(1.5rem, 4vw, 2.5rem); }
.fluid-spacing-lg { margin: clamp(2rem, 5vw, 4rem); }
.fluid-spacing-xl { margin: clamp(3rem, 6vw, 6rem); }

.fluid-padding-xs { padding: clamp(0.5rem, 2vw, 1rem); }
.fluid-padding-sm { padding: clamp(1rem, 3vw, 1.5rem); }
.fluid-padding-md { padding: clamp(1.5rem, 4vw, 2.5rem); }
.fluid-padding-lg { padding: clamp(2rem, 5vw, 4rem); }
.fluid-padding-xl { padding: clamp(3rem, 6vw, 6rem); }

/* Container queries for advanced responsive behavior */
.card-fluid {
    container-type: inline-size;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: clamp(8px, 1vw, 12px);
}

@container (min-width: 300px) {
    .card-fluid .card-body {
        padding: clamp(1rem, 3vw, 1.5rem);
    }
}

@container (min-width: 400px) {
    .card-fluid .card-title {
        font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    }
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
    /* Navigation optimized for mobile */
    .navbar {
        padding: var(--space-2) 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .nav-link {
        padding: var(--space-4) var(--space-3) !important;
        font-size: 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .dropdown-menu {
        width: 100%;
        border: none;
        box-shadow: none;
        padding: 0;
    }
    
    .dropdown-item {
        padding: var(--space-4) var(--space-6) !important;
        min-height: 48px;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-light);
    }
    
    /* Hero section mobile optimization */
    .hero-section {
        padding: var(--space-12) var(--space-4);
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        line-height: 1.2;
        margin-bottom: var(--space-4);
        color: white !important;
        font-weight: 700;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .hero-section p {
        font-size: clamp(1rem, 4vw, 1.125rem);
        margin-bottom: var(--space-6);
        color: white !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        opacity: 0.95 !important;
    }
    
    /* Mobile-optimized buttons */
    .btn {
        min-height: 52px;
        padding: var(--space-5) var(--space-8);
        font-size: clamp(1.125rem, 3vw, 1.25rem);
        font-weight: 700;
        box-shadow: var(--shadow-md);
    }
    
    .btn-lg {
        min-height: 60px;
        padding: var(--space-6) var(--space-10);
        font-size: clamp(1.25rem, 3.5vw, 1.375rem);
        font-weight: 700;
        box-shadow: var(--shadow-lg);
    }
    
    /* Card optimization for mobile */
    .card {
        margin-bottom: var(--space-4);
    }
    
    .card-body {
        padding: var(--space-5);
    }
    
    .card-title {
        font-size: 1.125rem;
        margin-bottom: var(--space-3);
    }
    
    /* Grid optimization */
    .fluid-grid,
    .fluid-grid-2,
    .fluid-grid-3,
    .fluid-grid-4 {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    /* Form controls mobile optimization */
    .form-control,
    .form-select {
        min-height: 48px;
        font-size: 1rem;
        padding: var(--space-4);
    }
    
    /* Touch-friendly spacing */
    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
    
    /* Icon sizing for mobile */
    [data-feather] {
        width: 20px !important;
        height: 20px !important;
    }
    
    /* Mobile-specific layout adjustments */
    .text-center {
        text-align: center !important;
    }
    
    /* Ensure adequate spacing between sections */
    section {
        margin-bottom: var(--space-12) !important;
    }
    
    /* Mobile typography improvements */
    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: var(--space-4);
    }
    
    h3 {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
        margin-bottom: var(--space-3);
    }
    
    p {
        line-height: 1.6;
        margin-bottom: var(--space-4);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .fluid-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fluid-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .fluid-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Dark mode support - forcing white background */
@media (prefers-color-scheme: dark) {
    body {
        background-color: white !important;
        color: var(--text-primary);
    }
    
    .card {
        background-color: white;
        color: var(--text-primary);
    }
    
    .form-control,
    .form-select {
        background-color: white;
        border-color: var(--border-light);
        color: var(--text-primary);
    }
    
    .bg-light {
        background-color: white !important;
        color: var(--text-primary);
    }
    
    .text-muted {
        color: var(--text-secondary) !important;
    }
}

/* Custom utility classes */
.text-gradient {
    background: linear-gradient(45deg, #007bff, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 2px 25px rgba(0,0,0,0.1) !important;
}

.border-radius-lg {
    border-radius: 15px !important;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* Mobile Visibility Enhancements */
@media (max-width: 768px) {
    /* Enhanced text contrast for mobile */
    .hero-section h1 {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        font-weight: 700;
        color: white !important;
    }
    
    .hero-section p {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        font-weight: 500;
        color: white !important;
    }
    
    /* Enhanced card visibility */
    .card {
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        border: 2px solid var(--border-light);
        margin-bottom: var(--space-6);
    }
    
    .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 35px rgba(0,0,0,0.2);
        border-color: var(--brand-primary);
    }
    
    /* Better mobile spacing */
    .container, .fluid-container {
        padding-left: var(--space-6);
        padding-right: var(--space-6);
    }
    
    /* Enhanced button visibility on mobile */
    .btn {
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        font-weight: 700;
    }
    
    .btn:hover {
        box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    }
    
    /* Better text visibility */
    .card-title {
        color: var(--gray-900);
        font-weight: 700;
    }
    
    .card-text {
        color: var(--gray-700);
        font-weight: 500;
        line-height: 1.5;
    }
    
    /* Enhanced feature cards for about page */
    .mission-section .card {
        border: 2px solid var(--border-light);
        background: white;
    }
    
    .mission-section .card:hover {
        border-color: var(--brand-primary);
        background: white;
    }
    
    /* CTA buttons enhancement */
    .cta-section .btn {
        min-height: 56px;
        padding: var(--space-5) var(--space-10);
        font-size: clamp(1.125rem, 3vw, 1.25rem);
        text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
}
/* Additional Button Variants */
.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.3);
    font-weight: 700;
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
    color: white;
    box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    color: white;
    border-color: var(--warning);
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.3);
    font-weight: 700;
}

.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
    color: white;
    box-shadow: 0 6px 20px 0 rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

.btn-info {
    background: var(--info);
    color: white;
    border-color: var(--info);
    box-shadow: 0 4px 14px 0 rgba(6, 182, 212, 0.3);
    font-weight: 700;
}

.btn-info:hover {
    background: #0891b2;
    border-color: #0891b2;
    color: white;
    box-shadow: 0 6px 20px 0 rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.3);
    font-weight: 700;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
    box-shadow: 0 6px 20px 0 rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.btn-dark {
    background: var(--gray-800);
    color: white;
    border-color: var(--gray-800);
    box-shadow: 0 4px 14px 0 rgba(31, 41, 55, 0.3);
    font-weight: 700;
}

.btn-dark:hover {
    background: var(--gray-900);
    border-color: var(--gray-900);
    color: white;
    box-shadow: 0 6px 20px 0 rgba(31, 41, 55, 0.4);
    transform: translateY(-2px);
}

/* Hero Button Styling for Blue Gradient Theme */
.hero-section .btn-primary {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
    font-weight: 700;
}

.hero-section .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important;
}

.hero-section .btn-secondary {
    background: white !important;
    color: var(--brand-primary) !important;
    border: 2px solid white !important;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2) !important;
    font-weight: 700;
}

.hero-section .btn-secondary:hover {
    background: var(--gray-50) !important;
    color: var(--brand-primary) !important;
    border-color: var(--gray-50) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3) !important;
}

/* CTA Section with Blue Gradient Theme */
.cta-section {
    background: linear-gradient(135deg, #4f7bf7 0%, #2563eb 50%, #1d4ed8 100%) !important;
    color: white !important;
    padding: var(--space-16) var(--space-6);
    margin: var(--space-8) 0;
    border-radius: var(--radius-2xl);
    position: relative;
    overflow: hidden;
}

.cta-section h2 {
    color: white !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: var(--space-4);
}

.cta-section p {
    color: white !important;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto var(--space-6) auto;
}

.cta-section .btn-light {
    background: white !important;
    color: var(--brand-primary) !important;
    border: 2px solid white !important;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2) !important;
    font-weight: 700;
}

.cta-section .btn-light:hover {
    background: var(--gray-50) !important;
    color: var(--brand-primary) !important;
    border-color: var(--gray-50) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3) !important;
}

.cta-section .btn-outline-light {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
    font-weight: 700;
}

.cta-section .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important;
}

/* ============================================
   COMPREHENSIVE RESPONSIVE DESIGN SYSTEM
   ============================================ */

/* Make all images responsive by default */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Tables - Horizontal scroll on mobile */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-6);
}

/* Table wrapper for horizontal scrolling */
.table-responsive, 
div:has(> table) {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: var(--space-4);
}

@media (max-width: 768px) {
    .table-responsive, 
    div:has(> table) {
        border: 1px solid var(--border-light);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }
    
    table {
        min-width: 600px;
        font-size: 0.875rem;
    }
    
    table td, table th {
        padding: 0.75rem !important;
        white-space: nowrap;
    }
}

/* Responsive Form Inputs */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    max-width: 100%;
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="date"],
    input[type="time"],
    textarea,
    select {
        min-height: 44px; /* Touch-friendly size */
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    /* Make buttons touch-friendly */
    .btn, button, input[type="submit"], input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Responsive Container Adjustments */
@media (max-width: 768px) {
    .container, .fluid-container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
        max-width: 100%;
    }
    
    /* Reduce spacing on mobile */
    .content-block,
    .card-body,
    section {
        padding: var(--space-4) !important;
    }
    
    /* Stack columns on mobile */
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .col, [class*="col-"] {
        padding-left: var(--space-2);
        padding-right: var(--space-2);
    }
}

/* Responsive Typography Adjustments */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    /* Smaller button text on very small screens */
    .btn {
        font-size: 0.9375rem;
        padding: 0.75rem 1.25rem;
    }
}

/* Responsive Navigation */
@media (max-width: 991px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid var(--border-light);
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 1000;
    }
    
    .navbar-nav {
        padding: var(--space-2) 0;
    }
    
    .nav-link {
        padding: var(--space-3) var(--space-6) !important;
        border-bottom: 1px solid var(--border-light);
    }
    
    /* Dropdown menu adjustments for mobile */
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        padding-left: var(--space-4);
        background: var(--surface-light);
    }
    
    .dropdown-item {
        padding: var(--space-3) var(--space-4);
        font-size: 0.9375rem;
        min-height: 48px !important;
        display: flex;
        align-items: center;
    }
}

/* Responsive Grid Systems */
@media (max-width: 768px) {
    .fluid-grid-2,
    .fluid-grid-3,
    .fluid-grid-4 {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    /* Calculator grid on mobile */
    .calculator-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .fluid-grid-3,
    .fluid-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive File Upload Areas */
@media (max-width: 768px) {
    .upload-area,
    .dropzone {
        padding: var(--space-6) var(--space-4);
        min-height: 200px;
    }
    
    .upload-area h3 {
        font-size: 1.125rem;
    }
}

/* Touch-Friendly Interactive Elements */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .card:hover,
    .btn:hover {
        transform: none;
    }
    
    /* Larger tap targets */
    a, button, .btn, .nav-link, .dropdown-item {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Responsive Utility Classes */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
    
    /* Text alignment on mobile */
    .text-mobile-center {
        text-align: center !important;
    }
    
    /* Full width on mobile */
    .mobile-full-width {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
    
    .show-desktop {
        display: block !important;
    }
}

/* Prevent Horizontal Scrolling */
body {
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* Responsive Embeds (Videos, iframes) */
.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.embed-responsive::before {
    display: block;
    content: "";
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Responsive Text Wrapping */
.text-wrap {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

/* Ensure long URLs and code don't overflow */
pre, code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive Padding Utilities */
@media (max-width: 768px) {
    .p-mobile-0 { padding: 0 !important; }
    .p-mobile-2 { padding: var(--space-2) !important; }
    .p-mobile-4 { padding: var(--space-4) !important; }
    .px-mobile-2 { padding-left: var(--space-2) !important; padding-right: var(--space-2) !important; }
    .px-mobile-4 { padding-left: var(--space-4) !important; padding-right: var(--space-4) !important; }
    .py-mobile-4 { padding-top: var(--space-4) !important; padding-bottom: var(--space-4) !important; }
}

/* Responsive Margin Utilities */
@media (max-width: 768px) {
    .m-mobile-0 { margin: 0 !important; }
    .mb-mobile-2 { margin-bottom: var(--space-2) !important; }
    .mb-mobile-4 { margin-bottom: var(--space-4) !important; }
    .mt-mobile-4 { margin-top: var(--space-4) !important; }
}

/* Landscape Orientation Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: var(--space-8) 0;
        min-height: 300px;
    }
    
    .navbar {
        min-height: 50px;
    }
}
