/* ============================================
   Masonic Lodge Bradford — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

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

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

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

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

/* Selection Color */
::selection {
    background: #c9983e;
    color: #0a1628;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(10, 22, 40, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   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.2s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.5s; }

/* Hamburger Animation */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ============================================
   Hero Section
   ============================================ */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 22, 40, 0.9) 0%,
        rgba(18, 36, 65, 0.75) 50%,
        rgba(10, 22, 40, 0.85) 100%
    );
    z-index: 1;
}

#hero > *:not(.absolute) {
    position: relative;
    z-index: 2;
}

/* ============================================
   Room Cards
   ============================================ */
.room-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.room-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Amenity Cards
   ============================================ */
.amenity-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.amenity-card:hover {
    transform: translateY(-6px);
}

/* ============================================
   Gallery Items
   ============================================ */
.gallery-item {
    cursor: pointer;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, 0);
    transition: background 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    background: rgba(10, 22, 40, 0.2);
}

/* ============================================
   Scroll Reveal Animations
   (Progressive Enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .reveal.revealed {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    .reveal-left {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .reveal-left.revealed {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .reveal-left.revealed.active {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Without JS / reduced motion: ensure everything is visible */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal, .reveal-left {
        opacity: 1;
        transform: none;
    }
}

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

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

@media (max-width: 640px) {
    .px-6 {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
