.profile-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-top-bar h1 {
  font-size: 28px;
  color: #222;
}

.profile-edit-btn {
  padding: 10px 20px;
  background-color: black;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
  font-family: "Josefin Sans", sans-serif;
}

.profile-edit-btn:hover {
  background-color: black;
}

.profile-main-section {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 50px;
}

.profile-picture-block {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 4px solid black;
  overflow: hidden;
  background-color: #fff;
}

.profile-picture-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-picture-menu-btn {
  position: absolute;
  bottom: 20px;
  right: 45px;
  background-color: rgba(255, 255, 255, 0.877);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding-bottom: 0px !important;
  height: 22px !important;
  padding: 2px 4px 2px 4px;
  border-radius: 5px;
}

.profile-picture-dropdown {
  position: absolute;
  top: 220px;
  /* below the circle */
  right: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 10;
  flex-direction: column;
  width: 140px;
}

.profile-picture-dropdown button {
  width: 100%;
  padding: 10px;
  background: none;
  border: none;
  text-align: left;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: "Josefin Sans", sans-serif;
}

.profile-picture-dropdown button:hover {
  background-color: #f5f5f5;
}

.profile-content-sections {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.profile-box {
  flex: 1 1 500px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  padding: 30px;
  box-sizing: border-box !important;
  height: fit-content !important;
}

.profile-box h2 {
  font-size: 28px;
  color: black;
  margin-bottom: 26px;
}

.profile-detail-item {
  margin-bottom: 15px;
  font-size: 15px;
  color: black;
  display: flex;
  gap: 20px;
}

.profile-detail-item span {
  font-weight: 700;
  color: black;
  font-size: 18px;
}

.profile-history-item {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  font-size: 18px;
  color: #444;
}

.profile-history-item:last-child {
  border-bottom: none;
}

/* Modal */
.profile-modal {
  display: none; /* initially hidden */
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.profile-modal-content {
  background-color: #fff;
  margin: 6% auto;
  padding: 35px;
  border-radius: 10px;
  width: 100%;
  max-width: 520px;
  position: relative;
  box-sizing: border-box !important;
}

.profile-modal-content form input {
  width: 100% !important;
}

.profile-modal-content h2 {
  margin-bottom: 20px;
  color: black;
}

.profile-modal-content label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
}

.profile-modal-content input,
.profile-modal-content select {
  width: 100%;
  margin-bottom: 18px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  padding: 15px;
  box-sizing: border-box !important;
}

.profile-modal-content button {
  padding: 12px 20px;
  background-color: black;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.profile-modal-content button:hover {
  background-color: black;
}

.profile-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 42px;
  color: #333;
  cursor: pointer;
}

.profile-modal-close:hover {
  color: #000;
}

@media (max-width: 768px) {
  .profile-main-section {
    flex-direction: column;
    align-items: center;
  }

  .profile-content-sections {
    flex-direction: column;
  }

  .profile-box {
    width: 100%;
  }

}
