/* Custom CSS for Desde La Barca Medical Center */

/* Color Variables */
:root {
    --forest-green: #166534;
    --forest-light: #6b7280;
    --off-white: #fafaf9;
    --emerald-700: #047857;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--off-white);
    color: #1f2937;
}

/* Typography */
.font-serif {
    font-family: 'Cormorant Garamond', serif;
}

.font-sans {
    font-family: 'Montserrat', sans-serif;
}

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

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

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

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

/* Reveal Animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left {
    transform: translateX(-30px);
}

.reveal-right {
    transform: translateX(30px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Stagger children animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar Styles */
#navbar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#navbar.scrolled {
    background: rgba(250, 250, 249, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Mobile Menu */
#mobile-menu {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-link {
    position: relative;
}

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

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

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

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

/* Image Hover Effects */
img {
    max-width: 100%;
    height: auto;
}

/* Service Card Hover */
.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}

/* Floating Card Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Smooth Transitions */
* {
    -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid #166534;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav, #mobile-menu-btn, button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* 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;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --forest-green: #047857;
    }
}

/* Landscape Phone Adjustment */
@media (max-width: 640px) and (orientation: landscape) {
    .lg\:col-span-5 {
        order: 2;
    }
    
    .lg\:col-span-7 {
        order: 1;
    }
}
