/* ==========================================================================
   SLEEPLACE — SISTEMA DE DISEÑO COMPARTIDO
   Tokens + reset + nav + footer + componentes reutilizables (botones,
   badges, tarjetas). Todas las páginas cargan este archivo primero y luego
   su propia hoja específica (home.css, resultados.css...).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700;9..144,900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Color */
    --ink:        #0f172a;   /* navy oscuro: nav, titulares, texto principal */
    --ink-soft:   #64748b;   /* slate: texto secundario */
    --ink-faint:  #94a3b8;   /* slate claro: metadatos, placeholders */
    --sky:        #0284c7;   /* azul cielo: CTA principal, enlaces */
    --sky-dark:   #0369a1;   /* hover del CTA principal */
    --sky-tint:   #e0f2fe;   /* fondos suaves sobre azul */
    --gold:       #d97706;   /* ámbar cálido: ratings, badges premium */
    --gold-tint:  #fef3c7;   /* fondo suave para badges de rating */
    --bg:         #f8fafc;   /* fondo de página */
    --surface:    #ffffff;   /* tarjetas */
    --line:       #e2e8f0;   /* separadores, bordes finos */

    /* Tipografía */
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;

    /* Espaciado y forma */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.16);
    --container: 1200px;
}

/* Respeta la preferencia de movimiento reducido en todo el sitio */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Reset ligero ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 {
    font-family: var(--font-display);
    margin: 0;
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -0.01em;
}

:focus-visible {
    outline: 3px solid var(--sky);
    outline-offset: 2px;
    border-radius: 4px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Nav ---------- */
.sl-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.sl-nav__inner {
    max-width: var(--container); margin: 0 auto; padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.sl-logo {
    font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
    color: var(--ink);
}
.sl-logo em { color: var(--sky); font-style: normal; }

.lang-switcher-form { margin: 0; }
.lang-switcher {
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
    color: var(--ink); background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 8px 12px; cursor: pointer;
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-weight: 700; font-size: 0.95rem; padding: 13px 26px;
    border-radius: var(--radius-sm); border: none; transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sky); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--sky-dark); box-shadow: var(--shadow-md); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1e293b; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-full { width: 100%; }

/* ---------- Badges ---------- */
.badge-rating {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--gold-tint); color: #92400e; font-weight: 800; font-size: 0.82rem;
    padding: 5px 10px; border-radius: 999px;
}
.badge-rating i { color: var(--gold); }
.badge-soft {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--sky-tint); color: var(--sky-dark); font-weight: 700; font-size: 0.78rem;
    padding: 5px 11px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em;
}

/* ---------- Tarjeta de alojamiento (reutilizada en home + resultados) ---------- */
.hotel-card {
    background: var(--surface); border-radius: var(--radius-md); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex; flex-direction: column; height: 100%;
}
.hotel-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.hotel-card__img { aspect-ratio: 4/3; overflow: hidden; background: var(--sky-tint); position: relative; }
.hotel-card__img img { width: 100%; height: 100%; object-fit: cover; }
.hotel-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hotel-card__zone { font-size: 0.78rem; color: var(--ink-faint); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.hotel-card__name { font-size: 1.08rem; font-weight: 600; line-height: 1.3; }
.hotel-card__desc { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.5; flex: 1; }
.hotel-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }

/* ---------- Footer ---------- */
.sl-footer { background: var(--ink); color: #cbd5e1; margin-top: 80px; }
.sl-footer__inner { max-width: var(--container); margin: 0 auto; padding: 56px 24px 28px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.sl-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 14px; font-family: var(--font-body); font-weight: 700; }
.sl-footer p, .sl-footer a { font-size: 0.88rem; line-height: 1.6; color: #94a3b8; }
.sl-footer a:hover { color: #fff; }
.sl-footer__bottom {
    border-top: 1px solid #1e293b; padding: 20px 24px; font-size: 0.78rem; color: #64748b;
    display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between;
    max-width: var(--container); margin: 0 auto;
}
.sl-footer__links { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 720px) {
    .sl-footer__inner { grid-template-columns: 1fr; gap: 28px; }
    .sl-footer__bottom { flex-direction: column; align-items: flex-start; }
}
