body {
  font-family: 'Inter', sans-serif;
  background-color: #f3f5f7;
}

.navbar {
  background-color: #003092 !important;
  color: white;
  padding: 0;
}

.navbar-brand img {
  max-height: 80px;
}

.navbar-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.navbar-text.fw-bold {
  font-weight: 600 !important;
  color: white;
}

.navbar .bi {
  font-size: 1.3rem;
  cursor: pointer;
}

.navbar .bi:hover {
  color: white;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.section-header h5{
  color: #2E384D;
  font-weight: normal !important;
  font-size: 18px !important;
}

/* .service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem 0.5rem;
  border-radius: 1rem;
  background-color: white;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: 1px solid #dee2e6;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  flex-grow: 1;
  min-width: 120px;
  max-width: 180px;
} */

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem 0.5rem;
  border-radius: 1rem;
  background-color: white;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: 1px solid #dee2e6;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  flex: 0 0 150px;
  height: 150px;
  margin-bottom: 1rem;  /* spacing between rows */
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  background-color: #003092;
  background-image: url('../../img/card-bg.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: cover;
  color: white !important;
  border-color: #003092;
  box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.2);
}

.service-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
  font-size: 14px;
}

.service-card a i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #003092;
}

.service-card a:hover i {
  color: white;
}

.service-card a span {
  font-weight: normal;
}

.service-card .bi {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #003092;
}

.service-card.active {
  background-color: #003092;
  background-image: url('../../img/card-bg.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: cover;
  color: white;
  border-color: #003092;
  box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.2);
}

.service-card.active .bi {
  color: white;
}

.service-card.active span {
  font-weight: 500;
}

.content-card {
  /* border-radius: 0.75rem; */
  /* box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); */
  margin-bottom: 1rem;
  text-decoration: none;
  color: #444;
}

.content-card .card-header {
  background-color: white;
  border-bottom: 1px solid #e9ecef;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}

.content-card .card-body {
  padding: 1.25rem;
}

.content-card.folder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Changed from center */
  text-align: center;
  min-height: 100px; /* Increase if needed */
  width: 95%;
  flex: 1 1 auto;
  padding-top: 1rem;
}

.content-card.folder-item img {
  margin-bottom: 0.5rem;
  max-height: 50px;
}

.folder-item span {
  font-size: 13px;
  color: #2E384D;
  min-height: 32px; /* Enough space for 2 lines */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;

  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical;
}


.content-card.folder-item .bi {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.folder-color {
  color: #003092;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  text-align: center;
}

.calendar-day-header {
  font-weight: 500;
  color: #6c757d;
  font-size: 0.85rem;
}

.calendar-day {
  padding: 0.4rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
  font-size: 0.9rem;
  color: #495057;
}

.calendar-day.prev-month,
.calendar-day.next-month {
  color: #adb5bd;
}

.calendar-day.current-day {
  background-color: #003092;
  color: white;
  font-weight: 600;
}

.calendar-day:not(.current-day):hover {
  background-color: #e9ecef;
}

.reminder-item {
  display: flex;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid #e9ecef;
}

.reminder-item:last-child {
  border-bottom: none;
}

.reminder-time {
  flex-shrink: 0;
  width: 80px;
  font-weight: 600;
  color: #6c757d;
  font-size: 0.9rem;
}

.reminder-details h6 {
  margin-bottom: 0.25rem;
  color: #343a40;
  font-size: 0.95rem;
}

.reminder-details p {
  margin-bottom: 0;
  color: #6c757d;
  font-size: 0.85rem;
}

@media (max-width: 991.98px) {
  .service-card {
    min-width: unset;
    width: 48%;
    max-width: unset;
  }

  .service-card-group {
    justify-content: center;
  }

  .sidebar {
    margin-top: 2rem;
  }
}

@media (max-width: 767.98px) {
  .navbar {
    padding: 1rem;
  }

  .navbar .navbar-text {
    display: none;
  }

  .navbar-brand img {
    height: 80px;
  }

  .service-card {
    width: 100%;
    max-width: unset;
  }

  .service-card-group {
    flex-direction: column;
    align-items: center;
  }
}

.form-container {
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08);
  padding: 2rem;
  max-width: 1000px;
  margin: 2rem auto;
}

