/* Custom styles for Pulmonary Sleep Clinic */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0fdf4;
}
::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

@keyframes floatDelayed {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.03);
    }
}

@keyframes scrollLine {
    0% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

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

.animate-fade-in-up-delay {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-fade-in-up-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-fade-in-up-delay-3 {
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

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

.animate-float-delayed {
    animation: floatDelayed 7s ease-in-out infinite;
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* Intersection Observer animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
    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; }

/* Mobile menu transitions */
#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(16, 185, 129, 0.08);
}

.nav-scrolled .font-serif,
.nav-scrolled span {
    color: #064e3b !important;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Selection color */
::selection {
    background: #a7f3d0;
    color: #064e3b;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
}

/* Print styles */
@media print {
    nav, #backToTop, button {
        display: none !important;
    }
    .bg-emerald-600, .bg-emerald-900 {
        background: #064e3b !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
