/* Custom Styles for David E. Waterfall, DMD PC */

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #B85C38;
    color: white;
}

/* Hero Animations */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }

.hero-image {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 1s ease 0.5s forwards;
}

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

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* About Animations */
.about-anim {
    opacity: 0;
    transform: translateY(30px);
}

.about-anim.animate {
    animation: fadeInUp 0.8s ease forwards;
}

.about-anim:nth-child(1) { animation-delay: 0.1s; }
.about-anim:nth-child(2) { animation-delay: 0.2s; }
.about-anim:nth-child(3) { animation-delay: 0.3s; }
.about-anim:nth-child(4) { animation-delay: 0.4s; }
.about-anim:nth-child(5) { animation-delay: 0.5s; }

.about-image {
    opacity: 0;
    transform: translateX(-30px);
}

.about-image.animate {
    animation: slideInLeft 0.8s ease 0.3s forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Services Animations */
.services-header-anim {
    opacity: 0;
    transform: translateY(30px);
}

.services-header-anim.animate {
    animation: fadeInUp 0.8s ease forwards;
}

.service-card {
    opacity: 0;
    transform: translateY(20px);
}

.service-card.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* Patient Info Animations */
.patient-header-anim {
    opacity: 0;
    transform: translateY(30px);
}

.patient-header-anim.animate {
    animation: fadeInUp 0.8s ease forwards;
}

.patient-cards-anim > div {
    opacity: 0;
    transform: translateX(30px);
}

.patient-cards-anim > div.animate {
    animation: slideInLeft 0.6s ease forwards;
}

.patient-cards-anim > div:nth-child(1) { animation-delay: 0.2s; }
.patient-cards-anim > div:nth-child(2) { animation-delay: 0.3s; }
.patient-cards-anim > div:nth-child(3) { animation-delay: 0.4s; }

/* Gallery Animations */
.gallery-img {
    opacity: 0;
    transform: scale(0.95);
}

.gallery-img.animate {
    animation: scaleIn 0.8s ease forwards;
}

.gallery-img:nth-child(1) { animation-delay: 0.1s; }
.gallery-img:nth-child(2) { animation-delay: 0.2s; }
.gallery-img:nth-child(3) { animation-delay: 0.3s; }

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

/* Contact Animations */
.contact-header-anim {
    opacity: 0;
    transform: translateY(30px);
}

.contact-header-anim.animate {
    animation: fadeInUp 0.8s ease forwards;
}

.contact-form-anim {
    opacity: 0;
    transform: translateY(30px);
}

.contact-form-anim.animate {
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    background-color: rgba(250, 247, 242, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* Mobile Menu Transitions */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

/* Form Focus States */
input:focus,
textarea:focus {
    border-bottom-color: #B85C38 !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: #B85C38;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9A4B2C;
}

/* Smooth Image Loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

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

/* Print Styles */
@media print {
    nav,
    #contact-form,
    iframe {
        display: none;
    }
    
    body {
        background: white;
    }
    
    section {
        page-break-inside: avoid;
    }
}
