.custom-author-profile {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin: 7px 0px 10px 0px;
    padding: 15px;
    border: 0px solid #ddd;
    border-radius: 8px;
    background-color: #ffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.author-designation {
    margin-top: 5px;
    font-size: 14px;
    font-weight: 700;
    color: #666;
    margin: 4px 0 8px;
}

.custom-author-profile .author-avatar {
    flex-shrink: 0; /* Prevents the image from shrinking */
}

/* Ensures both Gravatar (<img>) and custom image (<img class="custom-author-avatar-img">) follow the same design */
.custom-author-profile .author-avatar img,
.custom-author-profile .author-avatar .custom-author-avatar-img {
    border-radius: 10px 0px 10px 0px;
    width: 80px; /* Adjust the size as needed */
    height: 80px; /* Ensures the image remains square */
    object-fit: cover; /* Maintains aspect ratio and prevents distortion */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Optional: Adds slight depth */
}

.custom-author-profile .author-details {
    flex: 1; /* Ensures the text takes the remaining space */
}

.custom-author-profile .author-details h4 {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    color: #000000;
}

.custom-author-profile .author-details h4 a {
    text-decoration: none;
    color: #e60000;
    transition: color 0.3s ease;
}

.custom-author-profile .author-details h4 a:hover {
    color: #2db300;
}

.custom-author-profile .author-details p {
    font-size: 14px;
    margin: 5px 0px 0px 0px;
    color: #000000;
    line-height: 1.4;
}

@media (max-width: 767px) {

  .custom-author-profile {
    display: grid;
    grid-template-columns: 80px 1fr;
    grid-template-areas:
      "avatar name"
      "avatar designation"
      "bio bio";
    column-gap: 12px;
    row-gap: 4px;
    align-items: start;
  }

  .custom-author-profile .author-avatar {
    grid-area: avatar;
  }

  /* FLATTEN the container */
  .custom-author-profile .author-details {
    display: contents;
  }

  .custom-author-profile .author-details h4 {
	  margin-top: 10px;
      grid-area: name;
  }

  .custom-author-profile .author-details .author-designation {
	  margin-top: -20px;
      grid-area: designation;
  }

  .custom-author-profile .author-details > p:not(.author-designation) {
    grid-area: bio;
    margin-top: 10px;
  }
}
