body {
  margin: 0;
  padding: 0;
  font-family: "Nunito", sans-serif;
  overflow-x: hidden;
}
.layout-container {
  display: flex;
}
.nav-logo {
  padding: 20px;
  width: 100%;
  display: flex;
  font-size: 20px;
  color: black;
  font-weight: bold;
  background-color: #2f4f3f;
  align-items: center;
  position: fixed;
  z-index: 50;
}
.nav-logo-text {
  margin-left: 20px;
  color: white;
}
/* slidebar */
nav {
  background-color: #a3b18a;
  height: 100vh;
  width: 220px;
  display: flex;
  padding: 2px;
  flex-direction: column;
  transition: transform 0.3s ease;
  position: fixed;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 20px;
  padding: 10px;
  align-items: center;
  top: 60px;
  position: relative;
}
nav a {
  color: white;
  text-decoration: none;
  margin-right: 10px;
  font-weight: bold;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px;
  transition: 0.3s ease;
  background-color: transparent;
}
nav a:hover {
  color: #b1ab86;
  background-color: rgba(255, 255, 255, 0.218);
  color: #ffffff;
  transform: scale(1.04);
  border-radius: 15px;
}
.hamburger {
  font-size: 28px;
  cursor: pointer;
  position: fixed;
  top: 2px;
  left: 0px;
  z-index: 100;
  display: none;
  background-color: #2f4f3f; /* Same as nav background */
  color: white;
  padding: 10px 12px;
  border: none;
  transition: background-color 0.3s ease;
}
.hamburger:hover {
  background-color: #365d49;
  color: white;
}

.main-section {
  font-size: 20px;
  width: 100vw;
  padding: 60px 20px 0px 20px;
  box-sizing: border-box;
  min-height: 100vh;
  transition: padding-left 0.3s ease;
  margin-top: 20px;
}
.main-heading {
  font-size: 2.5rem;
  text-align: center;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  color: #2c3e50; /* deep neutral grey */
  margin-top: 20px;
  letter-spacing: 1px;
}


/* form */
.form-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-top: 20px;
}
.form-right {
  width: 50%;
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 10px rgba(0, 0, 0, 0.1); */
  border-radius: 20px;
}
.form-left {
  border-radius: 20px;
  width: 45%;
  padding: 20px;
  min-height: 450px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 10px rgba(0, 0, 0, 0.1);
}
.gender-container {
  width: 100%;
  height: 30%;
  border-radius: 20px 20px 0px 0px;
  display: flex;
  margin-top: 5%;
  justify-content: center;
}
.image1,
.image2 {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image1 img,
.image2 img {
  height: 180px;
  width: 200px;
  object-fit: cover;
  border-radius: 50%;
}

.gender-toggle {
  display: flex;
  width: 100%;
  margin-top: 40px;
  border-radius: 20px;
  overflow: hidden;
  height: 40px;
  background-color: rgb(205, 205, 160);
}

.gender-toggle input[type="radio"] {
  display: none;
}

.gender-toggle label {
  flex: 1; /* Take equal space */
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  background-color: rgb(205, 205, 160);
  color: white;
  transition: background-color 0s ease, color 0.3s;
}

.gender-toggle input[type="radio"]:checked + label {
  background-color: #437057;
  color: rgb(205, 205, 160);
  border-radius: 20px;
}
.inputs {
  margin-top: 20px;
}
.inputs input {
  width: 70%;
  padding: 4px;
  margin-top: 10px;
  border-radius: 5px;
  border: 1px solid rgb(205, 205, 160);
  background-color: rgb(205, 205, 160);
}
.inputs select {
  background-color: rgb(205, 205, 160);
  padding: 4px;
  border: none;
  border-radius: 5px;
  color: #437057;
  font-weight: 700;
}
.inputs label {
  text-align: center;
  color: #437057;
  font-weight: 700;
}
.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  gap: 10px;
}
.button-container button {
  background-color: #437057;
  padding: 10px;
  border-radius: 5px;
  border: none;
  color: rgb(205, 205, 160);
  font-weight: 700;
  width: 100%;
  flex: 1;
}

/* bmi result  */
.bmi-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
}

.bmi-progress {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(#4cd964 0%, #dcdcdc 0%);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  font-weight: bold;
  color: #444;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15), 0 2px 5px rgba(0, 0, 0, 0.1),
    inset 0 -2px 4px rgba(255, 255, 255, 0.4);
  transition: background 0.5s ease;
}

.bmi-progress span {
  background: #fff;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bmiresult-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;
}
.bmiresult {
  font-size: 30px;
  font-weight: 550;
}
/* weight range chart  */

.weightbox {
  padding: 12px;
  display: flex;
  border-radius: 20px;
  justify-content: center;
  height: auto;
  flex-direction: row;

}

.weightcolor {
  width: 100%;
  max-width: 400px;
}

.color-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  padding: 8px 0;
}

