body {
  background-color: #f5f7fa;
}

h2 {
  color: #14cb5a;
  margin-bottom: 1rem;
}

.page-label {
  font-size: 20px;
}

/* columns for desktop */
.profile-layout {
  column-count: 2;
  column-gap: 3.5rem;
  margin: 2rem 5rem;
}

section {
  max-width: 600px;
  margin: 0 auto 3rem auto;
  padding: 2rem 4rem 1rem;
  background-color: white;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.5s ease;
  overflow: hidden;
}

section:hover {
  overflow: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #8b8b8b transparent;
  box-shadow: 0 6px 24px rgba(95, 148, 106, 0.651);
}

.user-info {
  height: 430px;
}

.user-intro {
  height: 265px;
}

.skills {
  height: 410px;
}

.goals {
  height: 490px;
}

.frustrations {
  height: 300px;
}

.experience {
  height: 545px;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid #14cb5a;
  object-fit: cover;
}

.avatar-wrapper {
  padding: 1rem;
  /* Use flex to center avatar horizontally */
  display: flex;
  justify-content: center;
}

.user-info h2 {
  text-align: center;
}

.role {
  font-size: 1.2rem;
  text-align: center;
}

.content span {
  color: #5a5a5a;
}

section ul {
  margin-left: 1rem;
}

section ul li::marker {
  color: #10a74a;
}

section ul ul li {
  margin: 0.5rem 0;
}

li {
  margin: 1rem 0;
  color: #555;
  text-align: justify;
}

.category {
  margin-bottom: 2rem;
}

/* Progress bar styling */
.progress-bar {
  background-color: #6263623b;
  height: 1.1rem;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 0.8rem;
  margin-bottom: 1.5rem;
}

.progress-fill {
  background-color: #a7ee6c;
  color: black;
  height: 100%;
  padding-left: 8px;
  font-size: 14px;
}

/* Force certain cards to span full width */
.interests-card,
.volunteer-card,
.contact {
  max-width: 1270px;
  column-span: all;
}

.interests-images {
  /* Display interests in a horizontal row with spacing */
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}

.interests-images img {
  height: 4rem;
  padding-left: 2rem;
}

.volunteering {
  /* Arrange volunteering cards in a responsive row */
  display: flex;
  gap: 1rem;
  flex-wrap: wrap; /* Allow cards to wrap on smaller screens */
  justify-content: center;
}

/* Volunteering cards layout */
.volunteering .card {
  width: 320px;
  margin: 1rem auto;
  background-color: #f4fff9;
  border: none;
  position: relative;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.volunteering .card:hover {
  transform: translateY(-5px);
}

.volunteering .program-image {
  width: 100%;
  height: 160px;
  border-radius: 8px 8px 0 0;
}

.country-flag {
  /* Place flag and country text side by side */
  display: flex;
}

.country-flag img {
  height: 20px;
  margin-right: 0.8rem;
}

.volunteering .content {
  padding: 0.5rem 1rem;
}

.volunteering .content h3 {
  font-size: 18px;
  color: #13a049;
}

/* Volunteering buttons */
.volunteering .form-buttons {
  position: absolute;
  bottom: 1rem;
}

.btn-1,
.btn-2 {
  font-size: 14px;
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 16px;
}

.btn-1 {
  background-color: #9e9e9e;
}

.btn-2 {
  background-color: #45ec85;
}

/* Volunteer availability table */
.volunteer-table {
  margin: 2rem auto;
  overflow-x: auto;
  width: fit-content;
  border-radius: 16px;
}

.volunteer-table table {
  border-collapse: collapse;
  min-width: 750px;
}

.volunteer-table th {
  background: rgba(209, 240, 220, 0.6);
  padding: 1rem;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  border: 1px solid #e3e3e3;
}

.volunteer-table td {
  padding: 0.8rem;
  text-align: left;
  border: 1px solid #e3e3e3;
}

.volunteer-table tr:nth-child(odd) {
  background-color: #ebfcee;
}

.volunteer-table tr:nth-child(even) {
  background-color: rgba(240, 253, 245, 0.8);
}

.volunteer-table td:hover {
  background-color: #e6f4ea;
}

.volunteer-table td:first-child,
.volunteer-table th:first-child {
  background: rgba(245, 255, 249, 0.8);
  border-right: 2px solid #b8e4c7;
  color: #1e3932;
}

.volunteer-table thead {
  border-bottom: 2px solid #b8e4c7;
}

.volunteer-table .table-bottom td {
  background: rgba(245, 255, 249, 0.8);
  border: 1px solid #e3e3e3;
}

.volunteer-table .logo-text {
  color: rgb(117, 208, 126);
}

/* Contact form styles */
.contact form {
  /* Use column layout for form fields */
  display: flex;
  flex-direction: column;
  padding: 0 2rem 1rem 2rem;
  gap: 1rem;
}

label {
  color: #5e5656;
  margin-top: 0.75rem;
}

.contact input,
.contact textarea,
.contact select {
  background-color: #f5f7f4;
  color: #2e2e2e;
  border: 1px solid #c8d6c1;
  padding: 10px;
  border-radius: 6px;
  width: 100%;
  font-size: 1rem;
}

.contact input::placeholder,
.contact textarea::placeholder,
.contacts select {
  color: #9ca3af;
}

.contact input:focus,
.contact textarea:focus,
.contact select:focus {
  border-color: #4caf50;
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.contact textarea {
  resize: vertical;
}

.asterisk {
  color: #b92922;
}

.form-row {
  /* Arrange form groups side by side and wrap on smaller screens */
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 200px;
}

.form-group label {
  display: block;
  margin-bottom: 15px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.form-buttons {
  /* Arrange buttons horizontally */
  display: flex;
  gap: 1rem;
}

.form-buttons button[type="submit"] {
  background-color: #71cc75;
}

.form-buttons button[type="reset"] {
  background-color: #6c757db9;
}

.form-buttons .main-button:hover {
  color: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
  .profile-layout {
    column-count: 1;
    margin: 5rem;
  }

  .volunteer-table {
    margin: 1rem auto;
  }

  .volunteer-table table {
    padding: 1rem;
  }

  .volunteer-table table {
    min-width: 80px;
  }

  .volunteer-table th,
  .volunteer-table td {
    font-size: 15px;
  }

  .volunteer-table .logo-text {
    padding: 0 5px;
    font-size: 15px;
  }

  .contact form {
    padding: 0;
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .profile-layout {
    margin: 1.5rem;
  }

  section {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .page-label {
    font-size: 18px;
  }

  .role {
    font-size: 1rem;
  }

  .content {
    font-size: 0.91rem;
  }

  .volunteering .card {
    width: 100%;
    margin: 0 auto;
  }

  .volunteer-table {
    margin: 0.6rem auto;
  }

  .volunteer-table table {
    min-width: 50px;
  }

  .volunteer-table th,
  .volunteer-table td {
    padding: 6px 5px 3px 5px;
    font-size: 12px;
  }

  .interests-card {
    padding-bottom: 0;
  }

  .interests-images {
    gap: 1rem;
    margin-top: 1rem;
  }

  .interests-images img {
    height: 2.5rem;
    padding-left: 0;
  }

  .volunteer-table .logo-text {
    font-size: 10px;
  }

  .volunteer-table .table-bottom td {
    padding: 4px 10px 0;
  }
}
