/* ══════════════════════════════════════
   MacauStays — styles.css
   Imperial red + gold palette
   ══════════════════════════════════════ */

/* ── RESET & ROOT ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:         #100606;
  --surface:    #1a0a0a;
  --surface2:   #240e0e;
  --border:     #3a1818;
  --gold:       #d4a84b;
  --gold-light: #ebc878;
  --red:        #a8232c;
  --red-deep:   #6b1218;
  --text:       #f4ece0;
  --muted:      #a08585;
  --muted2:     #6a4f4f;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

/* ── NAV ── */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 200;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
}

.logo span {
  color: var(--text);
  font-weight: 300;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-badge {
  background: rgba(212,168,75,0.12);
  border: 1px solid rgba(212,168,75,0.3);
  color: var(--gold);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  gap: 1.2rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color .2s;
  cursor: pointer;
}

.nav-links a:hover {
  color: var(--text);
}

/* ── PAGE VISIBILITY ── */
.page { display: none; }
.page.active { display: block; }

/* ── HERO ── */
.hero {
  padding: 5rem 2rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(212,168,75,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.hero h1 em {
  color: var(--gold);
  font-style: normal;
}

.hero p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 1.5rem;
  font-weight: 300;
}

.hero-note {
  font-size: 11px;
  color: var(--muted2);
  letter-spacing: 0.05em;
}

/* ── REGION TABS ── */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 2rem 2rem;
}

.tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 18px;
  border-radius: 30px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  font-family: 'DM Sans', sans-serif;
}

.tab:hover,
.tab.active {
  background: rgba(212,168,75,0.12);
  border-color: rgba(212,168,75,0.4);
  color: var(--gold);
}

/* ── HOTEL LIST ── */
.section {
  padding: 0 2rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.region-group { display: none; }
.region-group.visible { display: block; }

.region-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.region-heading h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--text);
}

.region-flag { font-size: 1.4rem; }

.hotel-card {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 10px;
  transition: border-color .2s, background .2s;
}

.hotel-card:hover {
  border-color: rgba(212,168,75,0.35);
  background: var(--surface2);
}

.hotel-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.hotel-name {
  font-size: .98rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
}

.hotel-loc {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.hotel-badges {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 20px;
}

.badge-casino {
  background: rgba(168,35,44,0.12);
  border: 1px solid rgba(168,35,44,0.25);
  color: #e8a07a;
}

.badge-resort {
  background: rgba(60,20,20,0.3);
  border: 1px solid rgba(168,35,44,0.2);
  color: #e8a07a;
}

.badge-verified {
  background: rgba(212,168,75,0.08);
  border: 1px solid rgba(212,168,75,0.2);
  color: #d4a84b;
}

.reserve-btn {
  background: linear-gradient(135deg, #b58a2f, #d4a84b);
  color: #100606;
  border: none;
  padding: 10px 22px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .2s, transform .1s;
  flex-shrink: 0;
}

.reserve-btn:hover  { opacity: .88; }
.reserve-btn:active { transform: scale(.97); }

/* ── TURNSTILE MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10,2,2,0.93);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 92%;
  max-width: 400px;
  overflow: hidden;
  position: relative;
}

.modal-topbar {
  height: 5px;
  background: linear-gradient(90deg, var(--gold) 55%, rgba(212,168,75,0.12) 100%);
}

.modal-body { padding: 1.8rem 1.8rem 1.5rem; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  transition: color .2s;
}

.modal-close:hover { color: var(--text); }

.modal-hotel-box {
  background: #1a0a0a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.2rem;
}

.modal-hotel-icon  { font-size: 1.8rem; }
.modal-hotel-name  { font-size: 14px; font-weight: 500; color: var(--text); }
.modal-hotel-loc   { font-size: 12px; color: var(--muted); margin-top: 2px; }

.modal-divider {
  height: 1px;
  background: var(--border);
  margin: .8rem 0 1rem;
}

.modal-verify-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.modal-lock {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(212,168,75,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(212,168,75,0.06);
  flex-shrink: 0;
}

.modal-verify-title { font-size: 15px; font-weight: 500; color: var(--gold); }
.modal-verify-sub   { font-size: 12px; color: var(--muted); margin-top: 2px; }

.modal-ts {
  display: flex;
  justify-content: center;
  min-height: 68px;
  align-items: center;
  margin: .8rem 0 .4rem;
}

.modal-err {
  color: #f87171;
  font-size: 13px;
  margin-bottom: 6px;
  display: none;
}

.modal-footer-note {
  font-size: 10px;
  color: #2a2a3a;
  text-align: center;
  margin-top: 8px;
}

/* ── REDIRECT OVERLAY ── */
.rd-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(10,2,2,0.97);
  align-items: center;
  justify-content: center;
}

.rd-overlay.open { display: flex; }

.rd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 92%;
  max-width: 380px;
  overflow: hidden;
}

