/* ============================================================
   AAMA RESIDENCY — Responsive & Robust Stylesheet (Final)
   Author: Abhishek Kumar (updated)
   Date Updated: 20 Nov 2025
   Notes: Full responsive behavior, fixed navbar, accessible CTAs,
          robust CSS-only nav active fix, minimal global footer.
   ============================================================ */

/* =========================
   0. GLOBAL: BOX-SIZING + VARIABLES
   ========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --nav-height: 70px;
    --page-bg: #c4ab7b;           /* warm cream */
    --nav-bg: #78C7B1;            /* navbar background (merged) */
    --accent: #007bff;
    --accent-blue: #0288D1;
    --accent-light: #4FC3F7;
    --gold-1: #FFD700;
    --gold-2: #FFB300;
    --text-dark: #2b2b2b;
    --max-width: 1200px;
    --container-pad: 16px;
    --radius: 12px;
    --transition-fast: 0.18s;
}

/* =========================
   1. GLOBAL BODY & BASE
   ========================= */
html, body { height: 100%; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-align: center;
    background-color: var(--page-bg);
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.45;
    padding-top: calc(var(--nav-height) + 12px); /* reserve space under fixed nav */
}

/* Page container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

/* =========================
   2. NAVBAR / HEADER (fixed, accessible)
   ========================= */
/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--nav-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

/* Nav links container */
.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  align-items: center;
}

/* Base link style (applies to nav-item and auth when nav-item present) */
.nav-item {
  text-decoration: none;
  font-weight: 600;
  color: #0f3330;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s ease, box-shadow 0.25s ease, transform 0.18s ease, color 0.18s ease;
  display: inline-block;
}

/* Hover glow (shared) */
.nav-item:hover,
.nav-item:focus {
  background: rgba(255,255,255,0.32);
  color: #02363a;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
  transform: translateY(-2px);
}

/* Visual active state (used if HTML has .active) */
.nav-item.active {
  background: rgba(255,255,255,0.45);
  color: #02363a;
  box-shadow: 0 0 12px rgba(255,255,255,0.75);
  transform: translateY(-1px);
}

/* Auth button default visual — still overrideable by nav-item class */
.auth-btn {
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

/* Auth hover when used with nav-item for consistent look */
.auth-btn.nav-item:hover {
  background: linear-gradient(180deg, var(--accent), #0063cc);
  box-shadow: 0 6px 18px rgba(0,99,204,0.18), 0 0 8px rgba(255,255,255,0.15) inset;
  color: #fff;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .nav-links { gap: 12px; }
  .auth-btn { padding: 7px 10px; }
}

/* =========================
   2B. PURE CSS ACTIVE HIGHLIGHT (body-class and robust override)
   ========================= */

/* Neutralize any leftover .active so body-class driven styles win */
.nav-links a.nav-item.active,
.nav-links a.nav-item.active:hover,
.nav-links a.nav-item.active:focus {
  background: none !important;
  color: inherit !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Strong page-class based highlight (preferred; highest specificity) */
body.home-page    .nav-links a[href*="index"]    ,
body.about-page   .nav-links a[href*="about"]    ,
body.room-page    .nav-links a[href*="room"]     ,
body.service-page .nav-links a[href*="services"] ,
body.contact-page .nav-links a[href*="contact"]  {
  background: rgba(255,255,255,0.45) !important;
  color: #02363a !important;
  box-shadow: 0 0 12px rgba(255,255,255,0.75) !important;
  transform: translateY(-1px) !important;
}

/* Fallback: if no body-class provided, apply highlight based on href contents.
   This is intentionally less strict but keeps the nav working. */
html:not([class*="home-page"]):not([class*="about-page"]):not([class*="room-page"]):not([class*="service-page"]):not([class*="contact-page"])
  .nav-links a[href*="room"] {
  background: rgba(255,255,255,0.45) !important;
  color: #02363a !important;
  box-shadow: 0 0 12px rgba(255,255,255,0.75) !important;
  transform: translateY(-1px) !important;
}

/* Keep hover visual but avoid overriding forced active */
.nav-links a.nav-item:hover {
  background: rgba(255,255,255,0.32);
  color: #02363a;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
  transform: translateY(-2px);
}

/* =========================
   3. LOGO / HEADER IMAGE
   ========================= */
.logo-container {
  max-width: 400px;
  width: 100%;
  margin: calc(var(--nav-height) + 10px) auto 20px; /* ensure visible under fixed nav */
  padding: 12px;
  text-align: center;
  overflow: visible;
}

.hotel-logo {
  width: 320px;
  max-width: 70vw;
  height: auto;
  display: inline-block;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  transition: transform 280ms cubic-bezier(.2,.9,.2,1), box-shadow 280ms cubic-bezier(.2,.9,.2,1);
}

.hotel-logo:hover,
.hotel-logo:focus {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
  z-index: 20;
}

/* =========================
   4. MAIN / ABOUT / CONTENT
   ========================= */
main {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 18px var(--container-pad) 48px;
    text-align: center;
    flex: 1; /* allow footer to stick to bottom when content short */
}

/* Hero */
.hero-title { font-size: 1.7rem; margin: 6px 0 6px; font-weight: 800; color: var(--text-dark); }
.hero-sub { font-size: 0.95rem; color: rgba(0,0,0,0.75); margin-bottom: 18px; line-height: 1.5; }

/* =========================
   5. ROOMS & SERVICES (responsive grid)
   ========================= */
.rooms-services { text-align: center; padding: 28px 16px; margin: 12px auto; max-width: 1100px; }

.room-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: stretch;
    margin: 10px 0 18px;
}

.room-card {
    background: rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.10);
    transition: transform .18s ease, box-shadow .18s ease;
}
.room-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,0.12); }

