/*
 * KOGO Base CSS
 * Foundation styles, variables, and utilities
 * Version 1.0
 */

/* ==========================================
   CSS VARIABLES
   ========================================== */
:root {
    /* Primary Colors */
    --kogo-primary: #f97316;
    --kogo-primary-hover: #ea580c;
    --kogo-primary-light: rgba(249, 115, 22, 0.1);
    --kogo-primary-50: #fff7ed;
    --kogo-primary-100: #ffedd5;
    --kogo-primary-200: #fed7aa;
    --kogo-secondary: #f59e0b;

    /* Status Colors */
    --kogo-green: #22c55e;
    --kogo-green-light: #dcfce7;
    --kogo-red: #ef4444;
    --kogo-red-light: #fee2e2;
    --kogo-blue: #3b82f6;
    --kogo-blue-light: #dbeafe;
    --kogo-purple: #8b5cf6;
    --kogo-purple-light: #ede9fe;

    /* Backgrounds */
    --bg-page: #f8fafc;
    --bg-white: #ffffff;
    --bg-gray-50: #f8fafc;
    --bg-gray-100: #f1f5f9;

    /* Text */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;

    /* Borders */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ==========================================
   CSS RESET
   ========================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-page);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1.2;
}

.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;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

.text-white {
    color: var(--text-white);
}

.text-orange {
    color: var(--kogo-primary);
}

.text-green {
    color: var(--kogo-green);
}

