/* Custom styles for Freehill Asphalt */

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

/* Navbar transition */
.nav-text {
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-text {
    color: #1c1917;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-blur: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

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

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

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

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

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

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

/* Service card hover */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

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

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger children */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* Floating animation for hero cards */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.floating-card-1 {
    animation: float 6s ease-in-out infinite;
}

.floating-card-2 {
    animation: float 5s ease-in-out infinite 1s;
}

.floating-card-3 {
    animation: float 4s ease-in-out infinite 0.5s;
}

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

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

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

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

/* Selection color */
::selection {
    background: #fbbf24;
    color: #641631;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #f5f5f4 0%, #e7e5e4 100%);
}

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

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}
