/* Page Header */
.page-header {
  background: linear-gradient(135deg, #a2191e 0%, #8f1418 50%, #710f13 100%);
  color: white;
  padding: 2rem 0 3rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: white;
}

.breadcrumb i {
  width: 1rem;
  height: 1rem;
  color: rgba(255, 255, 255, 0.6);
}

.page-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.page-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
}

/* Filters Section */
.filters-section {
  padding: 2rem 0;
  background-color: white;
  border-bottom: 1px solid var(--border-color);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: white;
  font-size: 0.875rem;
  min-width: 150px;
}

.search-group {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  width: 1rem;
  height: 1rem;
}

/* Events Stats */
.events-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  justify-content: center;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Events Grid Section */
.events-grid-section {
  padding: 2rem 0 5rem;
  background-color: var(--background-gray);
}

.events-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
  transition: opacity 0.3s ease;
}

/* Event Card Enhancements */
.event-status-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 1;
}

.event-status-badge.future {
  background-color: #10b981;
  color: white;
}

.event-status-badge.now {
  background-color: #eab308;
  color: white;
}

.event-status-badge.completed {
  background-color: #6b7280;
  color: white;
}

.event-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
}

/* Navigation Active State */
.nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
}

.no-results-content i {
  width: 3rem;
  height: 3rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.no-results-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.no-results-content p {
  color: var(--text-secondary);
}


#pagination {
    display: flex;
    justify-content: center; /* Centraliza horizontalmente */
    margin: 20px 0; /* Adiciona espaço acima e abaixo */
}

.pagination-button {
    background-color: white;
    color:  #007bff; /* Cor do texto */
    border: none; /* Remove a borda */
    border-radius: 5px; /* Borda arredondada */
    padding: 10px 20px; /* Espaçamento interno */
    margin: 0 5px; /* Margem entre os botões */
    cursor: pointer; /* Cursor de mão ao passar sobre o botão */
    font-size: 14px; /* Tamanho da fonte */
    display: flex; /* Para alinhar o ícone e o texto */
    align-items: center; /* Alinha verticalmente no centro */
}

.pagination-button:disabled {
    background-color: white; /* Cor do botão desabilitado */
    color: #ccc;
    cursor: not-allowed; /* Cursor padrão */
}

.page-button {
    background-color: transparent; /* Fundo transparente */
    color: #007bff; /* Cor do texto */
    border: none; /* Borda azul */
    border-radius: 5px; /* Borda arredondada */
    padding: 10px 15px; /* Espaçamento interno */
    margin: 0 5px; /* Margem entre os botões */
    cursor: pointer; /* Cursor de mão ao passar sobre o botão */
}

.page-button:disabled {
    background-color: #fff; /* Fundo branco */
    color: #ccc; /* Cor do texto desabilitado */
    cursor: not-allowed; /* Cursor padrão */
}


/* Responsive Design */
@media (min-width: 640px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .events-stats {
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .page-title {
    font-size: 3rem;
  }

  .filters {
    flex-wrap: nowrap;
  }

  .events-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .events-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .filters-eventos {
    gap: 1.5rem;
    flex-direction: column;
  }

  .filters-eventos > * {
    width: 100%;
  }
}

/* ==========================================================
   LANDING_EVENTOS_MOBILE_V1
   Mobile:
   RESULTADOS + busca única + primeiro evento na primeira dobra.
   Desktop permanece com filtros completos.
   ========================================================== */

.mobile-results-toolbar {
  display: none;
}

@media (max-width: 767px) {

  /* Remove do mobile o cabeçalho institucional grande */
  .page-header {
    display: none;
  }

  /* Os filtros completos continuam existentes para desktop,
     mas não ocupam espaço na versão mobile. */
  .filters-section {
    display: none;
  }

  /* Contadores deixam de disputar a primeira dobra com o evento */
  .events-stats {
    display: none;
  }

  .mobile-results-toolbar {
    display: block;
    background: linear-gradient(
      135deg,
      #a2191e 0%,
      #8f1418 50%,
      #710f13 100%
    );
    padding: 0.65rem 0;
  }

  .mobile-results-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
  }

  .mobile-results-title {
    margin: 0;
    flex: 0 0 auto;
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.02em;
  }

  .mobile-results-search {
    flex: 1;
    min-width: 0;
  }

  .mobile-results-search .search-input {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0.5rem 0.65rem 0.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.78rem;
    line-height: 1;
  }

  .mobile-results-search .search-icon {
    left: 0.65rem;
    width: 0.95rem;
    height: 0.95rem;
  }

  /* O primeiro card sobe imediatamente após a barra RESULTADOS */
  .events-grid-section {
    padding: 0.75rem 0 3rem;
  }

  .events-grid {
    gap: 1rem;
    margin-bottom: 1rem;
  }
}


/* EVENT_CARD_META_INLINE_V1 */
.event-meta-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-top: 1rem;
}

.event-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.3;
}

.event-meta-item i {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.event-meta-distance {
  font-weight: 600;
  color: var(--text-secondary);
}

@media (max-width: 767px) {
  .event-meta-inline {
    gap: 0.65rem 0.9rem;
    margin-top: 0.9rem;
  }

  .event-meta-item {
    font-size: 0.9rem;
  }

  .event-actions {
    margin-top: 1rem;
  }

  .event-actions .btn {
    width: auto;
  }
}

/* COMPACTACAO_CARD_MOBILE_V1 */
@media (max-width: 767px) {

  /* Reduz o bloco branco interno do card */
  .events-grid .event-content {
    padding-top: 1rem;
    padding-bottom: 0.9rem;
  }

  /* Título continua destacado, mas ocupa menos altura */
  .events-grid .event-title {
    margin-bottom: 0;
  }

  /* Aproxima informações do título */
  .events-grid .event-meta-inline {
    margin-top: 0.65rem;
    gap: 0.55rem 0.85rem;
  }

  /* Aproxima botão das informações */
  .events-grid .event-actions {
    margin-top: 0.8rem !important;
    margin-bottom: 0;
  }

  /* Evita sobra vertical desnecessária no final */
  .events-grid .event-card {
    overflow: hidden;
  }
}
