/* Chrome de Habittel (header + footer) aislado para convivir con el CSS de Yapa en páginas internas. Generado a partir de hb-app.css. */
:root {
  --deep: #12343b;
  --teal: #1f5963;
  --sand: #d6c3a5;
  --cream: #f7f4ee;
  --ink: #1c2526;
  --muted: #5c6b6d;
  --line: rgba(18, 52, 59, 0.14);
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
header.site .wrap, footer.hbf .wrap { max-width:1200px; margin:0 auto; padding:0 32px; }
header.site, footer.hbf { font-family: Figtree, system-ui, sans-serif; color: var(--ink); }
header.site *, footer.hbf * { box-sizing: border-box; }
header.site a, footer.hbf a { color: inherit; text-decoration: none; }
header.site .logo {
  width: 50px;
  height: 42px;
}
header.site .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--deep);
}
header.site .brand i {
  font-style: normal;
  color: inherit;
}
header.site nav ul {
  display: flex;
  gap: 44px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 500;
  font-size: 17px;
  color: var(--deep);
}
header.site nav ul a:hover {
  color: var(--teal);
}
header.site .btns {
  display: flex;
  gap: 22px;
  align-items: center;
}
header.site .btn {
  border: 0;
  border-radius: 14px;
  padding: 13px 24px;
  font:
    600 16px Figtree,
    sans-serif;
  cursor: pointer;
}
header.site .btn.ghost {
  background: none;
  color: var(--deep);
  padding: 13px 4px;
}
header.site .btn.main {
  background: var(--teal);
  color: #fff;
}
header.site .btn:hover {
  filter: brightness(1.08);
}
header.site {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #e6d9c1;
  transition: box-shadow 0.2s;
}
header.site.sc {
  box-shadow: 0 6px 18px rgba(18, 52, 59, 0.14);
}
header.site nav ul a[aria-current="page"] {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 2px;
}
header.site .um {
  position: relative;
}
header.site .umb {
  border: 0;
  background: none;
  color: var(--deep);
  font:
    600 16px Figtree,
    sans-serif;
  cursor: pointer;
  padding: 13px 4px;
}
header.site .umenu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: #fbf8f2;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(18, 52, 59, 0.25);
  z-index: 80;
}
header.site .umenu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 11px 14px;
  border-radius: 10px;
  font:
    500 15px Figtree,
    sans-serif;
  color: var(--ink);
  cursor: pointer;
}
header.site .umenu button:hover {
  background: rgba(214, 195, 165, 0.35);
}
footer.hbf {
  padding: 44px 0 28px;
}
footer.hbf .fg {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
footer.hbf h4 {
  margin: 0 0 10px;
  font:
    600 15px Sora,
    sans-serif;
  color: var(--deep);
}
footer.hbf ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}
footer.hbf p {
  color: var(--muted);
  font-size: 14px;
  max-width: 300px;
}
footer.hbf .copy {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
footer.hbf .brand { display:flex; align-items:center; gap:10px; font:700 26px Sora,sans-serif; color:var(--deep); }
footer.hbf .logo { width:50px; height:42px; }
footer.hbf { background: var(--cream); border-top: 1px solid var(--line); }
@media (max-width:1000px){ footer.hbf .fg { grid-template-columns:1fr 1fr; } }
@media (max-width:600px){ footer.hbf .fg { grid-template-columns:1fr; } header.site .wrap, footer.hbf .wrap { padding:0 18px; } }

/* Menú de usuario con enlaces + avatar (páginas internas y home) */
header.site .umenu a { display: block; padding: 11px 14px; border-radius: 10px; font: 500 15px Figtree, sans-serif; color: var(--ink); text-decoration: none; }
header.site .umenu a:hover { background: rgba(214, 195, 165, .35); color: var(--deep); }
header.site .umenu[hidden] { display: none; }
header.site .umb { display: inline-flex; align-items: center; gap: 8px; }
header.site .av { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; font: 700 15px Figtree, sans-serif; }
header.site .umb:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 12px; }
header.site a.btn { display: inline-block; text-decoration: none; }
header.site a.btn.main { color: #fff; }
header.site .nav-search input { box-shadow: none; }

/* Logo subido por el marketplace (base de datos) */
header.site .hb-dblogo { display: block; height: 46px; width: auto; max-width: 240px; object-fit: contain; }
footer.hbf .hb-dblogo { display: block; height: 46px; width: auto; max-width: 240px; object-fit: contain; }

/* ==========================================================================
   Pulido del nav (escritorio): 3 columnas que se adaptan al contenido, para que
   el menú de usuario nunca se encime con el buscador. Especificidad mayor que
   las reglas `.site nav` de hb-responsive.css, así gana en cualquier orden de carga.
   ========================================================================== */
@media (min-width: 901px) {
  header.site nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand search actions" "links links links";
    align-items: center;
    column-gap: 36px;
    row-gap: 4px;
    height: auto;
    padding: 16px 0 6px;
  }
  header.site .brand { grid-area: brand; }
  header.site .nav-search {
    grid-area: search;
    width: 100%;
    max-width: 640px;
    justify-self: center;
  }
  header.site .btns { grid-area: actions; display: flex; align-items: center; gap: 14px; min-width: 0; }
  header.site #primaryNav {
    grid-area: links;
    display: flex;
    justify-content: center;
    gap: 44px;
    padding: 2px 0 10px;
    width: auto;
  }
  header.site #primaryNav > li { width: auto; }
  header.site #primaryNav > li > a {
    position: relative;
    display: inline-block;
    padding: 8px 2px;
    font-weight: 500;
    font-size: 16px;
    color: var(--deep);
  }
  header.site #primaryNav > li > a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--teal);
    transform: scaleX(0);
    transition: transform .2s ease;
  }
  header.site #primaryNav > li > a:hover::after,
  header.site #primaryNav > li > a[aria-current="page"]::after { transform: scaleX(1); }
  header.site .umb {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    max-width: 220px;
  }
  header.site .umb:hover { background: rgba(255, 255, 255, .85); }
  header.site .umb #uNm { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 15px; }
  header.site .btns .btn.main { padding: 12px 22px; white-space: nowrap; }
  header.site .btns .btn.ghost { white-space: nowrap; }
}
@media (min-width: 901px) and (max-width: 1150px) {
  header.site nav { column-gap: 20px; }
  header.site #primaryNav { gap: 28px; }
  header.site .btns .btn.main { padding: 11px 16px; }
  header.site .umb #uNm { max-width: 80px; }
}

/* Menú de secciones compacto y centrado, como el prototipo */
@media (min-width: 901px) {
  header.site #primaryNav { gap: 36px; margin: 0; }
  header.site #primaryNav > li { margin: 0; padding: 0; min-width: 0; flex: 0 0 auto; }
  header.site #primaryNav > li > a { margin: 0; font-size: 15px; }
}
@media (min-width: 901px) {
  header.site #primaryNav > li:not(.mobile-publish) { width: auto; }
}
