/* ===== Custom Styles for Dr. Rooney Medical Website ===== */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Scroll Reveal Animations ===== */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0) !important;
}

.scroll-reveal[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
}

.scroll-reveal[data-reveal="left"] {
    transform: translateX(-32px);
}

.scroll-reveal[data-reveal="right"] {
    transform: translateX(32px);
}

.scroll-reveal[data-reveal="scale"] {
    transform: scale(0.95);
}

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

#navbar.scrolled {
    background: rgba(6, 14, 36, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #2cd3a4;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-weight: 500;
    color: rgb(197, 211, 236);
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ===== Button & Interactive States ===== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ===== Selection Color ===== */
::selection {
    background: rgba(44, 211, 164, 0.3);
    color: white;
}

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

::-webkit-scrollbar-track {
    background: #060e24;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #2c63b8;
}

/* ===== Input Autofill ===== */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #060e24 inset !important;
    -webkit-text-fill-color: white !important;
}

/* ===== Reduced Motion ===== */
@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;
    }

    .scroll-reveal[data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 640px) {
    h1 {
        line-height: 1.1;
    }
}

@media (min-width: 1024px) {
    /* Desktop-only subtle hover lift on service cards */
    .group:hover .group-hover\:-translate-y-1 {
        transform: translateY(-4px);
    }
}
