/* Simple three-column responsive layout */
body {
  font-family: 'Roboto Condensed', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f7f7f7;
}

:root {
  --icon-size: .9rem;
}

#main_container {
  display: flex;
  min-height: calc(100vh - 105px);
  flex-wrap: nowrap;
  /* keep all three columns on one row */
  align-items: stretch;
}

.column {
  background: #fff;
  padding: 20px;
  overflow-y: auto;
  border-right: 1px solid #eee;
  flex: 0 0 auto;
  /* fixed basis managed by inline width during resize */
}

#sections {
  width: 20%;
  min-width: 190px;
  white-space: nowrap;
}

#titles {
  width: 40%;
  /*
  border-right: 1px solid #eee;
  */
  padding-right: 0;
}

#details {
  width: 40%;
}

.section-item {
  cursor: pointer;
  padding: 8px 0;
  color: #823794;
  border-bottom: 1px solid #f0f0f0;
}

.section-item.selected {
  font-weight: bold;
  background: #e6f7ff;
}

.title-item {
  cursor: pointer;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.title-label {
  font-size: 1.2em;
}

.title-overline {
  font-size: var(--icon-size);
  color: #CCC;
  text-transform: uppercase;
}

/* Filter bar at top of titles column */
#global-filter-bar {
  position: sticky;
  top: 56px;
  z-index: 1050;
  background: #fff;
}

.filter-inline {
  position: sticky;
  top: 0;
  z-index: 2;
}

.filter-inline .d-flex {
  gap: 8px;
}

.filter-inline .d-flex>div {
  max-height: 160px;
  overflow: auto;
}


.filterbar {
  #filterCount {
    position: absolute;
    width: 100%;
    text-align: center;
    pointer-events: none;
  }

  #filterClear {
    --bs-btn-padding-y: 0.1rem;
    --bs-btn-padding-x: 1rem;
  }

  .taxo-name {
    flex: 0 0 140px;
    text-align: right;
    margin-right: 20px;
  }

  .form-control {
    width: unset;
    flex: 1;
  }
}



/* Ensure titles list scrolls underneath sticky filter and remains visible */
#titles {
  position: relative;
}

#titlesList {
  max-height: 100%;
  overflow-y: auto;
  padding: 10px;
  mask-image: linear-gradient(to bottom, black calc(100% - 30px), transparent 100%);
}

/* Section count badge in left column */
.section-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-item .count {
  color: #999;
  font-size: 0.9em;
  margin-left: 8px;
}

/* Checkbox containers */

#filterPracticeCheckboxes {
  column-count: 4;

  .form-check-input {
    margin-top: -1px;
  }
}

#filterPracticeCheckboxes label,
#filterIssueCheckboxes label {
  font-size: 0.85em;
  margin-bottom: 2px;
  width: 200px;
  min-height: unset;
}

#filterPracticeContainer,
#filterIssueContainer {
  gap: 6px;
}

span.form-check-label {
  line-height: 1;
  display: flex;
  justify-content: space-between;
}

/* Counts next to taxonomy checkboxes */
.result-count {
  color: #6c757d;
  /* muted */
  font-size: 0.85em;
  margin-left: 6px;
}

.result-count-zero {
  color: #c0c0c0;
  /* lighter for zero */
}

/* Featured image at top of details */
.featured-image {
  margin-bottom: 12px;
  text-align: center;
}

.featured-image img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.title-item.selected {
  background: #f0f8ff;
}

.tag {
  display: inline-block;
  background: #e0e0e0;
  color: #333;
  border-radius: 12px;
  padding: 2px 10px;
  margin: 0 4px 0 0;
  font-size: 0.85em;
}

.tag,
.section-item,
.title-item .title-label,
.title-overline,
.key-label {
  font-family: 'Roboto Condensed', Arial, sans-serif;
}

/* Values use Merriweather for better legibility */
.key-value-table td.value,
.title-item,
.details-value {
  font-family: 'Merriweather', serif;
  color: #222;
}

.kv-url-link {
  .details-value {
    word-break: break-all;
  }
}

