/* Custom CSS - Tailwind-like utilities for Bootstrap compatibility */

/* Important: Override Bootstrap defaults that conflict */
* {
    box-sizing: border-box;
}

/* Reset Bootstrap button/link defaults that might interfere */
a, button {
    text-decoration: none;
}

/* Ensure proper spacing reset */
p, h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
}

/* Bootstrap container override - remove default padding if needed */
.container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* Color Utilities */
.bg-gray-50 { background-color: #f9fafb !important; }
.bg-gray-100 { background-color: #f3f4f6 !important; }
.bg-gray-200 { background-color: #e5e7eb !important; }
.bg-gray-300 { background-color: #d1d5db !important; }
.bg-gray-400 { background-color: #9ca3af !important; }
.bg-gray-500 { background-color: #6b7280 !important; }
.bg-gray-600 { background-color: #4b5563 !important; }
.bg-gray-700 { background-color: #374151 !important; }
.bg-gray-800 { background-color: #1f2937 !important; }
.bg-gray-900 { background-color: #111827 !important; }

.text-gray-400 { color: #9ca3af !important; }
.text-gray-500 { color: #6b7280 !important; }
.text-gray-600 { color: #4b5563 !important; }
.text-gray-700 { color: #374151 !important; }
.text-gray-900 { color: #111827 !important; }

.bg-blue-50 { background-color: #eff6ff !important; }
.bg-blue-100 { background-color: #dbeafe !important; }
.bg-blue-400 { background-color: #60a5fa !important; }
.bg-blue-500 { background-color: #3b82f6 !important; }
.bg-blue-600 { background-color: #2563eb !important; }
.bg-blue-700 { background-color: #1d4ed8 !important; }

.text-blue-400 { color: #60a5fa !important; }
.text-blue-600 { color: #2563eb !important; }
.text-blue-800 { color: #1e40af !important; }
.hover\:text-blue-600:hover { color: #2563eb !important; }
.hover\:text-blue-800:hover { color: #1e40af !important; }

.bg-red-50 { background-color: #fef2f2 !important; }
.bg-red-400 { background-color: #f87171 !important; }
.bg-red-500 { background-color: #ED8100 !important; }
.bg-red-600 { background-color: #dc2626 !important; }
.bg-red-700 { background-color: #b91c1c !important; }

.text-red-500 { color: #ED8100 !important; }
.text-red-600 { color: #dc2626 !important; }
.text-red-700 { color: #b91c1c !important; }
.text-red-800 { color: #991b1b !important; }
.hover\:text-red-600:hover { color: #dc2626 !important; }
.hover\:text-red-800:hover { color: #991b1b !important; }

.bg-green-50 { background-color: #f0fdf4 !important; }
.bg-green-400 { background-color: #4ade80 !important; }
.bg-green-500 { background-color: #22c55e !important; }
.text-green-500 { color: #22c55e !important; }
.text-green-700 { color: #15803d !important; }

.bg-yellow-400 { background-color: #facc15 !important; }
.bg-yellow-600 { background-color: #ca8a04 !important; }
.bg-yellow-700 { background-color: #a16207 !important; }
.bg-yellow-50 { background-color: #fefce8 !important; }
.text-yellow-900 { color: #713f12 !important; }
.text-yellow-700 { color: #a16207 !important; }
.text-yellow-800 { color: #854d0e !important; }
.hover\:bg-yellow-700:hover { background-color: #a16207 !important; }
.hover\:text-yellow-200:hover { color: #fef08a !important; }

.bg-purple-400 { background-color: #c084fc !important; }
.bg-purple-500 { background-color: #a855f7 !important; }
.bg-purple-600 { background-color: #9333ea !important; }
.bg-purple-700 { background-color: #7e22ce !important; }
.text-purple-400 { color: #c084fc !important; }

.bg-pink-400 { background-color: #f472b6 !important; }
.bg-pink-500 { background-color: #ED8100 !important; }
.bg-pink-600 { background-color: #db2777 !important; }
.bg-pink-700 { background-color: #be185d !important; }

.bg-indigo-600 { background-color: #4f46e5 !important; }
.bg-teal-600 { background-color: #0d9488 !important; }

/* Gradient Utilities */
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)) !important; }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)) !important; }
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops)) !important; }
.bg-gradient-to-t { background-image: linear-gradient(to top, var(--tw-gradient-stops)) !important; }

.from-blue-600 { --tw-gradient-from: #2563eb; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(37, 99, 235, 0)); }
.from-red-500 { --tw-gradient-from: #ED8100; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 68, 68, 0)); }
.from-red-600 { --tw-gradient-from: #dc2626; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(220, 38, 38, 0)); }
.from-green-500 { --tw-gradient-from: #22c55e; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(34, 197, 94, 0)); }
.from-indigo-600 { --tw-gradient-from: #4f46e5; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(79, 70, 229, 0)); }
.from-gray-900 { --tw-gradient-from: #111827; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(17, 24, 39, 0)); }
.from-gray-800 { --tw-gradient-from: #1f2937; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(31, 41, 55, 0)); }

.to-purple-600 { --tw-gradient-to: #9333ea !important; }
.to-purple-700 { --tw-gradient-to: #7e22ce !important; }
.to-pink-600 { --tw-gradient-to: #db2777 !important; }
.to-pink-700 { --tw-gradient-to: #be185d !important; }
.to-teal-600 { --tw-gradient-to: #0d9488 !important; }
.to-gray-900 { --tw-gradient-to: #111827 !important; }
.to-gray-800 { --tw-gradient-to: #1f2937 !important; }

.via-pink-500 { --tw-gradient-stops: var(--tw-gradient-from), #ED8100, var(--tw-gradient-to, rgba(236, 72, 153, 0)); }
.via-black\/50 { --tw-gradient-stops: var(--tw-gradient-from), rgba(0, 0, 0, 0.5), var(--tw-gradient-to, rgba(0, 0, 0, 0)); }
.via-black\/90 { --tw-gradient-stops: var(--tw-gradient-from), rgba(0, 0, 0, 0.9), var(--tw-gradient-to, rgba(0, 0, 0, 0)); }
.via-gray-800 { --tw-gradient-stops: var(--tw-gradient-from), #1f2937, var(--tw-gradient-to, rgba(31, 41, 55, 0)); }

/* Spacing Utilities */
.max-w-7xl { max-width: 80rem !important; }
.max-w-4xl { max-width: 56rem !important; }
.max-w-2xl { max-width: 42rem !important; }
.max-w-md { max-width: 28rem !important; }
.max-w-none { max-width: none !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-8 { padding-left: 2rem !important; padding-right: 2rem !important; }
.px-12 { padding-left: 3rem !important; padding-right: 3rem !important; }

.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-8 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
.py-12 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.py-16 { padding-top: 4rem !important; padding-bottom: 4rem !important; }

.p-4 { padding: 1rem !important; }
.p-6 { padding: 1.5rem !important; }
.p-8 { padding: 2rem !important; }

.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }
.mb-10 { margin-bottom: 2.5rem !important; }
.mb-12 { margin-bottom: 3rem !important; }

.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mt-8 { margin-top: 2rem !important; }
.mt-20 { margin-top: 5rem !important; }

.mr-1 { margin-right: 0.25rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mr-3 { margin-right: 0.75rem !important; }
.mr-4 { margin-right: 1rem !important; }

.ml-2 { margin-left: 0.5rem !important; }
.ml-3 { margin-left: 0.75rem !important; }
.ml-12 { margin-left: 3rem !important; }

.space-x-1 > * + * { margin-left: 0.25rem !important; }
.space-x-2 > * + * { margin-left: 0.5rem !important; }
.space-x-3 > * + * { margin-left: 0.75rem !important; }
.space-x-4 > * + * { margin-left: 1rem !important; }
.space-x-6 > * + * { margin-left: 1.5rem !important; }

.space-y-1 > * + * { margin-top: 0.25rem !important; }
.space-y-2 > * + * { margin-top: 0.5rem !important; }
.space-y-3 > * + * { margin-top: 0.75rem !important; }
.space-y-4 > * + * { margin-top: 1rem !important; }
.space-y-6 > * + * { margin-top: 1.5rem !important; }

.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }
.gap-12 { gap: 3rem !important; }

/* Flexbox Utilities */
.flex { display: flex !important; }
.flex-1 { flex: 1 1 0% !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.flex-col { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.items-center { align-items: center !important; }
.items-start { align-items: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-end { justify-content: flex-end !important; }

/* Grid Utilities */
.grid { display: grid !important; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

.col-span-1 { grid-column: span 1 / span 1 !important; }
.col-span-2 { grid-column: span 2 / span 2 !important; }
.col-span-3 { grid-column: span 3 / span 3 !important; }

/* Responsive Grid */
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .md\:col-span-2 { grid-column: span 2 / span 2 !important; }
    .md\:px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
    .md\:px-12 { padding-left: 3rem !important; padding-right: 3rem !important; }
    .md\:flex-row { flex-direction: row !important; }
    .md\:items-center { align-items: center !important; }
    .md\:justify-between { justify-content: space-between !important; }
    .md\:space-y-0 > * + * { margin-top: 0 !important; }
    .md\:mb-0 { margin-bottom: 0 !important; }
    .md\:mr-8 { margin-right: 2rem !important; }
    .md\:text-3xl { font-size: 2.25rem !important; line-height: 2.5rem !important; font-weight: 700 !important; }
    .md\:w-64 { width: 16rem !important; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .lg\:col-span-1 { grid-column: span 1 / span 1 !important; }
    .lg\:col-span-2 { grid-column: span 2 / span 2 !important; }
    .lg\:col-span-3 { grid-column: span 3 / span 3 !important; }
    .lg\:px-8 { padding-left: 2rem !important; padding-right: 2rem !important; }
    .lg\:flex { display: flex !important; }
    .lg\:hidden { display: none !important; }
    .lg\:block { display: block !important; }
}

@media (min-width: 640px) {
    .sm\:px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
}

/* Typography - Better sizes */
.text-xs { font-size: 0.875rem !important; line-height: 1.4rem !important; font-weight: 500 !important; }
.text-sm { font-size: 1rem !important; line-height: 1.5rem !important; font-weight: 500 !important; }
.text-base { font-size: 1.125rem !important; line-height: 1.7rem !important; font-weight: 400 !important; }
.text-lg { font-size: 1.25rem !important; line-height: 1.8rem !important; font-weight: 500 !important; }
.text-xl { font-size: 1.5rem !important; line-height: 1.9rem !important; font-weight: 600 !important; }
.text-2xl { font-size: 1.875rem !important; line-height: 2.2rem !important; font-weight: 600 !important; }
.text-3xl { font-size: 2.25rem !important; line-height: 2.5rem !important; font-weight: 700 !important; }
.text-4xl { font-size: 2.75rem !important; line-height: 2.8rem !important; font-weight: 700 !important; }
.text-5xl { font-size: 3.5rem !important; line-height: 1.2 !important; font-weight: 700 !important; }

.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.font-medium { font-weight: 500 !important; }
.font-black { font-weight: 900 !important; }

.uppercase { text-transform: uppercase !important; }
.leading-tight { line-height: 1.25 !important; }
.leading-snug { line-height: 1.375 !important; }
.leading-relaxed { line-height: 1.625 !important; }

.text-center { text-align: center !important; }
.text-transparent { color: transparent !important; }
.bg-clip-text { -webkit-background-clip: text !important; background-clip: text !important; }

/* Display & Visibility */
.hidden { display: none !important; }
.block { display: block !important; }
.inline-block { display: inline-block !important; }
.inline-flex { display: inline-flex !important; }
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.sticky { position: sticky !important; }
.fixed { position: fixed !important; }

/* Positioning */
.top-0 { top: 0px !important; }
.top-2 { top: 0.5rem !important; }
.top-3 { top: 0.75rem !important; }
.bottom-0 { bottom: 0px !important; }
.bottom-3 { bottom: 0.75rem !important; }
.bottom-4 { bottom: 1rem !important; }
.left-0 { left: 0px !important; }
.left-2 { left: 0.5rem !important; }
.left-3 { left: 0.75rem !important; }
.left-4 { left: 1rem !important; }
.right-0 { right: 0px !important; }
.right-2 { right: 0.5rem !important; }
.right-3 { right: 0.75rem !important; }
.right-4 { right: 1rem !important; }
.inset-0 { top: 0px !important; right: 0px !important; bottom: 0px !important; left: 0px !important; }

/* Sizing */
.w-full { width: 100% !important; }
.w-2 { width: 0.5rem !important; }
.w-6 { width: 1.5rem !important; }
.w-8 { width: 2rem !important; }
.w-10 { width: 2.5rem !important; }
.w-12 { width: 3rem !important; }
.w-32 { width: 8rem !important; }
.w-48 { width: 12rem !important; }
.w-64 { width: 16rem !important; }
.w-96 { width: 24rem !important; }

.h-1 { height: 0.25rem !important; }
.h-2 { height: 0.5rem !important; }
.h-6 { height: 1.5rem !important; }
.h-8 { height: 2rem !important; }
.h-10 { height: 2.5rem !important; }
.h-12 { height: 3rem !important; }
.h-20 { height: 5rem !important; }
.h-24 { height: 6rem !important; }
.h-32 { height: 8rem !important; }
.h-40 { height: 10rem !important; }
.h-48 { height: 12rem !important; }
.h-64 { height: 16rem !important; }
.h-full { height: 100% !important; }
.h-screen { height: 100vh !important; }
.h-auto { height: auto !important; }
.min-h-screen { min-height: 100vh !important; }

/* Border & Rounded */
.rounded { border-radius: 0.25rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-2xl { border-radius: 1rem !important; }
.rounded-full { border-radius: 9999px !important; }

.border { border-width: 1px !important; }
.border-2 { border-width: 2px !important; }
.border-4 { border-width: 4px !important; }
.border-t { border-top-width: 1px !important; }
.border-b { border-bottom-width: 1px !important; }
.border-l { border-left-width: 1px !important; }
.border-l-4 { border-left-width: 4px !important; }
.border-b-2 { border-bottom-width: 2px !important; }

.border-gray-100 { border-color: #f3f4f6 !important; }
.border-gray-200 { border-color: #e5e7eb !important; }
.border-gray-300 { border-color: #d1d5db !important; }
.border-gray-700 { border-color: #374151 !important; }
.border-white { border-color: #ffffff !important; }
.border-white\/30 { border-color: rgba(255, 255, 255, 0.3) !important; }

.border-blue-200 { border-color: #bfdbfe !important; }
.border-blue-400 { border-color: #60a5fa !important; }
.border-blue-500 { border-color: #3b82f6 !important; }
.border-green-400 { border-color: #4ade80 !important; }
.border-red-400 { border-color: #f87171 !important; }
.border-yellow-400 { border-color: #facc15 !important; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important; }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important; }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1) !important; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25) !important; }

/* Opacity */
.opacity-0 { opacity: 0 !important; }
.opacity-10 { opacity: 0.1 !important; }
.opacity-20 { opacity: 0.2 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-80 { opacity: 0.8 !important; }
.opacity-90 { opacity: 0.9 !important; }

/* Overflow */
.overflow-hidden { overflow: hidden !important; }
.overflow-x-auto { overflow-x: auto !important; }
.overflow-y-auto { overflow-y: auto !important; }

/* Z-Index */
.z-10 { z-index: 10 !important; }
.z-50 { z-index: 50 !important; }

/* Text Utilities */
.whitespace-nowrap { white-space: nowrap !important; }
.uppercase { text-transform: uppercase !important; }

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Last Child Utilities */
.last\:border-0:last-child { border-width: 0 !important; }

/* Backdrop */
.backdrop-blur-md { backdrop-filter: blur(12px) !important; }
.backdrop-blur-sm { backdrop-filter: blur(4px) !important; }

/* Transform */
.transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important; }
.scale-105 { --tw-scale-x: 1.05; --tw-scale-y: 1.05; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleX(var(--tw-scale-y)) !important; }
.scale-110 { --tw-scale-x: 1.1; --tw-scale-y: 1.1; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleX(var(--tw-scale-y)) !important; }
.scale-150 { --tw-scale-x: 1.5; --tw-scale-y: 1.5; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleX(var(--tw-scale-y)) !important; }
.-translate-x-1\/2 { --tw-translate-x: -50%; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important; }
.-translate-y-1 { --tw-translate-y: -0.25rem; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important; }
.-translate-y-1\/2 { --tw-translate-y: -50%; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important; }

/* Transition */
.transition-all { transition-property: all !important; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important; transition-duration: 150ms !important; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke !important; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important; transition-duration: 150ms !important; }
.transition-opacity { transition-property: opacity !important; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important; transition-duration: 150ms !important; }
.transition-transform { transition-property: transform !important; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important; transition-duration: 150ms !important; }
.duration-300 { transition-duration: 300ms !important; }
.duration-700 { transition-duration: 700ms !important; }

/* Hover States */
.hover\:bg-gray-100:hover { background-color: #f3f4f6 !important; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb !important; }
.hover\:bg-blue-50:hover { background-color: #eff6ff !important; }
.hover\:bg-blue-600:hover { background-color: #2563eb !important; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8 !important; }
.hover\:bg-purple-700:hover { background-color: #7e22ce !important; }
.hover\:bg-red-50:hover { background-color: #fef2f2 !important; }
.hover\:bg-white:hover { background-color: #ffffff !important; }
.hover\:bg-white\/30:hover { background-color: rgba(255, 255, 255, 0.3) !important; }

.hover\:text-white:hover { color: #ffffff !important; }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important; }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1) !important; }

/* Group Hover - Fixed for dropdown menus */
.group:hover .group-hover\:opacity-100 { opacity: 1 !important; }
.group:hover .group-hover\:visible { visibility: visible !important; }
.group:hover .group-hover\:scale-105 { --tw-scale-x: 1.05; --tw-scale-y: 1.05; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleX(var(--tw-scale-y)) !important; }
.group:hover .group-hover\:scale-110 { --tw-scale-x: 1.1; --tw-scale-y: 1.1; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleX(var(--tw-scale-y)) !important; }
.group:hover .group-hover\:scale-150 { --tw-scale-x: 1.5; --tw-scale-y: 1.5; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleX(var(--tw-scale-y)) !important; }
.group:hover .group-hover\:text-blue-600 { color: #2563eb !important; }
.group:hover .group-hover\:text-yellow-300 { color: #fde047 !important; }
.group:hover .group-hover\:bg-blue-100 { background-color: #dbeafe !important; }

/* Ensure dropdown menus work properly with group hover */
.group {
    position: relative;
}

.dropdown-wrapper {
    position: relative;
}

.dropdown-menu {
    pointer-events: none;
    min-width: 192px;
}

.dropdown-wrapper:hover .dropdown-menu {
    pointer-events: auto;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure dropdown stays visible when hovering over it */
.dropdown-wrapper .dropdown-menu:hover {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Background with opacity */
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1) !important; }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2) !important; }
.bg-black\/20 { background-color: rgba(0, 0, 0, 0.2) !important; }
.bg-black\/40 { background-color: rgba(0, 0, 0, 0.4) !important; }
.bg-black\/50 { background-color: rgba(0, 0, 0, 0.5) !important; }
.bg-black\/60 { background-color: rgba(0, 0, 0, 0.6) !important; }
.bg-black\/80 { background-color: rgba(0, 0, 0, 0.8) !important; }
.bg-black\/90 { background-color: rgba(0, 0, 0, 0.9) !important; }
.bg-black\/95 { background-color: rgba(0, 0, 0, 0.95) !important; }

/* Text with opacity */
.text-white\/80 { color: rgba(255, 255, 255, 0.8) !important; }
.text-white\/90 { color: rgba(255, 255, 255, 0.9) !important; }

.border-gray-700\/50 { border-color: rgba(55, 65, 81, 0.5) !important; }

/* Animation */
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important; }
.animate-ping { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite !important; }
.animate-fadeIn { animation: fadeIn 0.3s ease-in !important; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

@keyframes ping {
    75%, 100% { transform: scale(2); opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Visibility */
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }

/* Object Fit */
.object-cover { object-fit: cover !important; }

/* Blur */
.blur-3xl { filter: blur(64px) !important; }

/* Custom utilities for specific components */
.min-w-0 { min-width: 0px !important; }
.pt-3 { padding-top: 0.75rem !important; }
.pt-6 { padding-top: 1.5rem !important; }
.pt-8 { padding-top: 2rem !important; }
.pb-3 { padding-bottom: 0.75rem !important; }
.pb-4 { padding-bottom: 1rem !important; }
.pb-6 { padding-bottom: 1.5rem !important; }
.pl-4 { padding-left: 1rem !important; }
.pl-12 { padding-left: 3rem !important; }
.pr-4 { padding-right: 1rem !important; }

/* Scrollbar hide */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Prose styles for article content */
.prose { color: #374151; max-width: 65ch; }
.prose-lg { font-size: 1.125rem; line-height: 1.7; font-weight: 400; }

/* Responsive utilities */
@media (min-width: 768px) {
    .md\:text-base { font-size: 1.125rem !important; line-height: 1.7rem !important; font-weight: 400 !important; }
}

/* Arbitrary Values Support */
.h-\[400px\] { height: 400px !important; }
.h-\[500px\] { height: 500px !important; }

.w-\[280px\] { width: 280px !important; }
.w-\[320px\] { width: 320px !important; }

.text-\[10px\] { font-size: 0.875rem !important; line-height: 1.4rem !important; font-weight: 500 !important; }

/* Responsive Arbitrary Widths */
@media (min-width: 768px) {
    .md\:w-\[280px\] { width: 280px !important; }
}

@media (min-width: 1024px) {
    .lg\:w-\[320px\] { width: 320px !important; }
}

/* Additional Opacity Utilities */
.bg-white\/95 { background-color: rgba(255, 255, 255, 0.95) !important; }

/* Focus States */
.focus\:outline-none:focus { outline: 2px solid transparent !important; outline-offset: 2px !important; }
.focus\:border-blue-500:focus { border-color: #3b82f6 !important; }
.focus\:ring-2:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color) !important; --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important; box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) !important; }
.focus\:ring-blue-200:focus { --tw-ring-opacity: 1 !important; --tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity)) !important; }

/* Letter Spacing */
.tracking-wider { letter-spacing: 0.05em !important; }

/* Additional Text Sizes */
.text-6xl { font-size: 4rem !important; line-height: 1.2 !important; font-weight: 700 !important; }

/* Responsive Padding */
@media (min-width: 640px) {
    .sm\:px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
}

@media (min-width: 1024px) {
    .lg\:px-8 { padding-left: 2rem !important; padding-right: 2rem !important; }
}

/* Cursor */
.cursor-pointer { cursor: pointer !important; }

/* Additional Gradient via Colors */
.via-purple-600 { --tw-gradient-stops: var(--tw-gradient-from), #9333ea, var(--tw-gradient-to, rgba(147, 51, 234, 0)); }

/* Hover Gradient Changes */
.hover\:from-blue-700:hover { --tw-gradient-from: #1d4ed8 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(29, 78, 216, 0)) !important; }
.hover\:to-purple-700:hover { --tw-gradient-to: #7e22ce !important; }

/* Text Colors with Opacity */
.text-gray-200 { color: #e5e7eb !important; }
.text-white\/90 { color: rgba(255, 255, 255, 0.9) !important; }

/* Bootstrap compatibility overrides */
.bg-white { background-color: #ffffff !important; }
.text-white { color: #ffffff !important; }
.text-black { color: #000000 !important; }

/* Ensure Bootstrap doesn't override our custom utilities */
/* Tailwind-like classes should override Bootstrap defaults */

/* Additional responsive utilities */
@media (min-width: 640px) {
    .sm\:px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
}

/* Bootstrap 5 utilities for Multimedia section */
.rounded-3 { border-radius: 0.75rem !important; }
.rounded-4 { border-radius: 1rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }

/* Background pattern support */
.position-fixed {
    position: fixed !important;
}

.position-relative {
    position: relative !important;
}

.position-absolute {
    position: absolute !important;
}

.top-0 { top: 0 !important; }
.start-0 { left: 0 !important; }
.end-0 { right: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.translate-middle {
    transform: translate(-50%, -50%) !important;
}

.translate-middle-x {
    transform: translateX(-50%) !important;
}

/* Bootstrap 5 badge enhancements */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
}

/* Backdrop blur support */
.backdrop-blur-md {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Logo styling */
.logo-container img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    object-fit: contain;
}

.logo-container {
    position: relative;
}

/* Ensure logo container doesn't break layout */
.d-flex.align-items-center.gap-3 {
    flex-wrap: nowrap;
}

/* Logo hover effects */
.logo-container:hover {
    transition: transform 0.3s ease;
}

/* Responsive logo sizing */
@media (max-width: 767px) {
    .logo-container img {
        max-width: 40px !important;
        max-height: 40px !important;
    }
}

/* Fix for logo text gradient */
.gradient-text {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Fix for Bootstrap container conflicts */
.max-w-7xl {
    width: 100%;
    max-width: 80rem !important;
}

/* Ensure proper display for flex and grid */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 18px; /* Better readable base font size */
    line-height: 1.6; /* Better line height for readability */
    font-weight: 400; /* Normal weight for body text */
}

/* Better heading font sizes with bold weight */
h1 {
    font-size: 2.5rem; /* 40px - Better size for main headings */
    line-height: 1.2;
    font-weight: 700; /* Bold */
}

h2 {
    font-size: 2rem; /* 32px - Better size for subheadings */
    line-height: 1.3;
    font-weight: 700; /* Bold */
}

h3 {
    font-size: 1.5rem; /* 24px - Better size for section headings */
    line-height: 1.4;
    font-weight: 600; /* Semi-bold */
}

h4 {
    font-size: 1.25rem; /* 20px - Better size for subsection headings */
    line-height: 1.5;
    font-weight: 600; /* Semi-bold */
}

h5 {
    font-size: 1.125rem; /* 18px - Better readable size */
    line-height: 1.5;
    font-weight: 600; /* Semi-bold */
}

h6 {
    font-size: 1rem; /* 16px - Better readable size */
    line-height: 1.5;
    font-weight: 600; /* Semi-bold */
}

/* Better paragraph font size */
p {
    font-size: 1rem; /* 16px */
    line-height: 1.7; /* Better line spacing for readability */
    font-weight: 400; /* Normal weight */
}

/* Make important text elements bolder */
strong, b {
    font-weight: 700; /* Bold */
}

/* Better link styling */
a {
    font-weight: 500; /* Medium weight for links */
}

a:hover {
    font-weight: 600; /* Semi-bold on hover */
}

/* Better button text */
button {
    font-weight: 600; /* Semi-bold for buttons */
}

button.font-bold,
button[class*="font-bold"] {
    font-weight: 700 !important; /* Bold when specified */
}

/* Fix for backdrop blur */
.bg-white\/95 {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Override Bootstrap's default button/link styles that might conflict */
/* Reset button styles only when needed, but preserve clickability */
button {
    cursor: pointer;
    font-family: inherit;
}

button:focus {
    outline: none;
}

button:not([class*="px-"]):not([class*="py-"]):not([class*="p-"]):not([class*="btn"]) {
    border: none;
    background: none;
    padding: 0;
}

/* But preserve Bootstrap button styles when explicitly used */
.btn {
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    background-color: #0d6efd;
    color: #fff;
    display: inline-block;
}

/* Ensure buttons with utility classes work properly */
button[class*="w-"],
button[class*="h-"],
button[class*="px-"],
button[class*="py-"],
button[class*="p-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Ensure input fields don't have Bootstrap's default border radius override */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    border-radius: inherit;
}

/* Fix for Bootstrap's default link color */
a {
    color: inherit;
}

a:hover {
    color: inherit;
}

/* Ensure Bootstrap's form-control doesn't override our styles */
.form-control {
    border-radius: inherit;
    padding: inherit;
}

/* Fix for Bootstrap's default list styles */
ul, ol {
    padding-left: 0;
    margin-bottom: 0;
}

/* Ensure images don't break layout */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for mobile menu visibility - Bootstrap compatibility */
#mobileMenu.hidden {
    display: none !important;
}

#mobileMenu:not(.hidden) {
    display: block !important;
}

/* Fix for search bar visibility - Bootstrap compatibility */
#searchBar.hidden {
    display: none !important;
}

#searchBar:not(.hidden) {
    display: block !important;
}

/* Override Bootstrap's .hidden class if needed */
.hidden {
    display: none !important;
}

/* Ensure z-index works for dropdowns */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.z-50 {
    z-index: 50;
}

/* Fix pointer events for interactive elements */
button, a {
    cursor: pointer;
}

button {
    user-select: none;
    -webkit-user-select: none;
}

a {
    text-decoration: none;
}

/* Ensure nav links are clickable */
.nav-link {
    display: inline-block;
    cursor: pointer;
}

/* Fix for button with utility classes */
button.w-10,
button.h-10,
button[class*="px-"],
button[class*="py-"] {
    cursor: pointer;
    border: none;
    background: transparent;
}

/* Ensure buttons are visible and clickable */
button:not(.hidden) {
    display: inline-flex;
}

/* Fix for text alignment */
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE SUPPORT
   ============================================ */

/* Base Mobile-First Styles (320px and up) */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    -webkit-touch-callout: none;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Ensure all containers respect viewport width */
.container,
.container-fluid,
.max-w-7xl,
.max-w-4xl,
.max-w-2xl {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Responsive Images - Always responsive */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

img {
    object-fit: cover;
}

/* Responsive Typography - Mobile First */
@media (max-width: 479px) {
    /* Extra Small Devices (phones, 320px - 479px) */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    h1 {
        font-size: 1.75rem; /* 28px */
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem; /* 24px */
        line-height: 1.35;
    }
    
    h3 {
        font-size: 1.25rem; /* 20px */
        line-height: 1.4;
    }
    
    h4 {
        font-size: 1.125rem; /* 18px */
        line-height: 1.45;
    }
    
    h5 {
        font-size: 1rem; /* 16px */
        line-height: 1.5;
    }
    
    h6 {
        font-size: 0.9375rem; /* 15px */
        line-height: 1.5;
    }
    
    p {
        font-size: 1rem; /* 16px */
        line-height: 1.65;
    }
    
    .text-xs { font-size: 0.8125rem !important; }
    .text-sm { font-size: 0.9375rem !important; }
    .text-base { font-size: 1rem !important; }
    .text-lg { font-size: 1.125rem !important; }
    .text-xl { font-size: 1.25rem !important; }
    .text-2xl { font-size: 1.5rem !important; }
    .text-3xl { font-size: 1.75rem !important; }
    .text-4xl { font-size: 2rem !important; }
    .text-5xl { font-size: 2.5rem !important; }
    
    /* Mobile spacing adjustments */
    .px-4 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
    .px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }
    .px-8 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
    .py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
    .py-8 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    .mb-4 { margin-bottom: 1rem !important; }
    .mb-6 { margin-bottom: 1.5rem !important; }
    .mb-8 { margin-bottom: 2rem !important; }
    .mt-4 { margin-top: 1rem !important; }
    .mt-6 { margin-top: 1.5rem !important; }
    .mt-8 { margin-top: 2rem !important; }
    
    /* Mobile grid - single column */
    .grid-cols-1,
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
    
    /* Touch-friendly buttons */
    button,
    a.btn,
    .btn-primary-modern,
    .btn-secondary-modern {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
    
    /* Mobile navigation adjustments */
    .modern-nav {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .header-top-row {
        height: auto;
        min-height: 60px;
        padding: 0.5rem 0;
    }
    
    /* Mobile menu improvements */
    .mobile-menu-modern {
        width: 100%;
        max-width: 100vw;
    }
    
    /* Card adjustments */
    .card,
    .article-card,
    .category-card,
    .related-article-card {
        margin-bottom: 1.5rem;
    }
}

@media (min-width: 480px) and (max-width: 639px) {
    /* Small Devices (large phones, 480px - 639px) */
    body {
        font-size: 17px;
    }
    
    h1 {
        font-size: 2rem; /* 32px */
    }
    
    h2 {
        font-size: 1.75rem; /* 28px */
    }
    
    h3 {
        font-size: 1.5rem; /* 24px */
    }
    
    .container,
    .container-fluid {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    /* Two column grid for small tablets */
    .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    /* Medium Small Devices (small tablets, 640px - 767px) */
    body {
        font-size: 17px;
    }
    
    .container,
    .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    /* Two column layouts */
    .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    /* Tablets (768px - 1023px) */
    body {
        font-size: 18px;
    }
    
    .container,
    .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    /* Three column grid for tablets */
    .grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1024px) {
    /* Large Devices (desktops, 1024px and up) */
    body {
        font-size: 18px;
    }
    
    .container,
    .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1280px) {
    /* Extra Large Devices (large desktops, 1280px and up) */
    .container {
        max-width: 1280px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Landscape Orientation Support */
@media (max-width: 767px) and (orientation: landscape) {
    body {
        padding-top: 80px; /* Reduced padding for landscape */
    }
    
    .modern-nav {
        height: auto;
        min-height: 60px;
    }
    
    .header-top-row {
        height: auto;
        min-height: 60px;
    }
    
    /* Reduce hero heights in landscape */
    .article-hero-modern {
        min-height: 300px;
        max-height: 400px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    button,
    a,
    .btn,
    .nav-link-modern,
    .mobile-menu-link {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Remove hover effects on touch devices */
    *:hover {
        transform: none !important;
    }
    
    /* Larger tap targets */
    .search-btn-modern,
    .user-btn-modern,
    .theme-toggle,
    .mobile-menu-btn {
        width: 48px;
        height: 48px;
    }
}

/* Responsive Tables */
@media (max-width: 767px) {
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table thead {
        display: none;
    }
    
    table tbody,
    table tr,
    table td {
        display: block;
        width: 100%;
    }
    
    table tr {
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 1rem;
    }
    
    table td {
        text-align: right;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid #f3f4f6;
    }
    
    table td:last-child {
        border-bottom: none;
    }
    
    table td:before {
        content: attr(data-label);
        font-weight: 600;
        float: left;
        margin-right: 1rem;
    }
}

/* Responsive Forms */
@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        width: 100%;
        padding: 0.875rem 1rem;
        min-height: 44px;
    }
    
    .search-input-modern {
        font-size: 16px !important;
        padding: 0.875rem 1rem 0.875rem 3rem !important;
    }
    
    form {
        width: 100%;
    }
}

/* Responsive Navigation Enhancements */
@media (max-width: 991px) {
    .header-bottom-row {
        display: none;
    }
    
    .nav-link-modern {
        font-size: 1.125rem;
        padding: 0.75rem 1rem;
    }
}

/* Responsive Cards and Grids */
@media (max-width: 767px) {
    .grid {
        gap: 1rem;
    }
    
    .gap-2 { gap: 0.5rem !important; }
    .gap-3 { gap: 0.75rem !important; }
    .gap-4 { gap: 1rem !important; }
    .gap-6 { gap: 1.5rem !important; }
    .gap-8 { gap: 2rem !important; }
    
    /* Single column for cards on mobile */
    .related-articles-grid,
    .articles-grid,
    .category-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Responsive Video and Media */
@media (max-width: 767px) {
    video,
    iframe,
    embed,
    object {
        max-width: 100%;
        height: auto;
    }
    
    /* Responsive aspect ratio for videos */
    .video-wrapper {
        position: relative;
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        height: 0;
        overflow: hidden;
    }
    
    .video-wrapper iframe,
    .video-wrapper video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Responsive Modal and Overlays */
@media (max-width: 767px) {
    .modal,
    .image-zoom-modal {
        padding: 1rem;
    }
    
    .modal-content,
    .image-zoom-content {
        max-width: 100%;
        margin: 0;
        border-radius: 12px;
    }
    
    .image-zoom-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 40px;
        height: 40px;
    }
}

/* Responsive Share Buttons */
@media (max-width: 767px) {
    .article-share-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
}

/* Responsive Article Content */
@media (max-width: 767px) {
    .article-container-modern {
        padding: 0 1rem;
    }
    
    .article-body-modern {
        padding: 1.5rem 1rem;
    }
    
    .article-hero-content,
    .article-hero-no-image {
        padding: 2rem 1rem;
    }
    
    .article-title-modern,
    .article-body-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .article-excerpt-modern {
        font-size: 1.125rem;
    }
    
    .article-text-content {
        font-size: 18px;
        line-height: 1.75;
    }
    
    .article-meta-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Responsive Footer */
@media (max-width: 767px) {
    footer {
        padding: 2rem 1rem;
        text-align: center;
    }
    
    footer .container {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Prevent horizontal scroll */
@media (max-width: 767px) {
    * {
        max-width: 100%;
    }
    
    body {
        overflow-x: hidden;
        position: relative;
    }
    
    /* Fix for elements that might cause overflow */
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Responsive Utilities - Show/Hide */
@media (max-width: 767px) {
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-visible {
        display: block !important;
    }
    
    .desktop-hidden {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .mobile-visible {
        display: none !important;
    }
    
    .desktop-hidden {
        display: block !important;
    }
}

/* Responsive Flex Utilities */
@media (max-width: 767px) {
    .flex-col-mobile {
        flex-direction: column !important;
    }
    
    .flex-row-mobile {
        flex-direction: row !important;
    }
    
    .items-center-mobile {
        align-items: center !important;
    }
    
    .justify-center-mobile {
        justify-content: center !important;
    }
}

/* Responsive Text Alignment */
@media (max-width: 767px) {
    .text-center-mobile {
        text-align: center !important;
    }
    
    .text-left-mobile {
        text-align: left !important;
    }
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .modern-nav,
    .mobile-menu-modern,
    .search-bar-modern,
    .article-share-modern,
    footer {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .article-container-modern {
        max-width: 100%;
        padding: 0;
    }
}

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

/* Dark Mode Mobile Optimizations */
@media (max-width: 767px) {
    body.dark-mode {
        background-color: #0f172a;
    }
    
    body.dark-mode .modern-nav {
        background: rgba(15, 23, 42, 0.98);
    }
}

