/* ============================================
   Cabin at Trails End Bed and Breakfast
   Custom Styles
   ============================================ */

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

/* Custom selection color */
::selection {
    background-color: #7B2D3B;
    color: #fff;
}

/* ============================================
   Navbar Styles
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

#navbar.scrolled .nav-link {
    color: #4a5568;
}

#navbar.scrolled .nav-link:hover {
    color: #7B2D3B;
}

#navbar.scrolled .font-serif {
    color: #7B2D3B;
}

/* ============================================
   Reveal Animations
   ============================================ */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal[data-revealed="false"] {
    opacity: 0;
    transform: translateY(30px);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .group img {
        transition: none;
    }
}

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

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

#mobile-menu.hidden {
    animation: none;
    display: none;
}

/* ============================================
   Back to Top Button
   ============================================ */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:not(.visible) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.5;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}

/* ============================================
   Focus Visible for Accessibility
   ============================================ */
*:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* ============================================
   Subtle Hover Effects
   ============================================ */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* ============================================
   Image Loading Placeholder
   ============================================ */
img {
    background: linear-gradient(135deg, #fdf2f4 0%, #fce7eb 100%);
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #back-to-top,
    button {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
