/* Custom styles for Dr. Ramos Medical */

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

/* Selection color */
::selection {
    background-color: #4d7a36;
    color: white;
}

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

/* Base typography */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Serif headings */
.font-serif {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #3d632b;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    max-height: 400px;
}

/* Decorative dot pattern */
.pattern-dots {
    background-image: radial-gradient(circle, #4d7a36 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.08;
}

/* Scroll reveal - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    header, footer, .reveal, #mobile-menu, iframe {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .bg-forest-700 {
        background-color: ButtonText;
    }

    .text-forest-700 {
        color: ButtonText;
    }
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Form input focus states */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(77, 122, 54, 0.15);
}

/* Card hover effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Nav hover underline effect */
nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4d7a36;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a {
    position: relative;
}

/* Touch-friendly tap targets on mobile */
@media (max-width: 768px) {
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
}
