/* ============================================================
   BALAI DE ALBA — design tokens
   Palette pulled from the logo: navy ink + bright sky blue, on a
   warm ivory background (not stark white) for the "homie" feel
   against a still-professional layout.
   ============================================================ */
:root {
  --bg: #f7f4ee;              /* page background — warm ivory, not stark white */
  --surface: #ffffff;         /* card / header background */
  --text-primary: #14213d;    /* navy — headings, body text */
  --text-secondary: #55607a;  /* supporting text */
  --text-muted: #8891a6;      /* hints, captions */
  --accent: #1f77c9;          /* logo's bright blue — primary CTA color */
  --accent-dark: #15568f;     /* CTA hover state */
  --accent-light: #e3eefb;    /* pale tint for badges/backgrounds */
  --border: #e5e0d3;          /* hairline borders */
  --radius: 10px;
  --radius-lg: 18px;
  --max-width: 1140px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--text-primary);
}
h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--text-secondary); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---- Header ---- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }
.brand img.brand-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
nav.main-nav { display: flex; align-items: center; gap: 26px; }
nav.main-nav a { font-size: 0.94rem; color: var(--text-secondary); padding: 6px 2px; border-bottom: 2px solid transparent; }
nav.main-nav a:hover, nav.main-nav a.active { color: var(--text-primary); border-bottom-color: var(--accent); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent-dark); }
.btn-outline:hover { background: var(--accent-light); }

.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; color: var(--text-primary); cursor: pointer; }

/* ---- Hero ---- */
.hero { padding: 60px 0 52px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero-actions { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }

.placeholder-media {
  background: linear-gradient(135deg, var(--accent-light), var(--bg));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
  padding: 24px;
}
.hero-media { aspect-ratio: 4/3.4; }

/* ---- Highlight strip ---- */
.highlight-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.highlight-item { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--text-secondary); font-weight: 600; }
.highlight-item span.ico { font-size: 1.1rem; }

/* ---- Sections ---- */
section { padding: 52px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 620px; margin: 0 auto 36px; text-align: center; }
.section-head.left { margin: 0 0 32px; text-align: left; }

/* ---- Grids / cards ---- */
.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 22px; }
.card .icon-badge {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--accent-light); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 14px;
}

/* ---- Checklist (room inclusions) ---- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.95rem; color: var(--text-secondary); padding: 6px 0; border-bottom: 1px dashed var(--border); }
.checklist li span.ico { flex-shrink: 0; font-size: 1.05rem; }
.checklist.sub-list { padding-left: 30px; grid-template-columns: minmax(0,1fr); gap: 4px; }
.checklist.sub-list li { border-bottom: none; padding: 2px 0; font-size: 0.88rem; }

/* ---- Rate cards ---- */
.rate-card { text-align: center; }
.rate-card .rate-price { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.9rem; color: var(--accent-dark); margin: 6px 0; }
.rate-card .rate-note { font-size: 0.82rem; color: var(--text-muted); }

/* ---- Footer ---- */
footer.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 44px 0 26px; margin-top: 36px; }
footer.site-footer h4 { font-size: 0.95rem; }
footer.site-footer a { color: var(--text-secondary); }
footer.site-footer a:hover { color: var(--text-primary); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 30px; margin-bottom: 26px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 18px; font-size: 0.85rem; color: var(--text-muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---- Forms ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg);
  font-family: inherit; font-size: 0.95rem; color: var(--text-primary);
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}
.field-check { display: flex; align-items: center; gap: 8px; }
.field-check input { width: auto; }
.field-check label { margin: 0; font-weight: 600; }

.badge-demo {
  display: inline-block; background: var(--accent-light); color: var(--accent-dark);
  font-size: 0.78rem; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; font-weight: 700;
}

