/* =============================================
   Dr. Karol D. Dangaran, MD — Custom Styles
   ============================================= */

/* --- Base & Smooth Scrolling --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* --- Selection Color --- */
::selection {
    background-color: rgba(212, 160, 23, 0.2);
    color: #0A1F44;
}

/* --- Navbar Transition --- */
#navbar {
    transition: all 0.4s ease;
}

#nav-bg {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled #nav-bg {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* --- Mobile Menu --- */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

/* --- Service Cards --- */
.service-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.4s ease, 
                box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

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

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

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

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal.hidden-reveal {
        opacity: 1;
        transform: translateY(0);
    }
    
    .service-card:hover {
        transform: none;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Image Loading --- */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #D4A017;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Utility --- */
.text-balance {
    text-wrap: balance;
}

/* --- Mobile Menu Link Hover --- */
.mobile-menu-link {
    position: relative;
}

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

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

/* --- Contact Section Map --- */
#contact iframe {
    filter: saturate(0.8) contrast(1.05);
    transition: filter 0.3s ease;
}

#contact .rounded-3xl:hover iframe {
    filter: saturate(1) contrast(1);
}
