/* Custom styles for Rocky Mountain Ultrasound & Genetics */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1c1c1c;
}
::-webkit-scrollbar-thumb {
    background: #ff745c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff5230;
}

/* Service card stagger animation */
.service-card {
    opacity: 0;
    transform: translateY(30px);
}

.service-card.revealed {
    animation: cardReveal 0.6s ease forwards;
}

.service-card:nth-child(1).revealed { animation-delay: 0.05s; }
.service-card:nth-child(2).revealed { animation-delay: 0.1s; }
.service-card:nth-child(3).revealed { animation-delay: 0.15s; }
.service-card:nth-child(4).revealed { animation-delay: 0.2s; }
.service-card:nth-child(5).revealed { animation-delay: 0.25s; }
.service-card:nth-child(6).revealed { animation-delay: 0.3s; }

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

/* FAQ animation */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-content.active {
    max-height: 300px;
}

.faq-icon {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.faq-icon.rotated {
    transform: rotate(45deg);
    background-color: #ff745c;
}

.faq-icon.rotated svg {
    stroke: white;
}

/* Mobile menu animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-open .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-open .menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    width: 5rem;
}

/* Mobile link animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
}

.mobile-menu-open .mobile-link {
    animation: mobileLinkIn 0.4s ease forwards;
}

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

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

/* Navbar transition */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .nav-link {
    color: #1c1c1c;
}

.nav-scrolled .nav-link:hover {
    color: #ff5230;
}

.nav-scrolled .menu-line {
    background-color: #1c1c1c;
}

.nav-scrolled .font-serif,
.nav-scrolled .font-sans {
    color: #1c1c1c !important;
}

/* Selection color */
::selection {
    background-color: #ff745c;
    color: white;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .service-card {
        opacity: 1;
        transform: none;
    }
    
    .service-card.revealed {
        animation: none;
    }
    
    .faq-content {
        transition: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ff745c;
    outline-offset: 2px;
}

/* Form select arrow */
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='%23ff745c' stroke-width='2.5' 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;
}

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