/* FolioPool 2.3.10: balanced resource spacing and content-driven opportunity cards. */

/* Featured job cards: equal height, no forced word breaks, stable metadata rows. */
.list-post-feature .inner-feature-post {
  align-items: stretch;
}
.list-post-feature .inner-feature-post > .feature-box,
.list-post-feature .inner-feature-post > .feature-box > .item-career {
  min-width: 0;
  height: 100%;
}
.list-post-feature .inner-feature-post .item-career {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.list-post-feature .inner-feature-post .item-career .thumb {
  flex: 0 0 auto;
}
.list-post-feature .inner-feature-post .item-career .info-career {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.list-post-feature .inner-feature-post .item-career .thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto !important;
  object-fit: cover;
}
.list-post-feature .inner-feature-post .item-career h3 {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  min-height: 42px;
  height: auto !important;
  line-height: 21px;
  overflow: hidden;
}
.list-post-feature .inner-feature-post .item-career h3 > a {
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.list-post-feature .inner-feature-post .item-career h3 .label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  margin-top: 1px;
  line-height: 1;
}
.list-post-feature .inner-feature-post .item-career > p {
  min-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-post-feature .inner-feature-post .item-career .meta-career {
  width: 100%;
  margin-top: auto;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start !important;
  gap: 8px;
}
.list-post-feature .inner-feature-post .item-career .meta-career .meta-item {
  min-width: 0;
  align-items: flex-start !important;
}
.list-post-feature .inner-feature-post .item-career .meta-career .meta-item .icon {
  flex: 0 0 auto;
  top: 1px !important;
}
.list-post-feature .inner-feature-post .item-career .meta-career .meta-item .text {
  min-width: 0;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 18px !important;
}

/* Single job action buttons: icons and labels share the same vertical center. */
.meta-single-list .meta-right {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.meta-single-list .meta-right > *,
.meta-single-list .meta-right > .item-meta,
.meta-single-list .meta-right > .item-copy,
.meta-single-list .meta-right > .apply-now-btn {
  box-sizing: border-box;
  min-height: 48px;
  margin: 0;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.meta-single-list .meta-right > .item-meta,
.meta-single-list .meta-right > .item-copy {
  padding: 0 16px !important;
}
.meta-single-list .save-job-btn,
.meta-single-list .item-copy .text {
  height: 100%;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  gap: 6px;
  padding: 0 !important;
  line-height: 1.2 !important;
  white-space: nowrap;
}
.meta-single-list .save-job-btn .icon-heart,
.meta-single-list .item-copy .icon-link,
.meta-single-list .apply-now-btn .icon {
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.meta-single-list .save-job-btn svg,
.meta-single-list .item-copy svg,
.meta-single-list .apply-now-btn svg {
  display: block;
}

/* Application footer is a local action row, never the global site footer. */
.fp-apply-form__footer {
  box-sizing: border-box;
  width: 100%;
  background: #fff !important;
  color: inherit !important;
  padding: 18px 0 0 !important;
}
.fp-apply-form__footer .fp-apply-button {
  width: auto !important;
  min-width: 116px;
  flex: 0 0 auto;
}
.fp-apply-form__footer .fp-apply-button--primary {
  background: #1947c4 !important;
  color: #fff !important;
}
.fp-apply-form__footer .fp-apply-button--secondary {
  background: #fff !important;
  color: #4b5f80 !important;
}

/* Graphic resources: three spacious cards per desktop row.
 * The title and action controls return to the original image-overlay interaction:
 * hidden at rest, revealed on hover or keyboard focus.
 */
.filedohoa-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px !important;
  row-gap: 24px !important;
  column-gap: 24px !important;
  align-items: start;
  padding: 8px 0 24px;
  column-count: initial !important;
}
.filedohoa-grid .filedohoa-item {
  position: relative;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  margin: 0 !important;
  display: block !important;
  overflow: hidden;
  break-inside: auto !important;
  border: 1px solid #e2e8f3;
  border-radius: 14px;
  background: #eef2f8;
  box-shadow: 0 6px 20px rgba(31, 49, 86, 0.08);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.filedohoa-grid .filedohoa-item:hover,
.filedohoa-grid .filedohoa-item:focus-within {
  transform: translateY(-4px);
  border-color: #c5d4f3;
  box-shadow: 0 16px 34px rgba(31, 49, 86, 0.16);
}
.filedohoa-grid .filedohoa-image-link {
  display: block;
  overflow: hidden;
  border-radius: inherit;
  background: #eef2f8;
}
.filedohoa-grid .filedohoa-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto !important;
  display: block;
  object-fit: cover;
  transition: transform 300ms ease;
}
.filedohoa-grid .filedohoa-item:hover img,
.filedohoa-grid .filedohoa-item:focus-within img {
  transform: scale(1.035);
}
.filedohoa-grid .filedohoa-item-overlay {
  position: absolute !important;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 82px;
  padding: 30px 16px 15px !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between;
  gap: 14px;
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px) !important;
  background: linear-gradient(180deg, rgba(11, 24, 48, 0) 0%, rgba(11, 24, 48, 0.86) 65%, rgba(11, 24, 48, 0.94) 100%) !important;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
}
.filedohoa-grid .filedohoa-item:hover .filedohoa-item-overlay,
.filedohoa-grid .filedohoa-item:focus-within .filedohoa-item-overlay {
  opacity: 1 !important;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) !important;
}
.filedohoa-grid .filedohoa-title-link {
  min-width: 0;
  flex: 1 1 auto;
}
.filedohoa-grid .filedohoa-item-title {
  margin: 0;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.filedohoa-grid .filedohoa-item-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.filedohoa-grid .filedohoa-item a.filedohoa-download-icon,
.filedohoa-grid .filedohoa-item a.filedohoa-copy-link {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #1947c4;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
}
.filedohoa-grid .filedohoa-item a.filedohoa-download-icon:hover,
.filedohoa-grid .filedohoa-item a.filedohoa-copy-link:hover,
.filedohoa-grid .filedohoa-item a.filedohoa-download-icon:focus-visible,
.filedohoa-grid .filedohoa-item a.filedohoa-copy-link:focus-visible {
  border-color: #fff;
  background: #1947c4;
  color: #fff;
  outline: none;
}

/* Freelancer opportunity cards: remove the legacy fixed 340px height.
 * The grid row follows the tallest real content in that row, while each card
 * keeps a compact, predictable space before its deadline/action area.
 */
#career.archive-freelancer .list-post-feature .inner-feature-post {
  align-items: stretch;
  gap: 22px !important;
}
#career.archive-freelancer .list-post-feature .inner-feature-post > .item-freelance {
  box-sizing: border-box;
  height: auto !important;
  min-height: 0 !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column;
  flex-wrap: nowrap !important;
  align-content: normal !important;
  justify-content: flex-start;
  gap: 18px;
}
#career.archive-freelancer .item-freelance .it-fr-top {
  width: 100%;
  flex: 1 1 auto;
}
#career.archive-freelancer .item-freelance .info-customer {
  margin-bottom: 14px;
}
#career.archive-freelancer .item-freelance .info-job h3,
#career.archive-freelancer .item-freelance .info-job h4,
#career.archive-freelancer .item-freelance .info-job h5,
#career.archive-freelancer .item-freelance .info-job h6 {
  min-height: 0;
  height: auto;
  margin: 0 0 7px;
  line-height: 1.32;
}
#career.archive-freelancer .item-freelance .it-fr-bot {
  width: 100%;
  flex: 0 0 auto;
  margin-top: 0;
}
#career.archive-freelancer .item-freelance .it-fr-bot > div {
  display: grid;
  gap: 10px;
}
#career.archive-freelancer .item-freelance .deadline {
  margin: 0;
}
#career.archive-freelancer .item-freelance .it-fr-bot a {
  box-sizing: border-box;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
}

