/* Cherry Hill Farm Bed & Breakfast — Custom Styles */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9ee;
}
::-webkit-scrollbar-thumb {
    background: #8fb896;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5f966e;
}

/* Navbar Scrolled State */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 20px rgba(45, 90, 61, 0.08) !important;
}

.nav-scrolled .font-serif,
.nav-scrolled .text-forest-700 {
    color: #1a3626 !important;
}

.nav-scrolled .nav-link {
    color: #2d5a3d !important;
}

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

/* Floating Card Animations */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(-0.5deg); }
}

@keyframes float-fast {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.3deg); }
}

.floating-card {
    animation-duration: 4s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.animate-float-slow {
    animation-name: float-slow;
}

.animate-float-medium {
    animation-name: float-medium;
}

.animate-float-fast {
    animation-name: float-fast;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Mobile Menu */
#mobileMenu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    animation: fadeInLink 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.mobile-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-link:nth-child(4) { animation-delay: 0.2s; }
.mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeInLink {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Active nav link */
.nav-link.active {
    color: #3d7a52 !important;
    background: rgba(143, 184, 150, 0.1);
}

/* Image hover effects */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Selection color */
::selection {
    background: #dce8df;
    color: #1a3626;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #3d7a52;
    outline-offset: 2px;
}

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

/* Tablet adjustments */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
}

/* Print styles */
@media print {
    nav, #contact, footer {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}
