/* ============================================
   Dr. Gerardo Canchola — Custom Styles
   ============================================ */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Hero text animation */
.hero-content > * {
    opacity: 0;
    transform: translateY(24px);
    animation: heroFadeUp 0.7s ease forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.25s; }
.hero-content > *:nth-child(3) { animation-delay: 0.4s; }
.hero-content > *:nth-child(4) { animation-delay: 0.55s; }

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Feature cards */
.feature-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
}

/* Service cards */
.service-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    transform: translateY(-6px);
}

/* Patient cards */
.patient-card {
    transform: translateY(0);
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.patient-card:hover {
    transform: translateY(-4px);
}

/* Scroll reveal animations (below the fold only) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal delays */
.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; }

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}
#mobile-menu.open {
    max-height: 400px;
    padding-top: 0;
}

/* Mobile links */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    transition: color 0.2s ease, padding-left 0.2s ease;
}
.mobile-link:hover {
    color: #0d9488;
    padding-left: 0.5rem;
}

/* Nav links */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0d9488;
    transition: width 0.25s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Contact form focus states */
input:focus, textarea:focus {
    outline: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-content > * { animation: none; opacity: 1; transform: none; }
    .feature-card, .service-card, .patient-card { transition: none; }
    .feature-card:hover, .service-card:hover, .patient-card:hover { transform: none; }
}

/* Print styles */
@media print {
    header, #contact, footer { display: none; }
    body { color: #000; background: #fff; }
    .absolute { display: none; }
}