.rd-topbar        { height: 5px; display: flex; }
.rd-topbar-fill   { background: var(--gold); }
.rd-topbar-rest   { flex: 1; background: rgba(255,255,255,0.05); }
.rd-body          { padding: 1.6rem 1.8rem 1.4rem; }

.rd-label {
  font-size: 10px;
  color: #333;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}

.rd-title {
  font-size: 1.25rem;
  font-family: 'Playfair Display', serif;
  color: var(--text);
  margin-bottom: 1rem;
}

.rd-hotel-box {
  background: #1a0a0a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 1rem;
}

.rd-hotel-box p:first-child { font-size: 11px; color: var(--muted); }
.rd-hotel-box p:last-child   { font-size: 14px; font-weight: 500; color: #ebc878; margin-top: 3px; }

.rd-progress {
  height: 4px;
  background: #240e0e;
  border-radius: 2px;
  overflow: hidden;
}

.rd-bar {
  width: 0%;
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 2.2s linear;
}

.rd-note {
  font-size: 10px;
  color: #252530;
  text-align: center;
  margin-top: 10px;
}

/* ── STATIC PAGES ── */
.static-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.static-page h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: .5rem;
}

.static-page .page-date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.static-page h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin: 2rem 0 .7rem;
}

.static-page h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin: 1.4rem 0 .5rem;
}

.static-page p {
  color: #b0adb8;
  font-size: .95rem;
  margin-bottom: .9rem;
  line-height: 1.75;
}

.static-page ul,
.static-page ol {
  color: #b0adb8;
  font-size: .95rem;
  margin: .5rem 0 1rem 1.5rem;
  line-height: 1.9;
}

.static-page a {
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
}

.static-page a:hover { text-decoration: underline; }

.static-page .highlight-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin: 1.2rem 0;
}

.static-page .highlight-box p {
  margin: 0;
  font-size: .9rem;
}

/* ── COOKIE TABLE ── */
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.cookie-table th {
  background: var(--surface2);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  text-align: left;
  border: 1px solid var(--border);
}

.cookie-table td {
  color: #b0adb8;
  font-size: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 8000;
  flex-wrap: wrap;
}

.cookie-banner p {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  min-width: 240px;
}

.cookie-banner a {
  color: var(--gold);
  cursor: pointer;
}

.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }

.cookie-btn-accept {
  background: var(--gold);
  color: #100606;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.cookie-btn-decline {
  background: none;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.cookie-btn-decline:hover { color: var(--text); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  background: var(--surface);
}

.footer-inner { max-width: 1100px; margin: 0 auto; }

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: .8rem;
  letter-spacing: .04em;
}

.footer-col a,
.footer-col button,
.footer-col p {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  display: block;
  margin-bottom: 5px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  text-align: left;
  transition: color .2s;
}

.footer-col a:hover,
.footer-col button:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p { font-size: 11px; color: var(--muted2); }
.footer-bottom strong { color: var(--gold); }

