/*for main heading which is {Binary Calculator}*/
.pi {
  text-align: center;
  margin-top: 3%;
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 30ps;
}

/* Calculator Section */

.calculator2,
.calculator3,
.calculator4,
.calculator5,
.calculator6 {
  width: 500px;
  background: #fef6e4;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
  float: left;
  margin-top: 2%;
  margin-left: 35%;
  margin-right: 5%;
}
.calculator {
  width: 500px;
  background: #fef6e4;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
  float: left;
  margin-top: 2%;
  margin-left: 35%;
  margin-right: 5%;
}
.fraction {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fraction input {
  text-align: center;
  width: 80px;
  border: none;
  background: #eee;
}
.fraction hr {
  width: 80px;
  border: 1px solid #000;
  margin: 2px 0;
}

/* Specific adjustments for Calculator 2 */
.calculator2 {
  height: 300px;
  background: #fef6e4;
  clear: both; /* Ensures it starts on a new row */
  margin-top: 4%; /* Adjust to match calculator1 */
}

/* Specific adjustments for Calculator 3 */
.calculator3 {
  height: 300px;
  background: #fef6e4;
  clear: both; /* Ensures it starts on a new row */
  /* margin-top: 4%; */
  /* margin-bottom: 10%; */
}

.header {
  background: #d33b4a;
  color: white;
  padding: 10px;
  font-weight: bold;
  border-radius: 8px 8px 0 0;
  text-align: center;
}
.input-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.input-group span {
  width: 40%;
  font-weight: bold;
}

.input-group input {
  width: 30%;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

button {
  width: 25%;
  height: 15%;
  margin-left: 20%;
  background: #d33b4a;
  color: white;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: 15px 15px 15px 15px;
}
button:hover {
  background: #b52c3a;
}

/* Side Buttons Section */
.side-buttons {
  width: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  /* border: 2px solid red; */
}
.side-buttons button {
  background: #fef6e4;
  color: black;
  /*top-left, top-right,, bottom-right, bottom-left*/
  border-radius: 15px 15px 15px 15px;
  border: 1px solid #ccc;
  padding: 10px 20px;
  cursor: pointer;
  text-align: center;
  width: 80%;
}
/* .side-buttons btn1{
    border: 1px solid #ccc;
    width: 50%;
}*/
/* .side-buttons btn2{
    border: 1px solid #ccc;
    width: 70%;
}  */

.side-buttons button:hover {
  /* background: #ddd; */
  background: #a82a39;
}
.about {
  width: 900px;
  background: #fef6e4;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
  float: left;
  margin-top: 2%;
  margin-left: 15%;
  margin-right: 5%;
}
.about-h {
  text-align: center;
  margin-top: 3%;
  margin-bottom: 3%;
  clear: both;
}
.related_calculator {
  width: 900px;
  background: #fef6e4;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
  float: left;
  margin-top: 2%;
  margin-left: 15%;
  margin-right: 5%;
  margin-bottom: 3%;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .calculator,
  .calculator2,
  .calculator3,
  .calculator4,
  .calculator5,
  .calculator6 {
    width: 80%;
    margin-left: auto;
  }

  .about,
  .related_calculator {
    width: 80%;
  }
}

@media (max-width: 768px) {
  .calculator,
  .calculator2,
  .calculator3,
  .calculator4,
  .calculator5,
  .calculator6 {
    width: 85%;
    height: auto;
    margin: 30px;
  }
  .calculator2 {
    width: 85%;
    margin: 30px;
    margin-bottom: 30px;
  }
  .calculator3 {
    width: 85%;
    margin: 30px;
  }
  .about,
  .related_calculator {
    width: 100%;
  }

  .input-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .input-group span,
  .input-group input {
    width: 50%;
  }

  button {
    width: 80%;
  }
}

@media (max-width: 480px) {
  .pi {
    font-size: 1.5em;
  }

  button {
    width: 50%;
    font-size: 16px;
  }
}
