/* ==================== RESPONSIVE ENHANCEMENT CSS ==================== */
/* Modern, Mobile-First, Ultra-Responsive Design System */
/* Author: Enhanced for CopilotX */
/* Version: 2.0 */

/* ==================== ENHANCED CSS VARIABLES ==================== */
:root {
    /* Responsive Breakpoints */
    --breakpoint-xs: 320px;
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
    
    /* Fluid Typography Scale */
    --fluid-min-width: 320;
    --fluid-max-width: 1536;
    --fluid-screen: 100vw;
    
    /* Fluid Font Sizes (clamp for responsiveness) */
    --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
    --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
    --text-base: clamp(0.9rem, 0.85rem + 0.3vw, 1rem);
    --text-lg: clamp(1rem, 0.95rem + 0.35vw, 1.125rem);
    --text-xl: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
    --text-2xl: clamp(1.3rem, 1.15rem + 0.5vw, 1.5rem);
    --text-3xl: clamp(1.6rem, 1.4rem + 0.7vw, 1.875rem);
    --text-4xl: clamp(2rem, 1.7rem + 1vw, 2.25rem);
    --text-5xl: clamp(2.5rem, 2rem + 1.5vw, 3rem);
    --text-6xl: clamp(3rem, 2.5rem + 2vw, 3.75rem);
    
    /* Fluid Spacing */
    --space-xs: clamp(0.25rem, 0.2rem + 0.15vw, 0.5rem);
    --space-sm: clamp(0.5rem, 0.4rem + 0.25vw, 0.75rem);
    --space-md: clamp(0.75rem, 0.6rem + 0.35vw, 1rem);
    --space-lg: clamp(1rem, 0.8rem + 0.5vw, 1.5rem);
    --space-xl: clamp(1.5rem, 1.2rem + 0.75vw, 2rem);
    --space-2xl: clamp(2rem, 1.5rem + 1vw, 3rem);
    --space-3xl: clamp(2.5rem, 2rem + 1.5vw, 4rem);
    
    /* Container Widths */
    --container-xs: 100%;
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1536px;
    
    /* Modern Shadows with responsiveness */
    --shadow-sm-mobile: 0 1px 4px rgba(0, 0, 0, 0.1);
    --shadow-md-mobile: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg-mobile: 0 4px 16px rgba(0, 0, 0, 0.15);
    
    /* Touch-friendly sizes */
    --touch-target-min: 44px;
    --touch-target-comfortable: 48px;
    
    /* Mobile-optimized transitions */
    --transition-mobile: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Safe area insets for mobile notches */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}

/* ==================== RESPONSIVE CONTAINER SYSTEM ==================== */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

.container-fluid {
    width: 100%;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

/* Responsive container breakpoints */
@media (min-width: 640px) {
    .container {
        max-width: var(--container-sm);
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }
}

@media (min-width: 768px) {
    .container {
        max-width: var(--container-md);
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: var(--container-lg);
        padding-left: var(--space-xl);
        padding-right: var(--space-xl);
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: var(--container-xl);
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: var(--container-2xl);
    }
}

/* ==================== RESPONSIVE GRID SYSTEM ==================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
}

.col {
    flex: 1 0 0%;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

/* Mobile-first column system */
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }

/* SM breakpoint columns */
@media (min-width: 640px) {
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
}

/* MD breakpoint columns */
@media (min-width: 768px) {
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
}

/* LG breakpoint columns */
@media (min-width: 1024px) {
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
}

/* ==================== RESPONSIVE FLEXBOX UTILITIES ==================== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

/* Responsive flex direction */
@media (max-width: 767px) {
    .flex-col-mobile { flex-direction: column; }
    .flex-row-mobile { flex-direction: row; }
}

@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row; }
    .md\:flex-col { flex-direction: column; }
}

/* Responsive gaps */
.gap-0 { gap: 0; }
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.gap-5 { gap: var(--space-xl); }
.gap-6 { gap: var(--space-2xl); }

@media (min-width: 768px) {
    .md\:gap-4 { gap: var(--space-lg); }
    .md\:gap-6 { gap: var(--space-2xl); }
}

/* ==================== RESPONSIVE GRID UTILITIES ==================== */
.grid { display: grid; }

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid-cols-auto-sm { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.grid-cols-auto-lg { grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); }

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
}

/* ==================== RESPONSIVE SPACING UTILITIES ==================== */
/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }
.p-6 { padding: var(--space-2xl); }