.footer-resp {
  font-size: 11px;
  color: var(--muted2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  margin-top: 1rem;
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE — comprehensive mobile rewrite

   Three breakpoints chosen to match real-device pivots:
     900px  — small laptop / large tablet portrait
     700px  — tablet portrait / large phone landscape (THE main phone breakpoint)
     480px  — phones, including older iPhone SE (320px) up to iPhone 14 Pro Max (430px)

   Every component the page renders gets a mobile rule — nav, hero, tabs,
   hotel cards, both modals, redirect overlay, static pages (About/Privacy/
   Terms/Cookies), cookie table, cookie banner, footer, age gate.
   Hidden global overflow-x prevents any stray element from breaking layout.
   ══════════════════════════════════════════════════════════════════════ */

html, body { overflow-x: hidden; max-width: 100vw; }

/* Notched-phone safety: keep nav/footer/cookie-banner clear of the iPhone
   dynamic-island, the Pixel cutout and the bottom home-indicator. iOS
   exposes these via env(safe-area-inset-*); other browsers ignore them. */
@supports (padding: max(0px)) {
  nav            { padding-left: max(1rem, env(safe-area-inset-left));
                   padding-right: max(1rem, env(safe-area-inset-right)); }
  footer         { padding-left: max(1rem, env(safe-area-inset-left));
                   padding-right: max(1rem, env(safe-area-inset-right));
                   padding-bottom: max(2rem, calc(2rem + env(safe-area-inset-bottom))); }
  .cookie-banner { padding-left: max(1rem, env(safe-area-inset-left));
                   padding-right: max(1rem, env(safe-area-inset-right));
                   padding-bottom: max(0.9rem, calc(0.9rem + env(safe-area-inset-bottom))); }
}

/* ── Tablet portrait + larger phones ──────────────────────────────── */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 1.8rem; }
  .section    { padding: 0 1.5rem 4rem; }
  .static-page{ padding: 2.5rem 1.5rem 4rem; }
}

