/* Responsive Design Enhancements */

/* Ensure proper box-sizing for all elements */
*, *::before, *::after {
    box-sizing: border-box;
}

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

/* Ensure text doesn't break layouts on small screens */
.text-responsive {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Line clamp utility for text truncation */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile-first responsive utilities */
@media (max-width: 640px) {
    /* Hide overflow on mobile to prevent horizontal scrolling */
    body {
        overflow-x: hidden;
    }
    
    /* Ensure buttons are touch-friendly */
    button, a {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Make form elements more accessible on mobile */
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Tablet adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
    /* Tablet-specific styles if needed */
}

/* Desktop enhancements */
@media (min-width: 1025px) {
    /* Desktop-specific styles if needed */
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    /* Enhance contrast for better accessibility */
    .text-gray-800 {
        color: #000000 !important;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}