@import url(/css/components/publications/subscribe-aside.css);
@import url(/css/components/publications/subscribe-modal.css);
@import url(/css/components/publications/subscribe-footer.css);
@import url(/css/components/pagination.css);

header {
  background-color: rgb(var(--light-common-mineral));
}

/*******************************
 Research Header
 ******************************/

.research-header {
  background-color: rgb(var(--light-common-mineral));
}

.research-header .inner-wrapper {
  border-block-start-width: var(--border-width);
  border-color: rgb(var(--light-border-bold));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
}

.research-header-title {
  white-space: nowrap;
}

.research-header-breadcrumbs {
  color: rgb(var(--light-text-secondary));
  margin-block: 1rem;
}

.research-header-right {
  position: relative;
  flex-shrink: 0;
}

.research-header-right button {
  position: absolute;
  top: 0;
  right: 0;
}

@media (max-width: 48rem) {
  .research-header-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 42rem) {
  .research-header .inner-wrapper {
    align-items: flex-end;
  }

  .research-header-right-float {
    display: none;
  }

  .research-header-right button {
    position: relative;
  }
}

@media (max-width: 27rem) {
  .research-header .inner-wrapper {
    flex-direction: column;
    align-items: initial;
  }

  .research-header-right button {
    width: 100%;
  }
}

/*******************************
 Research Hero
 ******************************/

.research-hero {
  border-block-start-width: var(--border-width);
  border-color: rgb(var(--light-border-bold));
  background-color: rgb(var(--light-common-mineral));
}

.research-hero .inner-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0;
}

.recently-published-article {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;

  background-color: rgb(var(--mineral-container-primary));
}

.recently-published-article-date {
  display: flex;
  color: rgb(var(--neutral-30));
  gap: 0.5rem;
  align-items: center;
}

.recently-published-article-date .svg {
  width: 1rem;
  height: 1rem;
  display: inline-block;
}

.recently-published-spacer {
  background-color: rgb(var(--mineral-container-primary));
  padding-block: 2rem;
}

@media (max-width: 71rem) {
  .research-hero img {
    display: none;
  }
}

/*******************************
 Research Filters
 ******************************/
 
 .research-filters {
  background-color: rgb(var(--light-common-citrine));
  border-block-end-width: var(--border-width);
  border-color: rgb(var(--light-border-bold));
  overflow: hidden;
  display: flex;
}

.research-filters .inner-wrapper {
  background-color: rgb(var(--light-common-citrine));
  border: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.research-filter {
  flex-shrink: 0;
  user-select: none;
}

.research-filter .svg {
  width: 1.2rem;
  height: 1.2rem;
  display: inline;
}

.research-filter fieldset {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    border: none;
    padding: 1rem;
}

/* Hide the default radio buttons */
.research-filter input[type="radio"] {
    display: none;
}

.research-filter input[type="radio"]:hover + label {
  color: rgb(var(--light-text-link-hover));
}

.research-filter input[type="radio"]:checked + label:hover {
  background-color: transparent;
}

/* Labels styled like buttons */
.research-filter label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s, transform 0.2s;
    color: rgb(var(--light-text-link-default));
}

/* Active state styling */
.research-filter input[type="radio"]:checked + label {
    transform: scale(1.05);
}

.research-filter label::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0%;
    height: 4px;
    background: rgb(var(--light-border-bold));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

/* Animate underline slide-in */
.research-filter input[type="radio"]:checked + label::after {
    width: 80%;
}

/* Glider optional */
.research-filter-glider {
  display:none;
}

/* Responsive: 2-3 buttons per row on mobile */
@media (max-width: 920px) {
    .research-filter fieldset {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .research-filter fieldset {
        grid-template-columns: repeat(1, 1fr);
    }
}

/*******************************
 Research Articles
 ******************************/

.research-articles .inner-wrapper {
  padding-inline: 0;
  display: flex;
}

.research-articles-main {
  border-inline-end-width: var(--border-width);
  border-color: rgb(var(--light-border-bold));
  padding-block-end: 6rem;
}

.research-articles-main .research-articles-media-contact {
  display: none;
}

.research-article {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;

  border-block-end-width: var(--border-width);
  border-color: rgb(var(--light-border-bold));
}

.research-article-date {
  display: flex;
  color: rgb(var(--neutral-30));
  gap: 0.5rem;
  align-items: center;
}

.research-article-date .svg {
  width: 1rem;
  height: 1rem;
  display: inline-block;
}

.research-articles-aside {
  margin: 0 2rem 2rem;
  min-width: 20rem;
}

.research-articles-media-contact {
  padding-block: 2rem;
}

.research-articles-media-contact--title {
  margin-block-end: 1rem;
}

.research-articles-media-contact--name {
  font-weight: 600;
}

.research-articles-media-contact--info {
  margin-block: 0.4rem;
  color: rgb(var(--light-text-secondary));
}

.research-articles-media-contact--links {
  display: flex;
  gap: 0.5rem;
}

.research-articles-media-contact--links .svg {
  width: 1.5rem;
  height: 1.5rem;
}

.research-articles-subscribe {
  display: flex;
  flex-direction: column;
  background-color: rgb(var(--mineral-container-primary));
  padding: 1rem;
  white-space: nowrap;
  gap: 0.5rem;
}

.research-articles-subscribe--title {
  margin-block: 1rem;
}

.research-articles-subscribe--input {
  border-width: var(--border-width);
  border-color: rgb(var(--light-border-bold));
  width: 100%;
  background-color: transparent;
  padding: 0.75rem;
}

.research-articles-popular {
  margin-block: 2rem;
}

.research-articles-popular--title {
  margin-block: 1rem;
}

.research-articles-popular--products {
  border-width: var(--border-width);
  border-color: rgb(var(--light-border-bold));
}

@media (max-width: 69rem) {
  .research-articles-main {
    border: none;
    padding-block-end: 0;
  }

  .research-articles-aside {
    display: none;
  }

  .research-articles-main .research-articles-media-contact {
    display: block;
    padding-inline: 2rem;
    border-block-end-width: var(--border-width);
    border-color: rgb(var(--light-border-bold));
  }

  .research-article:last-of-type {
    border: none;
  }
}
