/* download filters: sand panel, one row per filter (category, file type + search), same chip style on both rows */
.download_filter {
  padding-top: 5.6rem;
  background-color: #fff;
}
.download_filter .panel {
  padding: 0.8rem 3.2rem;
  border-radius: 2rem;
  background-color: var(--light);
}
.download_filter .row {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  min-height: 8.8rem;
  padding: 2rem 0px;
}
.download_filter .row + .row {
  border-top: 1px solid var(--line2);
}
.download_filter .label {
  flex-shrink: 0;
  width: 12rem;
  color: var(--title);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.download_filter .chips {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
  gap: 0.8rem;
}
.download_filter .chips label {
  display: block;
  cursor: pointer;
}
.download_filter .chips input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.download_filter .chips span {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  height: 4.4rem;
  padding: 0px 1.4rem 0px 1.8rem;
  color: var(--title);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid var(--line2);
  border-radius: 2.2rem;
  background-color: #fff;
  transition: 0.3s;
}
.download_filter .chips b {
  font-family: var(--font_title);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.download_filter .chips em {
  min-width: 2.4rem;
  height: 2.2rem;
  padding: 0px 0.7rem;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 2.2rem;
  text-align: center;
  border-radius: 1.1rem;
  background-color: var(--light2);
  transition: 0.3s;
}
.download_filter .chips label:hover span {
  border-color: var(--title);
}
.download_filter .chips input:checked + span {
  color: #fff;
  border-color: var(--dark);
  background-color: var(--dark);
}
.download_filter .chips input:checked + span em {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.16);
}
.download_filter .chips input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.download_filter .search {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
  width: 42rem;
  height: 4.8rem;
  padding: 0.4rem 0.4rem 0.4rem 1.8rem;
  border: 1px solid var(--line2);
  border-radius: 2.4rem;
  background-color: #fff;
  transition: border-color 0.3s;
}
.download_filter .search:focus-within {
  border-color: var(--title);
}
.download_filter .search input {
  flex: 1;
  min-width: 0px;
  height: 100%;
  font-size: 1.5rem;
}
.download_filter .search button {
  flex-shrink: 0;
  height: 4rem;
  padding: 0 1.6rem;
  border: 0;
  border-radius: 2rem;
  background-color: var(--primary);
  color: #fff;
  font-family: var(--font_title);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.3s;
}
.download_filter .search button:hover {
  background-color: var(--primary_dark);
}
.download_filter .search input::placeholder {
  color: #a0a3a8;
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
  .download_filter .row {
    flex-wrap: wrap;
  }
  .download_filter .label {
    width: 100%;
  }
  .download_filter .search {
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .download_filter {
    padding-top: 28px;
  }
  .download_filter .panel {
    padding: 4px 16px;
    border-radius: 14px;
  }
  .download_filter .content,
  .download_filter .panel,
  .download_filter .row,
  .download_filter .search {
    min-width: 0;
    max-width: 100%;
  }
  .download_filter .panel {
    overflow: hidden;
  }
  .download_filter .row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    min-height: 0px;
    padding: 16px 0px;
  }
  .download_filter .label {
    width: auto;
    font-size: 12px;
    line-height: 16px;
  }
  /* chips scroll sideways in their own strip */
  .download_filter .chips {
    flex-wrap: nowrap;
    align-self: stretch;
    width: calc(100% + 32px);
    min-width: 0;
    max-width: calc(100% + 32px);
    gap: 8px;
    margin: 0px -16px;
    padding: 0px 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .download_filter .chips::-webkit-scrollbar {
    display: none;
  }
  .download_filter .chips span {
    gap: 8px;
    height: 40px;
    padding: 0px 12px 0px 16px;
    font-size: 14px;
    border-radius: 20px;
  }
  .download_filter .chips em {
    min-width: 22px;
    height: 20px;
    padding: 0px 6px;
    font-size: 11px;
    line-height: 20px;
    border-radius: 10px;
  }
  .download_filter .search {
    width: 100%;
    height: 46px;
    gap: 8px;
    padding: 4px 4px 4px 16px;
    border-radius: 23px;
  }
  .download_filter .search input {
    min-width: 0;
    font-size: 15px;
  }
  .download_filter .search button {
    height: 38px;
    padding: 0 14px;
    border-radius: 19px;
    font-size: 14px;
  }
}

/* download list: result bar (count, sort, grid / list view), document cards, pagination, help line */
.download_list {
  padding-top: 5.2rem;
  padding-bottom: 8rem;
  background-color: #fff;
}

/* #region result bar */
.download_list .bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--line);
}
.download_list .found {
  display: flex;
  align-items: baseline;
  gap: 1.6rem;
}
.download_list .found h2 {
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 3rem;
}
.download_list .found p {
  color: var(--text2);
  font-size: 1.4rem;
  line-height: 2rem;
}
.download_list .tools {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.download_list .sort {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.download_list .sort span {
  color: var(--text);
  font-size: 1.4rem;
  line-height: 2rem;
  white-space: nowrap;
}
.download_list .sort select {
  height: 4.2rem;
  padding: 0px 4.7rem 0px 1.6rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 1.5rem;
  border-radius: 2.1rem;
  border: 1px solid var(--line);
  background: #fff url(../img/download-chevron.svg) no-repeat right 1.6rem center / 1.6rem;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.3s;
}
.download_list .sort select:hover,
.download_list .sort select:focus {
  border-color: var(--title);
}
.download_list .view {
  display: flex;
  gap: 0.6rem;
}
.download_list .view button {
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff url(../img/download-grid.svg) no-repeat center / 1.8rem;
  transition: 0.3s;
}
.download_list .view button.list {
  background-image: url(../img/download-list.svg);
}
.download_list .view button:hover {
  border-color: var(--title);
}
.download_list .view button.active {
  border-color: var(--dark);
  background-color: var(--dark);
  background-image: url(../img/download-grid-white.svg);
}
.download_list .view button.list.active {
  background-image: url(../img/download-list-white.svg);
}
/* #endregion */

/* #region document cards (grid view) */
.download_list .cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.4rem;
  margin-top: 3.2rem;
}
.download_list .cards > li {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 2rem;
  border: 1px solid var(--line);
  background-color: #fff;
  transition: transform 0.35s, box-shadow 0.35s;
}
.download_list .cards > li:hover {
  transform: translateY(-0.6rem);
  box-shadow: 0px 1.6rem 3.6rem rgba(16, 22, 30, 0.12);
}
.download_list .cards > li.hide {
  display: none;
}
.download_list .thumb {
  position: relative;
  display: block;
  flex-shrink: 0;
  height: 30rem;
  background-color: #f3f2ef;
}
.download_list .thumb .img {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}
/* the cover keeps its own ratio (first page of the file), shown like a sheet on the sand tile */
.download_list .thumb .img img {
  width: auto;
  max-width: 76%;
  height: 23.6rem;
  object-fit: contain;
  box-shadow: 0px 0.2rem 0.4rem rgba(22, 24, 27, 0.06), 0px 1rem 2.4rem rgba(22, 24, 27, 0.12);
  transition: transform 0.5s;
}
.download_list .cards > li:hover .thumb .img img {
  transform: translateY(-0.6rem);
}
.download_list .type {
  position: absolute;
  left: 1.6rem;
  top: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 2.8rem;
  padding: 0px 1.1rem 0px 0.9rem;
  color: var(--title);
  font-family: var(--font_title);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: 0.08em;
  border-radius: 1.4rem;
  background-color: #fff;
}
.download_list .type::before {
  content: '';
  width: 1.5rem;
  height: 1.5rem;
  background: url(../img/download-file.svg) no-repeat center / contain;
}
.download_list .txt {
  flex: 1;
  padding: 2.2rem 2.4rem 0px;
}
.download_list .cat {
  display: block;
  color: var(--primary);
  font-family: var(--font_title);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.download_list .txt h3 {
  margin-top: 0.8rem;
  font-weight: 700;
  font-size: 2rem;
  line-height: 2.7rem;
}
.download_list .txt h3 a {
  transition: color 0.3s;
}
.download_list .txt h3 a:hover {
  color: var(--primary);
}
/* short description: list view only (grid cards stay title-first) */
.download_list .txt p {
  display: none;
  margin-top: 0.6rem;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 2.3rem;
}
.download_list .info {
  display: flex;
  flex-wrap: wrap;
  margin: 2rem 2.4rem 0px;
  padding: 1.4rem 0px;
  color: var(--text2);
  font-size: 1.35rem;
  line-height: 2rem;
  border-top: 1px solid var(--line);
}
.download_list .info li + li::before {
  content: '·';
  margin: 0px 0.9rem;
}
.download_list .acts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0px 2.4rem 2.4rem;
}
.download_list .acts.single {
  grid-template-columns: 1fr;
}
.download_list .acts a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  height: 4.8rem;
  padding: 0px 1.6rem;
  font-family: var(--font_title);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  white-space: nowrap;
  border-radius: 2.4rem;
  transition: 0.3s;
}
.download_list .acts a::before {
  content: '';
  flex-shrink: 0;
  width: 1.8rem;
  height: 1.8rem;
  background: no-repeat center / contain;
}
.download_list .btn_view {
  color: var(--title);
  border: 1px solid var(--line2);
}
.download_list .acts .btn_view::before {
  background-image: url(../img/download-view.svg);
}
.download_list .btn_view:hover {
  border-color: var(--title);
}
.download_list .btn_dl {
  color: #fff;
  background-color: var(--primary);
}
.download_list .acts .btn_dl::before {
  background-image: url(../img/download-dl.svg);
}
.download_list .btn_dl:hover {
  background-color: var(--primary_dark);
  box-shadow: 0px 1rem 2.4rem rgba(255, 90, 0, 0.25);
}
/* #endregion */

