/* Custom Fallback Styles for Elazigweb.net */

/* Define Colors (Tailwind config variables won't work if JS fails) */
:root {
    --color-primary: #1a1a1a;
    --color-accent: #d4af37;
    --color-secondary: #333333;
    
    /* Tailwind Transform Defaults */
    --tw-translate-x: 0;
    --tw-translate-y: 0;
    --tw-rotate: 0;
    --tw-skew-x: 0;
    --tw-skew-y: 0;
    --tw-scale-x: 1;
    --tw-scale-y: 1;
}

/* Custom Colors Classes */
.bg-primary { background-color: var(--color-primary) !important; }
.text-primary { color: var(--color-primary) !important; }
.border-primary { border-color: var(--color-primary) !important; }

.bg-accent { background-color: var(--color-accent) !important; }
.text-accent { color: var(--color-accent) !important; }
.border-accent { border-color: var(--color-accent) !important; }

.bg-yellow-50 { background-color: #fefce8 !important; }
.bg-gray-50 { background-color: #f9fafb !important; }
.bg-gray-200 { background-color: #e5e7eb !important; }
.bg-gray-800 { background-color: #1f2937 !important; }
.bg-white { background-color: #ffffff !important; }

.hover\:bg-accent:hover { background-color: var(--color-accent) !important; }
.hover\:text-accent:hover { color: var(--color-accent) !important; }

/* Arbitrary Value Fixes (Tailwind v3 JIT only) */
.min-h-\[3\.5rem\] { min-height: 3.5rem !important; }
.max-w-\[80\%\] { max-width: 80% !important; }
.max-w-none { max-width: none !important; }

.min-w-\[300px\] { min-width: 300px !important; }
.min-w-\[400px\] { min-width: 400px !important; }

/* Scroll Snap (v3 Backport) */
.snap-x { scroll-snap-type: x var(--tw-scroll-snap-strictness); }
.snap-mandatory { --tw-scroll-snap-strictness: mandatory; }
.snap-center { scroll-snap-align: center; }
:root {
    --tw-scroll-snap-strictness: proximity;
}

/* Grid Fixes (If CDN fails entirely) */
.grid { display: grid; }
.gap-8 { gap: 2rem; }
.gap-6 { gap: 1.5rem; }
.gap-4 { gap: 1rem; }
.gap-2 { gap: 0.5rem; }

/* Spacing Utilities (Space Between) */
.space-x-8 > :not([hidden]) ~ :not([hidden]) { margin-left: 2rem; }
.space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 1rem; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:flex { display: flex !important; }
    .md\:hidden { display: none !important; }
    .md\:flex-row { flex-direction: row !important; }
    .md\:inline-block { display: inline-block !important; }
    .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
    .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:py-32 { padding-top: 8rem; padding-bottom: 8rem; }
}

/* Container Fix */
.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1rem;
    padding-left: 1rem;
}
.mx-auto { margin-left: auto; margin-right: auto; }

@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }

/* Utility Fixes */
.hidden { display: none; }
#aiChatWindow.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; } /* ADDED */
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.bottom-6 { bottom: 1.5rem; }
.bottom-24 { bottom: 6rem; }
.right-6 { right: 1.5rem; }
.top-4 { top: 1rem; }
.right-4 { right: 1rem; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.whitespace-nowrap { white-space: nowrap; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.flex-wrap { flex-wrap: wrap; }
.items-end { align-items: flex-end; }
.flex-1 { flex: 1 1 0%; }
.uppercase { text-transform: uppercase; }
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Borders */
.border { border-width: 1px; }
.border-l { border-left-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t-4 { border-top-width: 4px; }
.border-gray-300 { border-color: #d1d5db; }
.border-gray-700 { border-color: #374151; }
.border-gray-800 { border-color: #1f2937; }
.border-transparent { border-color: transparent; }

/* Typography */
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-white { color: white !important; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }

.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

/* Spacing & Sizing */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-20 { width: 5rem; }
.h-1 { height: 0.25rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.pl-4 { padding-left: 1rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

/* Max Widths */
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }

/* Elements */
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Transitions */
.transition { transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; transition-duration: 150ms; }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:scale-110:hover { transform: scale(1.10); }
.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)); }
.group:hover .group-hover\:scale-110 { transform: scale(1.10); }
.animate-bounce { animation: bounce 1s infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-accent:focus { --tw-ring-color: var(--color-accent) !important; }
.focus\:border-accent:focus { border-color: var(--color-accent) !important; }
.hover\:bg-yellow-500:hover { background-color: #eab308 !important; }