.room-type {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.06);
    text-align: left;
    transition: transform .18s ease, box-shadow .18s ease;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* =========================
   6. CTA BUTTON (global-book-btn)
   ========================= */
.global-book-btn {
    display: inline-block;
    padding: 14px 36px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-blue));
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.45s ease;
    box-shadow: 0 6px 16px rgba(2,136,209,0.22);
    border: none;
    border-radius: 50px;
}

.global-book-btn:hover,
.global-book-btn:focus {
    background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
    color: #000;
    transform: translateY(-3px);
    text-shadow: 0 0 8px rgba(255,215,0,0.6);
    box-shadow: 0 12px 25px rgba(255,215,0,0.18);
}

/* Mobile-friendly */
@media (max-width: 600px) {
    .global-book-btn {
        display: block;
        margin: 18px auto;
        width: calc(100% - 40px);
        max-width: 420px;
        text-align: center;
    }
}

/* =========================
   7. TEAM / GALLERY
   ========================= */
.team { padding: 28px 16px; background: rgba(255,255,255,0.04); margin-top: 20px; }
.team h2 { margin-bottom: 18px; font-size: 1.7rem; color: var(--text-dark); text-transform: capitalize; }
.team-grid { display: grid; grid-template-columns: 1fr; gap: 18px; max-width: 1100px; margin: 0 auto; }

.gallery-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:14px; max-width:1100px; margin:0 auto; }
.gallery-grid img { width:100%; border-radius:10px; height:200px; object-fit:cover; transition: transform .25s ease, box-shadow .25s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* =========================
   8. MAP
   ========================= */
.map iframe { width:100%; height:400px; border:0; border-radius:10px; }

/* =========================
   9. UTILITIES + ACCESSIBILITY
   ========================= */
.hidden{ display:none!important; }
.text-left{ text-align:left; }
.text-center{ text-align:center; }
.small { font-size: 0.88rem; color: rgba(0,0,0,0.7); }

a:focus { outline: none; }
a:focus-visible { outline: 3px solid rgba(79,195,247,0.28); outline-offset: 3px; border-radius: 6px; }

/* =========================
   10. TYPOGRAPHY SIZING (responsive)
   ========================= */
h1 { font-size: 2.1rem; margin: 18px 0 8px; }
h2 { font-size: 1.6rem; margin: 12px 0; }
h3 { font-size: 1.15rem; margin: 8px 0; }

/* =========================
   11. RESPONSIVE BREAKPOINTS
   ========================= */
@media (max-width: 1100px) {
    :root { --max-width: 980px; }
    .room-grid { grid-template-columns: repeat(2, 1fr); }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    :root { --max-width: 860px; }
    .room-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    :root { --nav-height: 62px; }

    .navbar {
        padding: 0 10px;
        height: var(--nav-height);
    }

    .nav-links {
        gap: 12px;
        font-size: 14px;
    }

    .container, main { padding: 0 12px; }

    .room-grid { grid-template-columns: 1fr; }

    .hotel-logo { width: 180px; max-width: 54vw; }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.35rem; }

    .team-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1400px) {
    :root { --max-width: 1400px; }
    .room-grid { gap: 20px; }
}

/* =========================
   12. Animations
   ========================= */
@keyframes fadeUp { from{ opacity:0; transform:translateY(20px);} to{opacity:1; transform:translateY(0);} }

/* =========================
   13. LOGIN PAGE (kept compact)
   ========================= */
.login-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--nav-height) - 20px);
    padding: 20px 0;
    box-sizing: border-box;
}

.login-box {
    width: 380px;
    max-width: 92%;
    padding: 32px 26px;
    border-radius: 18px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    text-align: center;
    margin: 0 auto;
}

/* Input group basics (compact) */
.input-field { position: relative; margin-bottom: 14px; }
.input-field input {
    width: 90%;
    max-width: 260px;
    margin: 0 auto;
    padding: 12px 14px;
    padding-left: 46px;
    border-radius: 25px;
    border: 1px solid rgba(0,0,0,0.12);
    background: #fff;
    font-size: 15px;
}

/* =========================
   14. FOOTER (ultra-minimal)
   ========================= */
footer {
    text-align: center;
    padding: 16px 10px;
    font-size: .9rem;
    background: rgba(0,0,0,.12);
    margin-top: 30px;
}

/* =========================
   15. FINAL NAV FIX (defensive, tolerant)
   Put at the absolute end to ensure it wins specificity
   ========================= */

/* Neutralize any remaining .active from HTML (so body-class driven wins) */
.nav-links a.nav-item.active,
.nav-links a.nav-item.active:hover,
.nav-links a.nav-item.active:focus {
  background: none !important;
  color: inherit !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Force highlight based on body page-class (highest specificity) */
body.home-page    .nav-links a[href*="index"],
body.about-page   .nav-links a[href*="about"],
body.room-page    .nav-links a[href*="room"],
body.service-page .nav-links a[href*="service"],
body.contact-page .nav-links a[href*="contact"] {
  background: rgba(255,255,255,0.45) !important;
  color: #02363a !important;
  box-shadow: 0 0 12px rgba(255,255,255,0.75) !important;
  transform: translateY(-1px) !important;
}

/* Fallback: if body has no page-class, highlight 'room' link (useful during dev) */
html:not([class*="home-page"]):not([class*="about-page"]):not([class*="room-page"]):not([class*="service-page"]):not([class*="contact-page"])
  .nav-links a[href*="room"] {
  background: rgba(255,255,255,0.45) !important;
  color: #02363a !important;
  box-shadow: 0 0 12px rgba(255,255,255,0.75) !important;
  transform: translateY(-1px) !important;
}

/* End of stylesheet */