/* #region list view: one row per file (cover, title + description, details, actions) */
.download_list .cards.list {
  grid-template-columns: 1fr;
  gap: 1.2rem;
}
.download_list .cards.list > li {
  flex-direction: row;
  align-items: center;
  border-radius: 1.6rem;
}
.download_list .cards.list > li:hover {
  transform: none;
  border-color: var(--line2);
  box-shadow: 0px 1rem 2.4rem rgba(16, 22, 30, 0.08);
}
.download_list .cards.list .thumb {
  width: 14rem;
  align-self: stretch;
  height: auto;
  min-height: 15.6rem;
}
.download_list .cards.list .thumb .img img {
  height: 11.4rem;
}
.download_list .cards.list > li:hover .thumb .img img {
  transform: none;
}
.download_list .cards.list .type {
  display: none;
}
.download_list .cards.list .txt {
  padding: 2.4rem 4rem 2.4rem 3.2rem;
}
.download_list .cards.list .txt h3 {
  font-size: 2.2rem;
  line-height: 2.8rem;
}
.download_list .cards.list .txt p {
  display: block;
}
.download_list .cards.list .info {
  flex-direction: column;
  flex-wrap: nowrap;
  flex-shrink: 0;
  width: 18rem;
  margin: 0px;
  padding: 0px 0px 0px 3.2rem;
  border-top: none;
  border-left: 1px solid var(--line);
}
.download_list .cards.list .info li + li::before {
  display: none;
}
.download_list .cards.list .acts {
  flex-shrink: 0;
  width: 32rem;
  padding: 0px 3.2rem;
}
/* #endregion */

