/* Custom styles beyond Tailwind */

/* Base font smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero section - ensure text is readable */
#hero {
    position: relative;
}

/* Navigation transitions */
#navbar.scrolled {
    background: rgba(15, 28, 10, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Service card shimmer effect on hover */
.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transition: left 0.5s ease;
    border-radius: inherit;
}

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card:hover::after {
    left: 100%;
}

/* Decorative line animation on scroll */
.reveal-line {
    animation: expandLine 0.8s ease forwards;
}

@keyframes expandLine {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

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

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

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

/* Mobile menu button animation */
.menu-line:nth-child(1) {
    transform-origin: top;
}

.menu-line:nth-child(2) {
    transform-origin: center;
}

.menu-line:nth-child(3) {
    transform-origin: bottom;
}

#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) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Custom focus styles */
input:focus,
textarea:focus,
button:focus {
    outline: none;
}

/* Print styles */
@media print {
    nav, #backToTop, .mobile-menu {
        display: none !important;
    }
    
    body {
        color: #1f3815;
        background: white;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }
}

/* Large screen adjustments */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
