/**
 * Clique Diretório - Estilos dos Cards
 * Plugin de diretório de profissionais
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* ==========================================================================
   LISTA DE CARDS
   ========================================================================== */

.dir-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
  padding: 0;
}

.dir-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
  padding: 0;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.dir-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 
    0 4px 6px -1px rgba(0,0,0,.07),
    0 2px 4px -1px rgba(0,0,0,.04),
    inset 0 1px 0 rgba(255,255,255,0.8);
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.dir-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dir-card:hover {
  box-shadow: 
    0 10px 25px -8px rgba(0,0,0,.12),
    0 4px 10px -4px rgba(0,0,0,.08);
  transform: translateY(-2px);
  border-color: #667eea;
}

.dir-card:hover::before {
  opacity: 1;
}

/* Card em Destaque */
.dir-card-destaque {
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
  border: 2px solid #f59e0b;
  position: relative;
  box-shadow: 
    0 4px 6px -1px rgba(245, 158, 11, 0.15),
    0 2px 4px -1px rgba(245, 158, 11, 0.1),
    inset 0 1px 0 rgba(255,255,255,0.6);
}

.dir-card-destaque::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  border-radius: 22px 22px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dir-card-destaque:hover {
  border-color: #d97706;
  transform: translateY(-4px);
  box-shadow: 
    0 25px 50px -12px rgba(245, 158, 11, 0.25),
    0 12px 24px -8px rgba(245, 158, 11, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.7);
}

.dir-card-destaque:hover::before {
  opacity: 1;
}

.dir-destaque-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #166534;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.4);
  text-shadow: none;
  letter-spacing: 0.5px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dir-destaque-badge svg {
  fill: #fff;
}

@keyframes star-shine {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(255, 255, 0, 0.8)) drop-shadow(0 0 8px rgba(255, 200, 0, 0.6));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(255, 255, 0, 1)) drop-shadow(0 0 15px rgba(255, 200, 0, 0.9));
    transform: scale(1.1);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.5), 0 0 20px rgba(251, 191, 36, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.7), 0 0 30px rgba(251, 191, 36, 0.5);
  }
}

/* Header do Card */
.dir-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.dir-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dir-avatar-logo {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  overflow: hidden;
}

.dir-avatar-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.dir-info {
  flex: 1;
  min-width: 0;
}

.dir-name {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.3px;
}

.dir-name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dir-name a:hover {
  color: #2563eb;
}

.dir-status-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 8px;
  background: #fff;
  color: #16a34a;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  border: 1px solid #16a34a;
}

.dir-status-inline svg {
  color: #16a34a;
}

.dir-rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  background: #fff;
  color: #92400e;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.dir-star-mini {
  color: #d1d5db;
  font-size: 8px;
  cursor: pointer;
  transition: color 0.15s;
}

.dir-star-mini:hover {
  transform: scale(1.2);
}

.dir-star-mini.active {
  color: #fbbf24;
}

.dir-star-mini.hover {
  color: #fbbf24;
}

.dir-rating-inline.voted .dir-star-mini {
  cursor: default;
}

.dir-rating-inline.voted .dir-star-mini:hover {
  transform: none;
}

.dir-rating-num {
  margin-left: 4px;
  font-size: 11px;
  color: #92400e;
  font-weight: 600;
}

/* Taxonomias (Cidade e Profissão) */
.dir-taxonomias {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 18px;
}

.dir-taxonomias-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dir-taxonomias-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.dir-tax {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  height: auto;
  box-sizing: border-box;
}

.dir-tax svg {
  flex-shrink: 0;
}

.dir-tax-profissao,
.dir-tax-cidade {
  background: #e0f2fe;
  color: #0369a1;
  box-shadow: none;
  transition: all 0.2s ease;
  text-shadow: none;
}

.dir-tax-profissao:hover,
.dir-tax-cidade:hover {
  background: #0ea5e9;
  color: #fff;
  transform: none;
  box-shadow: none;
}

/* Badge de Profissão */
.dir-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
  color: #4c51bf;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  margin-top: 8px;
}

/* Status Ativo */
.dir-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px;
  margin-left: 8px;
}

