/* ============================================
   THE REFUGE HOSTEL — Custom Styles
   Classic & Elegant · Deep Navy + Warm Gold
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: rgba(200, 169, 97, 0.3);
    color: #f0f2f8;
}

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

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

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

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

/* ---------- Navbar ---------- */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(7, 16, 28, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(200, 169, 97, 0.1);
}

.nav-link {
    position: relative;
}

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

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

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

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

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

/* Menu button animation */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

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

/* ---------- Room Cards ---------- */
.room-card {
    background: rgba(13, 31, 53, 0.5);
    border: 1px solid rgba(30, 64, 102, 0.3);
    padding: 0;
    transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.room-card:hover {
    border-color: rgba(200, 169, 97, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ---------- Experience Cards ---------- */
.experience-card {
    border: 1px solid rgba(30, 64, 102, 0.2);
    transition: border-color 0.4s ease;
}

.experience-card:hover {
    border-color: rgba(200, 169, 97, 0.3);
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(7, 16, 28, 0);
    transition: background 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    background: rgba(7, 16, 28, 0.2);
}

/* ---------- Form Styles ---------- */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #C8A961 !important;
    box-shadow: 0 0 0 3px rgba(200, 169, 97, 0.1);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236a89ac' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ---------- Scroll Reveal (Progressive Enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    .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; }
}

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

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    #hero {
        min-height: 100vh;
    }

    .room-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    #hero h1 {
        font-size: 2.5rem;
    }
}