.text-red {
    color: var(--kogo-red);
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================
   LAYOUT UTILITIES
   ========================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Flexbox */
.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-start {
    justify-content: flex-start;
}

.justify-end {
    justify-content: flex-end;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-5 {
    gap: 1.25rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .lg\:grid-cols-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* ==========================================
   SPACING
   ========================================== */
.p-0 {
    padding: 0;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-5 {
    padding: 1.25rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.m-0 {
    margin: 0;
}

.m-auto {
    margin: auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.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-12 {
    margin-bottom: 3rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-10 {
    margin-top: 2.5rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.ml-1 {
    margin-left: 0.25rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.ml-auto {
    margin-left: auto;
}

/* ==========================================
   BACKGROUNDS & BORDERS
   ========================================== */
.bg-white {
    background-color: var(--bg-white);
}

.bg-gray-50 {
    background-color: var(--bg-gray-50);
}

.bg-gray-100 {
    background-color: var(--bg-gray-100);
}

.bg-orange-50 {
    background-color: var(--kogo-primary-50);
}

.bg-orange-100 {
    background-color: var(--kogo-primary-100);
}

.bg-green-50 {
    background-color: var(--kogo-green-light);
}

.bg-red-50 {
    background-color: var(--kogo-red-light);
}

.bg-blue-50 {
    background-color: var(--kogo-blue-light);
}

.bg-purple-50 {
    background-color: var(--kogo-purple-light);
}

.border {
    border: 1px solid var(--border-color);
}

.border-light {
    border: 1px solid var(--border-light);
}

.border-orange {
    border-color: var(--kogo-primary);
}

.rounded {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-xl {
    border-radius: var(--radius-xl);
}

.rounded-2xl {
    border-radius: var(--radius-2xl);
}

.rounded-full {
    border-radius: var(--radius-full);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}

/* ==========================================
   DISPLAY & VISIBILITY
   ========================================== */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
}

.z-10 {
    z-index: 10;
}

.z-50 {
    z-index: 50;
}

.z-9999 {
    z-index: 9999;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

@media (min-width: 768px) {
    .md\:block {
        display: block;
    }

    .md\:hidden {
        display: none;
    }

    .md\:flex {
        display: flex;
    }
}

@media (min-width: 1024px) {
    .lg\:block {
        display: block;
    }

    .lg\:hidden {
        display: none;
    }

    .lg\:flex {
        display: flex;
    }
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-xl);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--kogo-primary), var(--kogo-primary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
}

.btn-secondary {
    background-color: var(--kogo-primary-50);
    color: var(--kogo-primary);
}

.btn-secondary:hover {
    background-color: var(--kogo-primary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--kogo-primary);
    color: var(--kogo-primary);
}

/* ==========================================
   FORMS
   ========================================== */
.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    background-color: var(--bg-white);
    color: var(--text-primary);
    transition: var(--transition);
}

.input:focus {
    outline: none;
    border-color: var(--kogo-primary);
    box-shadow: 0 0 0 3px var(--kogo-primary-light);
}

.input::placeholder {
    color: var(--text-light);
}

/* ==========================================
   CARDS
   ========================================== */
.card {
    background-color: var(--bg-white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition-slow);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   ALPINE.JS HELPERS
   ========================================== */
[x-cloak] {
    display: none !important;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ==========================================
   ADDITIONAL UTILITIES FOR SEARCH PAGE
   ========================================== */

/* Primary Color Variants */
.bg-primary-500 {
    background-color: #FF7A00;
}

.bg-primary-600 {
    background-color: #E86E00;
}

.bg-primary-50 {
    background-color: #FFF7ED;
}

.bg-primary-100 {
    background-color: #FFEDD5;
}

.text-primary-500 {
    color: #FF7A00;
}

.text-primary-600 {
    color: #E86E00;
}

.text-primary-100 {
    color: #FFEDD5;
}

.text-primary-700 {
    color: #C2410C;
}

/* Gray Color Variants */
.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;
}

.bg-gray-300 {
    color: #D1D5DB;
}

.border-gray-200 {
    border-color: #E5E7EB;
}

.border-gray-300 {
    border-color: #D1D5DB;
}

/* Focus States */
.focus\:ring-2:focus {
    --tw-ring-offset-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 0 2px var(--kogo-primary);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow);
}

.focus\:ring-white:focus {
    --tw-ring-shadow: 0 0 0 2px white;
    box-shadow: var(--tw-ring-shadow);
}

.focus\:border-transparent:focus {
    border-color: transparent;
}

.focus\:outline-none:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.focus\:border-primary-500:focus {
    border-color: #FF7A00;
}

/* Hover States */
.hover\:bg-gray-50:hover {
    background-color: #F9FAFB;
}

.hover\:bg-primary-600:hover {
    background-color: #E86E00;
}

.hover\:text-gray-600:hover {
    color: #4B5563;
}

.hover\:shadow-lg:hover {
    box-shadow: var(--shadow-lg);
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

/* Width/Height */
.w-full {
    width: 100%;
}

.w-32 {
    width: 8rem;
}

.w-24 {
    width: 6rem;
}

.h-48 {
    height: 12rem;
}

.h-64 {
    height: 16rem;
}

.min-h-screen {
    min-height: 100vh;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-7xl {
    max-width: 80rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-md {
    max-width: 28rem;
}

/* Inset */
.inset-0 {
    inset: 0;
}

.inset-y-0 {
    top: 0;
    bottom: 0;
}

/* Opacity */
.opacity-50 {
    opacity: 0.5;
}

.bg-opacity-50 {
    --tw-bg-opacity: 0.5;
}

/* Transitions */
.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-shadow {
    transition-property: box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-200 {
    transition-duration: 200ms;
}

.duration-300 {
    transition-duration: 300ms;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* Pointer Events */
.pointer-events-none {
    pointer-events: none;
}

/* Object Fit */
.object-cover {
    object-fit: cover;
}

/* White Space */
.whitespace-nowrap {
    white-space: nowrap;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

/* Alpha Colors */
.text-white\/90 {
    color: rgba(255, 255, 255, 0.9);
}

.text-white\/70 {
    color: rgba(255, 255, 255, 0.7);
}

.ring-4 {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.ring-white\/30 {
    --tw-ring-color: rgba(255, 255, 255, 0.3);
}

/* Responsive Utilities */
@media (min-width: 640px) {
    .sm\:flex-row {
        flex-direction: row;
    }
    
    .sm\:items-center {
        align-items: center;
    }
    
    .sm\:justify-between {
        justify-content: space-between;
    }
    
    .sm\:inline {
        display: inline;
    }
    
    .sm\:mt-0 {
        margin-top: 0;
    }
    
    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .lg\:flex-row {
        flex-direction: row;
    }
    
    .lg\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .lg\:py-16 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    .lg\:items-center {
        align-items: center;
    }
    
    .lg\:justify-between {
        justify-content: space-between;
    }
    
    .lg\:text-5xl {
        font-size: 3rem;
        line-height: 1.2;
    }
}

@media (min-width: 1280px) {
    .xl\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}