.dir-status.active {
  background: #dcfce7;
  color: #166534;
}

/* Descrição do Serviço */
.dir-descricao {
  margin-top: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
  border-left: 4px solid #667eea;
}

.dir-descricao-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #64748b;
  margin: 0 0 8px;
}

.dir-descricao-text {
  font-size: 15px;
  line-height: 1.6;
  color: #1f2937;
  margin: 0;
}

/* Info de Contato */
.dir-contact-info {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 13px;
  color: #64748b;
}

.dir-contact-info span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   BOTÕES DE AÇÃO
   ========================================================================== */

.dir-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.dir-btn-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.5px;
}

.dir-btn-inline.dir-btn-whatsapp {
  background: #fff;
  color: #075E54;
  border: 1px solid #075E54;
}

.dir-btn-inline.dir-btn-whatsapp:hover {
  background: #075E54;
  color: #fff;
}

.dir-btn-inline.dir-btn-call {
  background: #fff;
  color: #1e40af;
  border: 1px solid #1e40af;
}

.dir-btn-inline.dir-btn-call:hover {
  background: #1e40af;
  color: #fff;
}

.dir-btn-inline.dir-btn-instagram {
  background: #fff;
  color: #c13584;
  border: 1px solid #c13584;
}

.dir-btn-inline.dir-btn-instagram:hover {
  background: #c13584;
  color: #fff;
}

.dir-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  letter-spacing: 0.5px;
  min-width: auto;
  transform: none;
  border: none;
}

.dir-btn svg {
  width: 12px;
  height: 12px;
}

/* WhatsApp */
.dir-btn-whatsapp {
  background: #075E54;
  color: #fff;
}

.dir-btn-whatsapp:hover {
  background: #064e46;
  color: #fff;
}

/* Ligar */
.dir-btn-call {
  background: #1e40af;
  color: #fff;
}

.dir-btn-call:hover {
  background: #1e3a8a;
  color: #fff;
}

/* Instagram */
.dir-btn-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff;
}

.dir-btn-instagram:hover {
  background: linear-gradient(45deg, #e6683c 0%, #dc2743 25%, #cc2366 50%, #bc1888 75%, #833ab4 100%);
  color: #fff;
}

/* Ver Detalhes */
.dir-btn-details {
  background: #fff;
  color: #475569;
  border: 2px solid #e2e8f0;
}

.dir-btn-details:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

/* Desabilitado */
.dir-btn-disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  border: 1px dashed #cbd5e1;
}

/* ==========================================================================
   GRID DE CARDS
   ========================================================================== */

.dir-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  overflow: visible;
  max-width: 500px;
  margin: 0 auto;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.dir-header {
  margin-bottom: 12px;
  text-align: center;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 12px;
}

.dir-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px;
  line-height: 1.3;
  font-family: 'Montserrat', sans-serif;
}

.dir-header p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* ==========================================================================
   MENSAGENS
   ========================================================================== */

.dir-success-msg {
  margin: 20px 0;
  padding: 16px 20px;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 1px solid #86efac;
  border-radius: 14px;
  color: #166534;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

/* ==========================================================================
   MODAL DE AVALIAÇÃO
   ========================================================================== */

.dir-rating-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}

.dir-rating-modal-overlay.active {
  display: flex;
}

.dir-rating-modal {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s ease;
  font-family: 'Montserrat', sans-serif;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dir-rating-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.dir-rating-modal-close:hover {
  background: #e2e8f0;
  color: #1f2937;
}

.dir-rating-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px;
}

.dir-rating-modal-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 24px;
}

.dir-rating-modal-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.dir-rating-modal-star {
  font-size: 40px;
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dir-rating-modal-star:hover {
  transform: scale(1.2);
}

.dir-rating-modal-star.active,
.dir-rating-modal-star.hover {
  color: #fbbf24;
}

.dir-rating-modal-current {
  font-size: 48px;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 4px;
}

.dir-rating-modal-count {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 24px;
}

.dir-rating-modal-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Montserrat', sans-serif;
}

.dir-rating-modal-btn:hover {
  background: #1d4ed8;
}

