/* Custom styles for Sunlight Pharmacy */

/* Base */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Service cards */
.service-card {
    transition: background-color 0.5s ease, transform 0.5s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Navbar scroll state */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-transparent {
    background-color: transparent;
    box-shadow: none;
}

/* Mobile menu */
#mobile-menu {
    animation: fadeIn 0.3s ease-out;
}

/* Form inputs */
input:focus,
textarea:focus {
    border-color: #0d9488 !important;
}

input:focus + label,
textarea:focus + label {
    color: #0d9488;
}

/* Selection */
::selection {
    background-color: rgba(13, 148, 136, 0.15);
    color: #0f766e;
}

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

::-webkit-scrollbar-track {
    background: #f8fafc;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Image lazy load fade */
img[loading="lazy"] {
    transition: opacity 0.6s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Subtle line decorations */
.divider-line {
    position: relative;
}

.divider-line::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 0;
    width: 48px;
    height: 1px;
    background: linear-gradient(to right, #0d9488, transparent);
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal,
    .reveal.revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-fade-in {
        animation: none;
        opacity: 1;
    }
    
    .service-card:hover {
        transform: none;
    }
}

/* Tablet */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

/* Large desktop */
@media (min-width: 1280px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
