/* ===============================
   בסיסי לכל האתר
=============================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  font-family: 'Heebo', sans-serif;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ===============================
   כותרות
=============================== */
h1 {
  text-align: center;
  margin: 15px 0;
  font-size: 2.5rem;
  font-weight: 700;
  color: #3498db;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
  letter-spacing: 1px;
}

h2 {
  text-align: center;
  margin: 15px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #3498db;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
  letter-spacing: 1px;
}

h3, h4, h5, h6 {
  text-align: center;
}

p {
  text-align: center;
  font-size: 1.2rem;
  color: #555;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ===============================
   ניווט פנימי
=============================== */
.internal-nav {
  display: none;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 16px;
  background-color: #f5f5f5;
  padding: 10px 0;
  border-radius: 8px;
}

.internal-nav a {
  margin: 0 15px;
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s;
}

.internal-nav a:hover {
  color: #e74c3c;
}

/* ===============================
   כפתורי Tabs
=============================== */
.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.tabs button {
  padding: 10px 20px;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  background-color: #ddd;
  transition: background-color 0.2s;
}

.tabs button.active {
  background-color: #3498db;
  color: white;
}

/* ===============================
   תצוגת התוצאות והגרף
=============================== */
#results-section {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease-in-out, max-height 0.5s ease-in-out;
  flex-direction: column;
  align-items: center;
}

#results-section.show {
  opacity: 1;
  max-height: 2000px; /* מספיק גבוה כדי להכיל את כל התוכן */
}

/* סידור התוצאות והגרף */
.results-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.results-wrapper,
.chart-wrapper {
  max-width: 100%;
}

.results-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 5px;
}

.result-card {
  flex: 1 1 120px;
  max-width: 180px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  padding: 10px;
  text-align: center;
  font-size: 0.95rem;
  color: #fff; /* צבע טקסט לבן */
}

.result-card span {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: inherit; /* צבע הטקסט מותאם לרקע */
}

.result-card strong {
  display: block;
  font-size: 1.2rem;
  color: inherit;
}

#main-bracket {
  color: #e74c3c;
}

.chart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 250px;
  max-width: 300px;
  padding: 10px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.chart-wrapper canvas {
  max-width: 100%;
}

.legend {
  display: flex;
  flex-direction: column;
  margin-top: 15px;
  flex-wrap: wrap;
  gap: 5px;
}

.legend div {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
}

.color-box {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

/* ===============================
   סגנון כללי לסקשנים עם ID
=============================== */
#tax-info,
#tax-credits,
#tax-tips {
  margin: 30px auto;
  padding: 20px;
  max-width: 700px;
  background-color: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-family: Arial, sans-serif;
}

#tax-info h2, #tax-info h3,
#tax-credits h2, #tax-credits h3,
#tax-tips h3 {
  color: #3498db;
  text-align: center;
  margin-bottom: 15px;
}

#tax-info p,
#tax-credits p,
#tax-tips p,
#credits-2025 p {
  text-align: center;
  color: #555;
  line-height: 1.6;
  margin-bottom: 5px;
}

/* ===============================
   טבלאות – אחידות
=============================== */
.table-wrapper {
  width: 100%;
  overflow-x: auto; /* גלילה אופקית במובייל */
}

.table-wrapper table {
  width: 100%;
  min-width: 300px;
  border-collapse: collapse;
  table-layout: fixed; /* רוחב אחיד של תאים */
}

.table-wrapper th,
.table-wrapper td {
  text-align: center;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ddd;
}

.table-wrapper th {
  background-color: #3498db;
  color: #fff;
  font-weight: 700;
}

.table-wrapper tr:nth-child(even) {
  background-color: #f1f1f1;
}

.table-wrapper tr:hover {
  background-color: #e0f0ff;
}

@media (max-width: 768px) {
  .table-wrapper th,
  .table-wrapper td {
    padding: 8px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .table-wrapper th,
  .table-wrapper td {
    padding: 8px;
    font-size: 0.9rem;
  }
}

/* ===============================
   רשימות ואלמנטים עם אייקון
=============================== */
#tax-info ul,
#tax-credits ul,
#tax-tips ul,
#credits-2025 ul
 {
  color: #555;
  line-height: 1.6;
  padding-left: 0;
  list-style: none;
}

#tax-tips ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 15px;
}

#tax-info ul li,
#tax-credits ul li,
#credits-2025 ul li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}

