/* === Custom Styles for Dr. Carlson MD === */

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

/* Custom selection color */
::selection {
    background: rgba(52, 212, 176, 0.3);
    color: #0A1C30;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #34D4B0;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Mobile menu animations */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

.mobile-nav-link {
    transition: all 0.2s ease;
}

/* === Service Cards === */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    border: 1px solid transparent;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.service-card:hover::before {
    border-color: rgba(52, 212, 176, 0.3);
}

/* === Contact Form === */
#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 212, 176, 0.15);
}

/* === Back to Top Button === */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

#back-to-top:hover {
    transform: translateY(-2px);
}

/* === Fade-in Animations (below fold only) === */
.fade-in-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

/* === Tablet === */
@media (max-width: 768px) {
    .service-card {
        padding: 1.5rem;
    }
}

/* === Small Mobile === */
@media (max-width: 360px) {
    .font-display.text-5xl {
        font-size: 2.5rem;
    }
}
