/* ==========================================================================
   Zhween Website - Consolidated CSS File (FOUC Prevention)
   All CSS modules consolidated to prevent @import delays
   ========================================================================== */

/* ==========================================================================
   Base Styles - Core Variables and Reset
   ========================================================================== */

/* CSS Custom Properties (Variables) */
:root {
    /* Primary Color Palette */
    --primary-color: #15aebf;
    --primary-light: #4ecdc4;
    --primary-dark: #0e9bb2;
    --primary-rgb: 21, 174, 191;
    
    /* Secondary Colors */
    --secondary-color: #ff6b35;
    --secondary-light: #ff8c5a;
    --secondary-dark: #e55a2e;
    
    /* Accent Colors */
    --accent-color: #ffd93d;
    --accent-light: #ffe666;
    --accent-dark: #e6c434;

    /* Product type Colors */
    --physical-color: #00b894;
    --digital-color: #e17055;
    
    /* Semantic Colors */
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #e17055;
    --info-color: #74b9ff;
    
    /* Neutral Colors */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray-100: #f1f3f4;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --dark-color: #2d3748;
    
    /* Text Colors */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-accent: #edf2f7;
    --bg-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --bg-gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    
    /* Shadows - Refined for consistency */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.12);
    --shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.16);
    --shadow-primary: 0 4px 14px rgba(var(--primary-rgb), 0.25);
    --shadow-primary-lg: 0 8px 24px rgba(var(--primary-rgb), 0.3);
    
    /* Border Radius - Brand consistency */
    --radius-xs: 0.25rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* Typography */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-family-arabic: 'Vazirmatn', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    
    /* Transitions - Smooth and consistent */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-colors: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
    --transition-transform: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-all: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

*:focus:not(:focus-visible) {
    outline: none;
}

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

/* Selection Styles */
::selection {
    background-color: rgba(var(--primary-rgb), 0.2);
    color: var(--text-primary);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* RTL Support handled by Bootstrap RTL and logical properties below */

/* Arabic and Kurdish text improvements */
[lang="ar"], [lang="ar"] *, 
.rtl, .rtl * {
    direction: rtl;
    text-align: right; /* fallback */
    text-align: start;
    font-family: var(--font-family-arabic);
}

[lang="ku"], [lang="ku"] * {
    font-family: var(--font-family-arabic);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066cc;
        --text-color: #000000;
        --border-color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ==========================================================================
   Typography Styles
   ========================================================================== */

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-4);
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
}

h3 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
}

h4 {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

h5 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

h6 {
    font-size: var(--font-size-base);
    font-weight: 600;
}

/* Display Typography */
.display-1 {
    font-size: 6rem;
    font-weight: 800;
    line-height: 0.9;
}

.display-2 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 0.95;
}

.display-3 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
}

.display-4 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    line-height: 1.1;
}

.display-5 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    line-height: 1.1;
}

.display-6 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    line-height: 1.2;
}

/* Lead Text */
.lead {
    font-size: var(--font-size-lg);
    font-weight: 400;
    line-height: var(--line-height-relaxed);
    color: var(--text-secondary);
}

