/* Custom styles for Jones J Gregory MD */

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

/* Custom selection color */
::selection {
    background-color: #337438;
    color: #fefdf8;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #337438, #2dd4bf);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

/* About image container */
.about-image-container {
    position: relative;
}

.about-image-container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 107, 90, 0.3);
    border-radius: 2rem;
    z-index: -1;
}

/* Navbar scroll state */
nav.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

nav.scrolled .font-serif,
nav.scrolled a:not(.bg-forest-600) {
    color: #1a3a1e;
}

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

@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.7s ease, transform 0.7s ease;
    }

    .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; }
}

/* Input focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(51, 116, 56, 0.15);
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

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

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

::-webkit-scrollbar-thumb {
    background: #b5dbb3;
    border-radius: 5px;
}

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

/* Geometric floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

@keyframes float-reverse {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(15px) rotate(-3deg); }
}

.hero-shape-1 {
    animation: float 6s ease-in-out infinite;
}

.hero-shape-2 {
    animation: float-reverse 8s ease-in-out infinite;
}

.hero-shape-3 {
    animation: float 7s ease-in-out infinite;
    animation-delay: 1s;
}

/* Pulse animation for badge */
@keyframes soft-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.animate-soft-pulse {
    animation: soft-pulse 2s ease-in-out infinite;
}

/* Gradient text (if needed) */
.gradient-text {
    background: linear-gradient(135deg, #337438, #2dd4bf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Contact form submit button loading state */
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Map section overlay */
section.relative.h-80,
section.relative.h-96 {
    background-image: url('https://images.pexels.com/photos/4047010/pexels-photo-4047010.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1440&h=400');
    background-size: cover;
    background-position: center;
}

/* Reduced motion support */
@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;
    }
}
