/* === Container & Grid === */
.coach-library-wrapper .view-content-wrap {
  padding: 40px 10px 20px 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.coach-library-wrapper .view-content-wrap .item {
  display: flex;
  flex-direction: column;
}

/* === Link Wrapper === */
.cl-item-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* === Card === */
.cl-item {
  display: flex;
  flex-direction: column;
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.cl-item-link:hover .cl-item {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* === Header === */
.cl-item--header {
  font-size: 1.25rem;
  font-weight: bold;
  padding: 15px;
  box-sizing: border-box;
}

.cl-item--header > span {
  font-size: 14px;
  font-weight: bold;
}

/* === Description === */
.cl-item--description {
  padding: 8px 0;
  font-size: 13px;
  color: #4e4e4e;
  min-height: 40px;
  max-height: 32px;
  line-height: 16px;
  overflow: hidden;
  font-family: "Open Sans", sans-serif;
}

/* === Metadata Row === */
.cl-item--body {
  flex-grow: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #9e9e9e;
}

/* === Category Field === */
.field--name-field-category {
  font-weight: 500;
}

/* === File Type Icon === */
.cl-item--icon img.file-type-icon {
  max-width: 32px;
  max-height: 32px;
  opacity: 0.8;
}

/* === Thumbnail Section === */
.cl-item--thumbnail {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
}

.cl-item--thumbnail img {
  max-width: 100%;
  height: auto;
  border-radius: 0 0 4px 4px;
  display: block;
}

.cl-item--thumbnail-details {
  top: 0;
  left: 0;
  width: 100%;
  position: absolute;
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding: 15px;
  box-sizing: border-box;
}

.cl-item--thumbnail-details span {
  color: white;
  font-size: 25px;
  font-weight: 700;
}

.cl-item--thumbnail-details img {
  max-width: 32px;
}

/* === Responsive Grid === */
@media (max-width: 1400px) {
  .coach-library-wrapper .view-content-wrap {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 1200px) {
  .coach-library-wrapper .view-content-wrap {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .coach-library-wrapper .view-content-wrap {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .coach-library-wrapper .view-content-wrap {
    grid-template-columns: 1fr;
  }
}


/* === Coach Library Filter Form === */
.coach-library-wrapper form.views-exposed-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  align-items: flex-end;
}

.coach-library-wrapper .views-exposed-form .form-item {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
}

.coach-library-wrapper .views-exposed-form label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #333;
}

.coach-library-wrapper .views-exposed-form input[type="text"],
.coach-library-wrapper .views-exposed-form select {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.2s ease-in-out;
}

.coach-library-wrapper .views-exposed-form input[type="text"]:focus,
.coach-library-wrapper .views-exposed-form select:focus {
  border-color: #2a8a94; /* match theme button */
  outline: none;
}

/* === Apply Button === */
.coach-library-wrapper .views-exposed-form .form-actions input[type="submit"] {
  background-color: #2a8a94; /* theme teal blue */
  border: none;
  color: white;
  font-weight: bold;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.coach-library-wrapper .views-exposed-form .form-actions input[type="submit"]:hover {
  background-color: #246e75;
}
