/* ============================================
   Bouwsteenwinkel — themas.css
   Styling voor themas.php (overzichtspagina)
   Gebruikt design tokens uit base.css.
   ============================================ */

/* ==== 1. HERO ==== */
.themas-hero {
  background: var(--bg-tertiary);
  padding: 48px 0 40px;
}

.themas-hero-inner {
  max-width: 820px;
  text-align: center;
}

.themas-hero h1 {
  font-size: 40px;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin: 0 0 16px;
}

.themas-hero-lead {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 auto 28px;
  max-width: 680px;
}

.themas-hero-lead a {
  color: var(--brand-coral);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.themas-hero-lead a:hover {
  color: var(--brand-coral-dark);
}

/* Search */
.themas-search {
  max-width: 520px;
  margin: 0 auto 20px;
}

.themas-search-label {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.themas-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.themas-search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.themas-search-wrap input[type="search"] {
  width: 100%;
  min-height: 52px;
  padding: 14px 44px 14px 46px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.themas-search-wrap input[type="search"]::placeholder {
  color: var(--text-tertiary);
}

.themas-search-wrap input[type="search"]:focus {
  outline: none;
  border-color: var(--brand-coral);
  box-shadow: 0 0 0 4px rgba(216, 90, 48, 0.12);
}

.themas-search-wrap input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.themas-search-clear {
  position: absolute;
  right: 14px;
  width: 26px;
  height: 26px;
  border: none;
  background: var(--bg-secondary);
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.themas-search-clear:hover {
  background: #EDEBE4;
  color: var(--text-primary);
}

.themas-hero-stats {
  color: var(--text-tertiary);
  font-size: 13px;
  margin-top: 4px;
}

.themas-hero-stats b {
  color: var(--text-primary);
  font-weight: 600;
}

.themas-hero-stats .sep {
  margin: 0 10px;
  opacity: 0.5;
}

/* ==== 2. A-Z FILTER ==== */
.themas-az {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: var(--header-height);
  z-index: 50;
  transition: transform 0.25s ease, top 0.25s ease;
}

/* Auto-hide op mobile: meebewegen met header */
@media (max-width: 767px) {
  body.is-nav-hidden .themas-az {
    transform: translateY(-100%);
    top: 0;
  }
}

.themas-az-inner {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.themas-az-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.themas-az-btn:hover:not(.is-disabled) {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.themas-az-btn.is-active {
  background: var(--text-primary);
  color: #fff;
}

.themas-az-btn.is-disabled {
  color: var(--text-tertiary);
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==== Section head (herbruikt op 3 en 4) ==== */
.themas-section-head {
  margin-bottom: 24px;
  text-align: center;
}

.themas-section-head h2 {
  font-size: 26px;
  letter-spacing: -0.3px;
  margin: 0 0 8px;
}

.themas-section-head p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  max-width: 620px;
  margin: 0 auto;
}

/* ==== STATUS-BADGE (Nu te huur / Binnenkort) — prominente dot+label ==== */
.themas-status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 2;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.themas-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.themas-status-badge.is-active .themas-status-dot {
  background: var(--green-500);
  box-shadow: 0 0 0 3px rgba(99, 153, 34, 0.2);
  animation: themas-pulse 2s ease-in-out infinite;
}

.themas-status-badge.is-upcoming .themas-status-dot {
  background: var(--amber-500);
}

.themas-status-badge.is-active {
  color: var(--green-800);
}

.themas-status-badge.is-upcoming {
  color: var(--amber-900);
}

@keyframes themas-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(99, 153, 34, 0.2); }
  50%      { box-shadow: 0 0 0 6px rgba(99, 153, 34, 0.0); }
}

/* Populair-ribbon op cards die popular=true zijn */
.themas-popular-ribbon {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  background: var(--brand-coral);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 999px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(216, 90, 48, 0.4);
}

/* ==== TOOLBAR (tabs + sorteer) ==== */
.themas-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.themas-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.themas-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.themas-tab:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.themas-tab.is-active {
  background: var(--text-primary);
  color: #fff;
}

.themas-tab.is-active:hover {
  background: var(--text-primary);
}

.themas-tab-count {
  display: inline-block;
  min-width: 20px;
  padding: 1px 7px;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.themas-tab.is-active .themas-tab-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.themas-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.themas-tab-dot-active    { background: var(--green-500); }
.themas-tab-dot-upcoming  { background: var(--amber-500); }

/* Sort dropdown */
.themas-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.themas-sort select {
  padding: 8px 28px 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F5E5A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--transition-fast);
}

.themas-sort select:focus,
.themas-sort select:hover {
  outline: none;
  border-color: var(--brand-coral);
}

/* Resultaat-teller */
.themas-result-count {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}

.themas-result-count b,
.themas-result-count span {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==== 3. POPULAIRE THEMA'S ==== */
.themas-pop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.themas-pop-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  color: inherit;
  transition: transform 0.1s, box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.themas-pop-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.themas-pop-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.themas-pop-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.themas-pop-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.6) 100%);
}

.themas-pop-label {
  position: absolute;
  left: 16px;
  bottom: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 1;
}

.themas-pop-img-blue    { background: var(--blue-500); }
.themas-pop-img-coral   { background: var(--brand-coral); }
.themas-pop-img-green   { background: var(--green-500); }
.themas-pop-img-amber   { background: var(--amber-500); }
.themas-pop-img-purple  { background: var(--purple-500); }
.themas-pop-img-teal    { background: var(--teal-500); }
.themas-pop-img-pink    { background: var(--pink-500); }
.themas-pop-img-red     { background: var(--red-500); }
.themas-pop-img-gray    { background: #888780; }

.themas-pop-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: -2px;
}

.themas-pop-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.themas-pop-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 14px;
  flex: 1;
}

.themas-pop-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.themas-pop-count {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--green-50);
  color: var(--green-800);
  border-radius: 999px;
  font-weight: 500;
}

