/*--------------------------------------------------------------
# ARCHIVE

For blog page and archives pages like category, author etc..
ONLY for post type = post
ADD your own stylesheet for custom post type archive
OR, if it uses sames styles, add it to enqueue style function in functions.php

--------------------------------------------------------------*/

.site-content {
  background: url('../img/bg_references.svg') top right no-repeat;
}

.rank-math-breadcrumb {
  margin: 35px 0 45px;
  text-align: left;
}

.archive-title {
  margin: 32px 0 15px;
  text-align: left;
  color: rgb(var(--main-rgb));
}

.filters-container .filters {
  border: 1px solid var(--Gris, #E9E9E9);
  border-radius: 60px;
  padding: 10px;
  display: flex;
  width: fit-content;
  gap: 12px;
}

.filter {
  padding: 5px 10px;
  border-radius: 50px;
  background-color: rgb(var(--grey-bg-rbg));
    border: 1px solid #ADC7C8;
  color: #000;
  font-size: 14px;
  font-weight: 300;
  line-height: 25px;
  white-space: nowrap;
  text-decoration: none;
}

.filter.active {
  background-color: rgb(var(--main-rgb));
  color: rgb(var(--white-rgb));
}

.filters-container {
	width: 1440px;
	max-width: 100%;
	margin: 0 auto 42px;
}

.site-main {
  position: relative;
  min-height: 200px;
}

.loader {
  position: absolute;
  top: 20px;
  left: calc(50% - 50px);
  width: 100px;
  height: 100px;
  opacity: 0;
  transition: opacity ease-in-out 0.3s;
}

.loader.visible {
  opacity: 1;
}

.loader:before,
.loader:after {
  content: '';
  border-radius: 50%;
  position: absolute;
  inset: 0;
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.3) inset;
}

.loader:after {
  box-shadow: 0 2px 0 rgb(var(--secondary-rgb)) inset;
  animation: rotate 2s linear infinite;
}

/* POST LIST */
.post-list {
  display: grid;
  padding:  0 0 42px;
  gap: 32px;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
}

.post-list article {
  position: relative;
  display: flex;
  flex-direction: column;
}

.post-list .entry-thumbnail {
  position: relative;
}

.post-list .entry-thumbnail::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: var(--wp--preset--color--tertiary-color);
  opacity: 0.4;
  z-index: 2;
  transition: width 0.4s;
}

.post-list article:hover .entry-thumbnail::before {
  width: 100%;
}

.entry-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.readmore {
  margin-top: auto;
}

.post-list .wp-post-image {
  display: block;
  aspect-ratio: 171 / 132;
  object-fit: cover;
  width: 100%;
  border-left: 4px solid var(--wp--preset--color--tertiary-color);
}

.site-content .entry-title {
  font-size: 16px;
  color: rgb(var(--main-rgb));
  font-weight: 400;
  line-height: 133.33%;
}

.entry-header {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.entry-header .term {
  display: inline-block;
  margin-left: auto;
  padding: 1px 10px;
  border-radius: 60px;
  background-color: #E9E9E9;
  font-size: 14px;
  line-height: 20px;
  color: rgb(var(--text-rgb));
}

.entry-content > p {
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@keyframes rotate {
  0% {  transform: rotate(0)}
  100% { transform: rotate(360deg)}
}

.custom-pagination {
  margin: 25px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  grid-column: span 2;
}

.custom-pagination span {
  cursor: pointer;
  padding: 0 4px;
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  color: rgb(var(--dark-rgb));
}

.custom-pagination span.disabled {
  opacity: 0.5;
  cursor: normal;
}

.custom-pagination .current {
  font-weight: 700;
  border-bottom: 1px solid rgb(var(--dark-rgb));
}

.page-numbers svg {
  pointer-events: none;
}

@media (min-width: 768px) {
  .site-content {
    background: url('../img/bg_references_desktop.svg') top right -143px no-repeat;
  }
  .filters-container .filter {
    padding: 6px 20px;
    font-size: 16px;
    font-weight: 300;
    line-height: 26px;
  }
  .post-list {
    padding-bottom: 168px;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 60px;
  }
  .post-list article {
    display: flex;
    flex-direction: column;
  }
  .site-content .entry-title {
    font-size: 26px;
  }
  .entry-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  .readmore {
    margin-top: auto;
  }
  .post-list .wp-post-image {
    aspect-ratio: 458 / 309;
  }
  .custom-pagination {
    grid-column: span 3;
    justify-content: flex-end;
  }
}

@media (max-width: 767px) {
  .entry-header .term {
    position: absolute;
    top: 8px;
    right: 8px;
  }
  .filters-container {
    padding: 0 16px;
    overflow-x: scroll;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overflow: -moz-scrollbars-none;
    -ms-overflow-style: none;
  }
  .filters-container::-webkit-scrollbar {
      display: none;
  }
  .filters-container .filters {
    max-width: 9000px;
  }
  .filters-container .filters > * {
    padding: 5px 15px;
  }
  .filters-container .filter {
    font-size: 14px;
  }
  .entry-content > p {
    font-size: 14px;
  }
}
