/* Custom styles for JCB Home Inspection Service */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9f3;
}
::-webkit-scrollbar-thumb {
    background: #d4a0aa;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

/* Selection color */
::selection {
    background: #f9d0d9;
    color: #5c1f2b;
}

/* Mobile menu animation */
.menu-line {
    display: block;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Service card hover effects */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(123, 45, 59, 0.15);
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.1);
}

/* Fade-in animations for below-fold content */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero text animation - only decorative, content is always visible */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: no-preference) {
    .floating {
        animation: float 6s ease-in-out infinite;
    }
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 1px #7B2D3B;
}

/* Image loading optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {
    nav, button, #contact-form {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