/* Div-based details layout */
.details-list {
  display: flex;
  flex-direction: column;
  padding-bottom: 2em;
  position: sticky;
  top: 10px;
}

.kv-pair {
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}

.kv-pair .key-label {
  color: #CCC;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.kv-pair .value {
  color: #222;
}

.kv-top-tags {
  border-bottom: 0;
}

.kv-resource-name {
  .value {
    font-size: 1.2em;
  }
}



.kv-location .value {
  white-space: break-spaces;
}

.short-description-wrapper {
  margin: 1em 0;
  /*border-bottom: 2px solid #31BBA722; */
  padding-bottom: 1em;

  /* padding-bottom: 1em;
  border-bottom: 1px solid #DDD;
  margin-bottom: 0.5em; */
}

.fld-short-description {
  white-space: break-spaces;
  font-family: 'Merriweather', serif;

}

.thumbnail-image {
  max-width: 400px;
  margin: 20px auto;

  img {
    max-width: 100%;
    border: 1px solid #DDD;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  }
}

.visit-button-wrapper {
  text-align: center;
}

.button-about,
.button-submit {
  cursor: pointer;
}

.pano-button {
  color: #fff;
  display: inline-block;
  padding: 8px 45px;
  color: #fff;
  transition: all 0.5s ease;
  border-radius: 40px;
  font-family: mr-eaves-modern, sans-serif;
  font-weight: 700;
  font-style: normal;
  text-decoration: none;
  font-size: 22px;
  position: relative;
  z-index: 80;
  text-transform: lowercase;

  &:hover {
    background-color: #fff;
    color: #31BBA7;
  }
}

.visit-button {
  background-color: #31BBA7;
  border: 2px solid #31BBA7;

}

.tag-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.field-tag {
  background: #31BBA722;
  color: #31BBA7;
  border-radius: 2px;
  padding: 2px 6px;
  font-size: 0.8em;
}

.key-value-table {
  width: 100%;
  border-collapse: collapse;
}

.key-value-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
}

@media (max-width: 900px) {
  #container {
    flex-direction: column;
  }

  #sections,
  #titles,
  #details {
    width: 100%;
    min-width: 0;
  }

  .column {
    border-right: none;
    border-bottom: 1px solid #eee;
  }
}

/* Resizer handles between columns */
.resizer {
  width: 8px;
  /*
  cursor: col-resize;
*/
  background: transparent;
  position: relative;
  flex: 0 0 8px;
}

.resizer::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: rgba(0, 0, 0, 0.06);
}

@media (max-width: 900px) {
  .resizer {
    display: none;
  }
}

/* icons */

/* Minimal modal styles for pano-modal (used by site.js) */
.pano-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.pano-modal.visible {
  pointer-events: auto;
}

.pano-modal-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(41, 143, 194, .4);
  backdrop-filter: contrast(0.3) grayscale(1) brightness(0.8);
  transition: opacity 500ms cubic-bezier(.2, .8, .2, 1);
}

.pano-modal.visible .pano-modal-backdrop {
  opacity: 1;
}

.pano-modal-container {
  position: relative;
  background: #fff;
  border-radius: 8px;
  max-width: 900px;
  width: calc(100% - 40px);
  max-height: calc(100vh - 80px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  z-index: 2;
  overflow: auto;
  transform: translateY(60px);
  transition: transform 500ms cubic-bezier(.2, .8, .2, 1), opacity 500ms cubic-bezier(.2, .8, .2, 1);
  opacity: 0;
}

.pano-modal.visible .pano-modal-container {
  transform: translateY(0);
  opacity: 1;
}

.pano-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  background: #298FC2;
  color: white;
}

.pano-modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.pano-modal-close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
}

.pano-modal-body {
  padding: 16px;
  color: #222;
  min-height: 60vh;
  h1 {
    font-weight: 300;
    span {
      font-weight: 600;
      color: #31BBA7;
    }
  }
}

/* style the name itself */
span.panonav {
    color: #31BBA7;
    font-weight: 600;
}