#tax-info ul li::before,
#tax-credits ul li::before,
#credits-2025 ul li::before
 {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
}

#tax-tips .tip-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 2px;
}

.tip-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 8px;
}

/* ===============================
   קישורים
=============================== */
#tax-info a,
#tax-credits a,
#tax-tips a,
#credits-2025 a {
  color: #3498db;
  text-decoration: underline;
}

/* ===============================
   רספונסיביות כללית
=============================== */
@media (max-width: 768px) {
  #tax-info,
  #tax-credits,
  #tax-tips {
    padding: 15px;
    margin: 20px 10px;
  }

  .tip-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
  }

  .results-container {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
  }

  .chart-wrapper, .results-wrapper {
    width: 90%;
    text-align: center;
  }

  .results p {
    font-size: 1rem;
  }

  .legend div {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  #share-buttons a img {
    width: 35px;
  }

  footer .share-text {
    font-size: 1rem;
  }

  footer {
    padding: 15px 10px;
  }
}

/* ===============================
   שאר הסגנונות – פוטר וכפתורי שיתוף
=============================== */
#share-buttons img {
  cursor: pointer;
  transition: transform 0.2s;
  margin-left: 10px;
  margin-right: 10px;
}

#share-buttons img:hover {
  transform: scale(1.2);
}

footer {
  background-color: #3498db;
  color: #fff;
  padding: 20px 10px;
  text-align: center;
  margin-top: 40px;
  font-family: Arial, sans-serif;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  margin-top: 10px;
}

footer .share-text {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

footer a {
  color: #fff;
  text-decoration: underline;
  transition: color 0.2s;
}

footer a:hover {
  color: #e0f7ff;
  text-decoration: none;
}

#share-buttons {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

#share-buttons a img {
  width: 40px;
  vertical-align: middle;
  transition: transform 0.2s;
}

#share-buttons a img:hover {
  transform: scale(1.1);
}

footer p a {
  word-break: break-word;
}

footer .copyright {
  font-size: 0.8rem;
  margin-top: 10px;
}

/* ===============================
   סגנון טבלת נקודות זיכוי 2025
=============================== */
#credits-2025 {
  display: none; /* מוסתר כברירת מחדל */
  margin-top: 20px;
  padding: 20px;
  max-width: 700px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-left: auto;
  margin-right: auto;
}

#credits-2025 h3 {
  color: #3498db;
  margin-bottom: 10px;
  text-align: center;
}



#credits-2025 table {
  width: 100%;
  min-width: 300px;
  border-collapse: collapse;
  table-layout: fixed;
}

#credits-2025 th,
#credits-2025 td {
  text-align: center;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ddd;
}

#credits-2025 th {
  background-color: #3498db;
  color: #fff;
  font-weight: 700;
}

#credits-2025 tr:nth-child(even) {
  background-color: #f1f1f1;
}

#credits-2025 tr:hover {
  background-color: #e0f0ff;
}

/* רספונסיביות למובייל */
@media (max-width: 768px) {
  #credits-2025 th,
  #credits-2025 td {
    padding: 8px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  #credits-2025 th,
  #credits-2025 td {
    padding: 8px;
    font-size: 0.85rem;
  }
}

/* מכולה */
.action-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 20px auto;
  flex-wrap: wrap; /* מאפשר שבירה לניידים */
  max-width: 100%;
}

/* בסיס לכפתורים */
.btn {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 12px 18px;
  font-size: 1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* אפיליאייט */
.btn-affiliate {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 12px 18px;
  font-size: 1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: normal; /* ✅ מאפשר ירידת שורה */
  line-height: 1.4;    /* מרווח יפה בין שורות */
  background: #3498db;
  color: #fff;
  font-weight: 600;
}
.btn-affiliate:hover {
  background: #2980b9;
}

/* PDF באמצע - עיצוב Adobe */
.btn-pdf {
  background: #FF0000;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 28px; /* קצת יותר גדול */
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.btn-pdf:hover {
  background: #E60000;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.btn-pdf:active {
  background: #cc0000;
  transform: translateY(0);
  box-shadow: none;
}

/* טיפים */
.btn-tips {
  background: #27ae60;
  color: #fff;
  font-weight: 600;
}
.btn-tips:hover {
  background: #1e8449;
}

/* רספונסיביות לניידים */
@media (max-width: 768px) {
  .action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
    font-size: 1rem;
  }
  .btn-pdf {
    padding: 16px;
    font-size: 1.1rem;
  }
}
