/* ==========================================================================
   CSS complementar do tema Prefeitura de Laranjal do Jari.
   Estilos que não são práticos em Tailwind inline (truncate multi-linha,
   animações do slider, paginação, prose fallback).
   ========================================================================== */

/* ---- Variáveis CSS (para uso sem Tailwind em alguns casos) ---- */
:root {
  --plj-green-700: #2E7D32;
  --plj-green-800: #1B5E20;
  --plj-green-900: #0D3B12;
  --plj-gold-500:  #FDD835;
  --plj-gold-600:  #FBC02D;
  --plj-gold-700:  #F9A825;
}

/* ---- Body base ---- */
html { scroll-behavior: smooth; }
body { font-feature-settings: "kern", "liga", "clig", "calt"; }

/* ---- Line clamp (fallback se Tailwind CDN não incluir) ---- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Slider: transições e dots ---- */
.plj-slider-dot.is-active {
  background-color: var(--plj-gold-500) !important;
  width: 2rem;
}
.plj-slider-dot {
  transition: all 0.3s ease;
}

/* Fade suave entre slides */
.plj-slide {
  transition: opacity 0.7s ease-in-out;
}
.plj-slide.is-active {
  opacity: 1;
  z-index: 10;
}

/* ---- Paginação do WordPress ---- */
.navigation.pagination,
.plj-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.navigation.pagination .page-numbers,
.plj-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--plj-green-800);
  background: #fff;
  border: 2px solid #E5E7EB;
  transition: all 0.2s ease;
}
.navigation.pagination .page-numbers:hover,
.plj-pagination .page-numbers:hover {
  background: var(--plj-green-800);
  color: #fff;
  border-color: var(--plj-green-800);
}
.navigation.pagination .page-numbers.current,
.plj-pagination .page-numbers.current {
  background: var(--plj-gold-500);
  color: var(--plj-green-900);
  border-color: var(--plj-gold-500);
}
.navigation.pagination .page-numbers.dots {
  border: none;
  background: transparent;
}

/* ---- Estilo mínimo do conteúdo gerado pelo editor (prose fallback) ---- */
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  line-height: 1.25;
}
.prose h1:first-child, .prose h2:first-child, .prose h3:first-child {
  margin-top: 0;
}
.prose h2 { font-size: 1.875rem; }
.prose h3 { font-size: 1.5rem; }
.prose p { margin-bottom: 1.2em; line-height: 1.75; }
.prose ul, .prose ol { margin: 1em 0 1em 1.5em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.4em; }
.prose a { text-decoration: underline; }
.prose blockquote {
  border-left: 4px solid var(--plj-gold-500);
  background: #F0FDF4;
  padding: 0.75rem 1.25rem;
  margin: 1.5em 0;
  font-style: normal;
  color: #334155;
  border-radius: 0 0.5rem 0.5rem 0;
}
.prose img {
  border-radius: 0.75rem;
  margin: 1.5em 0;
  box-shadow: 0 4px 6px -1px rgba(13,59,18,0.1);
}
.prose figure { margin: 1.5em 0; }
.prose figure figcaption {
  font-size: 0.875rem;
  color: #6B7280;
  font-style: italic;
  text-align: center;
  padding-top: 0.5rem;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
.prose th, .prose td {
  padding: 0.75rem 1rem;
  border: 1px solid #E5E7EB;
  text-align: left;
}
.prose th {
  background: #F0FDF4;
  color: var(--plj-green-900);
  font-weight: 700;
}
.prose code {
  background: #F1F5F9;
  color: var(--plj-green-800);
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
}
.prose pre {
  background: #0F172A;
  color: #F1F5F9;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5em 0;
}
.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* ---- Custom logo override ---- */
.custom-logo {
  max-height: 64px;
  width: auto;
}
@media (min-width: 768px) {
  .custom-logo { max-height: 80px; }
}

/* ---- Acessibilidade: foco visível forte ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--plj-gold-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Esconde completamente o admin bar do WP em mobile quando não logado ---- */
html.no-admin-bar { margin-top: 0 !important; }

/* ---- Comentários: ajustes finos ---- */
.comment-list .children {
  margin-left: 1.5rem;
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 2px solid #E5E7EB;
}

/* ---- WP Block: captions/galleries ---- */
.wp-block-image figcaption,
.wp-caption-text {
  color: #6B7280;
  font-size: 0.875rem;
  font-style: italic;
  text-align: center;
}

/* ---- Animação de entrada ---- */
@keyframes plj-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.plj-animate-fade-up {
  animation: plj-fade-up 0.6s ease-out both;
}

/* ---- Print ---- */
@media print {
  header, footer, .plj-slider, nav { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* ---- Scroll custom ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: var(--plj-green-800); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--plj-green-900); }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
