/* Custom styles for Care New England Medical Group */

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

/* Hide scrollbar for mobile menu on some browsers */
body.menu-open {
    overflow: hidden;
}

/* Custom selection color */
::selection {
    background-color: rgba(190, 24, 93, 0.2);
    color: #500724;
}

/* Reveal animation - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: always show content if JS is disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* No-JS fallback: ensure content is visible */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(45, 10, 20, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Geometric shape animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-5deg); }
}

.hero-shape-1 {
    animation: float 6s ease-in-out infinite;
}

.hero-shape-2 {
    animation: float-delayed 8s ease-in-out infinite;
}

.hero-shape-3 {
    animation: float 7s ease-in-out infinite 1s;
}

/* Pulse dot */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

/* Form focus styles */
input:focus, select:focus, textarea:focus {
    border-color: #be185d !important;
    box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.1) !important;
}

/* Card hover effects */
.service-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

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

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

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

/* Mobile menu transitions */
#mobileMenu {
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#mobileMenu.hidden {
    max-height: 0 !important;
    opacity: 0;
    overflow: hidden;
}

#mobileMenu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

/* Map overlay gradient */
.map-section {
    position: relative;
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::after {
    width: 200px;
    height: 200px;
}

/* Print styles */
@media print {
    nav, .hero-shape-1, .hero-shape-2, .hero-shape-3, #mobileMenuBtn {
        display: none !important;
    }
    
    body {
        color: #000 !important;
        background: #fff !important;
    }
    
    .bg-plum-950, .bg-gradient-to-br {
        background: #fff !important;
        color: #000 !important;
    }
}