/* #region pagination + help line */
.download_list .pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin-top: 5.6rem;
}
.download_list .pager ul {
  display: flex;
  gap: 0.8rem;
}
.download_list .pager a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
  color: var(--title);
  font-family: var(--font_title);
  font-weight: 600;
  font-size: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  transition: 0.3s;
}
.download_list .pager a[href]:hover {
  border-color: var(--title);
}
.download_list .pager a.active {
  color: #fff;
  border-color: var(--dark);
  background-color: var(--dark);
}
.download_list .pager .prev::before,
.download_list .pager .next::before {
  content: '';
  width: 1.2rem;
  height: 1rem;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-.75 -.75 12 10.5' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 4.5h10.5M6 0l4.5 4.5L6 9'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-.75 -.75 12 10.5' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 4.5h10.5M6 0l4.5 4.5L6 9'/%3E%3C/svg%3E") no-repeat center / contain;
}
.download_list .pager .prev::before {
  transform: scaleX(-1);
}
.download_list .pager .disabled {
  color: #c4c0b9;
  border-color: var(--line);
  pointer-events: none;
}
.download_list .help {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 5.6rem;
  padding: 2.4rem 3.2rem;
  border-radius: 2rem;
  border: 1px solid var(--line);
}
.download_list .help i {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 5.2rem;
  height: 5.2rem;
  border-radius: 1.4rem;
  background-color: var(--light2);
}
.download_list .help i img {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
}
.download_list .help p {
  flex: 1;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 2.6rem;
}
.download_list .help p strong {
  margin-right: 0.6rem;
  color: var(--title);
  font-family: var(--font_title);
  font-weight: 700;
  font-size: 1.8rem;
}
.download_list .help .btn_text {
  flex-shrink: 0;
}
/* #endregion */