.px-0 { padding-left: 0; padding-right: 0; }
.px-1 { padding-left: var(--space-xs); padding-right: var(--space-xs); }
.px-2 { padding-left: var(--space-sm); padding-right: var(--space-sm); }
.px-3 { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-4 { padding-left: var(--space-lg); padding-right: var(--space-lg); }
.px-5 { padding-left: var(--space-xl); padding-right: var(--space-xl); }
.px-6 { padding-left: var(--space-2xl); padding-right: var(--space-2xl); }

.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: var(--space-xs); padding-bottom: var(--space-xs); }
.py-2 { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-3 { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-4 { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-5 { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-6 { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }

/* Margin */
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

.m-1 { margin: var(--space-xs); }
.m-2 { margin: var(--space-sm); }
.m-3 { margin: var(--space-md); }
.m-4 { margin: var(--space-lg); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }
.mt-6 { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }
.mb-6 { margin-bottom: var(--space-2xl); }

/* Responsive spacing */
@media (min-width: 768px) {
    .md\:p-4 { padding: var(--space-lg); }
    .md\:p-6 { padding: var(--space-2xl); }
    .md\:px-6 { padding-left: var(--space-2xl); padding-right: var(--space-2xl); }
    .md\:py-6 { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
}

/* ==================== RESPONSIVE TYPOGRAPHY ==================== */
.text-xs { font-size: var(--text-xs); line-height: 1.4; }
.text-sm { font-size: var(--text-sm); line-height: 1.5; }
.text-base { font-size: var(--text-base); line-height: 1.6; }
.text-lg { font-size: var(--text-lg); line-height: 1.6; }
.text-xl { font-size: var(--text-xl); line-height: 1.7; }
.text-2xl { font-size: var(--text-2xl); line-height: 1.3; }
.text-3xl { font-size: var(--text-3xl); line-height: 1.25; }
.text-4xl { font-size: var(--text-4xl); line-height: 1.2; }
.text-5xl { font-size: var(--text-5xl); line-height: 1.15; }
.text-6xl { font-size: var(--text-6xl); line-height: 1.1; }

.font-thin { font-weight: 100; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* Responsive text alignment */
@media (max-width: 767px) {
    .text-center-mobile { text-align: center; }
}

@media (min-width: 768px) {
    .md\:text-left { text-align: left; }
    .md\:text-center { text-align: center; }
    .md\:text-right { text-align: right; }
}

/* ==================== RESPONSIVE DISPLAY UTILITIES ==================== */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }

/* Mobile-specific visibility */
.hidden-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hidden-mobile {
        display: block;
    }
}

.visible-mobile {
    display: block;
}

@media (min-width: 768px) {
    .visible-mobile {
        display: none;
    }
}

/* Breakpoint-specific visibility */
@media (max-width: 639px) {
    .hidden-xs { display: none !important; }
}

@media (min-width: 640px) {
    .sm\:block { display: block; }
    .sm\:hidden { display: none !important; }
}

@media (min-width: 768px) {
    .md\:block { display: block; }
    .md\:inline-block { display: inline-block; }
    .md\:hidden { display: none !important; }
}

@media (min-width: 1024px) {
    .lg\:block { display: block; }
    .lg\:hidden { display: none !important; }
}

/* ==================== RESPONSIVE WIDTH & HEIGHT ==================== */
.w-full { width: 100%; }
.w-screen { width: 100vw; }
.w-auto { width: auto; }
.w-1\/2 { width: 50%; }
.w-1\/3 { width: 33.333333%; }
.w-2\/3 { width: 66.666667%; }
.w-1\/4 { width: 25%; }
.w-3\/4 { width: 75%; }

.h-full { height: 100%; }
.h-screen { height: 100vh; }
.h-auto { height: auto; }

.min-h-screen { min-height: 100vh; }
.min-h-full { min-height: 100%; }

.max-w-xs { max-width: 320px; }
.max-w-sm { max-width: 384px; }
.max-w-md { max-width: 448px; }
.max-w-lg { max-width: 512px; }
.max-w-xl { max-width: 576px; }
.max-w-2xl { max-width: 672px; }
.max-w-3xl { max-width: 768px; }
.max-w-4xl { max-width: 896px; }
.max-w-5xl { max-width: 1024px; }
.max-w-6xl { max-width: 1152px; }
.max-w-7xl { max-width: 1280px; }
.max-w-full { max-width: 100%; }

/* ==================== MOBILE-OPTIMIZED BUTTONS ==================== */
.btn-mobile {
    min-height: var(--touch-target-min);
    padding: 12px 20px;
    font-size: var(--text-base);
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition-mobile);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}

.btn-mobile:active {
    transform: scale(0.97);
}

.btn-mobile-lg {
    min-height: var(--touch-target-comfortable);
    padding: 16px 28px;
    font-size: var(--text-lg);
    border-radius: 14px;
}

.btn-mobile-sm {
    min-height: 36px;
    padding: 8px 16px;
    font-size: var(--text-sm);
    border-radius: 10px;
}

@media (min-width: 768px) {
    .btn-mobile {
        padding: 10px 18px;
    }
}

/* ==================== RESPONSIVE CARDS ==================== */
.card-responsive {
    background: var(--bg-primary);
    border-radius: clamp(12px, 2vw, 16px);
    padding: clamp(16px, 3vw, 24px);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.card-responsive:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

@media (max-width: 767px) {
    .card-responsive {
        box-shadow: var(--shadow-sm-mobile);
    }
    
    .card-responsive:hover {
        box-shadow: var(--shadow-md-mobile);
        transform: translateY(-1px);
    }
}

/* ==================== MOBILE NAVIGATION OPTIMIZATION ==================== */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 8px var(--safe-area-bottom);
    padding-bottom: calc(8px + var(--safe-area-bottom));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: var(--z-fixed);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-mobile);
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:active {
    background: var(--bg-hover);
    transform: scale(0.95);
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item i {
    font-size: 20px;
}

.mobile-nav-item span {
    font-size: 11px;
    font-weight: 500;
}

@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }
}

/* ==================== RESPONSIVE MODALS ==================== */
.modal-responsive {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.modal-content-responsive {
    background: var(--bg-primary);
    border-radius: clamp(12px, 3vw, 20px);
    padding: clamp(20px, 4vw, 32px);
    max-width: min(90vw, 600px);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
    width: 100%;
}

@media (max-width: 767px) {
    .modal-responsive {
        align-items: flex-end;
        padding: 0;
    }
    
    .modal-content-responsive {
        max-width: 100%;
        max-height: 95vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        margin-bottom: 0;
    }
}

/* ==================== TOUCH-FRIENDLY FORM INPUTS ==================== */
.input-touch {
    min-height: var(--touch-target-min);
    padding: 12px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition-mobile);
    width: 100%;
}

.input-touch:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.1);
}

