/* Custom Styles for KidBite */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Blob animation for hero section */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom gradient text animation */
@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #f97316, #22c55e);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #ea580c, #16a34a);
}

/* Enhanced focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Smooth transitions for interactive elements */
a, button {
    transition: all 0.3s ease;
}

/* Card hover effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Mobile menu animation */
#mobile-menu {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

#mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #22c55e;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gradient-to-br {
        background: #ffffff;
    }
    
    .text-transparent {
        color: #000000;
    }
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(to right, #f97316, #eab308);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    background: linear-gradient(to right, #22c55e, #14b8a6);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(34, 197, 94, 0.3);
}

/* Section spacing */
section {
    scroll-margin-top: 80px;
}

/* Enhanced text readability */
p {
    line-height: 1.75;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