/* ---- Booking calendar ---- */
.booking-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: flex-start; }
.calendar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calendar-header button {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 30px; height: 30px; cursor: pointer; font-size: 0.95rem; color: var(--text-primary);
}
.calendar-header button:disabled { opacity: 0.35; cursor: not-allowed; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.calendar-grid .dow { font-size: 0.68rem; color: var(--text-muted); padding-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.day-cell { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; cursor: default; color: var(--text-muted); border-radius: 8px; }
.day-cell.available { background: var(--accent-light); color: var(--accent-dark); cursor: pointer; font-weight: 700; }
.day-cell.available:hover { background: var(--accent); color: #fff; }
.day-cell.selected { background: var(--text-primary); color: #fff; }
.day-cell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.day-cell.weekend-day.available { background: #fdecd6; color: #a8631a; }
.day-cell.weekend-day.available:hover { background: #e8952e; color: #fff; }
/* Booked dates are solid + white text so they read as clearly blocked at a
   glance, distinct from the pale weekend tint (both used to be similar
   light pastels — easy to mix up on a small calendar cell). */
.day-cell.booked-day { background: #d64d43; color: #fff; cursor: pointer; font-weight: 700; text-decoration: line-through; }
.day-cell.booked-day:hover { background: #b93c33; }
.day-cell.booked-day.selected { background: #8a2c25; color: #fff; text-decoration: none; }
/* In-range highlight for a multi-day selection, between the picked start and end dates. */
.day-cell.in-range { background: var(--accent); color: #fff; border-radius: 0; }
.day-cell.in-range.weekend-day { background: var(--accent); }
.day-cell.range-start { border-radius: 8px 0 0 8px; }
.day-cell.range-end { border-radius: 0 8px 8px 0; }

.status-wrap { margin-top: 22px; }
.status-box { border-radius: var(--radius); padding: 16px 18px; font-size: 0.9rem; margin-bottom: 6px; }
.status-box.ok { background: var(--accent-light); color: var(--accent-dark); }
.status-box.taken { background: #fbe7e4; color: #a3372a; }
.status-box.checking { background: var(--bg); color: var(--text-muted); }

.confirm-box { background: var(--accent-light); border: 1px solid var(--accent); border-radius: var(--radius-lg); padding: 30px; text-align: center; }

.notice-box { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 16px 20px; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 20px; }
.notice-box.warn { border-color: #d98c1f; background: #fdecd6; color: #7a4d0d; }

/* ---- Chat widget ---- */
.chat-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 50;
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 999px; padding: 13px 20px;
  font-family: inherit; font-weight: 700; font-size: 15px;
  cursor: pointer; box-shadow: 0 10px 30px rgba(31,119,201,0.35); transition: transform .15s;
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.5); } 70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }

.chat-panel {
  position: fixed; bottom: 22px; right: 22px; z-index: 60;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 44px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  display: none; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 80px rgba(20,33,61,0.25);
}
.chat-panel.open { display: flex; animation: rise .18s ease; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); background: var(--text-primary); color: #fff; }
.chat-header strong { display: block; font-size: 15px; }
.chat-sub { font-size: 12px; color: rgba(255,255,255,0.7); }
.chat-close { background: none; border: none; color: rgba(255,255,255,0.8); font-size: 24px; line-height: 1; cursor: pointer; }
.chat-close:hover { color: #fff; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--text-primary); }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.typing { color: var(--text-muted); font-style: italic; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-form input { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 11px 16px; color: var(--text-primary); font-family: inherit; font-size: 14.5px; outline: none; }
.chat-form input:focus { border-color: var(--accent); }
.chat-form button { background: var(--accent); color: #fff; border: none; border-radius: 50%; width: 42px; height: 42px; font-size: 18px; cursor: pointer; flex-shrink: 0; }

/* ---- Mobile ---- */
@media (max-width: 860px) {
  nav.main-nav { display: none; }
  .nav-toggle { display: block; }
  nav.main-nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); padding: 12px 24px 20px; border-bottom: 1px solid var(--border);
  }
  nav.main-nav.open a { padding: 10px 0; width: 100%; }
  .hero-grid, .footer-grid, .grid-4, .grid-3, .grid-2, .booking-layout, .checklist { grid-template-columns: minmax(0, 1fr); }

  .chat-fab { bottom: 16px; right: 16px; padding: 12px 16px; }
  .chat-panel { bottom: 0; right: 0; left: 0; width: 100%; height: 86dvh; border-radius: 18px 18px 0 0; }
}
