/* Custom styles for Top Rated Heating & Cooling */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7f1d1d;
}

/* Selection color */
::selection {
    background: #991b1c;
    color: #fff;
}

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

/* Animation for scroll reveals */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Line reveal animation */
.line-reveal {
    position: relative;
    overflow: hidden;
}

.line-reveal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: translateX(-101%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.line-reveal.is-visible::after {
    transform: translateX(0);
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Magazine grid layout */
.magazine-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .magazine-grid {
        grid-template-columns: 0.8fr 1.2fr;
        gap: 4rem;
        align-items: center;
    }
    
    .magazine-grid-reverse {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

/* Thin borders */
.thin-border-bottom {
    border-bottom: 1px solid rgba(28, 25, 23, 0.1);
}

.thin-border-top {
    border-top: 1px solid rgba(28, 25, 23, 0.1);
}

.thin-border-left {
    border-left: 1px solid rgba(28, 25, 23, 0.1);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .hover-lift {
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    nav,
    .reveal-on-scroll,
    button,
    iframe {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

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

/* Navbar scroll effect */
#navbar.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
