/* Custom styles for High Country Roofing */

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

/* Selection color */
::selection {
    background: #C9A227;
    color: #0a1628;
}

/* Navbar transitions */
#navbar {
    transition: background-color 0.5s ease, padding 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

#navbar.scrolled .nav-link,
#navbar.scrolled a:not(.nav-link):not([class*="bg-"]):not([class*="border-"]) {
    color: rgba(255, 255, 255, 0.7);
}

/* Service card hover effects */
.service-card {
    transition: background-color 0.5s ease;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C9A227, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
#mobile-menu.open .mobile-link:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }

/* Custom select styling */
select option {
    background: #0a1628;
    color: #fff;
}

/* 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);
}

/* Staggered fade-in for service cards */
.service-card:nth-child(1) { transition-delay: 0.0s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }
.service-card:nth-child(4) { transition-delay: 0.3s; }
.service-card:nth-child(5) { transition-delay: 0.4s; }
.service-card:nth-child(6) { transition-delay: 0.5s; }

/* Image lazy load placeholder */
img {
    background: linear-gradient(135deg, #1a2a4a 0%, #0a1628 100%);
}

/* Remove default focus outline and replace with custom */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #C9A227;
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #D4AF37;
}

/* Gallery image hover */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* Ensure all transitions are smooth */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
