@media (min-width: 781px) {
/* ----------- Page Container ----------- */
.searchMainContainer {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 16px;
  min-height: 500px;
}

/* ----------- Top Title ----------- */
.search-title-section {
  margin-top: 20px;
  margin-bottom: 15px;
}

.search-title-section h3 { 
  font-size: 26px;
  margin-bottom: 5px;
}

.search-title-section p {
  color: #666;
  font-size: 15px;
}

/* ----------- Clickable (reuse-safe) ----------- */
.search-clickable {
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.search-clickable:hover {
  color: #0b59c7;
}

/* ----------- View Mode Buttons ----------- */
.search-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.searchViewButtons {
  display: flex;
  gap: 10px;
}

.searchViewButtons button {
  padding: 8px 14px;
  font-size: 14px;
  border: 1px solid #ccc;
  background: #f9f9f9;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.searchViewButtons button:hover {
  background: #eaeaea;
  box-shadow: 0 0 6px rgba(0,0,0,0.15);
}

.searchViewButtons button.active {
  background: #0b4e0b;
  color: #fff;
  border-color: #0b4e0b;
}

.search-controls button {
  padding: 8px 14px;
  font-size: 14px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.search-controls button:hover {
  background: #f0f0f0;
}

/* ----------- Results Area ----------- */
.search-results-section {
  width: 100%;
  margin-top: 10px;
}
.search-highlight {
  background: #ffef7a;
  padding: 0 2px;
  border-radius: 2px;
}
.search-pagination {
  margin: 32px auto 0;              /* space from results + center */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;

  padding: 10px 16px;
  width: fit-content;

  border-radius: 10px;
  background: #f6f7f9;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.search-pagination button {
  border: none;
  background: #ffffff;
  color: #333;
  font-size: 18px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;

  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.15s ease;
}

.search-pagination button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.search-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.search-pagination span {
  font-weight: 600;
  font-size: 14px;
  color: #555;
  min-width: 64px;
  text-align: center;
}

/* hide helper */
.search-pagination.hidden {
  display: none;
}
}


@media (max-width: 780px) {
  /* ----------- Page Container ----------- */
  .searchMainContainer {
    width: 100%;
    margin: 10px auto;
    padding: 0 10px; /* Aligns with your index.css logic */
    min-height: 500px;
    box-sizing: border-box;
  }

  /* ----------- Top Title ----------- */
  .search-title-section {
    margin-top: 15px;
    margin-bottom: 10px;
    text-align: center; /* Better for mobile */
  }

  .search-title-section h3 {
    font-size: 22px; /* Slightly smaller for mobile */
    margin-bottom: 5px;
    color: #0A174E;
  }


  /* ----------- View Mode Buttons ----------- */
  .searchViewButtons {
    display: flex;
    justify-content: center;
    gap: 0; /* Create a joined-button look */
    margin-bottom: 20px;
  }

  .searchViewButtons button {
    flex: 1; /* Equal width buttons */
    padding: 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
  }

  .searchViewButtons button:first-child {
    border-radius: 8px 0 0 8px;
  }

  .searchViewButtons button:last-child {
    border-radius: 0 8px 8px 0;
    border-left: none;
  }

  .searchViewButtons button.active {
    background: #0A174E; /* Match your blue theme */
    color: #fff;
    border-color: #0A174E;
  }

  /* ----------- Results Area ----------- */
  .search-results-section {
    width: 100%;
    margin-top: 5px;
  }

  .search-highlight {
  background: #ffef7a;
  padding: 0 2px;
  border-radius: 2px;
}

  /* ----------- Pagination (Desktop Style Preserved) ----------- */
  .search-pagination {
    margin: 32px auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 16px;
    width: fit-content; /* Keeps it as a small floating box */
    border-radius: 10px;
    background: #f6f7f9;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  }

  .search-pagination button {
    border: none;
    background: #ffffff;
    color: #333;
    font-size: 18px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  }

  .search-pagination button:disabled {
    opacity: 0.4;
    box-shadow: none;
  }

  .search-pagination span {
    font-weight: 600;
    font-size: 14px;
    color: #555;
    min-width: 64px;
    text-align: center;
  }
}