/* ---------------------------------------------------------
   GRID 3×3 – KARTY (NECHÁVÁME BEZ ZMĚN)
--------------------------------------------------------- */

.wsf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

/* KARTA */

.wsf-card {
  background: #fff;
  /* border: 1px solid #ddd; */
  padding: 0.2rem;
  /* border-radius: 6px; */
  /* transition: box-shadow 0.2s ease; */
}

.wsf-card:hover {
  background: #9000FF1a;
  /* box-shadow: 0 4px 12px rgba(0,0,0,0.1); */
}

.wsf-card > a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

/* Wrapper drží poměr stran a schová přetečení */
.wsf-card-img {
  aspect-ratio: 2 / 1;
  width: 100%;
  overflow: hidden;
}

/* Obrázek vyplní box a může zoomovat */
.wsf-card-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

/* Zoom uvnitř pevného rámu */
.wsf-card:hover .wsf-card-img img {
  transform: scale(1.1);
}

/*
.wsf-card img {
  aspect-ratio: 3 / 2;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: .75rem;
}
*/

.wsf-card h3 {
  /* margin: 0 0 5rem 0; */
  margin-top: 1rem !important;
  /* font-size: 1.1rem; */
  color: #9000FF;
}

.wsf-card:hover h3 {
  color: #D810D8;
}

/* META INFO - DATUM PUBLIKACE A RUBRIKA */
.wsf-meta {
  margin: 0.2rem 0 1rem 0;
  font-size: 1.1rem;
  color: #8791a1; /* šedá jako na obrázku */
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/*
.wsf-meta .wsf-dot {
  color: #6B7280;
}

.wsf-meta .wsf-cat {
  color: #6B7280;
}
*/

.wsf-card p {
  margin: 0;
  color: #2D3748;
}

/* ---------------------------------------------------------
   TLAČÍTKA
--------------------------------------------------------- */

.wsf-button {
  background: #9000FF;
  color: #fff;
  padding: 5px 50px;
  /* border-radius: 6px; */
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bolder;
  margin: 0 auto;  
}

.wsf-button:hover {
  background: #D810D8;
}

/* ---------------------------------------------------------
   FORMULÁŘ FILTRŮ – SKRYTÝ / ZOBRAZENÝ
--------------------------------------------------------- */

/* výchozí stav – skrytý */
form#wsf-form {
  display: none;
  margin: 20px 0;
}

/* po kliknutí na Filtrovat */
form#wsf-form.wsf-open {
  display: grid;
}

/* ---------------------------------------------------------
   FORMULÁŘ – 3 SLOUPCE
--------------------------------------------------------- */

form#wsf-form {
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.wsf-actions {
  grid-column: 1 / -1;
  margin-top: 10px;
}

.wsf-tags-columns .wsf-tags-col {
  width: 180px;
}

/* Hover barva textu u rubrik a štítků */
.wsf-field label:not(:first-child):hover {
  color: #D810D8;
  cursor: pointer;
}

/* Hover pro všechny položky ve sloupcích štítků */
.wsf-tags-columns .wsf-tags-col label:hover {
  color: #D810D8;
  cursor: pointer;
}

/* Hover efekt na checkbox (rámeček + výplň) */
.wsf-field label:hover input[type="checkbox"],
.wsf-field input[type="checkbox"]:checked {
  accent-color: #D810D8;
}

/* ---------------------------------------------------------
   BREADCRUMB + ZRUŠIT FILTR
--------------------------------------------------------- */

.wsf-breadcrumb {
  margin: 10px 0 5px;
  /* font-size: 1.2rem; */
  opacity: 0.9;
}

.wsf-reset {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

/* autoscroll stránky pro nadpis pod sticky menu */
/*
h2#wsf-vybrane {
  scroll-margin-top: 80px;
}

#wsf-archiv {
  scroll-margin-top: 80px;
}
  */

/* ---------------------------------------------------------
   JEDNO TLAČÍTKO FILTROVAT – FINÁLNÍ FUNKČNÍ LOGIKA
--------------------------------------------------------- */

/* Horní tlačítko – viditelné jen když je formulář zavřený */
#wsf-toggle {
  display: block;
  margin: 0 auto;
}

/* Když je formulář otevřený → horní tlačítko schovat */
.wsf-form.wsf-open ~ #wsf-toggle,
.wsf-form.wsf-open + #wsf-toggle {
  display: none;
}

/* Tlačítko uvnitř formuláře – viditelné jen když je formulář otevřený */
.wsf-form .wsf-actions {
  display: none;
}

.wsf-form.wsf-open .wsf-actions {
  display: block;
  margin: 0 auto;
}

.wsf-reset-btn {
  background: #9000FF;
  color: #fff;
  border: none;
  padding: 2px 20px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bolder;
  margin-top: 10px;
  display: inline-block;
}

.wsf-reset-btn:hover {
  background: #D810D8;
}


/* ---------------------------------------------------------
   MODERNÍ STRÁNKOVÁNÍ
--------------------------------------------------------- */

.wsf-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 30px 0;
}

.wsf-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: #f2f2f2;
  border: 1px solid #ccc;
  border-radius: 2px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
}

.wsf-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  font-size: 1.4rem;
  color: #666;
}

.wsf-page-btn:hover {
  background: #D810D8;
  color: #fff;
  border-color: #7030A0;
}

.wsf-page-btn.active {
  background: #7030A0;
  color: #fff;
  border-color: #7030A0;
  cursor: default;
}

.wsf-page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* neaktivní štítky */
.wsf-tag-disabled {
  opacity: 0.2;
  pointer-events: none;
  filter: grayscale(100%);
}

/* checkbox uvnitř neaktivního štítku */
.wsf-tag-disabled input[type="checkbox"] {
  pointer-events: none;
}


/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */

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

  form#wsf-form {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  form#wsf-form {
    grid-template-columns: 1fr;
  }
}
