/* ==========================================
   DENTAL FACULTY PRACTICE CLINIC
   Custom Styles & Animations
   ========================================== */

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #fbbf24;
    color: #4a0a24;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9f123f;
}

/* ==========================================
   NAVIGATION
   ========================================== */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(45, 5, 22, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-text {
    transition: color 0.3s ease;
}

#navbar:not(.scrolled) .nav-text {
    color: rgba(255, 255, 255, 0.9);
}

/* Mobile Menu */
#mobileMenu {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#mobileMenu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

/* Hamburger Animation */
.menu-line {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s ease;
    transform-origin: center;
}

body.menu-open .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.25rem;
}

/* ==========================================
   HERO SECTION
   ========================================== */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(45, 5, 22, 0.4) 0%,
        rgba(74, 10, 36, 0.3) 50%,
        rgba(45, 5, 22, 0.6) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Scroll Indicator Animation */
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

#hero .absolute.bottom-10 {
    animation: scrollBounce 2s ease-in-out infinite;
}

/* ==========================================
   SERVICE CARDS
   ========================================== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* ==========================================
   SCROLL REVEAL ANIMATIONS
   (Progressive Enhancement - only apply when JS runs)
   ========================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

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

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

/* ==========================================
   FORM STYLES
   ========================================== */
select option {
    background-color: #fdf8e6;
    color: #2a1f1a;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 768px) {
    .font-serif.text-5xl {
        font-size: 2.75rem;
    }
    
    .font-serif.text-4xl {
        font-size: 2.25rem;
    }
}

/* ==========================================
   FOCUS VISIBLE STYLES
   ========================================== */
*:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}
