/* Custom styles for Heron's Nest Vacation Rental */

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

/* Scroll reveal base styles - content is visible by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Only apply hidden state when JS is active and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal:not(.revealed) {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Navbar transition */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(30, 58, 95, 0.08);
}

#navbar.scrolled .nav-logo-text {
    color: #1e3a5f;
}

/* Hero gradient overlay - ensures text readability */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 28, 46, 0.6) 0%,
        rgba(30, 58, 95, 0.4) 50%,
        rgba(15, 28, 46, 0.7) 100%
    );
    z-index: 1;
    pointer-events: none;
}

#hero > .relative {
    position: relative;
    z-index: 2;
}

/* Subtle pattern overlay on gallery section */
#gallery {
    position: relative;
}

#gallery::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(212, 168, 83, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

/* Custom focus styles */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.2);
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Image lazy loading fade */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #627d98;
}

/* 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;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem;
    }
    
    .scroll-reveal:not(.revealed) {
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    #navbar,
    #contact-form,
    button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