.themas-pop-count-empty {
  background: var(--amber-50);
  color: var(--amber-900);
}

.themas-pop-cta {
  font-size: 13px;
  color: var(--brand-coral);
  font-weight: 600;
  transition: transform var(--transition-fast);
}

.themas-pop-card:hover .themas-pop-cta {
  transform: translateX(3px);
}

/* ==== 4. ALLE THEMA'S GRID ==== */
.themas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.thema-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  color: inherit;
  transition: transform 0.08s, box-shadow var(--transition-fast), border-color var(--transition-fast);
  scroll-margin-top: calc(var(--header-height) + 60px);
}

.thema-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.thema-card-upcoming {
  border-style: dashed;
  background: var(--bg-primary);
}

.thema-card-img {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
}

.thema-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thema-card-img-blue    { background: var(--blue-500); }
.thema-card-img-coral   { background: var(--brand-coral); }
.thema-card-img-green   { background: var(--green-500); }
.thema-card-img-amber   { background: var(--amber-500); }
.thema-card-img-purple  { background: var(--purple-500); }
.thema-card-img-teal    { background: var(--teal-500); }
.thema-card-img-pink    { background: var(--pink-500); }
.thema-card-img-red     { background: var(--red-500); }
.thema-card-img-gray    { background: #888780; }

.thema-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.thema-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: -1px;
}

.thema-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  border-radius: 999px;
  font-weight: 500;
  backdrop-filter: blur(4px);
  z-index: 1;
}

.thema-card-badge-upcoming {
  background: var(--amber-500);
  color: #fff;
}

.thema-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.thema-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.thema-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card-foot: count + CTA */
.thema-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.thema-card-count {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  background: var(--green-50);
  color: var(--green-800);
  border-radius: 999px;
}

.thema-card-count-empty {
  background: var(--amber-50);
  color: var(--amber-900);
}

.thema-card-cta {
  font-size: 13px;
  color: var(--brand-coral);
  font-weight: 600;
  transition: transform var(--transition-fast);
  white-space: nowrap;
}

.thema-card:hover .thema-card-cta {
  transform: translateX(3px);
}

/* Hidden door search/filter */
.thema-card[hidden],
.themas-pop-card[hidden] {
  display: none !important;
}

/* ==== Empty state ==== */
.themas-empty {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  margin-top: 20px;
}

.themas-empty h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.themas-empty p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.themas-empty button,
.themas-empty-reset {
  background: none;
  border: none;
  color: var(--brand-coral);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.themas-empty button:hover,
.themas-empty-reset:hover {
  color: var(--brand-coral-dark);
}

/* ==== 5. SEO-CONTENTBLOK ==== */
.themas-seo {
  padding: 60px 0;
}

.themas-seo-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.themas-seo h2 {
  font-size: 26px;
  letter-spacing: -0.3px;
  margin: 0 0 20px;
}

.themas-seo h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 22px 0 8px;
  letter-spacing: -0.2px;
}

.themas-seo h3:first-of-type {
  margin-top: 0;
}

.themas-seo p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 12px;
}

.themas-seo p a {
  color: var(--brand-coral);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.themas-seo p a:hover {
  color: var(--brand-coral-dark);
}

.themas-seo-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.themas-seo-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.themas-seo-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 15px;
}

.themas-seo-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.themas-seo-card li {
  border-bottom: 1px solid var(--border);
}

.themas-seo-card li:last-child {
  border-bottom: none;
}

.themas-seo-card li a {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.themas-seo-card li a:hover {
  color: var(--brand-coral);
}

.themas-seo-card li a span {
  color: var(--text-tertiary);
  font-size: 13px;
}

.themas-seo-card p {
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

/* ==== Responsive ==== */
@media (max-width: 960px) {
  .themas-pop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .themas-seo-grid {
    grid-template-columns: 1fr;
  }
  .themas-hero h1 {
    font-size: 32px;
  }
}

@media (max-width: 620px) {
  .themas-hero {
    padding: 32px 0 28px;
  }
  .themas-hero h1 {
    font-size: 26px;
  }
  .themas-hero-lead {
    font-size: 14px;
  }
  .themas-pop-grid {
    grid-template-columns: 1fr;
  }
  .themas-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .thema-card-title {
    font-size: 15px;
  }
  .thema-card-desc {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }
  .thema-card-foot {
    flex-wrap: wrap;
    gap: 6px;
  }
  .thema-card-cta {
    font-size: 12px;
  }
  .themas-az {
    padding: 8px 0;
  }
  .themas-az-btn {
    min-width: 28px;
    height: 28px;
    font-size: 12px;
    padding: 0 6px;
  }
  .themas-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .themas-sort {
    justify-content: space-between;
  }
  .themas-sort select {
    flex: 1;
  }
  .themas-tab {
    padding: 7px 10px;
    font-size: 12px;
  }
  .themas-popular-ribbon {
    font-size: 9px;
    padding: 3px 8px;
  }
  .themas-status-badge {
    font-size: 10px;
    padding: 4px 8px 4px 7px;
  }
  .themas-seo {
    padding: 40px 0;
  }
}
