/* ========================================
   ADMIN PANEL - Cases de Sucesso Metabox
   ======================================== */

.cases-sucesso-metabox {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Campo de título personalizado */
.cases-sucesso-metabox .titulo-personalizado-container {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 4px solid #0073aa;
}

.cases-sucesso-metabox .titulo-personalizado-container label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #495057;
}

.cases-sucesso-metabox .titulo-personalizado-container input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.cases-sucesso-metabox .titulo-personalizado-container input[type="text"]:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.cases-sucesso-metabox .titulo-personalizado-container p {
  margin-top: 5px;
  font-size: 12px;
  color: #666;
  font-style: italic;
}

.cases-sucesso-metabox .case-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 15px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.cases-sucesso-metabox .case-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Accordion Header */
.case-item-header {
  background: #f8f9fa;
  padding: 15px 20px;
  cursor: pointer;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s ease;
}

.case-item-header:hover {
  background: #e9ecef;
}

.case-item-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #495057;
  flex-grow: 1;
}

.case-item-header .case-status {
  font-size: 12px;
  color: #6c757d;
  margin-left: 10px;
}

.case-item-header .accordion-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
  color: #6c757d;
}

.case-item-header .accordion-toggle:hover {
  background: #dee2e6;
  color: #495057;
}

.case-item-header .accordion-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.case-item-header .accordion-toggle.expanded svg {
  transform: rotate(180deg);
}

/* Accordion Content */
.case-item-content {
  padding: 20px;
  display: none;
  background: #fff;
}

.case-item-content.expanded {
  display: block;
}

/* Image Upload Container */
.image-upload-container {
  margin-bottom: 20px;
}

.image-upload-container .upload-image {
  background: #0073aa;
  border-color: #0073aa;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.image-upload-container .upload-image:hover {
  background: #005a87;
  border-color: #005a87;
}

.image-preview {
  margin: 15px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.image-preview img {
  max-width: 150px;
  max-height: 100px;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: block;
  margin-bottom: 10px;
}

.remove-image {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.remove-image:hover {
  background: #c82333;
  border-color: #bd2130;
}

/* Form Fields */
.case-item-content label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: #495057;
  font-size: 14px;
}

.case-item-content input[type="text"],
.case-item-content textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.case-item-content input[type="text"]:focus,
.case-item-content textarea:focus {
  border-color: #0073aa;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.case-item-content textarea {
  resize: vertical;
  min-height: 80px;
}

/* Author Fields Row */
.author-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.author-fields-row .field-group {
  display: flex;
  flex-direction: column;
}

/* Remove Case Button */
.remove-case {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.2s ease;
  margin-top: 15px;
}

.remove-case:hover {
  background: #c82333;
  border-color: #bd2130;
}

/* Add Case Button */
#add-case {
  background: #28a745;
  border-color: #28a745;
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-top: 20px;
  width: 100%;
}

#add-case:hover {
  background: #218838;
  border-color: #1e7e34;
}

/* Responsive Design */
@media (max-width: 768px) {
  .author-fields-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .case-item-header {
    padding: 12px 15px;
  }

  .case-item-content {
    padding: 15px;
  }

  .case-item-header h5 {
    font-size: 14px;
  }
}

/* Loading States */
.case-item.loading {
  opacity: 0.6;
  pointer-events: none;
}

.case-item.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #0073aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Empty State */
.cases-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  margin: 20px 0;
}

.cases-empty-state h4 {
  margin: 0 0 10px 0;
  color: #495057;
}

.cases-empty-state p {
  margin: 0 0 20px 0;
  font-size: 14px;
}

/* Status Indicators */
.case-status.complete {
  color: #28a745;
}

.case-status.incomplete {
  color: #ffc107;
}

.case-status.empty {
  color: #dc3545;
}

/* ========================================
   FRONTEND - Cases de Sucesso Slider
   ======================================== */

/* Estrutura base do Swiper */
.cases-sucesso-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 15px !important;
}

.swiper-wrapper {
  display: flex;
  align-items: flex-start;
}

.swiper-slide {
  flex: 0 0 auto;
  min-width: 0;
}

/* section.cases-sucesso-section {
  padding: px 0;
} */

.post-content img {
  border-radius: 0 !important;
}

