/* ============================================================
   ycbk-explore — all classes prefixed with .ycbk-explore__ to
   avoid clashes with Avada, Thrive, and any other plugin CSS.
   ============================================================ */

/* Root container reset */
#ycbk-explore-root,
#ycbk-explore-root * {
  box-sizing: border-box;
}

#ycbk-explore-root {
  font-family: 'Open Sans', Arial, sans-serif;
  color: #222;
  line-height: 1.5;
}

/* --- Hero section --- */
/* Selectors prefixed with #ycbk-explore-root outrank Avada's content
   styles (e.g. .fusion-content h1, .fusion-text p) without using !important. */
#ycbk-explore-root .ycbk-explore__hero {
  background: #f5f7f9;
  padding: 18px 24px 20px;
  border-bottom: 1px solid #e1e5e9;
}

#ycbk-explore-root .ycbk-explore__hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

#ycbk-explore-root .ycbk-explore__subtitle {
  font-size: 14px;
  color: #555;
  margin: 0 0 14px;
  text-align: left;
}

/* --- Search input --- */
.ycbk-explore__search {
  background: #fff;
  border: 2px solid #0a5d91;
  border-radius: 4px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.ycbk-explore__search-icon {
  color: #0a5d91;
  font-size: 18px;
  flex-shrink: 0;
}

.ycbk-explore__search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #222;
  background: transparent;
  font-family: inherit;
}

.ycbk-explore__search-input::placeholder {
  color: #999;
}

.ycbk-explore__search-hint {
  font-size: 11px;
  color: #aaa;
  border: 1px solid #ddd;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* --- Filter row --- */
.ycbk-explore__filters {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.ycbk-explore__filter-label {
  font-size: 12px;
  color: #666;
  font-weight: 600;
  margin-right: 4px;
}

.ycbk-explore__chip {
  background: #fff;
  border: 1px solid #d0d0d0;
  color: #555;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ycbk-explore__chip:hover {
  border-color: #0a5d91;
  color: #0a5d91;
}

.ycbk-explore__chip--active {
  background: #0a5d91;
  border-color: #0a5d91;
  color: #fff;
  font-weight: 600;
}

.ycbk-explore__chip:focus-visible,
.ycbk-explore__sort:focus-visible,
.ycbk-explore__search-input:focus-visible,
.ycbk-explore__load-more:focus-visible,
.ycbk-explore__card:focus-visible,
.ycbk-explore__retry:focus-visible {
  outline: 2px solid #0a5d91;
  outline-offset: 2px;
}

.ycbk-explore__sort-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ycbk-explore__sort-label {
  font-size: 12px;
  color: #666;
}

.ycbk-explore__sort {
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background: #fff;
  color: #222;
  font-family: inherit;
  cursor: pointer;
}

/* --- Results meta --- */
.ycbk-explore__meta {
  max-width: 900px;
  margin: 22px auto 14px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #666;
}

.ycbk-explore__meta strong {
  color: #0a5d91;
}

/* --- Results grid --- */
.ycbk-explore__grid {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

@media (max-width: 600px) {
  .ycbk-explore__grid { grid-template-columns: 1fr; }
}

/* --- Card --- */
.ycbk-explore__card {
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.ycbk-explore__card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.ycbk-explore__card-image {
  height: 120px;
  background-size: cover;
  background-position: center;
}

/* Gradient fallbacks by type when no featured image */
.ycbk-explore__card-image--episode {
  background-image: linear-gradient(135deg, #d9e6f0, #b8cfe0);
}
.ycbk-explore__card-image--interview {
  background-image: linear-gradient(135deg, #d4e8d0, #a9cfa1);
}
.ycbk-explore__card-image--spotlight {
  background-image: linear-gradient(135deg, #fde6b8, #f5cf80);
}
.ycbk-explore__card-image--blog {
  background-image: linear-gradient(135deg, #e8d4e0, #cfa9c6);
}

.ycbk-explore__card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.ycbk-explore__badge {
  display: inline-block;
  align-self: flex-start;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 2px;
}

.ycbk-explore__badge--episode   { background: #0a5d91; }
.ycbk-explore__badge--interview { background: #4a8b3c; }
.ycbk-explore__badge--spotlight { background: #f5a623; }
.ycbk-explore__badge--blog      { background: #8b4a7f; }

.ycbk-explore__card-title {
  font-size: 13px;
  color: #222;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ycbk-explore__card-meta {
  font-size: 10px;
  color: #888;
}

/* --- Skeleton cards (loading state) --- */
.ycbk-explore__skeleton {
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ycbk-explore__skeleton-image,
.ycbk-explore__skeleton-line {
  background: linear-gradient(90deg, #eee 0%, #f5f5f5 50%, #eee 100%);
  background-size: 200% 100%;
  animation: ycbk-explore-shimmer 1.4s infinite;
}

.ycbk-explore__skeleton-image { height: 120px; }
.ycbk-explore__skeleton-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ycbk-explore__skeleton-line { height: 10px; border-radius: 2px; }
.ycbk-explore__skeleton-line--badge { width: 40%; height: 12px; }
.ycbk-explore__skeleton-line--title { width: 90%; }
.ycbk-explore__skeleton-line--title-2 { width: 60%; }
.ycbk-explore__skeleton-line--date { width: 30%; height: 8px; }

@keyframes ycbk-explore-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Load More button --- */
.ycbk-explore__load-more-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 40px;
  text-align: center;
}

.ycbk-explore__load-more {
  background: #fff;
  border: 2px solid #0a5d91;
  color: #0a5d91;
  padding: 10px 28px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.ycbk-explore__load-more:hover {
  background: #0a5d91;
  color: #fff;
}

.ycbk-explore__load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Empty and error states --- */
.ycbk-explore__message {
  max-width: 600px;
  margin: 40px auto;
  padding: 32px 24px;
  text-align: center;
  background: #f5f7f9;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
}

.ycbk-explore__message-title {
  font-size: 16px;
  font-weight: 700;
  color: #0a5d91;
  margin: 0 0 8px;
}

.ycbk-explore__message-body {
  font-size: 13px;
  color: #555;
  margin: 0;
}

.ycbk-explore__retry {
  margin-top: 14px;
  background: #0a5d91;
  color: #fff;
  border: none;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
}

/* --- Reconnecting indicator --- */
.ycbk-explore__reconnecting {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  color: #999;
  font-style: italic;
}

/* --- Screen-reader-only helper (for aria-live announcer) --- */
.ycbk-explore__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
