/* ==================== Animations ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(249, 115, 22, 0); }
    100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

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

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

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-ring {
    animation: pulse-ring 2s infinite;
}

/* ==================== Glassmorphism ==================== */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==================== Timeline ==================== */
.timeline-step {
    transition: all 0.3s ease;
}

.timeline-step:hover {
    transform: translateX(4px);
}

/* ==================== Gradient text ==================== */
.gradient-text {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 50%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== Button hover effects ==================== */
.btn-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hover:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.25);
}

.btn-hover:active {
    transform: translateY(0);
}

/* ==================== Card hover ==================== */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(30, 58, 95, 0.15);
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

/* ==================== Print ==================== */
@media print {
    nav, footer, .no-print, button, form {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .shadow-sm, .shadow-lg {
        box-shadow: none !important;
    }

    .rounded-2xl {
        border: 1px solid #e5e7eb !important;
    }
}

/* ==================== Selection ==================== */
::selection {
    background-color: #f97316;
    color: white;
}

/* ==================== Focus styles ==================== */
*:focus-visible {
    outline: 2px solid #1e3a5f;
    outline-offset: 2px;
    border-radius: 4px;
}

.dark *:focus-visible {
    outline-color: #f97316;
}

/* ==================== Smooth scroll ==================== */
html {
    scroll-behavior: smooth;
}

/* ==================== Alpine.js cloak ==================== */
[x-cloak] {
    display: none !important;
}

/* ==================== Loading skeleton ==================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

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

/* ==================== QR Scanner ==================== */
#qr-reader {
    border-radius: 16px;
    overflow: hidden;
}

#qr-reader video {
    border-radius: 16px;
}

/* ==================== Hero background pattern ==================== */
.hero-pattern {
    background-image: radial-gradient(circle at 20% 50%, rgba(30, 58, 95, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 80% 50%, rgba(249, 115, 22, 0.05) 0%, transparent 50%);
}

.dark .hero-pattern {
    background-image: radial-gradient(circle at 20% 50%, rgba(30, 58, 95, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 80% 50%, rgba(249, 115, 22, 0.1) 0%, transparent 50%);
}
