/* ==========================================================================
   1. ESTRUTURA GERAL E CONTAINER PRINCIPAL
   ========================================================================== */
.wp-agenda-container {
  font-family: sans-serif;
  max-width: 1200px;
  margin: 0 auto;
}

/* ==========================================================================
   2. CABEÇALHO, FILTROS E CONTROLES DE VISUALIZAÇÃO
   ========================================================================== */
.wp-agenda-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #eee;
}

.wp-agenda-filtros,
.wp-agenda-views {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.wp-agenda-input,
.wp-agenda-select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
}

.wp-agenda-btn-view {
  padding: 8px 15px;
  border: none;
  background: #ddd;
  cursor: pointer;
  border-radius: 4px;
  transition: 0.3s;
}

.wp-agenda-btn-view:hover,
.wp-agenda-btn-view.ativo {
  background: #0073aa;
  color: #fff;
}

/* ==========================================================================
   3. LAYOUT EM LISTA E CARDS DE EVENTOS (COM LINKS INTEGRADOS)
   ========================================================================== */
.layout-lista .wp-agenda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  width: 100%;
}

.wp-agenda-card-link-wrapper {
  display: block;
  text-decoration: none;
  overflow: hidden;
}

.wp-agenda-card-info-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.wp-agenda-card-info-link:hover .wp-agenda-card-title {
  color: #0073aa;
}

.wp-agenda-card {
  border: 1px solid #eaeaea;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.wp-agenda-card-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.wp-agenda-card:hover .wp-agenda-card-img img {
  transform: scale(1.03);
}

.wp-agenda-card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.wp-agenda-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88em;
  color: #444;
  margin-bottom: 12px;
  border-bottom: 1px solid #eee;
  padding-bottom: 12px;
}

.wp-agenda-card-meta span {
  display: block;
}

.wp-agenda-card-title {
  margin: 0 0 10px 0;
  font-size: 1.25em;
  color: #111;
  line-height: 1.4;
  transition: color 0.2s ease-in-out;
}

.wp-agenda-card-excerpt {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 15px;
  flex-grow: 1;
  line-height: 1.6;
}

.wp-agenda-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid #eee;
  padding-top: 12px;
}

.wp-agenda-price {
  font-weight: bold;
  color: #28a745;
  font-size: 1.1em;
}

.wp-agenda-btn-leiamais {
  background: #0073aa;
  color: #fff;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9em;
  transition: 0.2s;
}

.wp-agenda-btn-leiamais:hover {
  background: #005177;
}

/* ==========================================================================
   4. LAYOUT CALENDÁRIO MENSAL
   ========================================================================== */
.wp-agenda-mes-titulo {
  text-transform: capitalize;
  text-align: center;
  margin-bottom: 20px;
}

.wp-agenda-calendario-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  border: 1px solid #ddd;
  background: #eee;
  padding: 5px;
}

.wp-agenda-cal-header {
  background: #0073aa;
  color: white;
  text-align: center;
  padding: 10px 5px;
  font-weight: bold;
}

.wp-agenda-cal-dia {
  background: #fff;
  min-height: 100px;
  padding: 5px;
  position: relative;
}

.wp-agenda-cal-dia.vazio {
  background: transparent;
}

.wp-agenda-cal-dia.hoje {
  background: #eef6fc;
  border: 2px solid #0073aa;
}

.wp-agenda-num-dia {
  font-weight: bold;
  color: #555;
  display: block;
  margin-bottom: 5px;
}

