.testemunhos {
  background: var(--cinza2);
  padding: 72px 24px;
  scroll-margin-top: 100px;
}

.testemunhos__inner {
  max-width: 1360px;
  margin: 0 auto;
}

.testemunhos__header {
  text-align: center;
  margin-bottom: 40px;
}

.testemunhos__title {
  color: var(--cinza11);
  font-weight: 700;
  margin-bottom: 8px;
}

.testemunhos__subtitle {
  color: var(--suporte6);
}

.testemunhos__status {
  text-align: center;
  color: var(--suporte6);
  padding: 40px 0;
  width: 100%;
}

.testemunhos__footer {
  text-align: center;
  margin-top: 32px;
}

/* ===== Carrossel (mesmo padrão do carrossel de cidades) ===== */
.testemunhos__carousel {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testemunhos__nav {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--suporte3);
  background: var(--cinza1);
  color: var(--suporte9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.testemunhos__nav:hover {
  background: var(--suporte1);
}

.testemunhos__nav:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.testemunhos__nav svg {
  width: 18px;
  height: 18px;
}

.testemunhos__nav[hidden] {
  display: none;
}

.testemunhos__track {
  flex: 1;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  scrollbar-width: none;
  --cols: 4;
}

.testemunhos__track::-webkit-scrollbar {
  display: none;
}

.testemunhos__track--centered {
  justify-content: center;
}

/* ===== Cartão de testemunho ===== */
.testemunho-card {
  flex: 0 0 calc((100% - (var(--cols) - 1) * 24px) / var(--cols));
  scroll-snap-align: start;
  background: var(--cinza1);
  border: 1px solid var(--suporte3);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.testemunho-card__quote {
  color: var(--suporte8);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}

.testemunho-card__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--suporte2);
}

.testemunho-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--suporte2);
}

.testemunho-card__avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--suporte5);
}

.testemunho-card__avatar--placeholder svg {
  width: 18px;
  height: 18px;
}

.testemunho-card__name {
  color: var(--cinza11);
  font-size: 14px;
  font-weight: 700;
}

.testemunho-card__date {
  color: var(--suporte6);
  font-size: 12px;
  margin-top: 1px;
}

@media (max-width: 960px) {
  .testemunho-card {
    min-height: 220px;
  }
}

@media (max-width: 768px) {
  .testemunhos__title {
    font-size: 40px;
  }
}

@media (max-width: 640px) {
  .testemunho-card {
    flex-basis: 100%;
  }

  .testemunhos__nav {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 480px) {
  .testemunhos {
    padding: 48px 16px;
  }

  .testemunhos__title {
    font-size: 30px;
  }
}

/* ===== Modal "Conte-nos a sua experiência" =====
   Mesmo padrão visual dos modais do backoffice (.bo-modal-overlay em
   css/empreendimentos-form.css) — overlay fixo + cartão centrado, escondido
   via atributo [hidden] nativo (não display/opacity, ver js/testemunhos-form.js). */
.testemunho-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 16, 16, 0.55);
}

.testemunho-modal[hidden] {
  display: none;
}

.testemunho-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--cinza1);
  border-radius: 24px;
  padding: 40px;
}

.testemunho-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--suporte1);
  color: var(--suporte9);
  cursor: pointer;
}

.testemunho-modal__close svg {
  width: 18px;
  height: 18px;
}

.testemunho-modal__title {
  color: var(--cinza11);
  font-weight: 700;
  margin-bottom: 8px;
  padding-right: 32px;
}

.testemunho-modal__subtitle {
  color: var(--suporte7);
  margin-bottom: 24px;
}

.testemunho-modal__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.testemunho-modal__textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.testemunho-modal__submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

/* Mesmo padrão visual do avatar picker do backoffice
   (.csf-avatar-picker em css/clientes-satisfeitos-form.css). */
.testemunho-modal__avatar-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--suporte1);
  border: 1.5px dashed var(--suporte4);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.testemunho-modal__avatar-picker:hover {
  border-color: var(--primaria5);
  background: var(--primaria1);
}

.testemunho-modal__avatar-picker__placeholder {
  width: 32px;
  height: 32px;
  color: var(--suporte5);
}

.testemunho-modal__avatar-picker__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testemunho-modal__avatar-picker__image[hidden] {
  display: none;
}

@media (max-width: 480px) {
  .testemunho-modal__dialog {
    padding: 28px 24px;
  }
}
