/* =========================================================
   KETMarket – GD Entities Archive (shortcode)
   FIXED LIGHT DESIGN
   - Kein Dark Mode
   - Cards & Filter immer weiß
   - Farben exakt aus KETMarket
   ========================================================= */

.gd-entities-archive{
  --km-bg: #ffffff;
  --km-surface: #ffffff;
  --km-text: #111827;
  --km-muted: #6b7280;

  --km-primary: #005E86;       /* KETMarket Teal */
  --km-primary-hover: #0073aa;
  --km-soft: #ccf0ff;
  --km-border: #d9e2e8;

  --km-radius: 4px;
  --km-radius-sm: 4px;

  --km-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --km-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);

  --km-focus: rgba(0, 94, 134, 0.18);

  color: var(--km-text);
  width: 100%;
  background: transparent;
}

/* -------------------------
   Filter Bar
-------------------------- */
.gd-entities-archive__filters{
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr auto;
  gap: 12px;
  align-items: center;

  background: #ffffff;
  border: 1px solid var(--km-border);
  border-radius: var(--km-radius);
  padding: 12px;
  box-shadow: var(--km-shadow-sm);
  margin-bottom: 16px;
}

/* Inputs / selects */
.gd-entities-archive__filters input[type="search"],
.gd-entities-archive__filters select{
  width: 100%;
  height: 42px;
  padding: 0 12px;

  border-radius: 999px;
  border: 1px solid var(--km-border);
  background: #ffffff;
  color: var(--km-text);
  outline: none;

  transition: border-color .2s ease, box-shadow .2s ease;
}

.gd-entities-archive__filters input[type="search"]::placeholder{
  color: var(--km-muted);
}

.gd-entities-archive__filters input[type="search"]:focus,
.gd-entities-archive__filters select:focus{
  border-color: rgba(0, 94, 134, 0.45);
  box-shadow: 0 0 0 3px var(--km-focus);
}

/* Button */
.gd-entities-archive__filters button{
  height: 42px;
  padding: 0 16px;

  border-radius: 999px;
  border: 1px solid rgba(0, 94, 134, 0.4);
  background: #005E86;
  color: #ffffff;

  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;

  box-shadow: 0 4px 12px rgba(0, 94, 134, 0.18);
  transition: background .2s ease, box-shadow .2s ease, transform .08s ease;
}

.gd-entities-archive__filters button:hover{
  background: #0073aa;
  box-shadow: 0 6px 16px rgba(0, 94, 134, 0.25);
}

.gd-entities-archive__filters button:active{
  transform: translateY(1px);
}

/* -------------------------
   Grid
-------------------------- */
.gd-entities-archive__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

/* Card */
.gd-entities-archive__card{
  background: #ffffff;
  border: 1px solid var(--km-border);
  border-radius: var(--km-radius);
  overflow: hidden;

  box-shadow: var(--km-shadow-sm);
  padding: 12px;

  transition: transform .12s ease, box-shadow .2s ease;
  position: relative;
}

.gd-entities-archive__card:hover{
  transform: translateY(-1px);
  box-shadow: var(--km-shadow);
}

/* Top accent bar (hell & ket-like) */
.gd-entities-archive__card::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #005E86;
}

/* Title */
.gd-entities-archive__title{
  margin: 8px 0 10px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
}

.gd-entities-archive__title a{
  color: #005E86;
  text-decoration: none;
}

.gd-entities-archive__title a:hover{
  color: #0073aa;
  text-decoration: underline;
}

/* Thumbnail */
.gd-entities-archive__thumb{
  display: block;
  border-radius: var(--km-radius-sm);
  overflow: hidden;
  border: 1px solid var(--km-border);
  margin-bottom: 10px;
  background: #ffffff;
}

.gd-entities-archive__thumb img{
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* Excerpt */
.gd-entities-archive__excerpt{
  color: var(--km-muted);
  font-size: 14px;
  line-height: 1.6;
}

.gd-entities-archive__excerpt p{
  margin: 0;
}

/* -------------------------
   Pagination
-------------------------- */
.gd-entities-archive__pagination{
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.gd-entities-archive__pagination .page-numbers{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  margin: 0 4px;

  border-radius: 999px;
  border: 1px solid var(--km-border);
  background: #ffffff;

  color: #005E86;
  text-decoration: none;
  font-weight: 600;

  transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.gd-entities-archive__pagination .page-numbers:hover{
  border-color: rgba(0, 94, 134, 0.4);
  box-shadow: 0 0 0 3px var(--km-focus);
}

.gd-entities-archive__pagination .page-numbers.current{
  background: var(--km-soft);
  border-color: rgba(0, 94, 134, 0.35);
}

/* -------------------------
   Responsive
-------------------------- */
@media (max-width: 1024px){
  .gd-entities-archive__grid{
    grid-template-columns: repeat(2, 1fr);
  }

  .gd-entities-archive__filters{
    grid-template-columns: 1fr 1fr;
  }

  .gd-entities-archive__filters button{
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px){
  .gd-entities-archive__grid{
    grid-template-columns: 1fr;
  }

  .gd-entities-archive__filters{
    grid-template-columns: 1fr;
  }
}
