/* ============================================
   Hotel Amelia & General Store — Custom Styles
   ============================================ */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

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

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

/* Selection */
::selection {
    background: rgba(212, 168, 83, 0.3);
    color: #f5d5c8;
}

/* Navbar Transition States */
#navbar.scrolled {
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

#navbar.scrolled .menu-line {
    background: #d4a853;
}

/* Mobile Menu Animations */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu .mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Mobile Menu Button Active State */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Room Card Hover */
.room-card {
    position: relative;
}

.room-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #d4a853, #e8c878);
    transition: width 0.5s ease;
}

.room-card:hover::after {
    width: 100%;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Reduced 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;
    }
}

/* Gold shimmer animation for hero */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Pulse for CTA elements */
@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 168, 83, 0.3); }
    50% { box-shadow: 0 0 20px 5px rgba(212, 168, 83, 0.1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .room-card::after {
        display: none;
    }
    
    /* Ensure map is readable on mobile */
    iframe {
        filter: invert(90%) hue-rotate(180deg) brightness(0.9) contrast(0.9) !important;
    }
}

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

/* Image lazy load fallback */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
