/* Custom styles for New Town Ob Gyn */

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

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

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #7d1c36;
}

/* Selection color */
::selection {
    background: rgba(212, 168, 83, 0.3);
    color: #f5d79a;
}

/* Navbar styles */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(to right, #e8c478, transparent);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #e8c478 !important;
}

/* Navbar scrolled state */
.navbar-scrolled {
    background: rgba(10, 10, 15, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(232, 196, 120, 0.1);
}

.navbar-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
}

.navbar-scrolled .menu-line {
    background: rgba(255, 255, 255, 0.8) !important;
}

/* Service card hover effects */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(232, 196, 120, 0.03), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Mobile menu animations */
.mobile-menu-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

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

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

/* Menu lines animation */
.menu-line {
    transition: all 0.3s ease;
}

#mobileMenuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobileMenuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobileMenuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Button hover effects */
a[href="tel:+12199447565"] {
    position: relative;
    overflow: hidden;
}

a[href="tel:+12199447565"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

a[href="tel:+12199447565"]:hover::before {
    left: 100%;
}

/* Hero text gradient */
h1 span.italic {
    background: linear-gradient(135deg, #e8c478 0%, #d4a853 50%, #f5d79a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fade-in animation for scroll reveal */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .service-card::before {
        display: none;
    }
    
    .service-card:hover {
        transform: none;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    h1 {
        font-size: clamp(2.25rem, 6vw, 3.5rem);
    }
    
    .service-card {
        padding: 1.5rem;
    }
}

/* Loading animation for images */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[src=""] {
    opacity: 0;
}
