/* Estilos customizados para Mente Funcional */

/* Utilitários para truncar texto */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Estilo para o texto de carregamento */
.loading-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Estilo para a área de conteúdo do post */
.post-content {
  font-size: 1.125rem;
  line-height: 1.75;
  color: #374151;
}

.post-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.post-content h2 {
  font-size: 1.875rem;
  font-weight: 600;
  color: #111827;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.post-content p {
  margin-bottom: 1.5rem;
  line-height: 1.75rem;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.post-content ul {
  list-style-type: disc;
  list-style-position: outside;
}

.post-content ol {
  list-style-type: decimal;
  list-style-position: outside;
}

.post-content li {
  margin-bottom: 0.5rem;
  display: list-item;
}

.post-content blockquote {
  border-left: 4px solid #7692be;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #6b7280;
  padding: 1.5rem;
}

.post-content blockquote p {
  margin-bottom: 0;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content a {
  color: #3b82f6;
  text-decoration: underline;
  transition: color 0.2s;
}

.post-content a:hover {
  color: #1d4ed8;
}

.post-content img {
  width: 100%;
  border-radius: 0.75rem;
  margin: 2rem 0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.post-content code {
  background-color: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-family: "Monaco", "Menlo", monospace;
  font-size: 0.875rem;
  color: #475569;
}

.post-content pre {
  background-color: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.post-content pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

/* Estilo para o botão de voltar ao topo */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #3b82f6;
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
  transition: all 0.3s;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: #1d4ed8;
  transform: scale(1.1);
}

/* Estilo para destacar citações */
.highlight-quote {
  background: linear-gradient(120deg, #a7f3d0 0%, #a7f3d0 100%);
  background-repeat: no-repeat;
  background-size: 100% 0.2em;
  background-position: 0 88%;
  transition: background-size 0.25s ease-in;
}

/* Responsividade melhorada */
@media (max-width: 768px) {
  .post-content {
    font-size: 1rem;
    line-height: 1.6;
  }

  .post-content h1 {
    font-size: 1.875rem;
  }

  .post-content h2 {
    font-size: 1.5rem;
  }

  .post-content h3 {
    font-size: 1.25rem;
  }
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(-90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
  background-size: 400% 400%;
  animation: skeleton-loading 1.6s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Garantir que as listas tenham bullets em todo o site */
ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

/* Override específico para listas dentro de artigos */
article ul {
  list-style-type: disc !important;
  list-style-position: outside !important;
  padding-left: 1.5rem !important;
}

article ol {
  list-style-type: decimal !important;
  list-style-position: outside !important;
  padding-left: 1.5rem !important;
}

article li {
  display: list-item !important;
}

/* Override específico para a classe prose do Tailwind */
.prose ul {
  list-style-type: disc !important;
  list-style-position: outside !important;
}

.prose ol {
  list-style-type: decimal !important;
  list-style-position: outside !important;
}

.prose li {
  display: list-item !important;
}

/* Mais específico ainda - para conteúdo do post */
.post-content.prose ul {
  list-style-type: disc !important;
  list-style-position: outside !important;
  margin-left: 0 !important;
  padding-left: 1.5rem !important;
}

.post-content.prose ol {
  list-style-type: decimal !important;
  list-style-position: outside !important;
  margin-left: 0 !important;
  padding-left: 1.5rem !important;
}

.post-content.prose li {
  display: list-item !important;
  margin-left: 0 !important;
}

/* Ultra específico - sobrescrever completamente o Tailwind prose */
.prose.prose-lg.max-w-none ul {
  list-style-type: disc !important;
  list-style-position: outside !important;
  padding-left: 1.5rem !important;
  margin-left: 0 !important;
}

.prose.prose-lg.max-w-none ol {
  list-style-type: decimal !important;
  list-style-position: outside !important;
  padding-left: 1.5rem !important;
  margin-left: 0 !important;
}

.prose.prose-lg.max-w-none li {
  display: list-item !important;
  margin-left: 0 !important;
  list-style-type: inherit !important;
}

/* Se nada mais funcionar, força com especificidade máxima */
div.post-content.prose.prose-lg.max-w-none ul li {
  list-style-type: disc !important;
  display: list-item !important;
}

div.post-content.prose.prose-lg.max-w-none ol li {
  list-style-type: decimal !important;
  display: list-item !important;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 2rem;
  height: 2rem;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top:hover {
  background: #4f46e5;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Links com cor indigo */
a {
  color: #6366f1;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #4f46e5;
}

.prose a {
  color: #6366f1 !important;
  text-decoration: underline;
}

.prose a:hover {
  color: #4f46e5 !important;
}
