/* Custom styles and overrides */

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Hero text animation */
#hero h1 {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease forwards 0.3s;
}

#hero p {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease forwards 0.6s;
}

#hero .flex.flex-col {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease forwards 0.9s;
}

#hero p.font-sans:first-of-type {
    animation-delay: 0.5s;
}

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

/* Service card stagger animation */
.service-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Section animations */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Header scroll state */
#header.scrolled {
    background: rgba(253, 252, 248, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 94, 32, 0.08);
}

/* Mobile menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Menu toggle animation */
.menu-toggle-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Nav link hover underline */
.nav-link {
    position: relative;
}

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #0D3B12;
}

/* 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='%231B5E20' 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;
}

/* Input focus transitions */
input:focus, textarea:focus, select:focus {
    outline: none;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

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

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

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

/* Counter animation */
.counter {
    display: inline-block;
}

/* Print styles */
@media print {
    #header, #mobile-menu, .animate-bounce {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    section {
        page-break-inside: avoid;
    }
}
