/* Peninsula Roofing — Custom Styles */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf9f7;
}
::-webkit-scrollbar-thumb {
    background: #d9cdb8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a88b6a;
}

/* Selection color */
::selection {
    background: #b92f2f;
    color: #fefdfb;
}

/* Service card hover animation */
.service-card {
    transform: translateY(0);
}
.service-card:hover {
    transform: translateY(-4px);
}

/* Gallery item */
.gallery-item {
    cursor: pointer;
}

/* Mobile nav link underline animation */
.mobile-nav-link {
    position: relative;
}
.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #7f1f1f;
    transition: width 0.3s ease;
}
.mobile-nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}
.navbar-scrolled .nav-link {
    color: #5e4a3a !important;
}
.navbar-scrolled .nav-link:hover {
    color: #7f1f1f !important;
}
.navbar-scrolled .font-serif {
    color: #7f1f1f !important;
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

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

/* Print styles */
@media print {
    header, #back-to-top, #mobile-menu-btn {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