.case-sucesso-item {
  flex-direction: column;
  justify-content: space-between !important;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .cases-sucesso-slider {
    min-height: 280px;
  }
}

/* Estados do slider */
.cases-sucesso-slider.loading {
  opacity: 0.7;
  pointer-events: none;
}

.cases-sucesso-slider.loaded {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.cases-sucesso-slider.swiper-initialized {
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   SLIDER PAGINATION - Dots Centralizados
   ======================================== */

/* Container dos dots customizados */
.cases-sucesso-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  gap: 8px;
  min-height: 20px;
  position: relative;
}

/* Estilos para os dots customizados */
.cases-sucesso-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #e0e0e0;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  margin: 0 4px;
  opacity: 0.6;
  display: inline-block;
  visibility: visible;
}

.cases-sucesso-pagination .swiper-pagination-bullet:hover {
  background-color: #f3d841;
  opacity: 0.8;
  cursor: pointer;
}

.bowling-effects-image {
  width: 100%;
  margin-top: 0px !important;
  padding-inline: 15px !important;
}

/* Regra mais específica para garantir que a classe active seja aplicada */
.cases-sucesso-pagination .swiper-pagination-bullet-active {
  background-color: #ffdd19 !important;
  opacity: 1 !important;
}

.cases-sucesso-pagination .swiper-pagination-bullet:focus {
  outline: none;
  outline-offset: 0;
}

/* Responsive para os dots */
@media (max-width: 768px) {
  .cases-sucesso-pagination {
    margin-top: 20px;
    gap: 6px;
  }

  .cases-sucesso-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0 3px;
  }
}

@media (max-width: 480px) {
  .cases-sucesso-pagination {
    margin-top: 15px;
    gap: 4px;
  }

  .cases-sucesso-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 2px;
  }
}

/* ========================================
   DEPOIMENTO - Funcionalidade Ler Mais
   ======================================== */

.case-sucesso-depoimento {
  position: relative;
  overflow: hidden;
}

.depoimento-content {
  position: relative;
  transition: all 0.3s ease;
}

