/**
 * ACF Serviços Listing Pro - Stylesheet
 * Version: 1.0.0
 */

/* ========================================
   BASE STYLES - Container Principal
======================================== */
.reallimp-locations {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ========================================
   FILTROS E BUSCA
======================================== */
.servicos-filters-wrapper {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.servicos-search-bar {
  position: relative;
  margin-bottom: 1.5rem;
}

.servicos-search-input {
  width: 100%;
  padding: 1rem 3.5rem 1rem 1.25rem;
  font-size: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-family: inherit;
  color: #333 !important;
  background: #fff !important;
}

.servicos-search-input:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.servicos-search-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: #0066cc;
  color: #fff;
  border: none;
  padding: 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.servicos-search-btn:hover {
  background: #0052a3;
  transform: translateY(-50%) scale(1.05);
}

.servicos-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-btn {
  padding: 0.625rem 1.25rem;
  background: #000000;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  background: #e5e7eb;
  color: #1f2937;
}

.filter-btn.active {
  background: #0066cc;
  color: #fff;
  border-color: #0066cc;
}

/* ========================================
   SEÇÕES E TÍTULOS
======================================== */
.servicos-section {
  margin-bottom: 3rem;
  animation: fadeIn 0.5s ease-in-out;
}

.servicos-section.hidden {
  display: none;
}

.reallimp-locations h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: #1a1a1a !important;
  border-bottom: 4px solid #0066cc;
  padding-bottom: 0.75rem;
  position: relative;
}

.reallimp-locations h2::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 80px;
  height: 4px;
  background: #0052a3;
}

.reallimp-locations h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: #2c3e50;
  padding-left: 1rem;
  border-left: 4px solid #0066cc;
}

/* ========================================
   GRID DE LOCALIZAÇÕES
======================================== */
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.location-grid a {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #f8f9fa !important;
  border-left: 4px solid #0066cc;
  color: #0066cc !important;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.location-grid a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(180deg, #0066cc 0%, #0052a3 100%);
  transition: width 0.3s ease;
}

.location-grid a:hover {
  background: #0066cc;
  color: #fff !important;
  transform: translateX(8px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
}

.location-grid a:hover::before {
  width: 100%;
}

.location-grid a:active {
  transform: translateX(6px) scale(0.98);
}

/* Efeito de destaque na busca */
.location-grid a.highlight {
  background: #fff3cd;
  border-left-color: #ffc107;
  animation: pulse 0.6s ease-in-out;
}

/* ========================================
   CTA DE CONTATO
======================================== */
.cta-contato {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  margin-top: 4rem;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.cta-contato p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0;
  max-width: 800px;
  margin: 0 auto;
}

/* ========================================
   ESTADOS DE CARREGAMENTO
======================================== */
.servicos-loading {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.servicos-loading::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #0066cc;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
  font-size: 1.1rem;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ========================================
   ANIMAÇÕES
======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   CONTADOR DE RESULTADOS
======================================== */
.servicos-results-count {
  text-align: center;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: #ffffff;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #6b7280;
}

.servicos-results-count strong {
  color: #0066cc;
  font-weight: 600;
}

/* ========================================
   RESPONSIVIDADE
======================================== */

/* Tablets */
@media (max-width: 1024px) {
  .location-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.65rem;
  }

  .reallimp-locations h2 {
    font-size: 1.5rem;
  }

  .reallimp-locations h3 {
    font-size: 1.2rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .reallimp-locations {
    padding: 1.5rem 1rem;
  }

  .servicos-filters-wrapper {
    padding: 1.25rem;
  }

  .servicos-filter-buttons {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .location-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .location-grid a {
    font-size: 0.9rem;
    padding: 0.875rem 1rem;
  }

  .reallimp-locations h2 {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
  }

  .reallimp-locations h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
  }

  .cta-contato {
    padding: 1.5rem;
  }

  .cta-contato p {
    font-size: 1rem;
  }
}

/* Mobile pequeno */
@media (max-width: 480px) {
  .reallimp-locations {
    padding: 1rem 0.75rem;
  }

  .servicos-search-input {
    font-size: 0.95rem;
    padding: 0.875rem 3rem 0.875rem 1rem;
  }

  .reallimp-locations h2 {
    font-size: 1.25rem;
  }

  .reallimp-locations h3 {
    font-size: 1rem;
  }

  .location-grid a {
    font-size: 0.875rem;
    padding: 0.75rem 0.875rem;
  }

  .filter-btn {
    font-size: 0.8125rem;
    padding: 0.4rem 0.85rem;
  }
}

/* ========================================
   ACESSIBILIDADE
======================================== */
.location-grid a:focus,
.filter-btn:focus,
.servicos-search-input:focus,
.servicos-search-btn:focus {
  outline: 3px solid #0066cc;
  outline-offset: 2px;
}

/* Redução de movimento */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {

  .servicos-filters-wrapper,
  .cta-contato {
    display: none;
  }

  .location-grid a {
    color: #000;
    text-decoration: underline;
  }

  .servicos-section {
    page-break-inside: avoid;
  }
}