.wibe-homepage-cards,
.wibe-homepage-cards *,
.wibe-homepage-cards *::before,
.wibe-homepage-cards *::after {
  box-sizing: border-box;
}

.wibe-homepage-cards {
  font-family: "Roboto", sans-serif;
}

.wibe-homepage-cards__section + .wibe-homepage-cards__section {
  margin-top: 42px;
}

.wibe-homepage-cards__section-title {
  margin: 0 0 24px;
  padding: 12px 18px;
  background: #15879e;
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.25;
}

.wibe-homepage-cards__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  align-items: stretch;
}

.wibe-homepage-cards__search {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin: 0 0 26px;
}

.wibe-homepage-cards__search-field,
.wibe-homepage-cards__search-help {
  min-width: 0;
}

.wibe-homepage-cards__search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.wibe-homepage-cards__search-label {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  color: #25343a;
  font-weight: 700;
}

.wibe-homepage-cards__search-input {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid #8fa0a8;
  border-radius: 0;
  background: #fff;
  color: #25343a;
  font: inherit;
}

.wibe-homepage-cards__search-input:focus {
  border-color: #15879e;
  outline: 3px solid rgba(21, 135, 158, .22);
  outline-offset: 1px;
}

.wibe-homepage-cards__search-button {
  min-height: 45px;
  padding: 10px 18px;
  border: 2px solid #15879e;
  background: #15879e;
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.wibe-homepage-cards__search-button:hover,
.wibe-homepage-cards__search-button:focus-visible {
  background: #fff;
  color: #15879e;
}

.wibe-homepage-cards__search-button:focus-visible {
  outline: 3px solid #f1bd2a;
  outline-offset: 2px;
}

.wibe-homepage-cards__search-help {
  padding: 12px 15px;
  border: 1px solid #c8ced1;
  background: #f7f9fa;
  color: #33454d;
  line-height: 1.45;
}

.wibe-homepage-cards__search-help strong,
.wibe-homepage-cards__search-help span {
  display: block;
}

.wibe-homepage-cards__search-help strong {
  margin-bottom: 5px;
  color: #15879e;
}

.wibe-homepage-cards__search-help-line {
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  white-space: nowrap;
}

.wibe-homepage-cards__search-help-line + .wibe-homepage-cards__search-help-line {
  margin-top: 3px;
}

.wibe-homepage-cards__card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d5dce0;
  background: #fff;
  box-shadow: 0 4px 16px rgba(25, 54, 65, .1);
  transition: transform .18s ease, box-shadow .18s ease;
}

.wibe-homepage-cards__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(25, 54, 65, .15);
}

.wibe-homepage-cards__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f3f4;
}

.wibe-homepage-cards__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wibe-homepage-cards__status {
  position: absolute;
  z-index: 2;
  top: 38%;
  left: -15%;
  width: 130%;
  padding: 10px 0;
  transform: rotate(-22deg);
  background: rgba(21, 135, 158, .72);
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .035em;
  pointer-events: none;
  text-align: center;
  text-transform: uppercase;
}

.wibe-homepage-cards__status--last_days {
  background: rgba(230, 126, 34, .72);
}

.wibe-homepage-cards__status--collection_failed,
.wibe-homepage-cards__status--rejected_by_people,
.wibe-homepage-cards__status--withdrawn {
  background: rgba(220, 0, 0, .68);
}

.wibe-homepage-cards__status--collection_success {
  background: rgba(63, 165, 53, .72);
}

.wibe-homepage-cards__status--federal_council {
  background: rgba(166, 124, 82, .72);
}

.wibe-homepage-cards__status--national_council {
  background: rgba(47, 111, 150, .72);
}

.wibe-homepage-cards__status--parliament {
  background: rgba(47, 111, 150, .72);
}

.wibe-homepage-cards__status--council_of_states {
  background: rgba(39, 91, 124, .72);
}

.wibe-homepage-cards__status--ready_for_vote {
  background: rgba(111, 78, 148, .72);
}

.wibe-homepage-cards__status--counting {
  background: rgba(245, 190, 0, .72);
  color: #222;
}

.wibe-homepage-cards__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 19px;
}

.wibe-homepage-cards__countdown,
.wibe-homepage-cards__type,
.wibe-homepage-cards__title {
  overflow-wrap: anywhere;
}

.wibe-homepage-cards__meta-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.wibe-homepage-cards__countdown {
  min-width: 0;
  margin: 0;
  color: #b54335;
  font-family: "Roboto", sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
}

.wibe-homepage-cards__countdown--ended {
  color: #59666b;
}

.wibe-homepage-cards__technical-id {
  flex: 0 1 auto;
  margin-left: auto;
  color: #666;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  text-align: right;
  white-space: nowrap;
}

.wibe-homepage-cards__type {
  margin: 0 0 7px;
  color: #59666b;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
}

.wibe-homepage-cards__title {
  margin: 0;
  color: #15879e;
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.wibe-homepage-cards__divider {
  width: 100%;
  margin: auto 0 16px;
  padding-top: 20px;
  border: 0;
  border-bottom: 1px solid #d5dce0;
}

.wibe-homepage-cards__button {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #15879e;
  background: #fff;
  color: #15879e;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
}

.wibe-homepage-cards__button:hover,
.wibe-homepage-cards__button:focus-visible {
  background: #15879e;
  color: #fff;
}

.wibe-homepage-cards__button:focus-visible {
  outline: 3px solid #f1bd2a;
  outline-offset: 3px;
}

.wibe-homepage-cards__diagnostics {
  margin-top: 30px;
  padding: 12px;
  border: 1px solid #c8ced1;
}

.wibe-homepage-cards__diagnostics pre {
  overflow: auto;
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .wibe-homepage-cards__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wibe-homepage-cards__title { font-size: 17px; }
}

@media (max-width: 620px) {
  .wibe-homepage-cards__grid { grid-template-columns: minmax(0, 1fr); }
  .wibe-homepage-cards__search { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .wibe-homepage-cards__search-controls { grid-template-columns: minmax(0, 1fr); }
  .wibe-homepage-cards__search-help-line { white-space: normal; }
  .wibe-homepage-cards__title { font-size: 16px; }
  .wibe-homepage-cards__countdown { font-size: 16px; }
  .wibe-homepage-cards__technical-id { font-size: 13px; }
  .wibe-homepage-cards__status {
    top: 40%;
    left: -18%;
    width: 136%;
    padding: 8px 0;
    transform: rotate(-20deg);
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wibe-homepage-cards__card,
  .wibe-homepage-cards__button { transition: none; }
}
