/* ANEC Events – front end. Uses the theme's colour variables with safe fallbacks. */
.anec-ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}
.anec-ev-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,.12));
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.anec-ev-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.16)); }
.anec-ev-card-image { position: relative; display: block; aspect-ratio: 4 / 3; background: #eef0f4; overflow: hidden; }
.anec-ev-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.anec-ev-card:hover .anec-ev-card-image img { transform: scale(1.05); }
.anec-ev-noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 40px; color: #b5bac6; }
.anec-ev-badge {
  position: absolute; right: 12px; bottom: 12px;
  background: rgba(26,31,60,.85); color: #fff;
  font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
}
.anec-ev-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.anec-ev-card-body h3 { font-family: var(--font-heading, 'Montserrat', sans-serif); font-size: 20px; line-height: 1.3; margin: 8px 0 10px; }
.anec-ev-card-body h3 a { color: var(--color-primary, #1a1f3c); text-decoration: none; }
.anec-ev-card-body h3 a:hover { color: var(--color-accent, #e63946); }
.anec-ev-card-body p { color: var(--color-text-light, #666); margin: 0 0 16px; line-height: 1.6; }
.anec-ev-more { margin-top: auto; color: var(--color-accent, #e63946); font-weight: 600; text-decoration: none; }
.anec-ev-more:hover { text-decoration: underline; }

.anec-ev-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--color-gray, #6c757d); }
.anec-ev-meta i { color: var(--color-accent, #e63946); margin-right: 4px; }

.anec-ev-empty { text-align: center; color: var(--color-gray, #6c757d); font-size: 17px; padding: 40px 0; }

.anec-ev-pagination { margin-top: 40px; text-align: center; }
.anec-ev-pagination .nav-links { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.anec-ev-pagination .page-numbers {
  display: inline-block; min-width: 40px; padding: 8px 12px; border-radius: 4px;
  background: #fff; border: 1px solid #dde0e6; color: var(--color-primary, #1a1f3c); text-decoration: none;
}
.anec-ev-pagination .page-numbers.current,
.anec-ev-pagination .page-numbers:hover { background: var(--color-primary, #1a1f3c); color: #fff; border-color: var(--color-primary, #1a1f3c); }
.anec-ev-pagination .screen-reader-text { position: absolute; left: -9999px; }

/* Single event */
.anec-ev-intro { max-width: 820px; margin: 0 auto 40px; text-align: center; }
.anec-ev-intro .anec-ev-meta { justify-content: center; font-size: 15px; margin-bottom: 18px; }
.anec-ev-desc { font-size: 17px; line-height: 1.8; color: var(--color-text, #333); }
.anec-ev-desc p { margin: 0 0 12px; }

.anec-ev-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.anec-ev-photo { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #f0f0f0; box-shadow: 0 4px 6px rgba(0,0,0,.1); }
.anec-ev-photo a { display: block; width: 100%; height: 100%; }
.anec-ev-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.anec-ev-photo:hover img { transform: scale(1.05); }
.anec-ev-zoom { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); color: #fff; font-size: 30px; opacity: 0; transition: opacity .3s ease; }
.anec-ev-photo:hover .anec-ev-zoom { opacity: 1; }

.anec-ev-back { text-align: center; margin-top: 44px; }

@media (max-width: 768px) {
  .anec-ev-grid { grid-template-columns: 1fr; gap: 22px; }
  .anec-ev-photos-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .anec-ev-desc { font-size: 16px; }
}
