/* Custom styles for Center for Diagnostic and Cosmetic Dentistry */

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

/* Base font settings */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(45, 90, 61, 0.08);
}

#navbar.scrolled .font-display {
    color: #2D5A3D;
}

/* Floating card animations */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 5.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* Service card hover effects */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                border-color 0.4s ease,
                background-color 0.4s ease;
}

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

/* Mobile menu */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.inactive {
    opacity: 0;
    pointer-events: none;
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #4a8b5c;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Mobile menu button animation */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* Scroll reveal animations (below the fold only) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input focus styles */
input:focus,
textarea:focus {
    outline: none;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8fb88f;
}

/* Selection color */
::selection {
    background: #dce8df;
    color: #2D5A3D;
}

/* Image lazy loading fallback */
img[loading="lazy"] {
    opacity: 1;
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu-btn,
    .floating-card,
    .reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}