/* Reusable, content-type-scoped autocomplete. */

.fp-project-search-autocomplete {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 10px;
}
.fp-project-search-autocomplete .search-input {
  width: 100%;
  margin-left: 0 !important;
}
[data-fp-autocomplete-root] {
  position: relative;
}
.fp-search-suggestions[hidden] {
  display: none !important;
}
.fp-search-suggestions {
  position: absolute;
  z-index: 10050;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: 390px;
  overflow: auto;
  padding: 7px;
  border: 1px solid #dbe3f1;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(18, 39, 82, 0.18);
}
.fp-search-suggestion {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  padding: 8px;
  border-radius: 9px;
  color: #243b66;
  text-decoration: none;
}
.fp-search-suggestion:hover,
.fp-search-suggestion:focus-visible,
.fp-search-suggestion.is-active {
  background: #edf3ff;
  color: #1947c4;
  outline: none;
}
.fp-search-suggestion img {
  width: 52px;
  height: 42px;
  display: block;
  object-fit: cover;
  border-radius: 7px;
  background: #eef2f8;
}
.fp-search-suggestion__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.fp-search-suggestion__copy strong,
.fp-search-suggestion__copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.fp-search-suggestion__copy strong {
  color: inherit;
  font-size: 14px;
  font-weight: 700;
}
.fp-search-suggestion__copy small {
  color: #76839c;
  font-size: 12px;
}
.fp-search-suggestion__arrow {
  color: #8da0c5;
  font-size: 25px;
  line-height: 1;
}
.fp-search-suggestion__message {
  padding: 14px 12px;
  color: #71809a;
  font-size: 13px;
  text-align: center;
}
.fp-search-suggestion__message.is-error {
  color: #b42318;
}

