/* Hybrid Human Science - custom styles */

/* ---------- Page width ----------
   The theme pins the header, content and footer to a fixed pixel width.
   This widens all of them together so they stay aligned.
   Tune the 1500px cap to taste.                                      */

@media (min-width: 768px) {
  .pkp_site_name_wrapper,
  .pkp_navigation_primary_wrapper,
  .pkp_structure_content,
  .pkp_structure_footer {
    width: 92% !important;
    max-width: 1500px !important;
  }
}

/* ---------- Site header logo ---------- */

.pkp_site_name .is_img img {
  max-height: 120px !important;
  max-width: 100% !important;
  height: auto;
  width: auto;
}

.pkp_site_name {
  margin-left: -20px;
}

@media (max-width: 992px) {
  .pkp_site_name .is_img img {
    max-height: 70px !important;
  }
  .pkp_site_name {
    margin-left: 10px;
  }
}

/* ---------- Homepage block order ----------
   The theme prints About, then Current Issue, then Additional Content.
   This puts the news (Additional Content) first instead.            */

.page_index_journal {
  display: flex;
  flex-direction: column;
}

.page_index_journal > .additional_content { order: 1; }
.page_index_journal > .homepage_about     { order: 2; }
.page_index_journal > .current_issue      { order: 3; }

/* ---------- Homepage news cards ---------- */

.hhs-news {
  margin: 0 0 2.5rem 0;
}

.hhs-news > h2 {
  font-size: 1.35rem;
  margin: 0 0 1.2rem 0;
  padding-bottom: .5rem;
  border-bottom: 2px solid #0F3A3A;
}

/* Three cards always share one row, splitting whatever width there is */
.hhs-news-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;
  align-items: flex-start;
}

.hhs-news-card {
  flex: 1 1 0;
  min-width: 0;
}

.hhs-news-card a {
  display: block;
  text-decoration: none !important;
  color: inherit !important;
}

.hhs-news-card img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  display: block;
  margin: 0 0 12px 0;
}

.hhs-news-card h3 {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  line-height: 1.25;
  color: #0F3A3A;
}

.hhs-news-card p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.45;
  color: #444;
}

.hhs-news-card a:hover h3 {
  text-decoration: underline;
}

/* Link to the full news archive */
.hhs-news-all {
  margin: 1rem 0 0 0;
  font-size: .9rem;
}

.hhs-news-all a {
  color: #0F3A3A;
  font-weight: 600;
}

/* Stack the cards on narrow screens */
@media (max-width: 700px) {
  .hhs-news-grid {
    display: block;
  }
  .hhs-news-card {
    margin-bottom: 30px;
  }
  .hhs-news-card h3 {
    font-size: 1.05rem;
  }
  .hhs-news-card p {
    font-size: .9rem;
  }
}
