/* Custom styles for The Cedars B&B */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #c25233;
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        animation: fadeInUp 0.8s ease forwards;
    }
    
    .reveal-left {
        opacity: 0;
        animation: fadeInLeft 0.8s ease forwards;
    }
    
    .reveal-right {
        opacity: 0;
        animation: fadeInRight 0.8s ease forwards;
    }
    
    .reveal-up:nth-child(1) { animation-delay: 0.1s; }
    .reveal-up:nth-child(2) { animation-delay: 0.2s; }
    .reveal-up:nth-child(3) { animation-delay: 0.3s; }
    .reveal-left { animation-delay: 0.2s; }
    .reveal-right { animation-delay: 0.2s; }
}

/* Fallback for no-JS: ensure content is visible */
.no-js .reveal-up,
.no-js .reveal-left,
.no-js .reveal-right {
    opacity: 1;
    animation: none;
}

/* Hero parallax effect */
#hero {
    perspective: 10px;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateZ(-10px) scale(1.1);
    background-image: url('https://images.pexels.com/photos/8082235/pexels-photo-8082235.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=1080');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Button hover effects */
button, a {
    -webkit-tap-highlight-color: transparent;
}

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

/* Image loading optimization */
img {
    loading: lazy;
    decoding: async;
}

/* Responsive typography */
@media (max-width: 640px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .font-serif {
        font-size: clamp(2.5rem, 6vw, 3.5rem);
    }
}

/* Print styles */
@media print {
    #navbar,
    #hero,
    .reveal-up,
    .reveal-left,
    .reveal-right {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