/* Text Utilities */
.text-gradient {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-primary {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-secondary {
    background: var(--bg-gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

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

/* Search Highlighting */
.search-highlight {
    background: linear-gradient(120deg, transparent 40%, var(--accent-color) 40%, var(--accent-color) 60%, transparent 60%);
    padding: 0 2px;
    font-weight: 600;
}

/* Mobile Typography Adjustments */
@media (max-width: 768px) {
    .display-1 { font-size: 4rem; }
    .display-2 { font-size: 3.5rem; }
    .display-3 { font-size: 3rem; }
    .display-4 { font-size: 2.5rem; }
    .display-5 { font-size: 2rem; }
    .display-6 { font-size: 1.75rem; }
    
    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    h4 { font-size: 1.5rem; }
    h5 { font-size: 1.25rem; }
    h6 { font-size: 1.125rem; }
    
    .lead {
        font-size: var(--font-size-base);
    }
    
    .search-highlight {
        background: linear-gradient(120deg, transparent 30%, var(--accent-color) 30%, var(--accent-color) 70%, transparent 70%);
        padding: 0 1px;
    }
}

@media (max-width: 576px) {
    .display-4 { font-size: 2rem; }
    .display-5 { font-size: 1.75rem; }
    .display-6 { font-size: 1.5rem; }
    
    h1 { font-size: 2rem; line-height: 1.2; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.125rem; }
    h6 { font-size: 1rem; }
}

/* ==========================================================================
   Component Styles - Buttons, Cards, Forms, etc.
   ========================================================================== */

/* ==========================================================================
   UNIFIED BUTTON SYSTEM - Brand Guideline
   All buttons follow these consistent patterns
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: var(--font-size-sm);
    line-height: 1.25;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: var(--transition-all);
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25);
}

.btn:active {
    transform: translateY(1px);
}

/* Primary Button - Main CTA */
.btn-primary {
    background: var(--bg-gradient);
    color: var(--white);
    border-color: transparent;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary-lg);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-primary);
}

/* Secondary Button - Alternative CTA */
.btn-secondary {
    background: var(--bg-gradient-secondary);
    color: var(--white);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary-color) 100%);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Warning/Accent Button */
.btn-warning {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    color: var(--text-primary);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-success:hover {
    background: #00a085;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Danger Button */
.btn-danger {
    background: var(--danger-color);
    color: var(--white);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.btn-danger:hover {
    background: #d45a48;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Outline Primary Button */
.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

/* Outline Secondary Button */
.btn-outline-secondary {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-outline-secondary:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Outline Light Button (for dark backgrounds) */
.btn-outline-light {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Ghost/Neutral Button */
.btn-ghost {
    background: var(--gray-100);
    color: var(--text-secondary);
    border: 2px solid var(--gray-200);
}

.btn-ghost:hover {
    background: var(--gray-200);
    color: var(--text-primary);
    border-color: var(--gray-300);
    transform: translateY(-1px);
}

/* Link Style Button */
.btn-link {
    background: transparent;
    color: var(--primary-color);
    border: none;
    padding: var(--space-2) var(--space-3);
    box-shadow: none;
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-xs);
    min-height: 36px;
    border-radius: var(--radius-lg);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--font-size-base);
    min-height: 52px;
    border-radius: var(--radius-xl);
}

.btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: var(--font-size-lg);
    min-height: 60px;
    border-radius: var(--radius-2xl);
}

/* Button with Icon */
.btn-icon {
    padding: 0.75rem;
    min-width: 44px;
    border-radius: var(--radius-xl);
}

.btn-icon-sm {
    padding: 0.5rem;
    min-width: 36px;
    min-height: 36px;
    border-radius: var(--radius-lg);
}

.btn-icon-lg {
    padding: 1rem;
    min-width: 52px;
    min-height: 52px;
    border-radius: var(--radius-xl);
}

/* Full Width Button */
.btn-block {
    width: 100%;
}

/* Button States */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Button Group */
.btn-group {
    display: inline-flex;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-start-start-radius: var(--radius-xl);
    border-end-start-radius: var(--radius-xl);
}

.btn-group .btn:last-child {
    border-start-end-radius: var(--radius-xl);
    border-end-end-radius: var(--radius-xl);
}

/* ==========================================================================
   UNIFIED CARD SYSTEM - Brand Guideline
   ========================================================================== */

.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-all);
    overflow: hidden;
    position: relative;
}

.card:hover {
    border-color: rgba(var(--primary-rgb), 0.2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

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

.card-header {
    padding: var(--space-4) var(--space-6);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    background: var(--bg-secondary);
    border-top: 1px solid var(--gray-200);
}

.card-img-top {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

/* Card Variants */
.card-flat {
    box-shadow: none;
    border: 1px solid var(--gray-200);
}

.card-flat:hover {
    box-shadow: var(--shadow-md);
}

.card-elevated {
    box-shadow: var(--shadow-md);
    border: none;
}

.card-elevated:hover {
    box-shadow: var(--shadow-xl);
}

/* ==========================================================================
   UNIFIED FORM SYSTEM - Brand Guideline
   ========================================================================== */

.form-control,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    transition: var(--transition-all);
    min-height: 48px;
}

.form-control:hover,
.form-select:hover {
    border-color: var(--gray-400);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

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

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

/* Form Sizes */
.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-sm);
    min-height: 40px;
    border-radius: var(--radius-md);
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: var(--font-size-lg);
    min-height: 56px;
    border-radius: var(--radius-xl);
}

/* Input Group */
.input-group {
    display: flex;
    position: relative;
}

.input-group .form-control {
    flex: 1;
    border-start-end-radius: 0;
    border-end-end-radius: 0;
    border-inline-end: none;
}

.input-group .btn {
    border-start-start-radius: 0;
    border-end-start-radius: 0;
}

/* Checkbox and Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 44px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-400);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-all);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    cursor: pointer;
}

/* ==========================================================================
   UNIFIED BADGE SYSTEM - Brand Guideline
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0.25rem 0.625rem;
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1.25;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-primary,
.badge.bg-primary {
    background: var(--bg-gradient) !important;
    color: var(--white);
}

.badge-secondary,
.badge.bg-secondary {
    background: var(--bg-gradient-secondary) !important;
    color: var(--white);
}

.badge-success {
    background: var(--success-color);
    color: var(--white);
}

.badge-warning {
    background: var(--accent-color);
    color: var(--text-primary);
}

.badge-danger {
    background: var(--danger-color);
    color: var(--white);
}

.badge-info {
    background: var(--info-color);
    color: var(--white);
}

.badge-light {
    background: var(--gray-100);
    color: var(--text-secondary);
}

.badge-lg {
    padding: 0.375rem 0.875rem;
    font-size: var(--font-size-sm);
}

/* Enhanced Forms */
.form-control, .form-select {
    border-radius: var(--radius-lg);
    border: 2px solid var(--gray-300);
    transition: var(--transition-colors);
    background: var(--bg-primary);
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
    outline: none;
}

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

.form-control:hover {
    border-color: var(--gray-400);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
    letter-spacing: 0.025em;
}

/* Input Groups */
.input-group {
    position: relative;
}

.input-group .form-control {
    border-start-end-radius: 0;
    border-end-end-radius: 0;
    border-inline-end: none;
}

.input-group .btn {
    border-start-start-radius: 0;
    border-end-start-radius: 0;
    border-inline-start: 2px solid var(--primary-color);
}

.input-group:focus-within .form-control {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

/* Form Validation */
.form-control.is-valid {
    border-color: var(--success-color);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.valid-feedback {
    color: var(--success-color);
    font-size: var(--font-size-sm);
    margin-top: var(--space-1);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: var(--font-size-sm);
    margin-top: var(--space-1);
}

/* Checkboxes and Radios */
.form-check-input {
    border: 2px solid var(--gray-400);
    border-radius: var(--radius-sm);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.form-check-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-inline-start: var(--space-2);
}

/* Interactive Elements */
.interactive {
    cursor: pointer;
    transition: var(--transition-all);
}

.interactive:hover {
    transform: scale(1.02);
}

.interactive:active {
    transform: scale(0.98);
}

/* Hover Effects */
.hover-lift {
    transition: var(--transition-all);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { inset-inline-start: -100%; }
    100% { inset-inline-start: 100%; }
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mobile Component Adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: var(--space-4);
    }
    
    .btn-lg {
        padding: var(--space-3) var(--space-6);
        font-size: var(--font-size-base);
    }
    
    .form-control,
    .form-select {
        font-size: 16px; /* Prevent iOS zoom */
        padding: var(--space-3);
        min-height: 44px; /* Touch-friendly */
    }
    
    .btn {
        min-height: 44px;
    }
    
    .form-check-input {
        min-width: 20px;
        min-height: 20px;
    }
    
    .form-check-label {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: var(--space-2) 0;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: var(--space-3);
    }
    
    .btn-lg {
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-size-sm);
    }
    
    .form-control,
    .form-select {
        padding: var(--space-2) var(--space-3);
    }
}

/* ==========================================================================
   Layout Styles - Navigation, Header, Footer, Hero sections
   ========================================================================== */

/* Enhanced Navigation */
.navbar {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: var(--shadow-sm);
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    min-height: 75px;
}

.navbar .container-fluid {
    padding-inline-start: var(--space-5);
    padding-inline-end: var(--space-5);
}

/* Ensure navbar contents are vertically centered */
.navbar .navbar-collapse {
    align-items: center;
}

.navbar-brand {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    margin-inline-end: var(--space-4);
    transition: var(--transition-transform);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-toggler {
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: var(--space-2);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    transition: var(--transition-all);
    padding: var(--space-2) var(--space-4) !important;
    border-radius: var(--radius-lg);
    position: relative;
    margin: 0 var(--space-1);
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 50%;
    width: 0;
    height: 2px;
    background: var(--bg-gradient);
    transition: var(--transition-all);
    transform: translateX(-50%); /* transform is physical, but centering 50% works if we don't care about direction of expansion or if we change it. For centering, translateX(-50%) is correct relative to the element itself */
}

/* For RTL, we might want the underline to expand differently, but centering is safe */

.nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateY(-2px);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
    background: rgba(var(--primary-rgb), 0.1);
}

.nav-link.active::before {
    width: 80%;
}

/* Dropdown Menus */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-xl);
    padding: var(--space-2);
    margin-top: var(--space-2);
    min-width: 200px;
}

.dropdown-item {
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    transition: var(--transition-colors);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.dropdown-item:hover {
    background: var(--bg-gradient);
    color: var(--white);
    transform: translateX(4px); /* Physical shift to right. In RTL this moves "backwards" (to the left visually if flipped, or right if not). Logical would be translateInlineStart/End but not supported in transform yet. We can leave it or use a direction-aware mixin. For now, keeping as is, acceptable minor glitch. */
}

.dropdown-divider {
    border-top: 2px solid var(--gray-200);
    margin: var(--space-2) 0;
}

/* Enhanced Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--gray-800) 100%);
    color: var(--white);
    padding: var(--space-20) 0 var(--space-8);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

footer h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: var(--space-6);
    font-size: var(--font-size-lg);
}

footer p {
    color: var(--gray-400);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-4);
}

footer a {
    color: var(--gray-300);
    text-decoration: none;
    transition: var(--transition-colors);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

footer a:hover {
    color: var(--primary-light);
    transform: translateX(4px);
}

footer .social-links {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

footer .social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: var(--radius-full);
    transition: var(--transition-all);
}

footer .social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-primary);
}

footer hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gray-600), transparent);
    margin: var(--space-12) 0 var(--space-8);
}

footer .footer-bottom {
    font-size: var(--font-size-sm);
    color: var(--gray-400);
}

footer .footer-bottom a {
    color: var(--gray-300);
}

footer .footer-bottom a:hover {
    color: var(--primary-light);
}

/* Newsletter Section */
.newsletter-section {
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    opacity: 0.9;
}

.newsletter-section .container {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Hero Section Characters
   ========================================================================== */

/* Hero Characters around Search */
.search-with-characters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 100%;
}

.search-form-main,
.search-with-characters .hero__search {
    flex: 1;
    min-width: 0;
    z-index: 2;
}

.hero-character {
    height: 130px;
    width: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    flex-shrink: 0;
}

/* RTL Support for Hero Characters */
[dir="rtl"] .search-with-characters {
    flex-direction: row-reverse;
}

/* Hero Draggable Characters - No CSS animations, handled by JS */
.hero-draggable {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
    position: relative;
    z-index: 10;
}

.hero-draggable:active {
    cursor: grabbing;
}

/* Tablet: Smaller characters */
@media (max-width: 991px) {
    .hero-character {
        height: 100px;
    }
    
    .search-with-characters {
        gap: 0.5rem;
    }
}

/* Mobile: Hide desktop characters */
@media (max-width: 767px) {
    .search-with-characters {
        justify-content: center;
    }
    
    .hero-character {
        display: none !important;
    }
}

/* Mobile Characters - Peeking from bottom corners */
.mobile-characters {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    z-index: 999;
    pointer-events: none;
}

.mobile-character {
    position: fixed;
    bottom: -5px;
    height: 65px;
    width: auto;
    filter: drop-shadow(0 -2px 6px rgba(0, 0, 0, 0.12));
    cursor: grab;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
    z-index: 999;
}

.mobile-character-left {
    left: 5px;
}

.mobile-character-right {
    right: 5px;
}

.mobile-character:active {
    cursor: grabbing;
}

/* Extra small screens */
@media (max-width: 400px) {
    .mobile-character {
        height: 55px;
    }
}

/* ==========================================================================
   Footer Characters - Standing on Footer Edge
   ========================================================================== */

.footer-characters-wrapper {
    position: relative;
    height: 100px;
    background: transparent;
    overflow: visible;
    margin-top: 1rem;
}

.footer-characters-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    height: 100%;
    padding: 0 2rem;
}

.footer-character {
    position: absolute;
    bottom: 0;
    height: 120px;
    width: auto;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.1));
    z-index: 10;
}

