/* ==========================================================================
   Component — Site Brand (logo + wordmark)
   ========================================================================== */

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex-shrink: 0;
  --site-brand-mark-size: 2.25rem;
}

.site-brand:hover,
.site-brand:focus-visible {
  text-decoration: none;
  color: inherit;
}

.site-brand__mark {
  display: block;
  flex: none;
  width: var(--site-brand-mark-size);
  height: var(--site-brand-mark-size);
  max-width: var(--site-brand-mark-size);
  max-height: var(--site-brand-mark-size);
  object-fit: contain;
  border-radius: var(--radius-md);
}

.site-brand__text {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xl);
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

/* ── Header ── */
.site-header .navbar-brand.site-brand {
  --site-brand-mark-size: 2.25rem;
  max-width: min(100%, 11rem);
}

.site-header .site-brand:hover .site-brand__text,
.site-header .site-brand:focus-visible .site-brand__text {
  color: var(--color-primary-hover);
}

/* ── Footer ── */
.site-footer__logo.site-brand {
  --site-brand-mark-size: 2.75rem;
}

.site-footer__logo.site-brand .site-brand__text {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  color: var(--footer-heading, #f8fafc);
}

.site-footer__logo.site-brand:hover .site-brand__text,
.site-footer__logo.site-brand:focus-visible .site-brand__text {
  color: var(--footer-accent, #38bdf8);
}

.site-brand--footer .site-brand__mark {
  border-radius: var(--radius-lg);
}

/* ── Auth modal ── */
.site-brand--auth {
  justify-content: center;
  margin-bottom: var(--space-3);
  --site-brand-mark-size: 3.5rem;
}

/* ── BackOffice sidebar ── */
.backoffice-sidebar-brand.site-brand {
  --site-brand-mark-size: 2rem;
  min-width: 0;
  max-width: 100%;
}

.backoffice-sidebar-brand.site-brand .site-brand__text {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backoffice-sidebar-brand.site-brand:hover .site-brand__text {
  color: #0f172a;
}

@media (max-width: 575.98px) {
  .site-header .navbar-brand.site-brand {
    --site-brand-mark-size: 2rem;
    max-width: min(100%, 9.5rem);
  }

  .site-header .site-brand__text {
    font-size: var(--font-size-lg);
  }
}
