/* ============================================
   Centennial Village Dental Group
   Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(159, 47, 47, 0.15);
    color: #6c2020;
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

.animate-fade-in {
    animation-name: fadeInUp;
    animation-duration: 1s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: forwards;
}

/* Navbar transition */
.nav-text {
    color: #6c2020;
    transition: color 0.4s ease;
}

.nav-subtext {
    color: #9f2f2f;
    transition: color 0.4s ease;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #c44545;
    transition: width 0.3s ease;
}

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

/* Navbar scrolled state */
.navbar-scrolled .nav-text {
    color: #6c2020;
}

.navbar-scrolled .nav-subtext {
    color: #9f2f2f;
}

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

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

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

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b5a68e;
}

/* Print styles */
@media print {
    header, footer, #contact-form, .scroll-reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #6c2020;
    }
}
