*,
*::before,
*::after {
  box-sizing: border-box;
}

html body {
  padding: 0;
  margin: 0;
}

body {
  font-family: "B Nazanin", "B Lotus", Tahoma, sans-serif;
  background-color: #f4f6f8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

body > * {
  width: 100%;
}

h1 {
  font-family: "B Titr", "B Nazanin", "B Lotus", Tahoma, sans-serif;
  font-size: 16px; /* Adjust size as needed */
  font-weight: bold;
  text-align: center; /* Common for Persian titles */
  margin: 20px 0; /* Adds spacing */
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.card {
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 24px;
  width: 100%;
  max-width: 630px;
  text-align: center;
}
.card h1 {
  margin-bottom: 16px;
  font-size: 24px;
}
.input-group {
  margin-bottom: 16px;
  height: 50px;
  display: flex;
}

.input-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccd0d5;
  border-left: none; /* Remove left border to connect with button */
  border-radius: 0 4px 4px 0; /* Round only right corners */
  font-size: 16px;
  outline: none; /* Remove default focus outline */
  background-color: #eeeeee;
}

.input-group button {
  width: 60px;
  padding: 10px;
  background-color: #007bff;
  border: 1px solid #007bff; /* Add border to match input */
  border-right: none; /* Remove right border to connect with input */
  border-radius: 4px 0 0 4px; /* Round only left corners */
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
}

.input-group button:disabled {
  background-color: #6c757d;
  border-color: #6c757d;
  cursor: not-allowed;
}

/* Optional: Add focus styles for better UX */
.input-group input:focus {
  border-color: #007bff;
}

/* Ensure the button and input align perfectly */
.input-group > * {
  height: 100%;
  box-sizing: border-box;
}
.progress-container {
  margin-top: 16px;
  display: none;
}
.progress-bar {
  width: 0%;
  height: 8px;
  background-color: #007bff;
  border-radius: 4px;
  transition: width 0.2s ease;
}
.message {
  margin-top: 16px;
  font-size: 18px;
  font-weight: bold;
}
.message.valid {
  color: #28a745;
}
.message.invalid {
  color: #dc3545;
}

.logo-container {
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-image {
  width: 180px;
  height: 180px;
}

.checkButton {
  display: flex;
}

header {
  position: relative;
  height: 100px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.header-links {
  position: relative;
  height: 100px;
  display: flex;
  align-items: flex-end; /* Align links to the bottom */
  justify-content: flex-end; /* Keep items aligned to the right */
  gap: 20px;
}

.header-links-text {
  color: black;
  text-decoration: none;
  font-weight: normal;
  padding-right: 10px; /* Adds left padding to each link */
  padding-bottom: 10px;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("../resources/headerbackground.jpg") center;
  opacity: 0.4;
  z-index: -1;
}

footer {
  background-color: #acddd7;
  height: 450px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 20px;
}

.footer-card {
  width: 350px;
  height: 320px;
  border-radius: 15px;
  background-color: #8ed2d5;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  color: black;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.footer-card i {
  font-size: 60px;
  margin-bottom: 25px;
  color: black;
}

.footer-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
}

.footer-card p {
  font-size: 16px;
  line-height: 1.6;
}

.step-number {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: #56a7a8;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.clear-btn {
  background-color: white;
  border-width: 0;
  position: relative; /* Makes transform work relative to its original position */
  transform: translate( 25px, -170px); /* Moves it up and right */
  cursor: pointer;
  padding: 2px;
}

.info-item {
  margin: 4px 0;
}
.info-label {
  font-weight: bold;
}

.warning-placeholder {
  color: red;
}

.lastimage {
  width: 100px;
  height: 100px;
}


#infoPanel {
  display: none;
  padding: 10px;
  margin-top: 10px;
}
#infoPanel h3 {
  margin-top: 0;
}

#logoPanel {
  display: none;
  padding-top: 8px;
}

#infoState {
  color: green;
}

#infoImage {
  width: 1px;
  height: 1px;
}


/* ===== Responsive tweaks for phones ===== */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start !important;
    height: auto;
  }
  
  .emam-image {
      height:30px;
  }

  .header-links {
    display: none;
  }

  .logo-image {
    max-width: 200px;
    max-height: 250px;
  }


  .card {
    padding: 16px;
    margin: 0 10px;
  }

  .input-group {
    display: flex;
    justify-content: center;
  }

  .input-group button,
  .input-group input {
    width: 80%;
    border-radius: 4px;
  }
  .input-group button {
    width: 50px;
    border-left: 1px solid #007bff;
    border-right: 1px solid #007bff;
  }

  footer {
    flex-direction: column-reverse;
    height: auto;
    padding: 20px 10px;
    gap: 20px;
  }
  .footer-card {
    width: 80%;
    max-width: none;
    height: auto;
    padding: 20px;
  }
  .footer-card .step-number {
    top: 10px;
    left: 10px;
    width: 26px;
    height: 26px;
    font-size: 14px;
  }
  


}
