/* Custom Styles for The NEST Bed & Breakfast */

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

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

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

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

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

/* Selection color */
::selection {
    background: #c5dfca;
    color: #1d3123;
}

/* Animation keyframes */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* Fade in animation for scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered fade-in for children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.3s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.4s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.5s; }

.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar transition */
.nav-scrolled {
    background: rgba(252, 251, 249, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(43, 78, 52, 0.1);
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #366241 !important;
}

/* Date input styling */
input[type="date"] {
    color: #2d2d2d;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.4) sepia(1) saturate(5) hue-rotate(90deg);
    cursor: pointer;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover underline animation for links */
.hover-underline {
    position: relative;
}

.hover-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease-out;
}

.hover-underline:hover::after {
    width: 100%;
}

/* Image hover effect */
img {
    transition: transform 0.7s ease-out;
}

/* Reduce motion for accessibility */
@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;
    }
}

/* Print styles */
@media print {
    nav,
    #contact,
    button {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
