/* --- General Styles within Main Content --- */
.search-main-content {
  padding: 20px;
  max-width: 1200px;
  margin: 20px auto;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.citation-header h1 {
  text-align: center;
  color: #ffffff;
  margin-bottom: 25px;
  font-weight: 600;
}

.search-container {
  width: 60vw; /* Width of the container */
  margin-bottom: 30px;
  padding: 20px;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  text-align: center;
  margin-left: auto;
  margin-right: auto; /* Centers the container */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; /* Adds spacing between input and button */
}

.search-input {
  width: 80%; /* 70% of .search-container */
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-button {
  width: 15%; /* 10% of .search-container */
  min-width: fit-content; /* Prevent collapse on small screens */
  padding: 12px 25px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

.search-button:hover {
  background-color: #0056b3;
}

.search-button:active {
  transform: scale(0.98);
}

/* --- Results Grid --- */
.results-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(300px, 1fr)
  ); /* Responsive grid */
  gap: 25px; /* Spacing between cards */
  padding: 0; /* Reset padding if needed */
  margin-top: 20px;
}

/* Make grid strictly 3 columns on wider screens if needed */
@media (min-width: 992px) {
  /* Adjust breakpoint as needed */
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Card Styles --- */
.card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden; /* Ensure footer stays within bounds */
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column; /* Stack content and footer vertically */
  height: 100%; /* Make cards in a row equal height if grid allows */
}

.card:hover {
  transform: translateY(-5px) scale(1.01); /* Subtle lift and scale effect */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.card-content {
  padding: 20px;
  flex-grow: 1; /* Allow content to take up available space */
}

.card-header {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a2a4d; /* Dark blue header */
  margin-top: 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.card-case-number {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 5px;
}
.card-date {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 15px;
}

.card-summary {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
  margin-top: 10px;
  background-color: #fdfdfd; /* Very subtle background */
  font-weight: 500; /* Slightly bolder */
  max-height: 120px; /* Limit summary height */
  overflow: hidden; /* Hide overflow */
  text-overflow: ellipsis; /* Add ellipsis for overflow */
}

.card-footer {
  padding: 15px 20px;
  background-color: #f8f9fa; /* Light footer background */
  border-top: 1px solid #eee;
  text-align: center; /* Center button */
  margin-top: auto; /* Push footer to the bottom */
}

.card-button {
  background-color: #007bff; /* Blue button */
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  border: none; /* Removes any default or unwanted border */
  cursor: pointer; /* Ensures it looks clickable */
  transition: background-color 0.3s, transform 0.2s; /* Optional smooth transitions */
}

.card-button:hover {
  background-color: #0056b3; /* Darker blue on hover */
  transform: translateY(-2px);
  color: white;
}

.card-button:active {
  transform: translateY(0);
}

/* --- Pagination Styles --- */
.pagination {
  text-align: center;
  margin-top: 40px;
  padding: 15px 0;
  border-top: 1px solid #eee; /* Separator line */
}

.page-link {
  display: inline-block;
  margin: 0 4px;
  padding: 8px 14px;
  /*color: #007bff;
  color: #e40492;*/
  color: #007bff;
  text-decoration: none;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
  font-size: 0.9rem;
  line-height: 1.5; /* Ensure consistent height */
  background-color: #fff; /* Default background for buttons */
  cursor: pointer; /* Make buttons look clickable */
  vertical-align: middle; /* Align buttons nicely */
  font-family: inherit; /* Inherit font from body/main */
}

.page-link:hover {
  background-color: #e9ecef;
  /*color: #0056b3;
  color: #bb0478;*/
  color: #0056b3;
  border-color: #ced4da;
}

.page-active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
  cursor: default; /* Not clickable */
}

.page-active:hover {
  /* Prevent hover effect on active button */
  background-color: #007bff;
  border-color: #007bff;
}

.page-disabled {
  color: #6c757d;
  pointer-events: none; /* Make it non-clickable */
  background-color: #e9ecef; /* Slightly different background for disabled */
  border-color: #dee2e6;
  opacity: 0.6;
  cursor: default;
}

/* Ensure disabled buttons look disabled */
button.page-disabled,
button.page-link:disabled {
  /* Target disabled buttons */
  color: #6c757d;
  background-color: #e9ecef;
  border-color: #dee2e6;
  opacity: 0.6;
  cursor: default;
}

.page-ellipsis {
  color: #6c757d;
  padding: 8px 5px;
  border: none;
  background: none;
  display: inline-block; /* Align with buttons */
  vertical-align: middle;
}

/* Optional: Style First/Last/Prev/Next differently */
.page-first,
.page-last,
.page-prev,
.page-next {
  font-weight: 500;
}

/* --- No Results / Error Message --- */
.no-results,
.error-message {
  text-align: center;
  padding: 40px 20px;
  margin-top: 20px;
  background-color: #fff;
  border: 1px dashed #ccc;
  border-radius: 6px;
  color: #555;
}
.error-message {
  color: #dc3545; /* Bootstrap danger color */
  border-color: #f5c6cb;
  background-color: #f8d7da;
}

.no-results p {
  margin-bottom: 10px;
  font-size: 1.1rem;
}
.no-results a {
  color: #007bff;
  text-decoration: none;
}
.no-results a:hover {
  text-decoration: underline;
}
