.entry-content .study-card-section {
  display: flex;                  
  flex-wrap: wrap;                /* wrap cards onto new rows */
  gap: 20px;                      /* spacing between cards */
  width: 100vw;                   /* full viewport width */
  margin-left: calc(4vw - 25%); /* cancel theme container centering */
  padding: 20px 0;
  justify-content: center;
}

.study-card-section {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
  justify-content: center;
}

.study-empty-state {
  width: 100%;
  padding: 2.5rem 1.5rem;
  margin: 2rem auto;
  text-align: center;

  color: #555;
  font-size: 1rem;

  border: 1px dashed #d1d5db;
  border-radius: 10px;
  background: #fafafa;
}


/* Allow card to shrink on small screens*/
.study-card {
  flex: 1 1 520px;   /* min width 300px, grow as needed */
  max-width: 520px;  /* max size that card can expend to */
  min-width: 0;     /* min size that card can shrink to */
  width: 100%;
  height: 100%;
  margin: 10px;      /* spacing between cards */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden; 
}

.study-card * {
  box-sizing: border-box;
}

.study-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.study-card-title {
  margin-top: 10px; 
  font-size: 1.5em; 
  font-weight:bold;
  text-align: center;
}

.study-card-inner {
  flex-grow: 1;
  margin-top: 10px; 
  font-size: 0.9em; 
  color:#555;
}

.study-card-image {
  display: block; 
  margin: 0 auto;
  width: 75%;
}

.study-card-button {
  align-self: center;
}

.study-card-button, 
.study-card-button:visited {
  color: white;              
  text-decoration: none;          /* removes underline from visited link*/
  background-color: #4a90e2;   /* ensures visited link doesn’t change background */
}

.study-card-button:hover {
  background-color: #357ab8;
}

.study-card-button:active {
  background-color: #2e5f8a;
}

.study-details {
  margin: 0 0 0 0;
  padding: 0;
  justify-content: flex-start;
}


.study-details dt,
.study-details dd {
  margin: 0;             /* removes browser default spacing */
  padding: 0;            /* ensures tight layout */
}

.study-details dt {
  float: left;           /* aligns titles to the left */
  clear: left;
  width: 80px;           /* controls label width */
  font-weight: bold;
  text-align: right;
  margin-right: 8px;     /* space between title and content */

}

.study-details dd {
  margin: 0 0 4px 0;     /* small vertical spacing between rows */
  text-align: left; 
}


/* make dt + dd pairs a flex container */
.study-details dt,
.study-details dd {
  display: inline-block;
}

.study-details dt {
  text-align: right;
  margin-right: 8px;
  margin-left: 4rem;    /* indent from left edge */
}

.study-details dd {
  display: flex;
  flex-wrap: wrap;
}

.study-card img {
  max-width: 100%;
  height: auto;
}

@media (min-width: 901px){
  .entry-content .study-card-section{
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }
}
@media (max-width: 900px){
  .entry-content .study-card-section{
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .entry-content .study-card-section {
    width: 100%;
    margin-left: 0;
  }

  .study-card {
    max-width: 100%;
    margin: 0;
    overflow: hidden;
  }

  .study-card .wp-block-columns {
    flex-direction: column !important;
  }

  .study-card .has-background {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .study-card img {
    max-width: 100%;
    height: auto;
  }
}
