/* ============================================================
   NEXDEN Digital — Sessão 04: Depoimentos & Carrossel Contínuo
   Fidelidade ao Modelo.png, Cards Sem Cortes & Modal Grafite/Ouro
   ============================================================ */

/* ── Container do Conteúdo de Depoimentos ── */
#testimonials .section__content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: clamp(28px, 6.5vw, 54px);
  padding-bottom: clamp(24px, 5.5vw, 44px);
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── Cabeçalho da Seção de Depoimentos ── */
.testimonials-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 92%;
  max-width: 480px;
  margin-bottom: clamp(14px, 3.2vw, 24px);
  z-index: 10;
}

/* Linha dourada centralizada de acabamento no topo */
.testimonials-top-line {
  width: clamp(48px, 12vw, 68px);
  height: 3px;
  background: linear-gradient(90deg, transparent, #cda861 30%, #e2be74 50%, #cda861 70%, transparent);
  border-radius: 2px;
  margin-bottom: clamp(10px, 2.2vw, 16px);
  opacity: 0.95;
}

/* Tag DEPOIMENTOS com kerning refinado */
.testimonials-tag {
  display: inline-block;
  color: #b89243;
  font-family: var(--font-family-display);
  font-size: clamp(0.72rem, 2vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: clamp(8px, 1.8vw, 14px);
}

/* Título de alto impacto visual */
.testimonials-title {
  font-family: var(--font-family-display);
  font-size: clamp(1.36rem, 4.3vw, 1.80rem);
  font-weight: 800;
  line-height: 1.25;
  color: #1a1a1a;
  letter-spacing: -0.015em;
  margin: 0;
}

.testimonials-title .text-gold {
  background: linear-gradient(135deg, #c49942 0%, #9e6c27 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
}

/* ── Carrossel de Depoimentos ── */
.testimonials-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  padding: 8px 0 14px 0;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 6%,
    black 94%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 6%,
    black 94%,
    transparent 100%
  );
}

.testimonials-carousel.is-dragging {
  cursor: grabbing;
}

/* Trilha deslizante contínua com alinhamento uniforme */
.testimonials-track {
  display: flex;
  align-items: stretch;
  gap: clamp(16px, 3.8vw, 24px);
  width: max-content;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: none !important;
}

/* ── Card Individual de Depoimento (Sem cortes de informação) ── */
.testimonial-card {
  width: clamp(285px, 80vw, 350px);
  flex-shrink: 0;
  position: relative;
  box-sizing: border-box;
  background: linear-gradient(180deg, #FDFCFB 0%, #F8F3EC 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: clamp(18px, 4.5vw, 24px);
  padding: clamp(18px, 4vw, 24px) clamp(18px, 4vw, 22px);
  box-shadow: 
    0 12px 28px -4px rgba(70, 50, 20, 0.08),
    0 2px 6px rgba(212, 175, 55, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 16px 36px -4px rgba(70, 50, 20, 0.12),
    0 4px 10px rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.75);
}

/* Aspas decorativas douradas no canto superior direito */
.testimonial-quote-mark {
  position: absolute;
  top: clamp(10px, 2.2vw, 16px);
  right: clamp(14px, 3.2vw, 20px);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.8rem, 6.5vw, 3.8rem);
  line-height: 1;
  color: rgba(205, 168, 97, 0.18);
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

/* Topo do Card: Avatar, Nome, Especialidade e Estrelas */
.testimonial-profile {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.8vw, 16px);
  margin-bottom: clamp(12px, 2.8vw, 16px);
  position: relative;
  z-index: 2;
  width: 100%;
}

.testimonial-avatar-wrapper {
  width: clamp(52px, 12.5vw, 62px);
  height: clamp(52px, 12.5vw, 62px);
  flex-shrink: 0;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #e4c47b 0%, #aa8233 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background-color: #ffffff;
}

.testimonial-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

/* Sem truncamento com reticências: quebra natural de linha */
.testimonial-name {
  font-family: var(--font-family-display);
  font-size: clamp(0.94rem, 2.5vw, 1.08rem);
  font-weight: 800;
  color: #111111;
  line-height: 1.25;
  margin: 0 0 3px 0;
  white-space: normal;
  word-break: normal;
}

.testimonial-role {
  font-family: var(--font-family-display);
  font-size: clamp(0.62rem, 1.6vw, 0.70rem);
  font-weight: 700;
  letter-spacing: 0.10em;
  color: #8c6e3b;
  text-transform: uppercase;
  margin: 0 0 5px 0;
  white-space: normal;
  word-break: normal;
  line-height: 1.3;
}

/* Avaliação em 5 Estrelas Douradas */
.testimonial-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #d49a34;
  line-height: 1;
  flex-shrink: 0;
}