@media (max-width: 1199px) {
  #career.archive-freelancer .list-post-feature .inner-feature-post { gap: 18px !important; }
  .filedohoa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px !important; row-gap: 20px !important; column-gap: 20px !important; }
}
@media (max-width: 991px) {
  .meta-single-list .meta-right { flex-wrap: wrap; }
}
@media (max-width: 767px) {
  #career.archive-freelancer .list-post-feature .inner-feature-post > .item-freelance {
    margin-bottom: 16px;
    gap: 15px;
  }
  .list-post-feature .inner-feature-post .item-career .meta-career {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .filedohoa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px !important; row-gap: 16px !important; column-gap: 16px !important; }
  .fp-apply-form__footer {
    margin-left: -18px;
    margin-right: -18px;
    margin-bottom: -26px;
    width: calc(100% + 36px);
    padding: 13px 18px calc(13px + env(safe-area-inset-bottom)) !important;
  }
}
@media (hover: none), (pointer: coarse) {
  .filedohoa-grid .filedohoa-item-overlay {
    opacity: 1 !important;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) !important;
  }
}

@media (max-width: 480px) {
  .list-post-feature .inner-feature-post .item-career .meta-career {
    grid-template-columns: 1fr;
  }
  .filedohoa-grid { grid-template-columns: 1fr; }
  .meta-single-list .meta-right { width: 100%; }
  .meta-single-list .meta-right > .apply-now-btn { width: 100%; }
  .meta-single-list .meta-right > .item-meta,
  .meta-single-list .meta-right > .item-copy { flex: 1 1 0; }
  .fp-apply-form__footer { display: grid; grid-template-columns: 1fr 1fr; }
  .fp-apply-form__footer .fp-apply-button { width: 100% !important; min-width: 0; }
}

/* FolioPool 2.3.13: make the single-resource preview use the exact same width logic as one archive card in the 3-column grid. */
@media (min-width: 1200px) {
  .single-file-content .single-file-layout {
    display: flex !important;
    gap: 48px !important;
    align-items: flex-start !important;
    width: 100%;
  }

  .single-file-content .single-file-image-section {
    flex: 0 0 calc((100% - 48px) / 3) !important;
    width: calc((100% - 48px) / 3) !important;
    max-width: calc((100% - 48px) / 3) !important;
    min-width: calc((100% - 48px) / 3) !important;
  }

  .single-file-content .single-file-image-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .single-file-content .single-file-info-section {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .single-file-content .single-file-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 24px !important;
  }

  .single-file-content .single-file-image-section,
  .single-file-content .single-file-info-section {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
  }
}


