/* Custom styles for J and T Roofing and Construction */

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

/* Base transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Navbar styles */
#navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(13, 33, 55, 0.06);
}

#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(13, 33, 55, 0.1);
}

/* Primary button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(20, 184, 166, 0.4);
    background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%);
    color: #ffffff;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary button */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #1e2d48;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #d0d7e4;
    cursor: pointer;
    font-size: 1rem;
}

.btn-secondary:hover {
    border-color: #14b8a6;
    color: #0d9488;
    background: rgba(20, 184, 166, 0.05);
}

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

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

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

/* Service cards */
.service-card {
    opacity: 1;
}

/* Gallery items */
.gallery-item {
    position: relative;
}

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

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

/* Mobile menu */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.mobile-menu.active {
    max-height: 400px;
}

.mobile-menu-link {
    display: block;
    padding: 0.5rem 0;
}

/* Scroll reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Selection color */
::selection {
    background: #99f6e4;
    color: #042f2e;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #99f6e4;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2dd4bf;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    #hero h1 {
        font-size: 2.25rem;
    }

    #hero h1 br {
        display: none;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .service-card:hover,
    .testimonial-card:hover {
        transform: none;
    }

    .gallery-item img {
        transition: none;
    }

    .gallery-item:hover img {
        transform: none;
    }
}
