/* =========================================
   PROJECT DOMAIN FILTERS & TAGS
========================================= */
.pub-filters-wrapper { background-color: #f9f9f9; border: 1px solid #dcdede; border-radius: 8px; padding: 20px; }
.project-filter-center {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 30px;
}
.pub-filter-row { display: flex; align-items: center; }

.pub-filter-label { 
  font-weight: 700; 
  color: #1e2328; 
  width: 70px; /* Match publications exactly */
  flex-shrink: 0;
}

.pub-filter-container { display: flex; gap: 10px; flex-wrap: wrap; }
.pub-filter-pill { 
  background-color: #ffffff; 
  border: 1px solid #dadce0; 
  border-radius: 16px; 
  padding: 6px 16px; 
  font-size: 14px; 
  color: #3c4043; 
  cursor: pointer; 
  white-space: nowrap; 
  transition: all 0.2s ease; 
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  box-sizing: border-box;
}
.pub-filter-pill:hover { background-color: #f1f3f4; }
.pub-filter-pill.active { background-color: #002c5f; color: #ffffff; border-color: #002c5f; }

.project-filter-center {
  width: 66.666%; 
  margin: 0 auto 30px auto; 
}

/* Table Tags */
.tag-pill {
  font-size: 10px; 
  font-weight: 700;
  padding: 4px 8px; 
  border-radius: 4px;
  color: #ffffff;
  display: inline-block;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Tag Colors (Matches Network/Pubs) */
.tag-black  { background-color: #2D3748 !important; } 
.tag-blue   { background-color: #2B6CB0 !important; } 
.tag-purple { background-color: #6B46C1 !important; } 
.tag-green  { background-color: #2F855A !important; } 
.tag-red    { background-color: #C53030 !important; } 
.tag-teal   { background-color: #2C7A7B !important; } 
.tag-orange { background-color: #C05621 !important; } 
.tag-yellow { background-color: #975A16 !important; } 
.tag-cyan   { background-color: #086F83 !important; } 
.tag-gray   { background-color: #4A5568 !important; }

.project-widget-container {
  font-family: Arial, sans-serif;
  width: 150% !important;
  margin-left: -25% !important;
  color: #333;

}

.project-section {
  margin-bottom: 4rem;
}

/* Forced larger font size */
.section-title {
  font-size: 2.2rem !important; 
  font-weight: 800;
  text-transform: uppercase;
  color: #222;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.5rem;
}

.table-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.project-table {
  display: table !important; 
  width: 100%;
  /* This is the magic rule that stops the squishing and the desktop scrollbar */
  table-layout: fixed; 
  border-collapse: collapse;
  text-align: left;
}

.project-table thead {
  display: table-header-group !important;
}

.project-table tbody {
  display: table-row-group !important;
}

.project-table tr {
  display: table-row !important;
}

.project-table th, 
.project-table td {
  display: table-cell !important;
  word-wrap: break-word; 
  padding-right: 25px !important;
}

.project-table td:last-child, 
.project-table th:last-child {
  padding-right: 0 !important;
}

/* Forced larger header fonts and removed nowrap so it fits the fixed layout */
.project-table th {
  font-weight: 800;
  color: #444;
  padding: 10px 10px 10px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 1.4rem !important; 
  line-height: 1.4;
}

/* Forced larger cell fonts */
.project-table td {
  padding: 20px 15px 20px 0;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
  line-height: 1.4;
  font-size: 1.2rem !important; 
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px; /* Uniform spacing between pills */
  align-items: center;
}
/* Strictly defined column widths totaling 100% */
.col-project    { width: 26%; }
.col-themes     { width: 16%; }
.col-consortium { width: 22%; }
.col-manager    { width: 14%; }
.col-period     { width: 12%; }
.col-funding    { width: 10%; }

/* Forced larger link fonts */
.project-link {
  font-size: 1.4rem !important; 
  font-weight: 800;
  color: #111 !important; /* Dark black */
  text-decoration: underline !important; /* Adds the underline */
  display: block;
  margin-bottom: 5px;
  line-height: 1.3;
  transition: color 0.2s ease-in-out; /* Makes the color change smooth */
}

.project-link:hover {
  color: #777 !important; /* Light grey */
  text-decoration: underline !important; 
}

/* Forced larger description fonts */
.project-desc {
  font-size: 1.1rem !important; 
  color: #555;
  line-height: 1.4;
  margin: 0;
}

.tooltip-trigger {
  cursor: default;
}

.more-text {
  color: #0055aa;
  font-weight: bold;
  border-bottom: 1px dotted #0055aa;
}

.consortium-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 300px;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  color: #222;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 1.2rem !important;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 9999;
}

/* Mobile behavior: Drop the fixed layout, drop the 150% width, and force the scrollbar */
@media (max-width: 768px) {
  .project-widget-container {
    width: 100% !important;
    margin-left: 0 !important;
  }
  .project-table {
    table-layout: auto; 
    min-width: 850px; 
  }
.pub-filter-pill { 
    font-size: 13px; 
    padding: 5px 12px; 
  }
}