/* Custom styles for Hut Construction */

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

/* Navbar transitions */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 252, 248, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(45, 90, 61, 0.08);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #1e3d28;
}

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

.nav-link {
    position: relative;
}

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

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

#navbar:not(.scrolled) .nav-link {
    color: #1e3d28;
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.2s ease, color 0.2s ease;
}

.mobile-menu-link:hover {
    padding-left: 8px;
    color: #2D5A3D;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Hero section */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #FDFCF8, transparent);
    z-index: 1;
    pointer-events: none;
}

/* Service cards hover effect */
.group:hover .group-hover\:bg-forest-500 {
    background-color: #2D5A3D;
}

/* Form styling */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.15);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8fb88e;
}

/* Selection color */
::selection {
    background: #dce8df;
    color: #1e3d28;
}

/* Image hover zoom */
img {
    transition: transform 0.5s ease;
}

/* Fade in animation for hero content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero > .relative > .relative.z-10 > .max-w-2xl > * {
    animation: fadeInUp 0.8s ease forwards;
}

#hero > .relative > .relative.z-10 > .max-w-2xl > *:nth-child(1) { animation-delay: 0.1s; }
#hero > .relative > .relative.z-10 > .max-w-2xl > *:nth-child(2) { animation-delay: 0.3s; }
#hero > .relative > .relative.z-10 > .max-w-2xl > *:nth-child(3) { animation-delay: 0.5s; }
#hero > .relative > .relative.z-10 > .max-w-2xl > *:nth-child(4) { animation-delay: 0.7s; }

/* Subtle pattern overlay for cream sections */
.bg-cream-50::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(45, 90, 61, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

/* Testimonial quote decoration */
.text-forest-200 svg {
    opacity: 0.6;
}

/* Button ripple effect on hover */
button[type="submit"]:hover {
    transform: scale(1.02);
}

button[type="submit"]:active {
    transform: scale(0.98);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #hero {
        min-height: 100vh;
    }

    #hero::after {
        height: 80px;
    }

    .font-serif {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}

/* Print styles */
@media print {
    #navbar, .scroll-indicator, .animate-bounce {
        display: none;
    }
}
