#profile-section {
  width: 100%;
  display: flex;
  flex-direction: row;
  padding: 2rem 1rem;
  gap: 2rem;
}

/* Profile wrapper */
.main-div-profile-info {
  display: flex;
  /* align-items: center;
  justify-content: center; */
  flex-wrap: wrap;
  flex-direction: column;
  gap: 2rem;
  width: 50%;
  max-width: 50rem;
  /* ~800px */
}

/* Profile image */
.profile-image {
  width: 50%;
  flex: 0 0 19.375rem;
  /* 150px → 9.375rem */
  height: 19.375rem;
  border-radius: 50%;
  overflow: hidden;
  border: 0.125rem solid #ccc;
}

/* Image itself */
.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Profile text */
.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  font-weight: bold;
}
.profile-latest-posts {
  width: 50%;
}

.profile-latest-posts h1 {
  font-size: 2rem;
  text-align: center;
}

.profile-edit-btn-container {
  display: flex;
  gap: 1rem;
  text-align: center;
}

.latest-post-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  /* allows wrapping on smaller screens */

}

/* Each item = 3 in a row */
.latest-post-container-item {
  flex: 1 1 calc(33.333% - 1rem);
  /* 3 per row with gap accounted for */
  aspect-ratio: 1 / 1;
  /* keeps square shape */
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #f3f3f3;
  max-width: 200px;
  object-fit: cover;
  /* optional cap */
}

.latest-post-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


#id_description {
    textarea-rows-3 { min-height: 0; height: 4.5em; } /* ≈ 3 rows */
}


/* Tablet */
@media (max-width: 992px) {
  .profile-latest-posts h1 {
    font-size: 1.5rem;
    text-align: center;
  }

  .profile-image {
    width: 80%;
    margin: auto;

  }

  #profile-section {
    flex-direction: column;
  }

  .main-div-profile-info,
  .profile-latest-posts {
    width: 100%;
  }

  .profile-edit-btn-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }

}
 .back-ancor-container {
    padding: 0.5rem;
 }

/* Responsive tweak */
@media (max-width: 37.5rem) {

  /* 600px */
  .profile-image {
    width: 80%;
    flex: 0 0 19.25rem;
    /* 100px → 6.25rem */
    height: 19.25rem;
  }

  .profile-info p {
    font-size: 0.9rem;

  }

  .profile-edit-btn-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }

  .profile-edit-btn-container button {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .profile-edit-btn-container a {
    font-size: 0.8rem;
  }

  .profile-latest-posts h1 {
    font-size: 1.2rem;
  }

  .profile-latest-posts {
    width: 100%;
    text-align: center;

  }
}
