/* === Guest Concierge Hub — joyful glassmorphism === */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --grad: linear-gradient(160deg, #87ceeb 0%, #ffd6a5 60%, #ffb4a2 100%);
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.7);
  --text: #1f2d3d;
  --muted: #5b6a7a;
  --accent: #ff6f61;
  --accent-2: #ffb347;
  --primary: #2d6cdf;
  --wa: #25d366;
  --shadow: 0 10px 30px rgba(31, 45, 61, 0.12);
  --radius: 22px;
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--grad);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

/* subtle floating blobs */
body::before, body::after {
  content: "";
  position: fixed; z-index: -1; border-radius: 50%;
  filter: blur(60px); opacity: .55;
  pointer-events: none;
}
body::before { width: 320px; height: 320px; background: #ffd6a5; top: -80px; left: -80px; }
body::after  { width: 380px; height: 380px; background: #b5e2ff; bottom: -120px; right: -120px; }

.app {
  max-width: min(580px, 100%);
  margin: 0 auto;
  padding: 18px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* === Glass === */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* === Header === */
.header {
  padding: 20px;
  animation: fadeUp .6s ease both;
}
.header-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.welcome { font-size: 14px; color: var(--muted); }
.villa-name {
  font-size: 26px; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ff6f61, #ffb347);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-top: 2px;
}
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.7); border: 1px solid var(--glass-border);
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 13px; color: var(--text);
  transition: transform .15s ease, background .2s;
}
.lang-btn:hover { background: #fff; transform: translateY(-1px); }
.lang-btn:active { transform: scale(.96); }
.current-lang-chip {
  background: rgba(31,45,61,.14);
  border-color: rgba(45,108,223,.35);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.lang-btn:focus-visible,
.btn-primary:focus-visible,
.btn-wa:focus-visible,
.guide-list a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.lang-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
  line-height: 1;
  flex-shrink: 0;
}
.lang-flag--chip {
  width: 22px;
  height: 16px;
}
.lang-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 16px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(31,45,61,.16);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}
.lang-fallback.is-hidden {
  display: none;
}
.lang-btn[aria-current="true"],
.lang-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255,111,97,.22), var(--shadow);
}

.weather {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px; border-radius: 14px;
  background: rgba(255,255,255,.4);
}
.weather-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.weather-icon {
  font-size: 22px;
  width: 28px;
  text-align: center;
}
.weather-temp {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  min-width: 48px;
}
.weather-desc {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.weather-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.weather-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.6);
}

/* Single-column stack: content grows vertically only (mobile-safe) */
.concierge-stack,
.bento {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.span-2 {
  /* Legacy grid helper — flex column ignores this safely */
  width: 100%;
}

.tile {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  animation: fadeUp .6s ease both;
  transition: transform .2s ease;
}
.tile:hover { transform: translateY(-2px); }
.tile:nth-child(1){ animation-delay: .05s }
.tile:nth-child(2){ animation-delay: .12s }
.tile:nth-child(3){ animation-delay: .18s }
.tile:nth-child(4){ animation-delay: .24s }
.tile:nth-child(5){ animation-delay: .3s }

.tile-head { display: flex; align-items: center; gap: 8px; }
.tile-emoji { font-size: 20px; }
.tile h2 { font-size: 16px; font-weight: 700; }

/* Wi-Fi */
.wifi-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.45);
}
.label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.value { font-weight: 700; font-size: 15px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.btn-primary {
  margin-top: 6px;
  border: 0; cursor: pointer;
  padding: 12px 16px; border-radius: 14px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 8px 20px rgba(255,111,97,.35);
  transition: transform .15s ease, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: scale(.97); }

/* Lists */
.list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.list li {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 14px; color: var(--text);
  padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,.35);
}
.list li::before { content: "•"; color: var(--accent); font-weight: 800; }

.rules-rich {
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-wrap: break-word;
  word-break: normal;
}
.rules-rich p {
  margin: 0;
}
.rules-rich > p:first-of-type {
  color: var(--text);
  font-size: 14px;
}
.rules-rich > p:last-of-type {
  color: var(--muted);
  font-size: 13px;
}
.rules-rich-heading {
  font-size: 14px;
  font-weight: 700;
  margin: 2px 0 0;
  color: var(--text);
}
.rules-rich-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rules-rich-list li {
  display: block;
  position: relative;
  font-size: 13px;
  color: var(--text);
  padding: 10px 12px 10px 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.35);
}
.rules-rich-list li::before {
  content: "•";
  position: absolute;
  left: 12px;
  top: 11px;
  color: var(--accent);
  font-weight: 800;
  line-height: 1.35;
}
/* Title on its own row — full width so words like “Ocupação:” don’t split */
.rules-rich-list li strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.3;
}

.map-embed-wrap {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.35);
  min-height: 280px;
  aspect-ratio: 16 / 11;
}
.map-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Checkout */
.big-time {
  font-size: 30px; font-weight: 800;
  background: linear-gradient(90deg, var(--primary), #5aa9ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stay-times {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stay-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.45);
  border: 1px solid rgba(255,255,255,.58);
}
.stay-row--in {
  background: linear-gradient(90deg, rgba(34,197,94,.14), rgba(255,255,255,.55));
  border-color: rgba(34,197,94,.28);
}
.stay-row--out {
  background: linear-gradient(90deg, rgba(239,68,68,.12), rgba(255,255,255,.55));
  border-color: rgba(239,68,68,.26);
}
.stay-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.stay-arrow {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}
.stay-arrow--in {
  color: #166534;
  background: rgba(34,197,94,.23);
}
.stay-arrow--out {
  color: #991b1b;
  background: rgba(239,68,68,.2);
}
.stay-row .value {
  font-size: 16px;
  align-self: stretch;
}
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.hub-space { margin-bottom: 12px; }
.hub-space-sm { margin-bottom: 10px; }
.lang-chooser {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Guide */
.guide-subtitle {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-top: 14px;
  margin-bottom: 6px;
}
.guide-subtitle:first-of-type { margin-top: 4px; }

.guide-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.guide-list--static { margin-bottom: 4px; }
.guide-list a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.5);
  text-decoration: none;
  color: var(--text);
  transition: background .2s, transform .15s;
}
.guide-list a:hover { background: #fff; transform: translateY(-1px); }
.pin { color: var(--accent); flex-shrink: 0; }
.guide-name { font-weight: 600; font-size: 14px; }
.guide-desc { font-size: 12px; color: var(--muted); }
.guide-text { display: flex; flex-direction: column; }

/* WhatsApp */
.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--wa); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 15px;
  box-shadow: 0 8px 20px rgba(37, 211, 102, .35);
  transition: transform .15s ease;
}
.btn-wa:hover { transform: translateY(-1px); }
.btn-wa:active { transform: scale(.97); }

.footer { text-align: center; padding-top: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 60;
  display: inline-block;
  align-items: center;
  max-width: min(92vw, 420px);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.7);
  background: rgba(31,45,61,.88);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 1;
  transition: opacity .6s ease;
}

.toast.is-hiding {
  opacity: 0;
}

.toast[hidden] {
  display: none;
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
