/* ===== Custom Styles for Dr. Mamoun Najjar MD ===== */

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

/* Selection color */
::selection {
    background: rgba(255, 107, 74, 0.3);
    color: #f5f5f7;
}

/* ===== Navbar Transition ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(8, 8, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 107, 74, 0.1);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

/* ===== Mobile Menu ===== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu .mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Menu toggle animation */
.menu-toggle-active .menu-line:nth-child(1) {
    transform: translateY(2.5px) rotate(45deg);
}
.menu-toggle-active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-toggle-active .menu-line:nth-child(3) {
    transform: translateY(-2.5px) rotate(-45deg);
}

/* ===== Service Cards ===== */
.service-card {
    background: linear-gradient(135deg, rgba(26, 26, 32, 0.8) 0%, rgba(39, 39, 46, 0.6) 100%);
    backdrop-filter: blur(10px);
}

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

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

.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; }

/* ===== Back to Top ===== */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .service-card {
        transition: none;
    }
    #back-to-top {
        transition: none;
    }
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ff6b4a;
    outline-offset: 2px;
}

/* ===== Image Loading ===== */
img {
    display: block;
    max-width: 100%;
}

/* ===== Custom scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #111116;
}
::-webkit-scrollbar-thumb {
    background: #38383f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4b4b52;
}

/* ===== Subtle grain texture overlay ===== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}
