/* BuildMEP Platform — dynamic cards */
.bmep-platform {
  --bmep-blue: #2563eb;
  --bmep-blue-dark: #1d4ed8;
  --bmep-blue-soft: #eff6ff;
  --bmep-navy: #0f2747;
  --bmep-text: #334155;
  --bmep-muted: #64748b;
  --bmep-border: #e2e8f0;
  color: var(--bmep-text);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.bmep-platform,
.bmep-platform * {
  box-sizing: border-box;
}

.bmep-platform a {
  color: inherit;
  text-decoration: none;
}

.bmep-platform svg {
  display: block;
  height: 100%;
  width: 100%;
}

.bmep-tool-grid,
.bmep-post-grid {
  display: grid !important;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  width: 100%;
}

.bmep-cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.bmep-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bmep-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bmep-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bmep-tool-card,
.bmep-post-card {
  background: #ffffff;
  border: 1px solid var(--bmep-border);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 39, 71, 0.055);
  display: flex !important;
  flex-direction: column;
  float: none !important;
  margin: 0 !important;
  max-width: none !important;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100% !important;
}

.bmep-tool-visual {
  background: linear-gradient(145deg, #f8fbff, #f3f7fc);
  border-bottom: 1px solid var(--bmep-border);
  height: 190px;
  overflow: hidden;
  position: relative;
}

.bmep-tool-screenshot {
  display: block;
  height: 100% !important;
  object-fit: cover;
  object-position: center top;
  width: 100% !important;
}

.bmep-tool-placeholder {
  background:
    radial-gradient(circle at 82% 22%, rgba(37, 99, 235, 0.12), transparent 30%),
    linear-gradient(145deg, #f8fbff, #f1f6fd);
  height: 100%;
  padding: 26px 28px;
  position: relative;
}

.bmep-tool-placeholder::after {
  background-image: radial-gradient(rgba(37, 99, 235, 0.16) 1px, transparent 1px);
  background-size: 13px 13px;
  bottom: 17px;
  content: "";
  height: 64px;
  position: absolute;
  right: 17px;
  width: 90px;
}

.bmep-placeholder-icon {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.10);
  color: var(--bmep-blue);
  display: flex;
  height: 42px;
  justify-content: center;
  margin-bottom: 20px;
  padding: 10px;
  width: 42px;
}

.bmep-placeholder-line {
  background: #dbe6f3;
  border-radius: 999px;
  display: block;
  height: 8px;
  margin-top: 10px;
  width: 42%;
}

.bmep-placeholder-line--wide {
  width: 70%;
}

.bmep-placeholder-result {
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  bottom: 24px;
  display: block;
  height: 42px;
  position: absolute;
  right: 28px;
  width: 92px;
}

.bmep-tool-icon {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 11px;
  bottom: -22px;
  box-shadow: 0 9px 20px rgba(37, 99, 235, 0.13);
  color: var(--bmep-blue);
  display: flex;
  height: 46px;
  justify-content: center;
  left: 22px;
  padding: 11px;
  position: absolute;
  width: 46px;
  z-index: 2;
}

.bmep-tool-badge {
  align-items: center;
  background: var(--bmep-blue);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.035em;
  min-height: 27px;
  padding: 0 10px;
  position: absolute;
  right: 14px;
  text-transform: uppercase;
  top: 14px;
}

.bmep-tool-badge--status {
  background: rgba(15, 39, 71, 0.90);
}

.bmep-tool-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 31px 22px 22px;
}

.bmep-tool-availability {
  align-items: center;
  color: #15803d;
  display: flex;
  font-size: 10px;
  font-weight: 800;
  gap: 6px;
  letter-spacing: 0.035em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.bmep-tool-availability i {
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #dcfce7;
  display: block;
  height: 6px;
  width: 6px;
}

.bmep-tool-title,
.bmep-post-title {
  color: var(--bmep-navy);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.32;
  margin: 0;
}

.bmep-tool-description,
.bmep-post-description {
  color: var(--bmep-muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 10px 0 20px;
}

.bmep-tool-action,
.bmep-post-action {
  align-items: center;
  align-self: flex-start;
  background: var(--bmep-blue);
  border: 1px solid var(--bmep-blue);
  border-radius: 9px;
  color: #ffffff !important;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 9px;
  justify-content: center;
  margin-top: auto;
  min-height: 42px;
  padding: 0 15px;
}

.bmep-tool-action:hover,
.bmep-tool-action:focus-visible,
.bmep-post-action:hover,
.bmep-post-action:focus-visible {
  background: var(--bmep-blue-dark);
  border-color: var(--bmep-blue-dark);
  color: #ffffff !important;
}

.bmep-tool-action--disabled {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #64748b !important;
  cursor: default;
}

.bmep-post-card {
  min-height: 100%;
}

.bmep-post-visual {
  align-items: center;
  background: linear-gradient(145deg, #eff6ff, #f8fafc);
  border-bottom: 1px solid var(--bmep-border);
  display: flex;
  height: 184px;
  justify-content: center;
  overflow: hidden;
}

.bmep-post-visual img {
  display: block;
  height: 100% !important;
  object-fit: cover;
  width: 100% !important;
}

.bmep-post-placeholder {
  color: var(--bmep-blue);
  display: block;
  height: 54px;
  opacity: 0.8;
  width: 54px;
}

.bmep-post-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 21px 21px 22px;
}

.bmep-post-meta {
  color: var(--bmep-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.bmep-post-title a:hover,
.bmep-post-title a:focus-visible {
  color: var(--bmep-blue);
}

.bmep-platform-empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #64748b;
  font: 600 13px/1.5 Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 15px 17px;
}

@media (max-width: 1024px) {
  .bmep-tool-grid,
  .bmep-post-grid,
  .bmep-cols-3,
  .bmep-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .bmep-tool-grid,
  .bmep-post-grid,
  .bmep-cols-2,
  .bmep-cols-3,
  .bmep-cols-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .bmep-tool-visual,
  .bmep-post-visual {
    height: 176px;
  }
}

