/* Custom Styles for City of Newark Hotels & Lodging */

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Navbar transitions */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(2, 44, 34, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(245, 240, 227, 0.1);
}

.nav-light {
    background: rgba(253, 252, 248, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.1);
}

/* Mobile menu animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuToggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuToggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

#menuToggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Mobile menu open state */
.mobile-menu-open {
    transform: translateX(0) !important;
}

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

/* Room card hover */
.room-card {
    opacity: 1;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(2, 44, 34, 0.12);
}

/* Feature items */
.feature-item {
    opacity: 1;
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered reveal delays */
.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; }

/* Form focus styles */
input:focus, select:focus, textarea:focus {
    border-color: rgb(4, 120, 87) !important;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.1) !important;
}

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

::-webkit-scrollbar-track {
    background: rgb(250, 248, 240);
}

::-webkit-scrollbar-thumb {
    background: rgb(6, 78, 59, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(6, 78, 59, 0.5);
}

/* Selection color */
::selection {
    background: rgb(6, 78, 59, 0.2);
    color: rgb(2, 44, 34);
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, rgb(245, 240, 225) 0%, rgb(239, 232, 211) 100%);
}
