/* Custom styles for Kari & Co. Hair & Scalp Therapy */

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

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-pulse-slow {
    animation: pulse 2s ease-in-out infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0f2140;
}

::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4ade80;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Button hover effects */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Image loading optimization */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Reduced motion support */
@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;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.active {
    max-height: 500px;
}

/* Navbar scroll effect */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Service card hover effect */
.group:hover .group-hover\:bg-mint-400 {
    background-color: #4ade80;
}

/* Form input focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Gallery image hover */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Testimonial card hover */
.group:hover .group-hover\:-translate-y-1 {
    transform: translateY(-4px);
}

/* Custom selection color */
::selection {
    background-color: #4ade80;
    color: #0a1628;
}

/* Ensure proper z-index stacking */
nav {
    z-index: 50;
}

/* Prevent layout shift on image load */
img {
    object-fit: cover;
}

/* Responsive typography */
@media (max-width: 640px) {
    .font-serif {
        font-size: 2rem;
        line-height: 1.2;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .font-serif {
        font-size: 3rem;
        line-height: 1.2;
    }
}

@media (min-width: 1025px) {
    .font-serif {
        font-size: 3.75rem;
        line-height: 1.1;
    }
}

/* Smooth transitions for all interactive elements */
button,
a,
input,
select,
textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover state for links */
a:hover {
    text-decoration: none;
}

/* Ensure proper contrast for all text */
.text-midnight-700\/70 {
    color: rgba(15, 33, 64, 0.7);
}

.text-white\/60 {
    color: rgba(255, 255, 255, 0.6);
}

.text-white\/70 {
    color: rgba(255, 255, 255, 0.7);
}

.text-white\/80 {
    color: rgba(255, 255, 255, 0.8);
}

/* Additional spacing utilities */
.py-24 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

/* Custom box shadows */
.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Border radius consistency */
.rounded-2xl {
    border-radius: 1rem;
}

.rounded-3xl {
    border-radius: 1.5rem;
}

/* Gradient backgrounds */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

/* Backdrop blur for navbar */
.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

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

/* Print styles */
@media print {
    nav,
    button,
    form {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-midnight-900,
    .bg-midnight-800 {
        background: #fff !important;
        color: #000 !important;
    }
}