/* FolioPool 2.3.14: single resource detail should align to the same left edge as the home icon and breadcrumb, and use the full content width. */
.single-file-content {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

@media (min-width: 1200px) {
  .single-file-content .single-file-layout {
    display: flex !important;
    gap: 48px !important;
    align-items: flex-start !important;
    width: 100%;
  }

  .single-file-content .single-file-image-section {
    flex: 0 0 calc((100% - 48px) / 3) !important;
    width: calc((100% - 48px) / 3) !important;
    max-width: calc((100% - 48px) / 3) !important;
    min-width: calc((100% - 48px) / 3) !important;
    margin-left: 0 !important;
  }

  .single-file-content .single-file-info-section {
    flex: 1 1 0 !important;
    min-width: 0;
  }
}


/* FolioPool 2.3.15: equal control heights and balanced single-resource actions. */
.filedohoa-controls {
  --fp-file-control-height: 54px;
  align-items: stretch !important;
}

.filedohoa-controls .filedohoa-home-link,
.filedohoa-controls .filedohoa-search-form input[type="search"],
.filedohoa-controls .filedohoa-sort-form select {
  box-sizing: border-box !important;
  height: var(--fp-file-control-height) !important;
  min-height: var(--fp-file-control-height) !important;
}

.filedohoa-controls .filedohoa-home-link {
  width: var(--fp-file-control-height) !important;
  border-radius: 50% !important;
}

.filedohoa-controls .filedohoa-search-form input[type="search"] {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: var(--fp-file-control-height) !important;
}

.filedohoa-controls .filedohoa-search-form button {
  top: 5px !important;
  bottom: 5px !important;
  min-height: calc(var(--fp-file-control-height) - 10px) !important;
}

.filedohoa-controls .filedohoa-sort-form {
  display: flex !important;
  align-items: stretch !important;
  flex: 0 0 auto;
}

.filedohoa-controls .filedohoa-sort-form select {
  display: block !important;
  padding: 0 46px 0 22px !important;
  line-height: calc(var(--fp-file-control-height) - 2px) !important;
  border-radius: calc(var(--fp-file-control-height) / 2) !important;
  min-width: 158px !important;
  background-position: right 18px center !important;
}

.single-file-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.single-file-actions .single-file-copy-link {
  flex: 0 0 auto;
  margin: 0 !important;
}

.single-file-actions .copy-link-button,
.single-file-actions .single-file-download-button {
  box-sizing: border-box !important;
  height: 52px !important;
  min-height: 52px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.single-file-actions .copy-link-button {
  width: auto !important;
  min-width: 152px;
  padding: 0 18px !important;
  font-size: 14px !important;
}

.single-file-actions .single-file-download-button {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  padding: 0 28px !important;
  font-size: 16px !important;
}

.single-file-actions .copy-link-button i,
.single-file-actions .single-file-download-button i {
  flex: 0 0 auto;
  margin: 0 !important;
  font-size: 15px;
  line-height: 1;
}

@media (max-width: 767px) {
  .filedohoa-controls {
    --fp-file-control-height: 42px;
  }

  .filedohoa-controls .filedohoa-sort-form select {
    min-width: 0 !important;
  }

  .single-file-actions {
    gap: 8px;
  }

  .single-file-actions .copy-link-button,
  .single-file-actions .single-file-download-button {
    height: 48px !important;
    min-height: 48px !important;
  }

  .single-file-actions .copy-link-button {
    min-width: 0;
    flex: 0 1 42%;
    padding: 0 12px !important;
  }

  .single-file-actions .single-file-download-button {
    flex: 1 1 58%;
    padding: 0 14px !important;
  }
}