@media screen and (min-width: 769px) and (max-width: 1024px) {
  .download_list .cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .download_list .cards.list .info {
    display: none;
  }
  .download_list .cards.list .acts {
    width: 28rem;
  }
}

@media screen and (max-width: 768px) {
  .download_list {
    padding-top: 32px;
    padding-bottom: 40px;
  }
  .download_list .bar {
    gap: 12px;
    padding-bottom: 16px;
  }
  .download_list .found {
    flex-direction: column;
    gap: 2px;
  }
  .download_list .found h2 {
    font-size: 20px;
    line-height: 26px;
  }
  .download_list .found p {
    font-size: 13px;
    line-height: 18px;
  }
  .download_list .sort span,
  .download_list .view {
    display: none;
  }
  .download_list .sort select {
    height: 40px;
    padding: 0px 38px 0px 14px;
    font-size: 14px;
    border-radius: 20px;
    background-position: right 14px center;
    background-size: 14px;
  }
  /* mobile: always one row per file (cover left, text right, actions below) */
  .download_list .cards,
  .download_list .cards.list {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
  }
  .download_list .cards > li,
  .download_list .cards.list > li {
    display: grid;
    grid-template-columns: 96px 1fr;
    align-items: start;
    border-radius: 14px;
  }
  .download_list .cards > li:hover {
    transform: none;
    box-shadow: none;
  }
  .download_list .thumb,
  .download_list .cards.list .thumb {
    grid-row: 1 / span 2;
    width: 96px;
    height: 100%;
    min-height: 132px;
  }
  .download_list .thumb .img img,
  .download_list .cards.list .thumb .img img {
    max-width: 72%;
    height: 96px;
  }
  .download_list .type,
  .download_list .cards.list .type {
    display: none;
  }
  .download_list .txt,
  .download_list .cards.list .txt {
    padding: 14px 16px 0px;
  }
  .download_list .cat {
    font-size: 11px;
    line-height: 14px;
  }
  .download_list .txt h3,
  .download_list .cards.list .txt h3 {
    margin-top: 6px;
    font-size: 16px;
    line-height: 21px;
  }
  .download_list .txt p,
  .download_list .cards.list .txt p {
    display: none;
  }
  .download_list .info,
  .download_list .cards.list .info {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    margin: 0px;
    padding: 6px 16px 14px;
    font-size: 12px;
    line-height: 17px;
    border: none;
  }
  .download_list .cards.list .info li + li::before {
    display: inline;
  }
  .download_list .info li + li::before {
    margin: 0px 6px;
  }
  .download_list .info li:last-child {
    display: none;
  }
  .download_list .acts,
  .download_list .cards.list .acts {
    grid-column: 1 / -1;
    width: auto;
    gap: 8px;
    padding: 12px 16px 14px;
    border-top: 1px solid var(--line);
  }
  .download_list .acts a {
    gap: 8px;
    height: 42px;
    padding: 0px 14px;
    font-size: 14px;
    border-radius: 21px;
  }
  .download_list .acts a::before {
    width: 16px;
    height: 16px;
  }
  .download_list .pager {
    gap: 6px;
    margin-top: 32px;
  }
  .download_list .pager ul {
    gap: 6px;
  }
  .download_list .pager a {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  .download_list .pager .prev::before,
  .download_list .pager .next::before {
    width: 12px;
    height: 10px;
  }
  .download_list .help {
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
    padding: 20px;
    border-radius: 14px;
  }
  .download_list .help i {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .download_list .help i img {
    width: 22px;
    height: 22px;
  }
  .download_list .help p {
    flex: 1 1 200px;
    font-size: 14px;
    line-height: 22px;
  }
  .download_list .help p strong {
    display: block;
    margin: 0px 0px 2px;
    font-size: 16px;
  }
}

.download_list.is-loading .cards {
  opacity: 0.45;
  pointer-events: none;
}
