/* Custom styles for Salty Breeze Cottages */

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

/* Navbar transition states */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(34, 57, 27, 0.08);
}

.nav-scrolled .nav-text {
    color: #294521 !important;
}

.nav-scrolled .nav-link {
    color: #3d6d31 !important;
}

/* Floating card animations */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1.3s;
}

.floating-card:nth-child(3) {
    animation-delay: -2.6s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Scroll reveal base styles */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

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

/* Mobile link transitions */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #3d6d31;
    transition: width 0.3s ease;
}

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

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

/* Selection color */
::selection {
    background: #c5dfb5;
    color: #22391b;
}

/* Reduced motion support */
@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;
    }
    
    .floating-card {
        animation: none;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9cc587;
}

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

img[loading="lazy"]:not([src]) {
    opacity: 0;
}
