@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #233140;          /* azul grisáceo oscuro del logo */
  --ink-dim: #566576;
  --sky: #bcdcf0;          /* celeste cielo del fondo del logo */
  --sky-deep: #6fa8cf;
  --sand: #cdb588;         /* arena/beige, de la palmera del logo */
  --sand-light: #ece2cc;
  --paper: #fbf8f2;
  --line: #e4ddcc;
  --ok: #4c8c63;
  --warn: #c98a24;
  --danger: #b5493f;
  --radius: 14px;
  --font-title: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --shadow: 0 10px 28px rgba(35, 49, 64, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
h1, h2, h3, h4 { font-family: var(--font-title); color: var(--ink); margin: 0 0 .5em; line-height: 1.2; }
p { margin: 0 0 1em; }
a { color: var(--sky-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 18px; }
button { font-family: inherit; cursor: pointer; }

/* --- Header --- */
.topbar {
  background: linear-gradient(180deg, var(--sky) 0%, #e7f2fa 100%);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.nav .logo img { height: 56px; width: auto; }
.nav-links { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); font-weight: 600; }
.nav-actions a.btn-wa { white-space: nowrap; }

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: none; font-weight: 700;
  font-size: 1rem; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--sky-deep); color: #fff; box-shadow: 0 6px 16px rgba(111,168,207,.45); }
.btn-primary:hover { background: #5c93b9; }
.btn-whatsapp { background: #25d366; color: #fff; box-shadow: 0 6px 16px rgba(37,211,102,.4); }
.btn-whatsapp:hover { background: #1fb858; }
.btn-outline { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* --- WhatsApp flotante --- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  width: 60px; height: 60px; border-radius: 50%; background: #25d366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
}
.wa-float svg { width: 32px; height: 32px; fill: #fff; }

/* --- Hero --- */
.hero {
  background: linear-gradient(180deg, var(--sky) 0%, var(--paper) 100%);
  padding: 48px 0 56px;
  text-align: center;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.hero p.lead { font-size: 1.15rem; color: var(--ink-dim); max-width: 640px; margin: 0 auto 1.4em; }
.hero .ubicacion { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-dim); margin-bottom: 1.4em; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Secciones --- */
section { padding: 40px 0; }
.section-title { text-align: center; margin-bottom: 1.6em; }
.badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 1.2em 0; }
.badge {
  background: var(--sand-light); color: var(--ink); border-radius: 999px;
  padding: 6px 14px; font-weight: 600; font-size: .9rem; border: 1px solid var(--line);
}

/* --- Filtros --- */
.filtros { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 1.6em; }
.filtros button {
  background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 8px 16px;
  font-weight: 600; color: var(--ink-dim);
}
.filtros button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* --- Grid de unidades --- */
.grid-unidades { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card-unidad {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; border: 1px solid var(--line);
}
.card-unidad img { aspect-ratio: 4/3; object-fit: cover; width: 100%; background: var(--sand-light); }
.card-unidad .body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-unidad h3 { margin: 0; font-size: 1.25rem; }
.card-unidad .tipo { color: var(--sky-deep); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.card-unidad .cap { color: var(--ink-dim); font-weight: 600; }
.card-unidad .btn { margin-top: auto; }
.empty-state { text-align: center; color: var(--ink-dim); padding: 40px 0; }

/* --- Ficha de unidad --- */
.ficha-top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .ficha-top { grid-template-columns: 1fr; } }
.galeria { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.galeria img.principal { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.galeria-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.galeria-thumbs img { width: 70px; height: 56px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.galeria-thumbs img.active { border-color: var(--sky-deep); }
.ficha-info .cap-pill { display: inline-block; background: var(--sand-light); border-radius: 999px; padding: 6px 14px; font-weight: 700; margin-bottom: 10px; }
.reglas { background: var(--sand-light); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 20px 0; }
.reglas h4 { margin-bottom: .5em; }
.reglas ul { margin: 0; padding-left: 1.2em; }
.reglas li { margin-bottom: .4em; }

/* --- Calendario --- */
.calendario-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-header button { background: var(--sky-deep); color: #fff; border: none; border-radius: 8px; width: 34px; height: 34px; font-size: 1.1rem; }
.cal-header button[disabled] { opacity: .35; }
.cal-mes-label { font-weight: 700; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid .dow { font-size: .75rem; font-weight: 700; color: var(--ink-dim); padding-bottom: 4px; }
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: .9rem; font-weight: 600; cursor: pointer;
  background: #f4f7f9; color: var(--ink); user-select: none;
}
.cal-day.blank { visibility: hidden; cursor: default; }
.cal-day.past { color: #c7cfd6; cursor: not-allowed; background: transparent; }
.cal-day.ocupado { background: #dadfe3; color: #8b96a1; text-decoration: line-through; cursor: not-allowed; }
.cal-day.revision { background: #fbe3a1; color: #7a5a06; cursor: not-allowed; }
.cal-day.selected { background: var(--sky-deep); color: #fff; }
.cal-day.in-range { background: var(--sky); color: var(--ink); }
.cal-leyenda { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: .82rem; color: var(--ink-dim); }
.cal-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.cal-leyenda i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cal-leyenda .i-ocupado { background: #dadfe3; }
.cal-leyenda .i-revision { background: #fbe3a1; }
.cal-leyenda .i-selected { background: var(--sky-deep); }

.fechas-elegidas { margin-top: 12px; font-weight: 600; }
.fechas-elegidas .vacio { color: var(--ink-dim); font-weight: 400; }

/* --- Formulario de solicitud --- */
.form-solicitud { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-top: 20px; }
.form-solicitud h3 { margin-bottom: .2em; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 13px 14px; border-radius: 10px; border: 1.5px solid var(--line);
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: 2px solid var(--sky-deep); border-color: var(--sky-deep); }
.form-row textarea { resize: vertical; min-height: 70px; }
.form-note { font-size: .85rem; color: var(--ink-dim); background: var(--sand-light); border-radius: 10px; padding: 10px 12px; margin: 14px 0; }
.form-msg { font-weight: 700; padding: 10px 12px; border-radius: 10px; margin-top: 10px; }
.form-msg.ok { background: #e4f3e8; color: var(--ok); }
.form-msg.error { background: #fbe6e3; color: var(--danger); }

/* --- Confirmación --- */
.confirmacion { text-align: center; padding: 70px 18px; }
.confirmacion .icono { font-size: 3.2rem; margin-bottom: .2em; }

/* --- Footer --- */
footer { background: var(--ink); color: #dfe6ec; padding: 36px 0 24px; margin-top: 40px; }
footer .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 24px; }
footer h4 { color: #fff; margin-bottom: .6em; }
footer a { color: #c9d6e0; }
footer .legal { text-align: center; color: #93a2ae; margin-top: 24px; font-size: .82rem; }

/* --- Panel admin --- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--ink); color: #fff; padding: 20px 14px; flex-shrink: 0; }
.admin-sidebar .logo-txt { font-family: var(--font-title); font-size: 1.3rem; margin-bottom: 1.2em; }
.admin-sidebar button.nav-item {
  display: block; width: 100%; text-align: left; background: none; border: none; color: #cdd7e0;
  padding: 10px 12px; border-radius: 8px; font-weight: 600; margin-bottom: 4px;
}
.admin-sidebar button.nav-item.active, .admin-sidebar button.nav-item:hover { background: rgba(255,255,255,.12); color: #fff; }
.admin-main { flex: 1; padding: 26px 32px; background: #f4f6f8; }
.admin-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-card { background: #fff; border-radius: 12px; border: 1px solid #e4e8ec; padding: 18px; margin-bottom: 18px; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #ecf0f3; }
table.admin-table th { color: var(--ink-dim); font-size: .8rem; text-transform: uppercase; }
.pill { padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.pill.pendiente { background: #fbe3a1; color: #7a5a06; }
.pill.confirmada { background: #d7efdd; color: var(--ok); }
.pill.rechazada { background: #f3dad7; color: var(--danger); }
.pill.cancelada { background: #e4e8ec; color: #6b7680; }
.admin-login { max-width: 360px; margin: 10vh auto; }
.admin-actions button { margin-right: 6px; }
.btn-sm { padding: 6px 12px; font-size: .82rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 700; }
.btn-sm.confirmar { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn-sm.rechazar { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm.cancelar { background: #fff; color: var(--ink-dim); }
.admin-filtros { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-filtros select, .admin-filtros input { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); }
.fotos-admin { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.fotos-admin .foto { position: relative; }
.fotos-admin img { width: 90px; height: 72px; object-fit: cover; border-radius: 8px; }
.fotos-admin button { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: .7rem; line-height: 1; }
.cal-general { display: grid; gap: 6px; }
.cal-general-row { display: grid; grid-template-columns: 160px 1fr; gap: 10px; align-items: center; border-bottom: 1px solid #ecf0f3; padding: 6px 0; }