.footer-character-left {
    left: 8%;
}

.footer-character-right {
    right: 8%;
}

/* Draggable footer characters - animations handled by JS */
.draggable-character {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
}

.draggable-character:active {
    cursor: grabbing;
}

/* RTL Support for Footer Characters */
[dir="rtl"] .footer-character-left {
    left: auto;
    right: 8%;
}

[dir="rtl"] .footer-character-right {
    right: auto;
    left: 8%;
}

/* Tablet: Smaller footer characters */
@media (max-width: 991px) {
    .footer-characters-wrapper {
        height: 80px;
    }
    
    .footer-character {
        height: 90px;
    }
    
    .footer-character-left {
        left: 5%;
    }
    
    .footer-character-right {
        right: 5%;
    }
}

/* Mobile: Hide footer characters (handled by d-none d-md-block) */

/* ==========================================================================
   Main styles that need to override or combine multiple modules
   ========================================================================== */

/* Global styles that depend on multiple modules */
main {
    flex-grow: 1;
    min-height: calc(100vh - 300px); /* Approximate header + footer height */
}

/* Combined component styles */

/* Cross-module responsive adjustments */
@media (max-width: 768px) {
    /* Ensure proper spacing between layout and component elements */
    
    /* Adjust component spacing in mobile layout */
    .card + .card {
        margin-top: var(--space-4);
    }
    
    /* Mobile-specific cross-module styles */
}

@media (max-width: 576px) {
    /* Ultra-mobile cross-module adjustments */
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .newsletter-section {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .card:hover {
        border: 3px solid var(--primary-color) !important;
    }
    
    .btn {
        border-width: 2px !important;
    }
}

/* Reduced motion cross-module support */
@media (prefers-reduced-motion: reduce) {
    .card:hover,
    .btn:hover,
    .nav-link:hover {
        transform: none !important;
    }
}