/* ==========================================================================
   Hay Espacio — Components
   Reusable, composable pieces. Prefix everything with a namespace to avoid
   collisions as the page set grows (Auth, Profile, Marketplace, etc.).
   ========================================================================== */

/* ---- Logo mark: the "h." symbol -----------------------------------------
   Solid black circle, white lowercase h, white dot to the lower-right.
   Never stretch, never recolor the circle, never let the h touch the edge. */

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.logo-mark {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark__glyph {
  color: var(--color-white);
  font-weight: var(--fw-bold);
  font-size: 18px;
  line-height: 1;
  transform: translate(-2px, 1px); /* optical centering for the h + dot */
}

.logo-mark__dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-white);
  right: 10px;
  bottom: 11px;
}

.logo-mark--pulse {
  animation: logo-breathe 2.8s var(--ease-standard) infinite;
}

@keyframes logo-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.logo-word {
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-tight);
  color: var(--color-ink);
}

/* ---- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 44px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard),
    opacity var(--dur-fast) var(--ease-standard);
}

.btn:hover {
  opacity: 0.85;
}

.btn--primary {
  background: var(--color-black);
  color: var(--color-white);
  border: 1px solid var(--color-black);
}

.btn--ghost {
  background: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-line-strong);
}

.btn--ghost:hover {
  border-color: var(--color-black);
  opacity: 1;
}

.btn--text {
  height: auto;
  padding: 0;
  border-radius: 0;
  color: var(--color-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Site header / nav ---------------------------------------------------
   Structural placement lives in layout.css; visual treatment lives here. */

.site-header {
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bg);
}

.main-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.main-nav__link {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-mist);
}

.main-nav__link:hover {
  color: var(--color-ink);
  opacity: 1;
}

.main-nav__link.is-active {
  color: var(--color-ink);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}

.nav-toggle__bar {
  width: 20px;
  height: 2px;
  background: var(--color-ink);
}

/* ---- Card ----------------------------------------------------------------
   Used later by Marketplace listings and Post Detail related items. */

.card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease-standard);
}

.card:hover {
  border-color: var(--color-line-strong);
}

.card__media {
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
}

.card__body {
  padding: var(--space-4);
}

.card__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-1);
}

.card__meta {
  font-size: var(--fs-xs);
  color: var(--color-mist);
}

/* ---- Badge ---------------------------------------------------------------
   For status labels: "disponible", "ocupado", categories, etc. */

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-line-strong);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-ink);
}

/* ---- Forms -----------------------------------------------------------
   Shared by Auth and Create Post. Kept minimal on purpose. */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.field__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.field__input,
.field__textarea {
  height: 48px;
  padding: 0 var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
}

.field__textarea {
  height: auto;
  min-height: 120px;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
}

.field__input:focus,
.field__textarea:focus {
  border-color: var(--color-black);
}

.field__hint {
  font-size: var(--fs-xs);
  color: var(--color-mist);
}

/* ---- Empty / placeholder state --------------------------------------- */

.placeholder {
  border: 1px dashed var(--color-line-strong);
  border-radius: var(--radius-md);
  padding: var(--space-8) var(--space-5);
  text-align: center;
  color: var(--color-mist);
}

.placeholder__title {
  color: var(--color-ink);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-2);
}


/* Botón de Ayuda Flotante */
.help-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--color-black);
  color: var(--color-white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1000;
  text-decoration: none;
  font-size: 24px;
  transition: transform 0.2s ease;
}

.help-float:hover {
  transform: scale(1.1);
  opacity: 1;
}

.help-hint {
  position: fixed;
  bottom: 30px;
  right: 80px;
  background: white;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-line);
  pointer-events: none;
}