/* Library Page Styles */

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  margin-bottom: 20px;
}

.header .flex-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header .icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.header .text {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  text-transform: capitalize;
}

/* Dark mode support for library title */
html.theme-dark .header .text {
  color: #ffffff !important;
}

/* Dark mode: truncated description on cards */
html.theme-dark .resource-card .resource-description,
html.theme-dark .resource-card .desc-clickable-truncated {
  color: #ffffff !important;
}

html.theme-dark .resource-card .desc-clickable-truncated::after {
  color: #8ec5f0 !important;
}

/* Filter Buttons */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 20px 20px;
  justify-content: center;
}

.filter-btn {
  padding: 10px 20px;
  border: 2px solid #ddd;
  background-color: white;
  color: #666;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  outline: none;
}

.filter-btn:hover {
  border-color: #689fd4;
  color: #689fd4;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
  background-color: #689fd4;
  color: white;
  border-color: #689fd4;
}

/* Resource Cards */
.resource-card-main-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.resource-card {
  margin: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  min-height: 550px;
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.resource-card.hidden {
  display: none;
}

/* Resource Type Badge */
.resource-type-badge {
  background-color: #689fd4;
  color: white;
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  display: inline-block;
}

.card-action {
  padding: 10px 15px;
  background-color: rgba(104, 159, 212, 0.1);
  text-align: right;
}

/* Resource Image */
.resource-image {
  height: 350px;
  overflow: hidden;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Resource Content */
.resource-card .card-content {
  padding: 25px;
  min-height: 0;
}

.resource-card-content-linked {
  padding-bottom: 8px;
}

.resource-card-content-description {
  padding-top: 0;
}

/* Library: align shared modal with library typography */
.library-content-container .desc-clickable-truncated::after {
  color: #689fd4;
}

.library-content-container .desc-clickable-wrap:hover {
  background-color: rgba(104, 159, 212, 0.12);
}

#library-resource-description-modal .desc-modal__title,
#library-resource-description-modal .desc-modal__body,
#library-resource-description-modal .desc-modal__body p {
  text-align: left;
}

.resource-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.resource-description {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-top: 10px;
}

.library-content-container .desc-clickable-truncated.resource-description {
  margin-top: 0;
}


/* No Resources Message */
.no-resources {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.no-resources h5 {
  color: #666;
  margin-bottom: 15px;
}

.no-resources p {
  color: #999;
  font-size: 14px;
}

/* Center library content on large screens */
@media (min-width: 993px) {
  .library-content-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  .library-content-container .row {
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
  }
  
  .library-content-container .row .col {
    margin-left: auto;
    margin-right: auto;
    float: none;
    display: block;
  }
}

/* Ensure horizontal centering for all screen sizes */
.library-content-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.library-content-container .row {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.library-content-container .row .col {
  margin-left: auto;
  margin-right: auto;
  float: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header .text {
    font-size: 20px;
  }
  
  .filter-btn {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  .resource-card {
    margin: 10px;
    min-height: unset;
  }

  .resource-card .card-content {
    min-height: unset;
    padding: 16px 18px;
  }
  
  .resource-image {
    height: 200px;
  }
  
  .resource-title {
    font-size: 16px;
  }
  
  .resource-card .resource-description {
    font-size: 13px;
  }
}

/* Flex utilities */
.flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

