/* Custom styles for Dr. Brent G. Clark DMD website */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #ecfdf5;
}
::-webkit-scrollbar-thumb {
    background: #064e3b;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Geometric background decorations */
.geo-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.geo-circle--1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%);
    top: 15%;
    right: -50px;
    opacity: 0.3;
    animation: float 8s ease-in-out infinite;
}

.geo-circle--2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    bottom: 20%;
    left: -30px;
    opacity: 0.4;
    animation: float 10s ease-in-out infinite reverse;
}

.geo-circle--3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    top: 60%;
    right: 10%;
    opacity: 0.15;
    animation: float 12s ease-in-out infinite;
}

.geo-triangle--1 {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid #a7f3d0;
    opacity: 0.15;
    top: 30%;
    left: 5%;
    transform: rotate(15deg);
    animation: spin 20s linear infinite;
}

.geo-dots--1 {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, #064e3b 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: 0.08;
    bottom: 30%;
    right: 5%;
    animation: float 6s ease-in-out infinite;
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Navbar styles */
#navbar {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(209, 250, 229, 0.5);
}

#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(6, 78, 59, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #064e3b;
    transition: width 0.3s ease;
}

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

/* Service cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #064e3b, #10b981);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Testimonial cards */
.testimonial-card {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(6, 78, 59, 0.12);
}

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

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#back-to-top:not(.visible) {
    opacity: 0;
    pointer-events: none;
}

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

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

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .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; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .geo-circle, .geo-triangle--1, .geo-dots--1 {
        animation: none !important;
    }
}

/* Print styles */
@media print {
    #navbar, #back-to-top, .geo-circle, .geo-triangle--1, .geo-dots--1 {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