.label-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-right {
  padding-left: 12px;
  white-space: nowrap;
}

.colorcircle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.color-label.active {
  background-color: #a3b18a;
     padding: 7px;
  border-radius: 10px;
  width: 100%;
}
.color-label.active .colorcircle{
  width:15px;
  height: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.healthy-range {
  padding-bottom: 15px;
}
.healthy-range-text {
  margin-top: 10px;
  color: black;
  font-size: 20px;
  text-align: center;
  font-weight: bold;
}

.about-bmi {
  padding: 10px;
  border-radius: 10px;
  font-size: 17px;
  color: #333;
  background-color: #e6e4e481;
  
}

.about-bmi h2 {
  margin-bottom: 10px;
  color: #2f4f3f;
  margin-top: 50px;
}

.bmi-table {
  width: 100%;
  max-width: 700px;
  margin: 20px auto;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.bmi-table th,
.bmi-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
.bmi-table th{
  color: #2f4f3f;
}
.bmi-table th {
  background-color: #f5f5f5;
  color: #2f4f3f;
  font-weight: bold;
}

.bmi-table tr:hover {
  background-color: #f0f8ff;
}

.bmi-table td {
  color: #444;
}
/* risks  */
.risks{
  color:#444;
    font-size: 17px;
}
.risks li{
  margin-top: 5px;
}

@media (min-width: 320px) and (max-width: 599px) {
  .nav-logo-text {
    margin-left: 30px;
  }
  .main-heading {
    font-size: 30px;
    display: flex;
    justify-content: center;
    padding: 4px;
    margin-top: 10px;
    align-items: center;
  }
  .form-container {
    flex-direction: column;
    box-sizing: border-box;
    padding: 20px;
  }

  .form-left,
  .form-right {
    width: 90%;
  }
  .form-right {
    padding: 10px;
  }
  .image1 img,
  .image2 img {
    height: 150px;
    width: 130px;
    object-fit: cover;
  }
  .gender-toggle {
    margin-top: 10px;
  }
  .inputs input {
    width: 60%;
  }
  .bmiresult {
    font-size: 20px;
  }
  .about-bmi {
    padding-left: 5px !important;
    font-size: 15px;
    margin: 0 10px;
  }
}
@media (max-width: 768px) {
  nav {
    transform: translateX(-100%);
    width: 180px;
    height: 100vh;
    position: fixed;
    top: 5;
    left: 0;
    background-color: #a3b18a;
    z-index: 20;
    position: fixed;
  }
  .nav-logo-text {
    margin-left: 30px;
  }
  nav.show {
    transform: translateX(0);
    top: 5;
  }
  .hamburger {
    display: block;
  }
  .main-section {
    padding: 100px 20px 20px 20px;
  }
  .form-right {
    width: 95%;
  }
  .about-bmi {
    padding-left: 220px;
  }
}
@media (min-width: 600px) and (max-width: 767px) {
  .main-section {
    padding-left: 0;
  }

  .form-container {
    flex-direction: column;
    padding: 30px;
    align-items: center;
  }

  .form-left,
  .form-right {
    width: 90%;
  }

  .image1 img,
  .image2 img {
    width: 150px;
    object-fit: cover;
  }

  .gender-toggle {
    margin-top: 10px;
  }

  .inputs input {
    width: 60%;
  }
  .about-bmi {
    padding-left: 5px !important;
    font-size: 15px;
    margin: 0 10px;
  }
}

/* Medium devices: 768px–1199px */
@media (min-width: 768px) and (max-width: 1199px) {
  .main-section {
    padding-left: 240px;
  }

  .form-container {
    flex-direction: column;
    padding: 70px;
    padding-top: 20px;
    align-items: center;
    margin-top: 5px;
  }

  .form-right {
    width: 90%;
    padding: 20px;
  }

  .form-left {
    width: 90%;
  }

  .image1 img,
  .image2 img {
    width: 150px;
    object-fit: cover;
  }

  .gender-toggle {
    margin-top: 10px;
  }

  .inputs input {
    width: 60%;
  }
  .about-bmi {
    padding-left: 240px;
    font-size: 16px;
  }
}

@media (min-width: 1200px) {
  .main-section {
    padding-left: 240px;
  }

  .inputs input {
    width: 60%;
  }
  .about-bmi {
    padding-left: 240px; /* same as .main-section padding-left */
  }
}