.form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border-radius: 0.75rem !important;
  padding: 0.75rem 1rem !important;
  border: 1px solid #adbac4 !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
    background-color: #ecf5ff !important; 
}

.select2-container--default .select2-selection--single .select2-selection__rendered{
  border-radius: 0.75rem !important;
  padding: 0.35rem 1rem !important;
  border: 1px solid #adbac4 !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
    background-color: #ecf5ff !important; 
    color: var(--bs-body-color) !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--bs-body-color) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
  background-color: #e9ecef;
  border-color: #ced4da;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.btn-search {
  background-color: #003092;
  color: white;
  border-radius: 0.75rem;
  padding: 0.75rem 2.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.2);
}

.btn-search:hover {
  background-color: #0b5ed7;
  transform: translateY(-2px);
  color: white;
  box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.3);
}


.btn-reset {
  background-color: #9f1818;
  color: white;
  border-radius: 0.75rem;
  padding: 0.75rem 2.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.2);
}

.btn-reset:hover {
  background-color: #c62020;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.3);
}

.form-group-top {
  margin-bottom: 1.5rem;
}

.form-group-row {
  margin-bottom: 1rem;
}

.form-group-row .col {
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .form-group-row .col {
    margin-bottom: 0;
  }
}

.search-summary {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 2rem;
  /* display: flex; */
  /* flex-wrap: wrap; */
  /* align-items: center; */
  /* justify-content: space-between; */
}

.search-summary .search-query {
  font-size: 1.1rem;
  font-weight: 500;
  color: #0d6efd;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}

.search-summary .result-count {
  font-size: 1rem;
  color: #6c757d;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}

.search-summary .dropdown-sort .btn {
  border-radius: 0.5rem;
  border-color: #dee2e6;
  color: #495057;
  background-color: white;
}

.search-summary .dropdown-sort .btn:hover {
  background-color: #f8f9fa;
}

.search-result-item {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.2s ease-in-out;
  border: 1px solid #EAEAEA;
  cursor: pointer;
}

.search-result-item a {
  text-decoration: none;
}

.search-result-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.search-result-item .result-number {
  font-size: 1.2rem;
  font-weight: 600;
  color: #0d6efd;
  margin-right: 1rem;
  flex-shrink: 0;
}

.search-result-item .result-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 0.5rem;
}

.search-result-item .result-meta {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.75rem;
}

.search-result-item .result-snippet {
  font-size: 0.95rem;
  color: #495057;
  line-height: 1.6;
}

  /* .sidebar {
    height: 100%;
  } */

/* .sidebar h5 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 1.5rem;
  padding: 1rem;
} */

.quick-link-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  background-color: white;
  border-radius: 30px;
  margin: 10px;
  padding: 10px;
  border-bottom: 1px solid #e9ecef;
  text-decoration: none;
  color: #495057;
  transition: all 0.2s ease-in-out;
}

.quick-link-item:last-child {
  border-bottom: none;
}

.quick-link-item:hover {
  background-color: #f8f9fa;
  padding-left: 0.5rem;
  color: #0d6efd;
}

.quick-link-item .bi {
  font-size: 1.2rem;
  margin-right: 0.75rem;
  color: #6c757d;
}

.quick-link-item:hover .bi {
  color: #0d6efd;
}

.quick-link-item span {
  flex-grow: 1;
  font-weight: 500;
}

.top-navbar {
  background-color: #ffffff;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #343a40;
  flex-wrap: wrap;
  border-bottom: 1px solid #e9ecef;
}

.top-navbar .nav-tabs {
  border-bottom: none;
}

.top-navbar .nav-link {
  color: #495057;
  background-color: #e9ecef;
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-right: 0.75rem;
}

.top-navbar .nav-link:hover {
  background-color: #dee2e6;
  color: #343a40;
}

