 /* ===============================
   HB Ilmaiskokeilut – Dark UI
   Musta + punainen, modal teksti valkoinen
   =============================== */

.hbil {
  --hbil-accent: #d6111e;
  --hbil-card-bg: #000;
  --hbil-border: #d6111e;
  --hbil-text: #ffffff;
  --hbil-muted: #fffff;
  --hbil-shadow: 0 10px 30px rgba(0,0,0,0.65);
  color: var(--hbil-text);
}

/* Search */
.hbil-search {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hbil-search__input {
  background: #0f0f12;
  color: var(--hbil-text);
  border: 1px solid var(--hbil-border);
  border-radius: 12px;
  padding: 12px 14px;
  width: min(420px, 100%);
}

.hbil-search__input::placeholder { color: var(--hbil-muted); }

.hbil-search__input:focus {
  outline: none;
  border-color: var(--hbil-accent);
  box-shadow: 0 0 0 3px rgba(214,17,30,0.35);
}

.hbil-search__button,
.hbil-btn {
  background: linear-gradient(135deg, #d6111e, #9f0d16);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.hbil-search__button:hover,
.hbil-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(214,17,30,0.45);
}

/* Count */
.hbil-count {
  margin-bottom: 20px;
  font-weight: 900;
  color: var(--hbil-text);
}

/* Grid */
.hbil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

/* Card */
.hbil-card {
  background: radial-gradient(circle at top, #1a1a1f, var(--hbil-card-bg));
  border: 1px solid var(--hbil-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--hbil-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .2s ease, box-shadow .2s ease;
color:  #fff !important;
}

.hbil-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0,0,0,0.85);
}

.hbil-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #1f1f24;
}

.hbil-card__title {
  font-size: 19px;
  color: var(--hbil-accent);
  margin: 4px 0 0;
}

.hbil-card__excerpt {
  color: #fff !important;
  font-size: 14px;
  line-height: 1.55;
}

/* Share */
.hbil-card__share {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.hbil-card__shareLabel {
  font-size: 12px;
  font-weight: 900;
  color: var(--hbil-muted);
}

.hbil-share-btn {
  background: #0f0f12;
  border: 1px solid #2a2a2f;
color: #fff !important;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease;
}

.hbil-share-btn:hover {
  background: rgba(214,17,30,0.15);
  box-shadow: 0 0 0 2px rgba(214,17,30,0.25);
}

/* Pagination */
.hbil-pagination {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hbil-page {
  background: #000;
  border: 2px solid var(--hbil-accent);
  color: var(--hbil-accent);
  padding: 9px 14px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: all .15s ease;
}

.hbil-page:hover { background: var(--hbil-accent); color: #fff; }

.hbil-page.is-active {
  background: var(--hbil-accent);
  color: #fff;
  cursor: default;
}

/* Modal */
.hbil-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.hbil-modal.is-open { display: block; }

.hbil-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(2px);
}

.hbil-modal__content {
  position: relative;
  background: radial-gradient(circle at top, #1b1b20, #0e0e11);
  color: #ffffff;

  width: min(980px, calc(100% - 24px));
  margin: 48px auto;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid #2a2a2f;
  box-shadow: 0 25px 80px rgba(0,0,0,0.9);

  max-height: calc(100vh - 96px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.hbil-modal__close {
  position: sticky;
  top: 6px;
  float: right;
  font-size: 34px;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* Modal content */
.hbil-modal-title { color: var(--hbil-accent); margin-bottom: 14px; }

.hbil-modal-image {
  max-width: 100%;
  border-radius: 16px;
  margin-bottom: 16px;
  border: 1px solid #242428;
}

.hbil-modal-share {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hbil-modal-share__label { font-weight: 900; color: var(--hbil-muted); }

.hbil-modal-body { color: #ffffff; line-height: 1.7; }

/* Force all modal text to white */
.hbil-modal__content,
.hbil-modal__content p,
.hbil-modal__content li,
.hbil-modal__content span,
.hbil-modal__content div {
  color: #ffffff;
}

/* Links in modal */
.hbil-modal__content a {
  color: #ffffff;
  font-weight: 800;
  text-decoration: underline;
}
.hbil-modal__content a:hover {   color: #ffffff;
 }

/* Scroll lock */
body.hbil-modal-open { overflow: hidden; }

/* ======= 2-palstainen layout modaalissa ======= */
.hbil-modal-layout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.hbil-modal-left {
  flex: 1 1 auto;
  min-width: 0;
}

/* ======= MAINOSALUE / TARJOUSKORTTI ======= */
.hbil-modal-right {
  margin-top: 25px;
  flex: 0 0 320px;
  max-width: 360px;

  border-radius: 18px;
  padding: 16px;

  background: radial-gradient(circle at top, rgba(214,17,30,0.22), rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.55));
  border: 1px solid rgba(214,17,30,0.35);
  box-shadow:
    0 18px 55px rgba(0,0,0,0.85),
    0 0 0 2px rgba(214,17,30,0.10);
  position: relative;
  overflow: hidden;
}

.hbil-modal-right::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(214,17,30,0.55), transparent 65%);
  filter: blur(2px);
  opacity: 0.9;
  pointer-events: none;
}

.hbil-offer-headline {
  display: block;
  font-weight: 1000;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 12px;
    color: #ffffff;
  margin: 0 0 10px;
}

.hbil-offer-text {
  display: inline-flex;
  align-items: left;
  gap: 8px;

  margin: 0 0 14px;
  padding: 10px 12px; 0px 25px;

  border-radius: 999px;
  border: 1px solid rgba(214,17,30,0.55);
  background: rgba(214,17,30,0.16);

  color: #ffffff;
  font-weight: 950;
font-size: 12px !important;
  letter-spacing: 0.2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.hbil-offer-btn {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;

  margin: 0 0 12px;
  padding: 13px 16px;

  border-radius: 14px;
  background: linear-gradient(135deg, #ff2a3a, #b80f1a 55%, #8a0b13);
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 1000;

  box-shadow:
    0 14px 32px rgba(214,17,30,0.40),
    0 0 0 1px rgba(255,255,255,0.06);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.hbil-offer-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 18px 44px rgba(214,17,30,0.52),
    0 0 0 2px rgba(214,17,30,0.22);
}

.hbil-offer-empty {
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.78);
  background: rgba(0,0,0,0.22);
  font-size: 13px;
  line-height: 1.55;
}

/* Mobile: pinoa allekkain */
@media (max-width: 860px) {
  .hbil-modal-layout { flex-direction: column; }
  .hbil-modal-right { max-width: 100%; }
}
