/**
 * Events + News/Channels listing — /events/ + /all-channels/
 * Scoped to .ww-events + body.page-template-events-php / all-channels-php
 */
body.page-template-events-php,
body.page-template-all-channels-php {
  background: #f1f5f9 !important;
}

body.page-template-events-php .bottom-sec-full,
body.page-template-all-channels-php .bottom-sec-full {
  background: #f1f5f9 !important;
}

.ww-events {
  --wwe-accent: #874390;
  --wwe-accent-hover: #6d3578;
  --wwe-accent-soft: rgba(135, 67, 144, 0.1);
  --wwe-ink: #0f172a;
  --wwe-muted: #64748b;
  --wwe-border: #e2e8f0;
  --wwe-panel: #ffffff;
  --wwe-radius: 14px;
  --wwe-radius-sm: 10px;
  --wwe-shadow: 0 4px 24px -6px rgba(15, 23, 42, 0.08);
  --wwe-shadow-hover: 0 12px 32px -8px rgba(15, 23, 42, 0.14);
  color: var(--wwe-ink);
  padding-bottom: 48px;
}

.ww-events *,
.ww-events *::before,
.ww-events *::after {
  box-sizing: border-box;
}

.ww-events .wrapper-1300 {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.ww-events .full-width {
  float: none !important;
  width: 100% !important;
}

.ww-events .bg-ffffff,
.ww-events .bg-f8f8f8 {
  background: transparent !important;
}

/* ── Hero header ───────────────────────────────────────── */
.ww-events__hero {
  padding: 24px 0 8px;
}

.ww-events__hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.ww-events__title {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 1.875rem);
  font-weight: 700;
  color: var(--wwe-ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-decoration: none !important;
  float: none !important;
}

.ww-events .add-event-button {
  float: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto !important;
  padding: 10px 22px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: var(--wwe-accent) !important;
  border: none !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(135, 67, 144, 0.35);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ww-events .add-event-button::before {
  content: '+';
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
}

.ww-events .add-event-button:hover,
.ww-events .add-event-button:focus {
  background: var(--wwe-accent-hover) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(135, 67, 144, 0.4);
}

/* ── Sort dropdown ─────────────────────────────────────── */
.ww-events .sort-channel-box {
  float: none !important;
}

.ww-events .sort-channel-box select,
.ww-events #dynamic_select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 200px;
  padding: 10px 40px 10px 16px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--wwe-ink) !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23874390' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  border: 1.5px solid var(--wwe-border) !important;
  border-radius: 999px !important;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ww-events .sort-channel-box select:focus,
.ww-events #dynamic_select:focus {
  outline: none;
  border-color: rgba(135, 67, 144, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(135, 67, 144, 0.12) !important;
}

/* ── Grid ──────────────────────────────────────────────── */
.ww-events__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px 20px;
  padding: 24px 0 8px;
}

/* News cards use .channel-box-small + product-list-image-box-home */
.ww-events__grid .channel-box-single.channel-box-small {
  width: 100% !important;
  margin-bottom: 0 !important;
}

.ww-events__grid .product-list-image-box-home {
  min-height: 0 !important;
  max-height: none !important;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: 100% auto !important;
  background-position: center top !important;
  background-repeat: no-repeat;
  transition: transform 0.35s ease;
}

.ww-events__grid .channel-box-single:hover .product-list-image-box-home {
  transform: scale(1.04);
}

/* Premium badge */
.ww-events__grid .premium-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, #874390 0%, #6d3578 100%);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(135, 67, 144, 0.4);
}

/* Reset legacy channel-box quirks inside the grid */
.ww-events__grid .channel-box-single,
.ww-events__grid .channel-box-single:first-child {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--wwe-panel);
  border: 1px solid var(--wwe-border);
  border-radius: var(--wwe-radius);
  overflow: hidden;
  box-shadow: var(--wwe-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.ww-events__grid .channel-box-single:hover {
  transform: translateY(-3px);
  box-shadow: var(--wwe-shadow-hover);
  border-color: rgba(135, 67, 144, 0.2);
}

.ww-events__grid .channel-box-image,
.ww-events__grid .channel-box-single:first-child .channel-box-image {
  min-height: 0 !important;
  max-height: none !important;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: 100% auto !important;
  background-position: center top !important;
  background-repeat: no-repeat;
  transition: transform 0.35s ease;
}

.ww-events__grid .channel-box-single > .full-width:first-child {
  overflow: hidden;
}

.ww-events__grid .channel-box-single:hover .channel-box-image {
  transform: scale(1.04);
}

/* Card body */
.ww-events__grid .list-bottom-info-section {
  float: none !important;
  width: 100% !important;
  padding: 16px 18px 18px !important;
  border-top: 1px solid var(--wwe-border);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ww-events__grid .arrow-box {
  display: none !important;
}

.ww-events__grid .channel-desc-title-2-line {
  float: none !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: var(--wwe-ink) !important;
  min-height: 0 !important;
  max-height: none !important;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none !important;
}

.ww-events__grid .channel-desc-title-2-line:hover {
  color: var(--wwe-accent) !important;
}

.ww-events__grid .channel-desc-title-2-line + .full-width {
  margin-top: auto !important;
}

/* Meta footer: tag + date */
.ww-events__grid .channels-bottom-brand-sec {
  float: none !important;
  width: auto !important;
  display: inline-flex;
}

.ww-events__grid .channels-bottom-brand-sec a {
  float: none !important;
  display: inline-block;
  padding: 4px 12px;
  font-family: 'Poppins', sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--wwe-accent) !important;
  background: var(--wwe-accent-soft);
  border-radius: 999px;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ww-events__grid .channel-desc-title-2-line + .full-width {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ww-events__grid .channels-bottom-date-sec {
  float: none !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 12px !important;
  color: var(--wwe-muted) !important;
}

/* ── Pagination ────────────────────────────────────────── */
.ww-events .pagination-main-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 0 8px;
  float: none !important;
}

.ww-events .pagination-main-box .page-numbers {
  float: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px !important;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--wwe-accent) !important;
  background: #fff;
  border: 1.5px solid var(--wwe-border) !important;
  border-radius: var(--wwe-radius-sm);
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ww-events .pagination-main-box .page-numbers:hover {
  border-color: var(--wwe-accent) !important;
  background: var(--wwe-accent-soft);
}

.ww-events .pagination-main-box .page-numbers.current {
  color: #fff !important;
  background-color: var(--wwe-accent) !important;
  border-color: var(--wwe-accent) !important;
}

.ww-events .center-section {
  display: block !important;
  width: 100% !important;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .ww-events .wrapper-1300 {
    padding: 0 16px;
  }

  .ww-events__grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px 14px;
  }

  .ww-events__hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 440px) {
  .ww-events__grid {
    grid-template-columns: 1fr;
  }
}
