/* ============================================================
   TENANTS
   ============================================================ */

.section-white.tenants-section {
  background-color: #f7f7f7;
  border-top: 1px solid #e1e1e1;
}

.tenants-section h2.h1-style {
  text-align: center;
  margin: 0 0 45px;
}

/* flex em vez de grid para centralizar a última linha quando incompleta */
.tenants-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.tenant-item {
  flex: 0 0 calc((100% - 3 * 24px) / 4);
}

.tenant-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  padding: 24px;
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.tenant-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: .8;
  transition: filter .2s ease, opacity .2s ease;
}

.tenant-card:hover,
.tenant-card:focus-visible {
  border-color: #d9012e;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transform: translateY(-2px);
  outline: none;
}

.tenant-card:hover img,
.tenant-card:focus-visible img {
  filter: none;
  opacity: 1;
}

.tenant-card-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: #000;
  text-transform: uppercase;
}

/* MODAL */
body.tenant-modal-open {
  overflow: hidden;
}

.tenant-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
}

.tenant-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.tenant-modal-box {
  position: relative;
  background: #fff;
  padding: 32px 32px 28px;
  width: 95%;
  max-width: 620px;
  max-height: 90vh;
  border-radius: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  animation: tenantFadeInUp .3s ease;
}

.tenant-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 26px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
}

.tenant-modal-body {
  flex: 1;
  overflow-y: auto;
  text-align: center;
}

.tenant-details-logo img {
  max-width: 200px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto 16px;
}

.tenant-details-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  line-height: 1.2em;
  color: #000;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0 0 22px;
}

.tenant-details-name:after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: #d9012e;
  margin: 12px auto 0;
}

.tenant-details-info {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 0 0 24px;
}

.tenant-details-info dt {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #666;
}

.tenant-details-info dd {
  font-size: 17px;
  color: #000;
  margin: 2px 0 0;
}

.tenant-details-subtitle {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #666;
  border-top: 1px solid #eee;
  padding-top: 20px;
  margin: 0 0 14px;
}

.tenant-brokers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.tenant-broker {
  background: #f7f7f7;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
}

.tenant-broker strong {
  display: block;
  color: #000;
  margin-bottom: 2px;
}

.tenant-broker a {
  display: block;
  color: #333;
  word-break: break-all;
}

.tenant-broker a:hover {
  color: #d9012e;
}

@keyframes tenantFadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 992px) {
  .tenant-item {
    flex-basis: calc((100% - 2 * 24px) / 3);
  }
}

@media (max-width: 768px) {
  .tenants-section h2.h1-style {
    margin-bottom: 30px;
  }

  .tenant-modal-box {
    padding: 28px 18px 18px;
  }

  .tenant-brokers {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .tenants-grid {
    gap: 14px;
  }

  .tenant-item {
    flex-basis: calc((100% - 14px) / 2);
  }

  .tenant-card {
    padding: 16px;
  }
}
