@font-face {
  font-family: 'Baloo Bhaijaan 2';
  src: url('https://quamtex.ir/fonts/webfonts/baloo-bhaijaan-2-arabic-500-normal.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Baloo Bhaijaan 2';
  src: url('https://quamtex.ir/fonts/webfonts/baloo-bhaijaan-2-latin-500-normal.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

h1 {
    font-size: 24px;
}
.main-container {
  display: flex;
  flex-direction: row;
  background-color: #dae0e2;
}

.main-content {
  padding: clamp(0.875rem, 0.4464285714285714rem + 0.8571428571428572vw, 1.25rem);
  margin: clamp(0.625rem, -0.0892857142857143rem + 1.4285714285714286vw, 1.25rem);
  background-color: #ffffff;
  border-radius: 20px;
  font-size: clamp(0.938rem, 0.842rem + 0.426vw, 1.188rem);
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  color: #112548;
  max-width: 100%;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.description {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  text-align: right;
  font-size: clamp(0.875rem, 0.731rem + 0.638vw, 1.25rem);
}

.bmi {
  display: grid;
  margin: 20px 0;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0  0 20px #0000008e;
  padding: 20px;
  grid-template-columns: repeat(4, 1fr);
}

.pop {
  font-size: 1.2rem;
  border: none;
  border-radius: 25px;
  background: linear-gradient(to right, #112548,#112548);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  font-family: "Baloo Bhaijaan 2", sans-serif;
  grid-column: span 2;
  justify-self: center;
  width: 40%;
  height: 40px;
}

.description-title {
  font-size: clamp(1rem, 0.809rem + 0.851vw, 1.5rem);
  color: #112548;
}

button.pop:hover {
  background: linear-gradient(to right,#34236b, #375891);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.712);
}

button.pop:active {
  background: linear-gradient(to right,#34236b, #375891);
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.712);
}

h3 {
    font-size: clamp(1rem, 0.911rem + 0.238vw, 1.125rem);
    align-self: center;
}

input {
  -moz-appearance: textfield;
  font-size: 16px;
  border:2px solid #112548;
  outline:none;
  height: 46px;
  vertical-align:middle;
  position:relative;
  border-radius:24px;
  width: 80%;
  box-sizing:border-box;
  padding:0 18px;
  align-self: center;
  box-shadow: 3px 5px 10px 0px #00000061;
  text-align: center;
  font-family: "Baloo Bhaijaan 2", sans-serif;
  transition: border 0.5s,box-shadow 0.5s,transform 0.5s;
  margin-top: 10px;
  margin-bottom: 30px;
}

input:focus {
  border:2px solid #1a4faa;
  box-shadow: 3px 5px 10px 0px #273751;
  transition: border 0.5s,box-shadow 0.5s,transform 0.5s;
  transform: scale(1.04);
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rtl {
  direction: rtl;
}

table {
  border-collapse: collapse;
  width: 100%;
  direction: rtl;
}

th, td {
  padding: 8px 12px;
  text-align: center;

}

th {
  background-color: #112548;
  font-weight: bold;
  color: #dae0e2;

 }

td {
    border: 1px solid silver;    
}

tr:nth-child(even) {
  background-color: #fafafa;
}

#weight {
  border-top-left-radius: 20px;
}

#bmi {
  border-top-right-radius: 20px;
}

.results {
  background-color: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  font-size: clamp(0.938rem, 0.842rem + 0.426vw, 1.188rem);
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  color: #112548;
}

select {
  font-size: 16px;
  border:2px solid #112548;
  height: 46px;
  border-radius:24px;
  padding:0 18px;
  box-shadow: 3px 5px 10px 0px #00000061;
  text-align: center;
  font-family: "Baloo Bhaijaan 2", sans-serif;
  transition: border 0.5s,box-shadow 0.5s,transform 0.5s;
  background-color: white;
  width: 95%;
  margin-top: 10px;
  margin-bottom: 30px;
}

div.total {
  grid-row: 2/3;
  grid-column: 4/5;
  justify-self: center;
  height: fit-content;
  align-items: start;
  width: 100%;
}

div.total2 {
  grid-row: 1/2;
  grid-column: 1/5;
  justify-self: right;
  height: fit-content;
  align-items: start;
  width: 100%;
}

div.pul {
  grid-row: 1/2;
  grid-column: 1/2;
  justify-self: center;
  height: fit-content;
  align-items: start;
  width: 100%;
}

div.percentage {
  grid-row: 2/3;
  grid-column: 1/2;
  justify-self: center;
  height: fit-content;
  align-items: start;
  width: 100%;
}

div.days {
  grid-row: 2/3;
  grid-column: 2/4;
  justify-self: center;
  height: fit-content;
  align-items: start;
  width: 100%;
}

button.pop {
  grid-row: 3/4;
  grid-column: 1/5;
  justify-self: center;
  height: fit-content;
  align-items: start;
  width: 60%;
}

.results {
  grid-row: 4/5;
  grid-column: 1/5;
  justify-self: center;
  height: fit-content;
  align-items: center;
  width: 100%;
  margin-top: 50px;
}


@media (max-width: 600px) {
  .bmi {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
  }
    div.total {
    grid-row: 4/5;
    grid-column: 1/2;
    }

    div.total2 {
    grid-row: 1/2;
    grid-column: 1/2;
    }

    div.pul {
    grid-row: 1/2;
    grid-column: 1/2;
    }

    div.percentage {
    grid-row: 3/4;
    grid-column: 1/2;
    }

    div.days {
    grid-row: 2/3;
    grid-column: 1/2;

    }

    button.pop {
    grid-row: 5/6;
    grid-column: 1/2;

    }

    .results {
    grid-row: 6/7;
    grid-column: 1/2;
    }

}

.fade {
  opacity: 0;
  transition: opacity 5s ease-in-out;
}

.fade.show {
  opacity: 1;
}
