/* Custom Styles for Dermatology Laser Center */

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

/* Base Typography */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar Transitions */
.nav-link {
    position: relative;
    color: #500724;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #d97706;
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #d97706;
}

/* Scroll Reveal Animations */
.section-eyebrow {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-title {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-subtitle {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.treatment-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.about-image-container {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Scroll Reveal Active State */
.reveal-active .section-eyebrow {
    opacity: 1;
    transform: translateY(0);
}

.reveal-active .section-title {
    opacity: 1;
    transform: translateY(0);
}

.reveal-active .section-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.reveal-active .service-card {
    opacity: 1;
    transform: translateY(0);
}

.reveal-active .treatment-card {
    opacity: 1;
    transform: translateY(0);
}

.reveal-active .about-image-container {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered Delays for Service Cards */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* Staggered Delays for Treatment Cards */
.treatment-card:nth-child(1) { transition-delay: 0.05s; }
.treatment-card:nth-child(2) { transition-delay: 0.1s; }
.treatment-card:nth-child(3) { transition-delay: 0.15s; }
.treatment-card:nth-child(4) { transition-delay: 0.2s; }

/* Hero Animations */
.hero-eyebrow {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-headline {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 0.8s ease forwards;
    animation-delay: 0.8s;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Orb Animations */
.orb-1 {
    animation: float1 8s ease-in-out infinite;
}

.orb-2 {
    animation: float2 10s ease-in-out infinite;
}

.orb-3 {
    animation: float3 12s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-25px, 25px) scale(1.08); }
    66% { transform: translate(15px, -15px) scale(0.92); }
}

@keyframes float3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    33% { transform: translate(-48%, -52%) scale(1.03); }
    66% { transform: translate(-52%, -48%) scale(0.97); }
}

/* Mobile Menu */
.mobile-menu-link {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

#mobileMenu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.2s; }

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

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

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

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

/* Custom Select Styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23831443' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal-active .section-eyebrow,
    .reveal-active .section-title,
    .reveal-active .section-subtitle,
    .reveal-active .service-card,
    .reveal-active .treatment-card,
    .reveal-active .about-image-container {
        opacity: 1;
        transform: none;
    }
}

/* Selection Color */
::selection {
    background-color: #d97706;
    color: #380317;
}