.top-navbar .nav-link.active {
  background-color: #003092;
  color: white;
  font-weight: 600;
  box-shadow: 0 0.25rem 0.75rem rgba(13, 110, 253, 0.2);
  border-bottom: none;
}

.top-navbar .info-text {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  color: #6c757d;
}

.content-area {
  padding: 2rem 0;
}

.card-item {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  text-decoration: none;
}

.card-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.card-item .card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 0.5rem;
  line-height: 1.6 !important;
}

.card-item .card-text {
  font-size: 0.85rem;
  color: #6c757d;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.pagination .page-item .page-link {
  border-radius: 0.5rem;
  margin: 0 0.25rem;
  color: #0d6efd;
  border-color: #dee2e6;
  transition: all 0.2s ease;
}

.pagination .page-item .page-link:hover {
  background-color: #e9ecef;
  border-color: #ced4da;
}

.pagination .page-item.active .page-link {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: white;
  box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.2);
}

.pagination .page-item.disabled .page-link {
  color: #adb5bd;
}

@media (max-width: 767.98px) {
  .top-navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .top-navbar .nav-tabs {
    width: 100%;
    margin-bottom: 1rem;
  }

  .top-navbar .nav-link {
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
  }

  .top-navbar .info-text {
    width: 100%;
    text-align: center;
  }

  .content-area {
    padding: 1rem;
  }
}


/*** BLD Volume*/

.search-bar-container {
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 2rem;
  max-width: 800px;
  /* Limit width of search bar */
  margin-left: auto;
  margin-right: auto;
}

.search-input-group .form-control {
  border-radius: 0.75rem;
  border: 1px solid #ced4da;
  padding: 0.75rem 1rem;
  padding-left: 3rem;
  /* Space for icon */
  background-color: #f8f9fa;
  /* Light background for input */
}

.search-input-group .form-control:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  background-color: white;
}

.search-input-group .bi-search {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 1.1rem;
  z-index: 2;
  /* Ensure icon is above input */
}

.volume-grid-container {
  margin: 0 auto;
  border-radius: 0.75rem;
  padding: 2rem;
}

.book-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: white;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  height: 100%;
  border: 1px solid #D6DFEA;
  ;
}

.book-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Container for the book image and number */
.book-icon-wrapper {
  width: 80px;
  /* Width of the book image area */
  height: 100px;
  /* Height of the book image area */
  position: relative;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Ensure image doesn't overflow */
}

.book-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Ensure the whole image is visible */
  display: block;
}

.book-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  color: #EEDD70;
  margin-top: 5px;
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  /* Add shadow for readability */
}

.see-all-link {
  text-align: right;
  margin-top: 1.5rem;
  padding-right: 1rem;
}

.see-all-link a {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.see-all-link a:hover {
  text-decoration: underline;
  color: #0b5ed7;
}

.top-action-bar {
  background-color: white;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.top-action-bar .action-link {
  color: #1B1833;
  text-decoration: none;
  font-weight: normal;
  font-size: 14px;
  margin-right: 1.2rem;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
  white-space: nowrap;
  margin-bottom: 0.5rem;
}

.top-action-bar .action-link:last-child {
  margin-right: 0;
}

.top-action-bar .action-link:hover {
  color: #0d6efd;
}

.top-action-bar .action-link .bi {
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

.top-action-bar .nav-arrows .action-link {
  margin-right: 0.75rem;
}

.top-action-bar .nav-arrows .action-link:last-child {
  margin-right: 0;
}

.comment-container {
  margin-top: 2rem;
  margin-bottom: 2rem;
  max-width: 900px;
}

/* General clamping utility */
.clamp-1, .clamp-3, .clamp-4 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Specific line limits */
.clamp-1 {
  line-clamp: 1;
  -webkit-line-clamp: 1;
  min-height: 1.5em;  /* reserve space for exactly 1 line */
}

.clamp-3 {
  line-clamp: 3;
  -webkit-line-clamp: 3;
  min-height: 4em;  /* ~3 lines height */
}

.clamp-4 {
  line-clamp: 4;
  -webkit-line-clamp: 4;
  min-height: 6em;    /* ~4 lines height */
}