.depoimento-content {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Quando o texto não excede 4 linhas, não aplicar truncamento */
.depoimento-content.no-truncate {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
  overflow: visible;
}

.depoimento-content.expanded {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  max-height: 1000px;
  /* Altura suficiente para todo o texto */
}

.ler-mais-btn {
  border: none !important;
  background: none !important;
  text-decoration: underlines;
  color: #0073aa !important;
  padding: 0 !important;
  margin: 12px 0px;
}

.ler-mais-btn:hover {
  background-color: transparent !important;
}

.ler-mais-hr {
  transition: width 0.3s ease;
}

.ler-mais-hr:hover {
  width: 50%;
}

/*  background-color: #ffdd19 !important;
  border: none;
  color: #0073aa !important;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  margin-top: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
} */

/* .ler-mais-btn:hover {
  color: #ffdd19 !important;
  background-color: #0a4766 !important;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
} */

.ler-mais-btn:focus {
  color: #0a4766 !important;
  background-color: #ffdd19 !important;
  text-decoration: none;
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

.ler-mais-btn .ler-mais-text,
.ler-mais-btn .ler-menos-text {
  display: inline;
}

.ler-mais-btn.expanded .ler-mais-text {
  display: none;
}

.ler-mais-btn:not(.expanded) .ler-menos-text {
  display: none;
}

/* Animação suave para o texto */
.depoimento-content p {
  margin: 0;
  margin-bottom: 16px;
  color: #565A5B;
  line-height: 140%;
  transition: all 0.3s ease;
}

/* Controle das reticências */
.depoimento-content .reticencias {
  display: inline;
  transition: opacity 0.3s ease;
}

.depoimento-content.expanded .reticencias {
  opacity: 0;
  display: none;
}

/* Responsive para mobile */
@media (max-width: 768px) {
  .depoimento-content:not(.expanded) {
    max-height: 8.5em;
    -webkit-line-clamp: 4;
  }

  .ler-mais-btn {
    font-size: 13px;
    padding: 6px 0;
  }
}

/* ========================================
   DEPOIMENTOS MÚLTIPLOS - Admin Panel
   ======================================== */

/* Container de depoimentos */
.depoimentos-list {
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background: #f8f9fa;
  padding: 15px;
}

/* Item de depoimento */
.depoimento-item {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  margin-bottom: 15px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.depoimento-item:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.depoimento-item:last-child {
  margin-bottom: 0;
}

/* Header do depoimento */
.depoimento-item-header {
  background: #f1f3f4;
  padding: 12px 15px;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s ease;
}

.depoimento-item-header:hover {
  background: #e9ecef;
}

.depoimento-item-header h6 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  flex-grow: 1;
}

.depoimento-item-header .depoimento-status {
  font-size: 11px;
  color: #6c757d;
  margin-left: 10px;
}

.depoimento-item-header .remove-depoimento {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 3px;
  transition: all 0.2s ease;
  margin-left: 10px;
}

.depoimento-item-header .remove-depoimento:hover {
  background: #c82333;
  border-color: #bd2130;
}

/* Conteúdo do depoimento */
.depoimento-item-content {
  padding: 15px;
  background: #fff;
}

/* Status dos depoimentos */
.depoimento-status.complete {
  color: #28a745;
}

.depoimento-status.incomplete {
  color: #ffc107;
}

.depoimento-status.empty {
  color: #dc3545;
}

/* Botão adicionar depoimento */
.add-depoimento {
  background: #17a2b8;
  border-color: #17a2b8;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  transition: all 0.2s ease;
  margin-bottom: 15px;
}

.add-depoimento:hover {
  background: #138496;
  border-color: #117a8b;
}

/* Responsive para depoimentos */
@media (max-width: 768px) {
  .depoimentos-list {
    padding: 10px;
  }

  .depoimento-item-header {
    padding: 10px 12px;
  }

  .depoimento-item-content {
    padding: 12px;
  }

  .depoimento-item-header h6 {
    font-size: 13px;
  }

  .author-fields-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ========================================
   FRONTEND - Múltiplos Depoimentos
   ======================================== */

/* Container de depoimentos no frontend */
.case-sucesso-depoimentos {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.case-sucesso-depoimento {
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.case-sucesso-nome {
  color: #565A5B;
}

.case-sucesso-depoimento:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}


/* Responsive para múltiplos depoimentos */
@media (max-width: 768px) {
  .case-sucesso-depoimentos {
    gap: 15px;
  }

  .case-sucesso-depoimento {
    padding-bottom: 12px;
    margin-bottom: 12px;
  }

  .case-sucesso-depoimento:not(:last-child)::after {
    margin-top: 12px;
  }
}

.case-sucesso-imagem img {
  margin: 0px !important;
}

.case-sucesso-imagem,
.case-sucesso-texto {
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: 0 2px 16px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  min-height: 222px;
}

.case-sucesso-imagem img {
  margin: 0px !important;
}

.cases-sucesso-slider:has(.case-sucesso-imagem) {
  min-height: 600px;
}

@media(max-width: 768px) {
  .cases-sucesso-slider:has(.case-sucesso-imagem) {
    min-height: 520px;
    margin-bottom: 25px;
  }

  .cases-sucesso-slider:has(.case-sucesso-texto) {
    margin-bottom: 25px;
  }
}

/* Título do case */
.case-sucesso-titulo {
  margin: 0 0 15px 0;
  font-size: 18px !important;
  font-weight: 600;
  color: #18455D;
  line-height: 1.3;
  text-align: left !important;
}

.case-sucesso-titulo h1,
.case-sucesso-titulo h2,
.case-sucesso-titulo h3,
.case-sucesso-titulo h4,
.case-sucesso-titulo h5,
.case-sucesso-titulo h6 {
  margin: 0 0 15px 0;
  font-size: 18px !important;
  font-weight: 600;
  color: #18455D;
  line-height: 1.3;
  text-align: left !important;
}

/* Responsive para o título */
@media (max-width: 768px) {
  .case-sucesso-titulo {
    font-size: 16px;
  }

  .case-sucesso-titulo h1,
  .case-sucesso-titulo h2,
  .case-sucesso-titulo h3,
  .case-sucesso-titulo h4,
  .case-sucesso-titulo h5,
  .case-sucesso-titulo h6 {
    font-size: 16px;
  }
}

/* remover o box-shado do somente do texto quando tiver imagem*/
.case-sucesso-imagem:has(.case-sucesso-texto) .case-sucesso-texto {
  box-shadow: none;
}