/* ── Phones (main mobile rules) ───────────────────────────────────── */
@media (max-width: 700px) {
  /* Global padding shrink — desktop 2rem ate too much on 360px screens */
  nav            { padding: 0 1rem; height: 56px; }
  .logo          { font-size: 1.05rem; letter-spacing: 0.02em; }
  .nav-badge     { display: none; }
  .nav-links     { display: none; }
  .nav-right     { gap: 0.6rem; }

  /* Hero */
  .hero          { padding: 2.8rem 1rem 1.8rem; }
  .hero h1       { font-size: clamp(1.55rem, 6.5vw, 2.1rem); margin-bottom: 0.9rem; }
  .hero p        { font-size: 0.92rem; padding: 0 0.25rem; }
  .hero-label    { font-size: 10px; letter-spacing: 0.18em; margin-bottom: 0.7rem; }
  .hero-note     { font-size: 10px; }

  /* Region tabs */
  .tabs          { padding: 0 0.75rem 1.4rem; gap: 6px; }
  .tab           { padding: 6px 14px; font-size: 12px; }

  /* Hotel grid + cards */
  .section       { padding: 0 1rem 2.8rem; }
  .region-heading{ font-size: 1.05rem; padding: 1.2rem 0 0.6rem; }
  .region-flag   { font-size: 1.2rem; }
  .hotel-card    {
    grid-template-columns: 44px 1fr;
    gap: 10px;
    padding: 0.85rem 0.9rem;
    border-radius: 8px;
  }
  .hotel-icon    { width: 40px; height: 40px; font-size: 1.2rem; border-radius: 6px; }
  .hotel-name    { font-size: 0.92rem; margin-bottom: 2px; }
  .hotel-loc     { font-size: 11px; }
  .hotel-badges  { margin-top: 5px; gap: 4px; }
  .badge         { font-size: 10px; padding: 2px 7px; }
  .reserve-btn   {
    grid-column: 1 / -1;
    width: 100%;
    padding: 11px;
    font-size: 13px;
    margin-top: 8px;
  }

  /* Turnstile modal */
  .modal-body         { padding: 1.4rem 1.2rem 1.2rem; }
  .modal-hotel-box    { padding: 10px 12px; gap: 10px; }
  .modal-hotel-icon   { font-size: 1.5rem; }
  .modal-hotel-name   { font-size: 13px; }
  .modal-hotel-loc    { font-size: 11px; }
  .modal-verify-title { font-size: 14px; }
  .modal-verify-sub   { font-size: 11px; }
  .modal-lock         { width: 36px; height: 36px; font-size: 0.95rem; }
  .modal-close        { top: 12px; right: 12px; font-size: 22px; padding: 4px 8px; }

  /* Redirect overlay */
  .rd-body            { padding: 1.3rem 1.2rem 1.1rem; }
  .rd-title           { font-size: 1.1rem; margin-bottom: 0.8rem; }
  .rd-hotel-box       { padding: 9px 12px; }

  /* Static pages — Privacy / Terms / Cookies / About */
  .static-page         { padding: 1.8rem 1rem 3rem; }
  .static-page h1      { font-size: 1.45rem; }
  .static-page h2      { font-size: 1.05rem; margin: 1.6rem 0 0.6rem; }
  .static-page h3      { font-size: 0.95rem; margin: 1.1rem 0 0.4rem; }
  .static-page p       { font-size: 0.9rem; line-height: 1.65; }
  .static-page ul,
  .static-page ol      { font-size: 0.9rem; margin-left: 1.2rem; line-height: 1.7; }
  .static-page .highlight-box { padding: 1rem; margin: 1rem 0; }
  .static-page .page-date { font-size: 11px; margin-bottom: 1.8rem; padding-bottom: 0.8rem; }

  /* Cookie table — too wide for phones, make it horizontally scrollable */
  .cookie-table          { display: block; overflow-x: auto; white-space: nowrap; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .cookie-table th,
  .cookie-table td       { font-size: 11px; padding: 6px 10px; }

  /* Cookie banner — stack vertically, full-width buttons */
  .cookie-banner         { padding: 0.9rem 1rem; flex-direction: column; align-items: stretch; gap: 0.7rem; }
  .cookie-banner p       { font-size: 12px; min-width: 0; text-align: center; }
  .cookie-btns           { display: flex; gap: 8px; width: 100%; }
  .cookie-btn-accept,
  .cookie-btn-decline    { flex: 1; padding: 10px; font-size: 13px; }

  /* Footer */
  footer        { padding: 2rem 1rem; }
  .footer-inner { padding: 0; }
  .footer-top   { grid-template-columns: 1fr 1fr; gap: 1.4rem; margin-bottom: 1.5rem; }
  .footer-col h4{ font-size: 12px; margin-bottom: 0.6rem; }
  .footer-col a,
  .footer-col button,
  .footer-col p { font-size: 11.5px; }
  .footer-bottom{ flex-direction: column; align-items: flex-start; gap: 0.6rem; padding-top: 1.2rem; }
  .footer-bottom p { font-size: 10.5px; }
  .footer-resp  { font-size: 10.5px; padding: 7px 12px; }
}

/* ── Small phones (iPhone SE through 14 Pro Max portrait) ─────────── */
@media (max-width: 480px) {
  .hero            { padding: 2.2rem 1rem 1.5rem; }
  .hero h1         { font-size: 1.45rem; line-height: 1.2; }
  .hero p          { font-size: 0.88rem; }
  .hero-label      { font-size: 9.5px; }

  .tab             { padding: 5px 12px; font-size: 11.5px; }

  .hotel-card      { padding: 0.75rem 0.8rem; }
  .hotel-name      { font-size: 0.9rem; }

  .modal-body      { padding: 1.2rem 1rem; }
  .rd-body         { padding: 1.1rem 1rem; }

  .static-page     { padding: 1.5rem 0.9rem 2.5rem; }
  .static-page h1  { font-size: 1.3rem; }
  .static-page p   { font-size: 0.88rem; }

  .footer-top      { grid-template-columns: 1fr; gap: 1.2rem; }

  .cookie-banner   { padding: 0.8rem 0.9rem; }
}