/* css/length-converter.css */
body {
      margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #2c3e50;
    direction: rtl;
    line-height: 1.6;

}

main {
    max-width: 800px;
    margin: 1.5rem auto 3rem;
    padding: 0 1rem;
    background: #ffffff;
    border: 2px solid #3a997a;
    border-radius: 6px;
}



/* بقية الأنماط كما هي ... */

h1 {
      text-align: center;
    font-size: 2.4rem;
    margin-bottom: 2rem;
    border-bottom: 3px solid #3a997a;
    padding-bottom: 0.3rem;
    color: #000000;
    font-weight: 700;
    margin-top: unset;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group label {
  font-weight: 600;
  color: #000000;
  margin-bottom: 0.3rem;
  display: block;
  cursor: pointer;
}

.form-group input[type="number"],
.form-group select {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 2px solid #3a997a;
  outline-offset: -2px;
  outline-color: transparent;
  transition: outline-color 0.35s ease-in-out, border-color 0.35s ease-in-out;
  box-sizing: border-box;
  direction: rtl;
  width: 100%;
}

.form-group input[type="number"]:focus,
.form-group select:focus {
  border-color: #2c86c9;
  outline-color: #a2cdfb;
}

.buttons-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-submit,
.btn-reset {
  padding: 0.75rem 2.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  user-select: none;
  width: fit-content;
  min-width: 120px;
  text-align: center;
  transition: background-color 0.3s ease;
}

.btn-submit {
  background-color: #3a997a;
  color: #fff;
}

.btn-submit:disabled {
  background-color: #8cc9b5;
  cursor: not-allowed;
}

.btn-submit:hover:not(:disabled),
.btn-submit:focus:not(:disabled) {
  background-color: #286a50;
  outline: none;
  box-shadow: 0 4px 12px rgba(32, 96, 63, 0.4);
}

.btn-reset {
  background-color: #a3a3a3;
  color: #fff;
}

.btn-reset:hover,
.btn-reset:focus {
  background-color: #7d7d7d;
  outline: none;
  box-shadow: 0 4px 12px rgba(100, 100, 100, 0.5);
}

#result {
  border: 2px solid #3a997a;
  border-radius: 12px;
  padding: 1.5rem;
  background-color: #e6f3eb;
  color: #20603f;
  font-weight: 700;
  font-size: 1.3rem;
  text-align: center;
  user-select: text;
  margin-top: 2rem;
}

#result h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

[aria-label="تعليمات استخدام أداة تحويل الطول"] {
  margin-top: 3rem;
  color: #1a2e6a;
  line-height: 1.6;
  max-width: 500px;
  width: 100%;
  
}

[aria-label="تعليمات استخدام أداة تحويل الطول"] h2 {
      margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    border-bottom: 2px solid #3a997a;
    padding-bottom: 0.2rem;
}

[aria-label="تعليمات استخدام أداة تحويل الطول"] ul {
  list-style: disc inside;
  margin: 0 0 1rem 0;
  padding-left: 1rem;
}

@media (max-width: 480px) {
  main {
    margin: 1.5rem 1rem 3rem;
    padding: 1.5rem 1.5rem 2.5rem;
  }
  .buttons-group {
    flex-direction: column;
    gap: 0.8rem;
  }
  .btn-submit,
  .btn-reset {
    width: 100%;
    min-width: auto;
  }
  [aria-label="تعليمات استخدام أداة تحويل الطول"] {
    max-width: 100%;
    margin: 3rem 0 0 0;
    padding: 0 1rem;
  }
}