.textarea-touch {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* ==================== RESPONSIVE IMAGES ==================== */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

/* ==================== ASPECT RATIOS ==================== */
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-photo { aspect-ratio: 4 / 3; }
.aspect-wide { aspect-ratio: 21 / 9; }

/* ==================== MODERN GLASSMORPHISM ==================== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== SMOOTH SCROLL BEHAVIOR ==================== */
html {
    scroll-behavior: smooth;
}

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

/* ==================== MOBILE PERFORMANCE OPTIMIZATIONS ==================== */
* {
    -webkit-tap-highlight-color: transparent;
}

img, video {
    max-width: 100%;
    height: auto;
}

/* GPU acceleration for smooth animations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* ==================== RESPONSIVE UTILITIES ==================== */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* ==================== BORDER RADIUS ==================== */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: 4px; }
.rounded { border-radius: 6px; }
.rounded-md { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }
.rounded-2xl { border-radius: 20px; }
.rounded-3xl { border-radius: 24px; }
.rounded-full { border-radius: 9999px; }

/* ==================== SHADOWS ==================== */
.shadow-none { box-shadow: none; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

/* ==================== TRANSITIONS ==================== */
.transition-none { transition: none; }
.transition-all { transition: var(--transition); }
.transition-fast { transition: var(--transition-fast); }
.transition-slow { transition: var(--transition-slow); }

/* ==================== OPACITY ==================== */
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* ==================== CURSOR ==================== */
.cursor-auto { cursor: auto; }
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-move { cursor: move; }

/* ==================== USER SELECT ==================== */
.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all { user-select: all; }

/* ==================== POINTER EVENTS ==================== */
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* ==================== SAFE AREA SUPPORT ==================== */
.safe-top { padding-top: var(--safe-area-top); }
.safe-bottom { padding-bottom: var(--safe-area-bottom); }
.safe-left { padding-left: var(--safe-area-left); }
.safe-right { padding-right: var(--safe-area-right); }

/* ==================== PRINT STYLES ==================== */
@media print {
    .no-print { display: none !important; }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: 100%;
    }
}

/* ==================== LANDSCAPE ORIENTATION ==================== */
@media (orientation: landscape) and (max-height: 500px) {
    .modal-content-responsive {
        max-height: 85vh;
    }
}

/* ==================== HIGH DPI DISPLAYS ==================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .high-dpi-image {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ==================== DARK MODE OPTIMIZATIONS ==================== */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}

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

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

/* Skip to main content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

/* ==================== LOADING STATES ==================== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 25%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

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

.spinner {
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

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

/* ==================== SCROLL SNAP ==================== */
.scroll-snap-x {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.scroll-snap-y {
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

.snap-start { scroll-snap-align: start; }
.snap-center { scroll-snap-align: center; }
.snap-end { scroll-snap-align: end; }

/* ==================== MODERN ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

/* Stagger children animations */
.stagger-children > * {
    animation: fadeIn 0.4s ease-out backwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
