.unidade-sidebar {
  position: sticky;
  top: 1.5rem;
}

.unidade-galeria img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.unidade-lista-icones li {
  margin-bottom: 0.35rem;
}

.unidade-card {
  border: 1px solid #e9ecef;
  border-radius: 0.875rem;
  overflow: hidden;
  background: #fff;
}

.unidade-card:hover {
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.unidade-card-media {
  position: relative;
  overflow: hidden;
}

.unidade-card-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 1;
  background: rgba(0, 45, 98, 0.88);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.35rem 0.55rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

.unidade-card-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.unidade-card-title {
  color: var(--bs-primary);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.unidade-card-meta {
  color: #6c757d;
  font-size: 0.875rem;
}

.unidade-card-btn {
  display: block;
  width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 999px;
  color: var(--bs-primary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.unidade-card:hover .unidade-card-btn {
  background: rgba(0, 130, 230, 0.06);
  border-color: rgba(0, 130, 230, 0.35);
}

/* Hero gallery + lightbox */
.unidade-hero-galeria-main {
  display: block;
  position: relative;
  cursor: zoom-in;
  border-radius: 0.75rem;
  overflow: hidden;
}

.unidade-hero-galeria-main img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  width: 100%;
  height: auto;
  display: block;
}

.unidade-hero-galeria-main:hover .unidade-hero-galeria-badge {
  opacity: 1;
}

.unidade-hero-galeria-badge {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.unidade-hero-galeria-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.unidade-hero-galeria-thumb {
  border: 2px solid transparent;
  border-radius: 0.5rem;
  padding: 0;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  background: none;
  cursor: pointer;
  opacity: 0.75;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.unidade-hero-galeria-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.unidade-hero-galeria-thumb.active,
.unidade-hero-galeria-thumb:hover {
  border-color: var(--bs-primary);
  opacity: 1;
}

.unidade-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 1rem;
}

.unidade-lightbox.is-open {
  display: flex;
}

.unidade-lightbox img {
  max-width: min(1100px, 100%);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
}

.unidade-lightbox-close,
.unidade-lightbox-prev,
.unidade-lightbox-next {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.unidade-lightbox-close:hover,
.unidade-lightbox-prev:hover,
.unidade-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.28);
}

.unidade-lightbox-close {
  top: 1rem;
  right: 1rem;
}

.unidade-lightbox-prev {
  left: 1rem;
}

.unidade-lightbox-next {
  right: 1rem;
}

.unidade-lightbox-caption {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.875rem;
  text-align: center;
  max-width: 90%;
}

.unidade-galeria-thumb-link {
  display: block;
  cursor: zoom-in;
}
