/* EMPRES.ES · Ficha pública · dark neon skin (match empres.es + operador) · v20261006-geo1 */
:root {
  --bg: #020b13;
  --bg-deep: #01070d;
  --panel: #071522;
  --panel-2: #06111c;
  --line: #173347;
  --line-soft: #143044;
  --cyan: #21d8f5;
  --green: #66f04b;
  --text: #f4f8fb;
  --muted: #8fa9b8;
  --amber: #ffb323;
  --glow-green: 0 0 18px #66f04b44;
  --glow-cyan: 0 0 18px #21d8f544;
  --radius: 10px;
  --wrap: 880px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 15px/1.55 Arial, Helvetica, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(circle at 50% 0%, #082137 0%, #020b13 45%, #01070d 100%);
  background-attachment: fixed;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--green); text-shadow: 0 0 8px #66f04b55; }
a:focus-visible, .button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.hidden { display: none !important; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #020a11ef;
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  min-width: 0;
}
.site-brand:hover { color: #fff; text-shadow: none; }
.brand-ring {
  flex: 0 0 auto;
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  box-shadow: var(--glow-cyan), inset 0 0 10px #21d8f533;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid #26f3d0aa;
}
.brand-ring-core {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}
.brand-name .tld { color: var(--green); }
.brand-tagline {
  margin-top: 3px;
  color: var(--cyan);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  white-space: nowrap;
}
.nav-link {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid #2c6079;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: var(--glow-cyan);
  text-shadow: none;
}

/* —— Main —— */
.site-main { flex: 1 0 auto; padding: 26px 0 48px; }

.loading-state {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  padding: 40px 0;
  justify-content: center;
}
.spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--cyan);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 0 28px #0005;
}

