/* === Custom Styles for Integrated Health Services === */

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

/* Custom selection color */
::selection {
    background: rgba(52, 211, 153, 0.3);
    color: #fff;
}

/* === Navbar transitions === */
#navbar.scrolled {
    background: rgba(5, 10, 20, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

#menuBtn.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active #bar2 {
    opacity: 0;
}

#menuBtn.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* === Service card hover effects === */
.service-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* === Stagger children === */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* === Gold shimmer line animation === */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.gold-line {
    background: linear-gradient(90deg, transparent, #FCD34D, transparent);
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
}

/* === Pulse glow for CTA buttons === */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(52, 211, 153, 0.2); }
    50% { box-shadow: 0 0 40px rgba(52, 211, 153, 0.4); }
}

.cta-pulse:hover {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* === Responsive adjustments === */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* === Form focus states === */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.2);
}

/* === Mobile menu link hover === */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #34D399;
    transition: width 0.3s ease;
}

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

/* === Subtle grain overlay (optional texture) === */
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");
}
