/*
 * Public documents list — com_ekdokumenti.
 *
 * The palette is restated here rather than inherited: the theme declares its
 * `--ek-*` tokens inside the FRONT PAGE's inline <style> block, so a component
 * page starts with none of them. Same values as media/com_ekcjenik/css/cjenik.css
 * and as the front page; if the greens change, all three are edited together.
 */
:root {
  --ek-g: #5b7d2a;
  --ek-g-d: #445e1d;
  --ek-g-dd: #2d4213;
  --ek-lime: #a9c860;
  --ek-ink: #10150b;
  --ek-soft: #f4f7ed;
  --ek-line: #e5ebd8;
  --ek-text: #3b4232;
  --ek-steel: #79836a;
}

.ek-doc {
  padding: 64px 0 88px;
  background: #fff;
  color: var(--ek-text);
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  line-height: 1.7;
}

.ek-doc__shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 28px;
}

.ek-doc__head {
  max-width: 760px;
  margin-bottom: 40px;
}

.ek-doc__eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 16px;
  padding: 7px 16px;
  border-radius: 50px;
  background: rgba(91, 125, 42, .1);
  color: var(--ek-g);
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.ek-doc__title {
  margin: 0 0 16px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.5px;
  color: var(--ek-ink);
}

.ek-doc__lead {
  margin: 0;
  font-size: 18px;
  color: #5d6552;
}

.ek-doc__empty {
  margin: 0;
  padding: 20px 24px;
  border: 1px solid var(--ek-line);
  border-left: 4px solid var(--ek-g);
  border-radius: 14px;
  background: var(--ek-soft);
}

.ek-doc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.ek-doc__item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--ek-line);
  border-radius: 18px;
  transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s ease, border-color .25s ease;
}

.ek-doc__item:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: 0 22px 44px -22px rgba(45, 66, 19, .3), 0 0 0 2px var(--ek-g) inset;
}

/* The format badge. `aria-hidden` in the markup, because the same three letters
   are in the meta line as real text - a screen reader should hear it once. */
.ek-doc__ext {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(91, 125, 42, .12), rgba(169, 200, 96, .22));
  color: var(--ek-g-dd);
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .5px;
}

.ek-doc__body {
  flex: 1 1 auto;
  min-width: 0;
}

.ek-doc__name {
  display: block;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ek-ink);
  text-decoration: none;
}

.ek-doc__name:hover,
.ek-doc__name:focus-visible {
  color: var(--ek-g-d);
  text-decoration: underline;
}

.ek-doc__desc {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: #5d6552;
}

.ek-doc__meta {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--ek-steel);
  font-variant-numeric: tabular-nums;
}

/* #445e1d, not the accent #5b7d2a: white on the accent is 4.02:1 and fails AA. */
.ek-doc__btn {
  flex: 0 0 auto;
  align-self: center;
  padding: 11px 22px;
  border-radius: 50px;
  background: var(--ek-g-d);
  color: #fff;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .3px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, transform .2s ease;
}

.ek-doc__btn:hover,
.ek-doc__btn:focus-visible {
  background: var(--ek-g-dd);
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .ek-doc {
    padding: 44px 0 64px;
  }

  .ek-doc__shell {
    padding: 0 18px;
  }

  /* The button drops under the text rather than squeezing the title into two
     words per line. */
  .ek-doc__item {
    flex-wrap: wrap;
    gap: 14px;
  }

  .ek-doc__btn {
    align-self: stretch;
    text-align: center;
  }
}
