/* Custom Styles for Jim Doran and Son General Contractors */

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Clip Path for Hero */
.clip-diagonal {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Navbar Scroll State */
.nav-scrolled {
    background: rgba(254, 252, 251, 0.97) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .nav-logo-text {
    color: #1c1917 !important;
}

.nav-scrolled .nav-logo-sub {
    color: #732727 !important;
}

.nav-scrolled .menu-line {
    background: #1c1917 !important;
}

/* Hero Animations */
@keyframes heroSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-tagline {
    animation: heroSlideUp 0.8s ease-out 0.2s both;
}

.hero-image {
    animation: heroSlideUp 0.8s ease-out 0.4s both;
}

/* Service Cards */
.service-card {
    position: relative;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(115, 39, 39, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Testimonial Cards */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

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

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

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

/* Hamburger Animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* 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;
    }
    
    .reveal.hidden-reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

/* Selection Color */
::selection {
    background: #fce7e7;
    color: #5f2222;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid #732727;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav, #backToTop, .gallery-item::after {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