/* —— Hero —— */
.ficha-hero {
  position: relative;
  padding: 24px 24px 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 0% 0%, #0b2a40 0%, transparent 55%),
    linear-gradient(180deg, #081a29 0%, var(--panel) 100%);
  box-shadow: 0 0 40px #0008, var(--glow-cyan);
}
.ficha-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--green), transparent);
  opacity: .7;
}
.hero-top { display: flex; align-items: center; gap: 18px; }
.avatar {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a2030, #071522);
  border: 2px solid var(--cyan);
  box-shadow: var(--glow-cyan), inset 0 0 18px #21d8f522;
  color: #26f3d0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
}
.ficha-heading { min-width: 0; }
.eyebrow {
  margin: 0 0 4px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.entry-title {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .3px;
  color: #fff;
  overflow-wrap: anywhere;
}
.entry-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.entry-meta:empty { display: none; }
.entry-meta .sep { margin: 0 8px; color: #27566f; }
.entry-meta .stars { color: var(--amber); font-weight: 700; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badges:empty { display: none; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .4px;
  text-transform: uppercase;
  background: #0a1d2a;
  color: var(--cyan);
  border: 1px solid #1c4258;
}
.badge.ok {
  background: #0a2012;
  color: var(--green);
  border-color: #2a6a30;
  box-shadow: 0 0 10px #66f04b22;
}
.badge.star { color: var(--amber); border-color: #5a4a20; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* —— Buttons —— */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #2c6079;
  border-radius: 6px;
  background: transparent;
  color: var(--cyan);
  font: 700 14px/1.2 Arial, Helvetica, sans-serif;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow .15s, border-color .15s, color .15s, background .15s;
}
.button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: #0a2030;
  box-shadow: var(--glow-cyan);
  text-shadow: none;
}
.button-primary {
  background: linear-gradient(90deg, #71f44c, #45df67);
  border-color: transparent;
  color: #04110a;
  font-weight: 800;
  box-shadow: var(--glow-green);
}
.button-primary:hover, .button-primary:focus {
  background: linear-gradient(90deg, #8cff66, #66f04b);
  border-color: transparent;
  color: #021008;
  box-shadow: 0 0 22px #66f04b66;
}
.button-whatsapp { border-color: #2a6a30; color: var(--green); }
.button-whatsapp:hover { border-color: var(--green); color: var(--green); box-shadow: var(--glow-green); background: #0a2012; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.btn-row:empty { display: none; }

/* —— Sections —— */
.ficha-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.ficha-grid > .full { grid-column: 1 / -1; }
.ficha-section {
  padding: 18px 20px 20px;
  min-width: 0;
}
.section-title {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.meta-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 14px;
  margin: 0;
}
.meta-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  padding-top: 2px;
}
.meta-list dd { margin: 0; overflow-wrap: anywhere; }
.web-line, .addr { margin: 0 0 12px; overflow-wrap: anywhere; }
.web-line { margin: 0; }
.addr:empty { display: none; }
.prose p { margin: 0 0 10px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--green); }
.notes { white-space: pre-line; color: #dce9ef; }

/* —— Error —— */
.error-state { padding: 28px 24px; text-align: center; }
.error-state .entry-title { font-size: 24px; margin-bottom: 8px; }

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: #020a11;
  color: var(--muted);
  font-size: 13px;
}
.site-footer p { margin: 0; padding: 18px 0; text-align: center; }
.site-footer a { color: #fff; font-weight: 800; letter-spacing: .5px; }

/* —— Responsive —— */
@media (max-width: 720px) {
  .ficha-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .site-main { padding: 16px 0 36px; }
}
@media (max-width: 560px) {
  .wrap { width: min(100% - 20px, var(--wrap)); }
  .header-inner { min-height: 56px; }
  .brand-ring { width: 30px; height: 30px; }
  .brand-name { font-size: 17px; }
  .brand-tagline { font-size: 8px; letter-spacing: .8px; }
  .nav-link { padding: 6px 10px; font-size: 12px; }
  .ficha-hero { padding: 18px 16px; }
  .hero-top { align-items: flex-start; gap: 14px; }
  .avatar { width: 58px; height: 58px; font-size: 21px; }
  .entry-title { font-size: 23px; }
  .entry-meta { font-size: 13px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-actions .button { width: 100%; padding: 0 10px; }
  .hero-actions .button-primary:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
  .ficha-section { padding: 16px; }
  .meta-list { grid-template-columns: 1fr; gap: 2px; }
  .meta-list dd { margin-bottom: 8px; }
  .btn-row .button { flex: 1 1 calc(50% - 8px); }
}
@media (max-width: 360px) {
  .brand-tagline { display: none; }
}

/* —— Cerca / relacionadas (v20261006-geo1) —— */
.near-note { margin: -4px 0 10px; font-size: 13px; }
.near-note:empty { display: none; }
.near-sub { margin: 16px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.near-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.near-list:empty { display: none; }
.near-item { min-width: 0; }
.near-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; min-height: 52px;
  background: #081a27; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.near-link:hover { border-color: var(--cyan); box-shadow: var(--glow-cyan); color: var(--text); text-shadow: none; }
.near-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.near-name { font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.near-sub-line { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.near-dist { flex: 0 0 auto; color: var(--text); font-size: 12px; font-weight: 700; white-space: nowrap; }
.near-chip {
  flex: 0 0 auto;
  display: inline-block; min-width: 84px; text-align: center;
  padding: 3px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .5px; line-height: 1.5;
  text-transform: uppercase; white-space: nowrap;
  border: 1px solid currentColor; background: #0a1d2a;
}
.near-chip.b-lado { color: var(--green); background: #0a2012; box-shadow: 0 0 10px #66f04b33; }
.near-chip.b-muy  { color: var(--cyan);  background: #08202b; box-shadow: 0 0 10px #21d8f533; }
.near-chip.b-cerca { color: #26f3d0; background: #082321; }
.near-chip.b-zona { color: var(--amber); background: #221a08; }
.near-chip.b-alr  { color: #ad73ff; background: #170f26; }
.near-chip.b-loc  { color: var(--muted); background: #0a1722; border-color: #2a4a5c; }
@media (max-width: 720px) {
  .near-list { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .near-chip { min-width: 0; }
  .near-link { gap: 8px; padding: 9px 10px; }
}

/* 2026-10-09 logo del negocio en el avatar */
.avatar.has-logo { background: #fff; padding: 3px; overflow: hidden; }
.avatar.has-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; display: block; }

/* 2026-10-09 En nuestros portales */
.ficha-section.portales .portales-note { margin: 0 0 10px; opacity: .8; font-size: 14px; }
.button.button-portal { border-color: #ffb323; color: #ffb323; }
.button.button-portal.directo { background: #221a08; }
