/* ============================================================
   TOPBAR-LONARDI — Barra superior de navegación entre profesionales
   Reutilizable en: /diseno/ /arqui/ /inmobiliaria/ /contadora/
   Solo cambia la clase "topbar-activo" según la página.
   ============================================================ */
:root{
  --topbar-h: 48px;
  --topbar-naranja: #E8642C;   /* naranja del logo/texto (ajustable) */
}
/* Evita que la barra tape el contenido */
body{ padding-top: var(--topbar-h) !important; }
/* Si el header de la página es fijo (position:fixed con top:0), lo bajamos.
   Si el header no es fijo, esta regla no hace nada. */
.site-header{ top: var(--topbar-h) !important; }

.topbar{
  position: fixed; top: 0; left: 0; width: 100%; height: var(--topbar-h);
  z-index: 100000; display: flex; align-items: stretch;
  background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25);
  font-family: 'Montserrat', sans-serif;
}
/* ---- Logo (izquierda) ---- */
.topbar-logo{
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px; background: #fff; text-decoration: none;
  flex-shrink: 0; border-right: 1px solid #eee;
}
.topbar-logo img{ height: 30px; width: auto; display: block; }
.topbar-logo span{
  color: var(--topbar-naranja); font-weight: 800; font-size: .95rem;
  letter-spacing: 2px; text-transform: uppercase;
  font-family: 'Century Gothic','Didact Gothic',sans-serif; white-space: nowrap;
}
/* ---- Secciones (derecha, 4 del mismo ancho) ---- */
.topbar-nav{ display: flex; flex: 1; min-width: 0; }
.topbar-item{
  position: relative; flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; overflow: hidden;
  background-color: #2A3139;                 /* fondo si la imagen falta */
  background-size: cover; background-position: center;
  border-bottom: 3px solid transparent;
  transition: filter .35s ease, border-color .35s ease;
}
.topbar-item::before{
  content: ''; position: absolute; inset: 0;
  background: rgba(10,12,20,.45);
  transition: background .35s ease;
}
.topbar-item:hover{ filter: brightness(1.25); }
.topbar-item.topbar-activo{ border-bottom-color: var(--topbar-naranja); }
.topbar-item.topbar-activo::before{ background: rgba(10,12,20,.32); }
.topbar-item.topbar-activo .topbar-nombre{ text-shadow: 0 1px 8px rgba(0,0,0,.8); }
/* ---- Fotos circulares (1 o 2) ---- */
.topbar-fotos{ position: relative; display: flex; flex-shrink: 0; }
.topbar-foto{
  width: 40px; height: 40px; border-radius: 50%;
  background-color: #5a6472;                 /* placeholder si falta la foto */
  background-size: cover; background-position: center;
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.topbar-foto + .topbar-foto{ margin-left: -10px; }
/* ---- Nombre en serif cursiva ---- */
.topbar-nombre{
  position: relative; color: #fff; line-height: 1; white-space: nowrap;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic; font-weight: 600; font-size: 1.55rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
/* ---- Responsive: fila compacta con scroll horizontal ---- */
@media (max-width: 820px){
  :root{ --topbar-h: 44px; }
  .topbar-logo{ padding: 5px 10px; gap: 6px; }
  .topbar-logo img{ height: 22px; }
  .topbar-logo span{ font-size: .68rem; letter-spacing: 1px; }
  .topbar-nav{ overflow-x: auto; scrollbar-width: none; }
  .topbar-nav::-webkit-scrollbar{ display: none; }
  .topbar-item{ flex: 0 0 auto; min-width: 112px; padding: 5px 8px; gap: 6px; }
  .topbar-foto{ width: 30px; height: 30px; border-width: 1.5px; }
  .topbar-nombre{ font-size: 1.05rem; }
}

/* ============================================================
   FIX-LONARDI - Barra superior (topbar) responsive + offsets
   Lo agrega fix.php a topbar.css / barra-assets/topbar.css
   ============================================================ */
:root{--topbar-h:72px}
/* Offset: los headers quedan debajo de la barra en vez de tapados */
body{padding-top:var(--topbar-h)!important}
#site-header,.site-header{top:var(--topbar-h)!important}
/* En celular: la barra con fotos entra completa, sin moverla */
@media(max-width:768px){
  :root{--topbar-h:116px}
  .topbar{flex-wrap:wrap!important;justify-content:center!important;row-gap:4px!important;padding:6px 10px!important;overflow:visible!important;height:auto!important;min-height:0!important}
  .topbar-logo{width:100%!important;justify-content:center!important;gap:6px!important;padding:1px 0!important}
  .topbar-logo img{height:20px!important;width:auto!important}
  .topbar-logo span{font-size:.75rem!important;letter-spacing:.05em!important}
  .topbar-nav{width:100%!important;display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:4px!important;overflow:visible!important;justify-content:stretch!important}
  .topbar-item{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;background:none!important;padding:3px 2px!important;border-radius:10px!important;min-width:0!important}
  .topbar-fotos{display:flex!important}
  .topbar-foto{width:32px!important;height:32px!important;min-width:32px!important;background-size:cover!important;background-position:center!important;border-radius:50%!important;border:2px solid #fff!important;box-shadow:0 1px 4px rgba(0,0,0,0.2)}
  .topbar-foto + .topbar-foto{margin-left:-10px!important}
  .topbar-nombre{font-size:.6rem!important;letter-spacing:.02em!important;white-space:nowrap!important}
}