.dir-rating-modal-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.dir-rating-modal-success {
  color: #16a34a;
  font-weight: 600;
  margin-top: 16px;
}

/* Estado Vazio */
.dir-empty {
  text-align: center;
  padding: 48px 24px;
  background: #f8fafc;
  border-radius: 20px;
  border: 2px dashed #e2e8f0;
  grid-column: 1 / -1;
}

.dir-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.dir-empty h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #1a202c;
}

.dir-empty p {
  margin: 0;
  color: #64748b;
}

/* ==========================================================================
   PAGINAÇÃO
   ========================================================================== */

.dir-pagination {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dir-pagination a,
.dir-pagination span {
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.dir-pagination a {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.dir-pagination a:hover {
  background: #f8fafc;
  border-color: #667eea;
  color: #667eea;
}

.dir-pagination .current {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
}

/* ==========================================================================
   LISTA DE CIDADES
   ========================================================================== */

.dir-cidades-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.dir-cidade-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  text-decoration: none;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s ease;
}

.dir-cidade-link:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-color: transparent;
}

.dir-cidade-link:hover .dir-cidade-count {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.dir-cidade-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: #f1f5f9;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  transition: all .2s ease;
}

/* ==========================================================================
   FORMULÁRIO
   ========================================================================== */

.diretorio-form {
  display: grid;
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 20px;
}

.diretorio-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #374151;
  font-size: 14px;
}

.diretorio-form input[type="text"],
.diretorio-form input[type="tel"],
.diretorio-form input[type="email"],
.diretorio-form textarea,
.diretorio-form select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  transition: all .2s ease;
  background: #fff;
}

.diretorio-form input:focus,
.diretorio-form textarea:focus,
.diretorio-form select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, .1);
}

.diretorio-form textarea {
  resize: vertical;
  min-height: 100px;
}

.diretorio-form button[type="submit"] {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
}

.diretorio-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(102, 126, 234, .4);
}

.diretorio-form .form-note {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

/* ==========================================================================
   SEÇÃO DE CADASTRO
   ========================================================================== */

.dir-cadastro-section {
  margin-top: 48px;
  margin-bottom: 80px;
  padding: 32px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 24px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.dir-cadastro-section h3 {
  margin: 0 0 24px;
  font-size: 26px;
  font-weight: 700;
  color: #1a202c;
  text-align: center;
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */

@media (max-width: 640px) {
  .dir-card {
    padding: 18px;
  }

  .dir-card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .dir-avatar {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }

  .dir-name {
    font-size: 20px;
  }

  .dir-status {
    margin-left: 0;
    margin-top: 8px;
  }

  .dir-actions {
    flex-direction: column;
  }

  .dir-btn {
    min-width: 100%;
  }

  .dir-contact-info {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .dir-header h1 {
    font-size: 28px;
  }

  .dir-header p {
    font-size: 16px;
  }
}

/* ==========================================================================
   AVALIAÇÃO POR ESTRELAS
   ========================================================================== */

.dir-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.dir-rating-stars {
  display: flex;
  gap: 2px;
}

.dir-star {
  font-size: 14px;
  color: #d1d5db;
  cursor: pointer;
  transition: color 0.15s ease;
  line-height: 1;
}

.dir-star:hover,
.dir-star.hover {
  color: #fbbf24;
  transform: none;
}

.dir-star.active {
  color: #f59e0b;
}

.dir-rating-info {
  font-size: 11px;
  color: #6b7280;
}

.dir-rating-avg {
  font-weight: 600;
  color: #f59e0b;
}

.dir-rating.voted .dir-star {
  cursor: default;
}

.dir-rating.voted .dir-star:hover {
  transform: none;
}

.dir-rating-msg {
  font-size: 12px;
  color: #10b981;
  margin-left: 8px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   FILTRO POR PROFISSÃO
   ========================================================================== */

.dir-filtro-profissao {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.dir-filtro-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.dir-filtro-btn:hover {
  border-color: #667eea;
  color: #667eea;
  background: #f0f4ff;
}

.dir-filtro-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.dir-filtro-btn.active:hover {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
  color: #fff;
}
