/* Make row act like equal height container */
.category-list {
  display: flex;
  flex-wrap: wrap;
}

/* Bootstrap 3 column fix */
.category-list > [class*="col-"] {
  margin-bottom: 30px;
}

/* Card full height */
.category-card {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  height: 100%; /* <--- ensure card stretches */
}

.category-card:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transform: translateY(-3px);
}

/* Image */
.category-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
}
.category-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Body */
.category-body {
  display: flex;
  flex-direction: column;
  padding: 15px;
  flex-grow: 1;
}

/* Title fade-out */
.category-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.category-title:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;  /* fix direction so fade is at end */
  width: 50px;
  height: 100%;
  background: linear-gradient(to left, transparent, #fff);
}

/* Description clamp */
.category-desc {
  font-size: 14px;
  color: #555;
  flex-grow: 1;
  margin-bottom: 15px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Footer aligned bottom */
.category-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto; /* push footer down */
}

/* Devices text */
.category-devices {
  font-size: 13px;
  color: #666;
}

/* Outlined Button (Bootstrap 3 style override) */
.btn-outline {
  background-color: transparent;
  border: 1px solid #007bff !important;
  color: #007bff;
  border-radius: 6px;
  padding: 5px 12px;
  transition: all 0.3s ease;
}
.btn-outline:hover,
.btn-outline:focus {
  background-color: #007bff;
  color: #fff;
}

/* Section title */
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 0.3rem;
}

/* underline only under text */
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background-color: #dc3545; /* Bootstrap red */
  border-radius: 2px;
}

/* icon styles */
.section-title i {
  background-color: #dc3545; /* red */
  color: white;
  padding: 0.4rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  font-size: 15px;
}




.device-test-card {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background: #fff;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}
.device-test-card:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Image */
.device-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

/* Body */
.device-body {
  padding: 15px;
}

/* Title one-line fade */
.device-title {
  margin: 0 0 10px;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.device-title span {
  display: inline-block;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}
.device-title::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(to left, transparent, white);
}

/* Description (3 lines max with fade) */
.device-desc {
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  min-height: 4.5em;
}
.device-desc::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 100%;
  height: 1.2em;
  background: linear-gradient(to bottom, transparent, white 80%);
}

/* Footer row */
.device-footer {
  border-top: 1px solid #eee;
  padding-top: 8px;
}

/* Status label */
.device-status {
  display: inline-block;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 4px;
  float: left;
}
.device-status.active {
  background-color: #dff0d8;
  color: #3c763d;
}
.device-status.inactive {
  background-color: #f2dede;
  color: #a94442;
}

/* Outline button (Bootstrap 3 doesn’t have it natively) */
.btn-outline-primary {
  color: #337ab7;
  background-color: transparent;
  border: 1px solid #337ab7;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: #337ab7;
  color: #fff;
}