.testimonial-stars svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Corpo do Depoimento */
.testimonial-body {
  position: relative;
  z-index: 2;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.testimonial-text {
  font-family: var(--font-family-body);
  font-size: clamp(0.82rem, 2.1vw, 0.90rem);
  line-height: 1.58;
  color: #2e2e2e;
  margin: 0;
  text-align: left;
  word-break: normal;
}

/* Palavras-chave destacadas em marrom/dourado nobre */
.testimonial-highlight {
  color: #94631d;
  font-weight: 700;
}

/* Expressão "Ler mais" perfeitamente integrada ao fluxo do texto */
.testimonial-inline-more {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin-left: 5px;
  font-family: inherit;
  font-size: 0.88em;
  font-weight: 700;
  color: #b88a38;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  vertical-align: baseline;
  transition: color 0.2s ease;
  white-space: nowrap;
  position: relative;
  z-index: 5;
  pointer-events: auto !important;
  touch-action: manipulation;
}

.testimonial-inline-more:hover {
  color: #8c641c;
}

/* ── Indicadores / Paginação (Dots) ── */
.testimonials-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(8px, 2.2vw, 16px);
  z-index: 10;
}

.testimonials-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(184, 146, 67, 0.35);
  transition: all 0.3s ease;
}

.testimonials-dot.is-active {
  width: 22px;
  border-radius: 6px;
  background: linear-gradient(90deg, #cda861, #9e6c27);
  box-shadow: 0 2px 6px rgba(184, 146, 67, 0.3);
}

/* ── Modal Oficial NEXDEN (Grafite Escuro e Dourado) ── */
.testimonial-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
}

.testimonial-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.testimonial-modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #1C1C1C 0%, #101010 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.65);
  border-radius: 24px;
  padding: clamp(24px, 5.5vw, 36px) clamp(22px, 5vw, 30px);
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.75),
    0 0 35px rgba(212, 175, 55, 0.22);
  transform: scale(0.94) translateY(12px);
  opacity: 0.85;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  color: #EDEDED;
}

.testimonial-modal-overlay.is-active .testimonial-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.testimonial-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ECC876;
  font-size: 1.4rem;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 10;
}

.testimonial-modal-close:hover {
  background: #ECC876;
  color: #111111;
  border-color: #ECC876;
}

/* Perfil dentro do Modal Dark */
.testimonial-modal-content .testimonial-profile {
  margin-bottom: 18px;
}

.testimonial-modal-content .testimonial-name {
  color: #FFFFFF;
  font-size: clamp(1.05rem, 2.8vw, 1.22rem);
}

.testimonial-modal-content .testimonial-role {
  color: #ECC876;
  font-size: clamp(0.68rem, 1.8vw, 0.78rem);
}

.testimonial-modal-full-text {
  font-family: var(--font-family-body);
  font-size: clamp(0.92rem, 2.3vw, 1.02rem);
  line-height: 1.7;
  color: #E2E2E2;
  margin: 16px 0 22px 0;
  text-align: left;
}

.testimonial-modal-full-text .testimonial-highlight {
  color: #ECC876;
  font-weight: 700;
}

.testimonial-modal-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px dashed rgba(212, 175, 55, 0.45);
  color: #ECC876;
  font-family: var(--font-family-display);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Prevenção de rolagem com modal ativo */
body.modal-open {
  overflow: hidden !important;
  touch-action: none;
}

/* Acessibilidade: Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .testimonial-modal-overlay,
  .testimonial-modal-content {
    transition-duration: 0.01ms !important;
    transform: none !important;
  }
}
