/* מבנה בסיסי */
body {
  font-family: 'Segoe UI', sans-serif;
  background: #f2f2f2;
  margin: 0;
  padding: 0;
  direction: rtl;
}

.calculator-container {
  max-width: 800px;
  margin: 40px auto;
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 0 16px rgba(0,0,0,0.1);
}

h1, h2, h3 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
}

/* כפתורי מחשבונים */
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.button-group button {
  padding: 10px 16px;
  border: none;
  background: #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.button-group button.active,
.button-group button:hover {
  background: #0078D7;
  color: white;
}

/* תוכן מחשבון */
.calc-panel {
  display: none;
}

.calc-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.calc-card {
  background: #fafafa;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.calc-body form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* תצוגה של שדות קלט */
.section {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.section label {
  font-weight: bold;
  margin-bottom: 4px;
  font-size: 14px;
}

.section input[type="number"] {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 15px;
}

/* כותרות בתוך טפסים */
form h3 {
  width: 100%;
  margin: 16px 0 8px;
  font-size: 16px;
  color: #444;
}

/* כפתור חישוב */
#calcBtn, #calc2Btn, #calc3Btn {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  background: #28a745;
  color: #fff;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

#calcBtn:hover, #calc2Btn:hover, #calc3Btn:hover {
  background: #218838;
}

/* תוצאות */
.results {
  margin-top: 24px;
  background: #f9f9f9;
  padding: 15px;
  border-radius: 10px;
  font-size: 16px;
  color: #333;
}

/* תצוגה רספונסיבית */
@media (max-width: 600px) {
  .section {
    flex: 1 1 100%;
  }
}