/* Prevent page scroll while modal open */
.pano-modal-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .pano-modal-container {
    width: calc(100% - 20px);
    border-radius: 6px;
  }
}

.has-icon:before {
  font-size: var(--icon-size);
  width: var(--icon-size);
  height: var(--icon-size);
  display: block;
  margin-right: .3rem;
  float: left;
  font-family: "Font Awesome 7 Free";
  font-weight: 600;
  color: #298FC2;
  opacity: .6;
}

/* https://icon-sets.iconify.design/streamline-plump-color/ */

.icon-articleblog {
  --icon: url("https://api.iconify.design/streamline-plump-color/news-paper-flat.svg");
}

.icon-event:before {
  content: "\f133";
  font-weight: 400;
}

.icon-news\&updates:before {
  content: "\f09e";
}


.icon-:before {
  background-color: #CCC;
  border-radius: 50%;
}

.icon-fundingopportunities:before {
  content: "\f688";

}

.icon-onlinetrainingcourse:before {
  content: "\f19d";
}

.icon-reporttoolkitguide:before {
  content: "\f552";
}

.icon-videowebinar:before {
  content: "\f03d";
}

.chip--org {
  --icon: url("https://api.iconify.design/streamline-ultimate-color/hierarchy-4.svg");
}

.chip--template {
  --icon: url("https://api.iconify.design/streamline-ultimate-color/ui-webpage-template.svg");
}

.chip--audio {
  --icon: url("https://api.iconify.design/streamline-plump-color/user-podcast-flat.svg");
}




.icon-featured {
  --icon: url("https://api.iconify.design/streamline-stickies-color/star.svg");
}

.field-tag.host-owner-organization {
  background: #FAA31B22;
  color: #FAA31B;
}

.field-tag.issue-area {
  background: #298FC222;
  color: #298FC2;
}

.resource-title a {
  text-decoration: none;
  font-size: 1.5em;
  color: #823794;
  line-height: 1.1em;
}




/* featured */
.title-item.is-featured:after {
  content: '★';
  position: absolute;
  top: -10px;
  right: 0;
  color: gold;
  font-size: 70px;
  line-height: 1;
  opacity: .4;
  transform: rotate(14deg);
}

.title-item {
  position: relative;
  overflow: hidden;
}





.logo img {
  height: 40px;
  width: auto;
}

header {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: white;

  &:before {
    content: '';
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    clip-path: polygon(0 0%, 100% 0, 100% 90%, 0 100%);
    opacity: 0.73;
    background-image: linear-gradient(-180deg, #833795 4%, #298FC2 98%);
    z-index: 1;
  }

  .title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    z-index: 2;
    position: relative;

    h1 {
      font-family: mr-eaves-modern, sans-serif;
      font-weight: 700;
      font-size: 70px;
      color: white;
      z-index: 20;
    }
  }

  .header-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;

    .pano-button {
      background-color: #298FC2;
      border-color: #298FC2;
      cursor: pointer;

      &:hover {
        color: #298FC2;
        background-color: #fff;
      }
    }
  }

  .focus-image {
    clip-path: polygon(0 0%, 100% 0, 100% 100%, 0 80%);
    overflow: hidden;
    height: 250px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    img {
      width: 100%;
      margin-top: -40%;
    }
  }

}

.sortOptions {
  text-align: right;
  margin-bottom: 0.5rem;

  button {
    border: 1px solid #CCC;
    border-radius: 999px;
    background-color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    
    &:hover {
      background-color: #f0f0f0;
    }
    
    &.active {
      background-color: #298FC2;
      color: white;
      border-color: #298FC2;
    }
  }
}

#titlesList {
  transition: opacity 0.3s ease, transform 0.3s ease;
}


footer {
  color: white;
  background-color: #298FC2;
  height: 75px;
  display: flex;
  align-items: center;

  img {
    width: 120px;
    margin-left: -8px;
    filter: brightness(50);
  }

  .copy {
    flex: 1
  }

  .container {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  a {
    color: white;
    text-decoration: none;

    &:hover {
      color: #DDD;
      text-decoration: underline;
    }
  }
}