.wp-agenda-eventos-dia {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wp-agenda-badge-evento {
  background: #0073aa;
  color: #fff;
  font-size: 0.75em;
  padding: 3px 5px;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  transition: 0.2s;
}

.wp-agenda-badge-evento:hover {
  background: #005177;
  color: #fff;
}

/* ==========================================================================
   5. LAYOUT VISUALIZAÇÃO DIÁRIA
   ========================================================================== */
.wp-agenda-dia-wrap {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #eee;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.wp-agenda-dia-titulo {
  font-size: 1.4em;
  color: #0073aa;
  margin-bottom: 20px;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 10px;
}

.wp-agenda-dia-lista {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.wp-agenda-dia-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px;
  background: #fdfdfd;
  border-left: 4px solid #0073aa;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wp-agenda-dia-hora {
  font-weight: bold;
  font-size: 1.1em;
  color: #333;
  min-width: 90px;
}

.wp-agenda-dia-info h4 {
  margin: 0 0 5px 0;
  font-size: 1.2em;
}

.wp-agenda-dia-info a {
  color: #333;
  text-decoration: none;
  transition: 0.2s;
}

.wp-agenda-dia-info a:hover {
  color: #0073aa;
}

.wp-agenda-dia-item-local {
  margin: 0;
  font-size: 0.9em;
  color: #666;
}

/* ==========================================================================
   6. PAGINAÇÃO AJAX
   ========================================================================== */
.wp-agenda-paginacao {
  display: flex;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 30px;
  grid-column: 1 / -1;
}

.wp-agenda-page-num {
  padding: 8px 14px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s;
}

.wp-agenda-page-num:hover,
.wp-agenda-page-num.ativo {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

/* ==========================================================================
   7. DETALHES DA PÁGINA INDIVIDUAL DO EVENTO (SINGLE)
   ========================================================================== */
.wp-evento-header-meta {
  margin: 10px 0 20px 0;
  font-size: 1.15em;
  color: #555;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.wp-evento-meta-item {
  font-weight: 500;
}

.wp-evento-featured-image {
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.wp-evento-featured-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
}

.wp-evento-body-content {
  font-size: 1.15em;
  line-height: 1.8;
  color: #333;
  margin-bottom: 40px;
}

.wp-evento-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
  border-top: 1px solid #eee;
  padding-top: 30px;
}

.wp-evento-singelo-card {
  background: #ffffff;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
  border-left: 5px solid;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.wp-evento-singelo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.1);
}

.wp-evento-singelo-card h4 {
  margin: 0 0 12px 0;
  font-size: 0.95em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #777;
}

.card-preco {
  border-left-color: #9c5096;
}

.card-local {
  border-left-color: #ee8f38;
}

.card-organizador {
  border-left-color: #54595f;
}

.wp-evento-card-value {
  font-size: 1.4em;
  font-weight: bold;
  color: #28a745;
  margin: 0;
}

.wp-evento-card-title-strong {
  font-size: 1.2em;
  font-weight: bold;
  color: #111;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.wp-evento-card-subtext {
  font-size: 0.92em;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

.wp-agenda-loading {
  text-align: center;
  padding: 20px;
  font-weight: bold;
  color: #0073aa;
}

.wp-agenda-no-results {
  text-align: center;
  padding: 30px;
  font-size: 1.1em;
  color: #666;
  width: 100%;
}

/* ==========================================================================
   8. SHORTCODE: BLOCO DE EVENTOS RECENTES (4 CARDS)
   ========================================================================== */
.wp-recentes-container {
  width: 100%;
  margin: 30px auto;
}

.wp-recentes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.wp-recentes-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.wp-recentes-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.wp-recentes-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.wp-recentes-img-wrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #f7f7f7;
}

.wp-recentes-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wp-recentes-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
  background: #f0f0f0;
  color: #bbb;
}

.wp-recentes-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.wp-recentes-title {
  margin: 0 0 15px 0;
  font-size: 1.1em;
  font-weight: bold;
  color: #222;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wp-recentes-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f5f5f7;
  padding-top: 12px;
  margin-top: auto;
}

.wp-recentes-date {
  font-size: 0.85em;
  color: #555;
  font-weight: 500;
}

.wp-recentes-badge {
  font-size: 0.75em;
  font-weight: bold;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  color: #fff;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Mapa de cores de Badges */
.cat-color-padrao {
  background-color: #8e8e93;
}
.cat-color-palestras {
  background-color: #0073aa;
}
.cat-color-cursos {
  background-color: #28a745;
}
.cat-color-workshop {
  background-color: #ee8f38;
}
.cat-color-politica {
  background-color: #9c5096;
}
.cat-color-saude {
  background-color: #e04b4b;
}
.cat-color-empreendedorismo {
  background-color: #17a2b8;
}

.cat-color-danca {
  background-color: #935b9a;
}

/* ==========================================================================
   9. RESPONSIVIDADE (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
  .wp-recentes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .wp-evento-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .wp-agenda-calendario-grid {
    grid-template-columns: 1fr;
  }
  .wp-agenda-cal-header {
    display: none;
  }
  .wp-agenda-cal-dia {
    min-height: auto;
    margin-bottom: 5px;
  }
  .wp-agenda-cal-dia.vazio {
    display: none;
  }
  .wp-agenda-num-dia::after {
    content: " (Dia)";
    font-weight: normal;
    font-size: 0.8em;
  }
}

@media (max-width: 600px) {
  .wp-agenda-dia-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .wp-agenda-dia-hora {
    min-width: auto;
  }
  .wp-evento-cards-grid {
    grid-template-columns: 1fr;
  }
  .wp-recentes-grid {
    grid-template-columns: 1fr;
  }
}
