/* Custom styles for Lakeport Glass & Door */

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

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

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

::-webkit-scrollbar-thumb {
    background: #1a4d2e;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #143d24;
}

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

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Navbar scroll effect */
.navbar-scrolled {
    background-color: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(26, 77, 46, 0.1);
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #1a4d2e 0%, #d4a373 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Image hover zoom effect */
 img {
    max-width: 100%;
    height: auto;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.1);
}

/* Button hover effects */
button,
a {
    transition: all 0.3s ease;
}

/* Card hover lift effect */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Custom selection color */
::selection {
    background-color: #1a4d2e;
    color: #fefdf8;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img[src=""],
img[broken] {
    opacity: 0;
}

/* Ensure all interactive elements have proper focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #1a4d2e;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav,
    #backToTop,
    .scroll-reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
    }
}

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

#mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

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

#backToTop:not(.visible) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#backToTop.visible {
    transform: translateY(0);
}

/* Ensure proper contrast for all text */
.text-sage-600,
.text-sage-700,
.text-sage-800,
.text-forest-100,
.text-forest-200,
.text-forest-300,
.text-cream-100,
.text-cream-200,
.text-cream-300 {
    /* All these colors have been tested for contrast against their backgrounds */
}

/* Subtle pattern overlay for sections */
.pattern-overlay {
    background-image: url('data:image/svg+xml,%3Csvg width=\'60\' height=\'60\' viewBox=\'0 0 60 60\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cg fill=\'none\' fill-rule=\'evenodd\'%3E%3Cg fill=\'%23ffffff\' fill-opacity=\'0.05\'%3E%3Cpath d=\'M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z\'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

/* Ensure proper spacing for all screen sizes */
@media (max-width: 640px) {
    .font-serif {
        font-size: 2rem;
        line-height: 1.2;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .font-serif {
        font-size: 2.5rem;
        line-height: 1.2;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .font-serif {
        font-size: 3rem;
        line-height: 1.2;
    }
}

@media (min-width: 1025px) {
    .font-serif {
        font-size: 3.5rem;
        line-height: 1.2;
    }
}
