/* i18n flash prevention — body hidden until translations applied */
html.i18n-loading body { visibility: hidden; }

/* -------------------------
   אפס סטיילינג בסיסי
------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  direction: rtl;
  font-family: 'Calibri', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  width: 100%;
  min-height: 100vh;
  display: block;           /* ✅ ביטול flex הגלובלי */
  overflow-x: hidden;       /* מניעת גלילה לרוחב */
  overflow-y: auto;         /* ✅ גלילה פעילה כברירת מחדל */
  background: linear-gradient(135deg, #f3eaff, #eaf1ff);
}

/* -------------------------
   תוכן מסך (כותרת ראשית, כותרת משנית, גוף)
------------------------- */
main.screen-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  max-width: 1600px;
  margin: 0 auto;
}

.screen-title h1 {
  font-size: 2.3rem;
  margin-bottom: 20px;
  color: #182848;
  margin-top: 10px;
}

.screen-title h2 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #690b7c;
}

.screen-title p {
  font-size: 1rem;
  line-height: 1.6;
  color: #333333;
  margin-bottom: 10px;
}

/* -------------------------
         חבילות
------------------------- */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  padding: 10px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 10px;
  padding: 30px;
  width: 300px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

/* מסגרת דינמית */
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 10px;
  border: 3px solid transparent;
  pointer-events: none;
  transition: border 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.card:hover::after {
  border-color: var(--border-color, #690b7c);
}

.card h2 {
  margin-bottom: 5px;
  font-size: 20px;
  color: #1d3360;
}

.card-subtitle {
  font-size: 15px;
  color: #555;
  margin: 3px 0 10px;
  text-align: center;
  font-weight: 600;
}

.card p {
  position: relative;
  margin: 8px 0 8px 20px;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  text-align: right;
}

.card p::before {
  content: "✔";
  position: absolute;
  right: 0;
  transform: translateX(140%);
  color: #1d3360;
  font-weight: bold;
  font-size: 14px;
}

/* כפתורים בכרטיסים */
.card .card-btn {
  display: block;
  margin: 15px auto 0;
  padding: 10px 20px;
  border: none;
  background: linear-gradient(90deg, #690b7c, #d187dc);
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: auto;
}

.card .card-btn:hover {
  background-color: #304c8f;
}

/* -------------------------
   תוכן למסכים כלליים (register / payment וכו’)
------------------------- */
.page-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 40px 20px;
  max-width: 1600px;
  margin: 0 auto;
}

.content-box {
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 40px 50px;
  max-width: 900px;
  width: 100%;
}

.content-box h1 {
  font-size: 2rem;
  color: #182848;
  margin-bottom: 10px;
}

.content-box h3 {
  font-size: 1.2rem;
  color: #690b7c;
  margin-bottom: 35px;
}

/* -------------------------
   עיצוב טפסים כלליים
------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* שתי עמודות מאוזנות */
  gap: 20px;
  align-items: start; /* כדי שכל השדות יהיו בגובה אחיד */
  text-align: right;
}

.form-grid > * {
  width: 100%; /* מונע שדה ראשון שובר עמודה */
}


.form-grid input,
.form-grid select {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  transition: all 0.3s ease;
}

.form-grid input:focus,
.form-grid select:focus {
  border-color: #d187dc;
  outline: none;
  box-shadow: 0 0 6px rgba(209, 135, 220, 0.4);
}

.form-grid select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23690b7c' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  background-size: 12px;
  padding-left: 36px;
  cursor: pointer;
}
/* English: the text starts on the left, so the arrow (and its room) move to the right — it covered the text */
html[dir="ltr"] .form-grid select {
  background-position: right 16px center;
  padding-left: 12px;
  padding-right: 36px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.price-box {
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  color: #1d3360;
}

.primary-button {
  grid-column: 1 / -1;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #690b7c, #d187dc);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
  width: 250px;
  margin: 10px auto 0;
}

.primary-button:hover {
  opacity: 0.9;
}

.form-message {
  grid-column: 1 / -1;
  margin-top: 10px;
  font-weight: bold;
}

/* חץ חזרה */
.back-arrow {
  position: absolute;
  top: 25px;
  right: 40px;
  font-size: 18px;
  color: #690b7c;
  text-decoration: none;
  z-index: 10;
  transition: color 0.2s ease;
}

.back-arrow:hover {
  color: #304c8f;
}

/* מובייל */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .primary-button {
    width: 100%;
  }
}

/* ================================
   התאמות מיוחדות למסך ההרשמה
================================== */
body.register-page {
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.register-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

/* כרטיס הרשמה */
.register-box {
  background: #fff;
  padding: 40px 50px;
  border-radius: 20px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
  width: 800px;
  text-align: center;
}

/* טופס ההרשמה */
.register-box .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 28px;
  align-items: start;
  text-align: right;
}

.register-box .form-grid > * {
  width: 100%;
}

.register-box input,
.register-box select {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  transition: all 0.3s ease;
}

.register-box input:focus,
.register-box select:focus {
  border-color: #d187dc;
  outline: none;
  box-shadow: 0 0 6px rgba(209, 135, 220, 0.4);
}

/* תאריך האירוע */
.register-box input[type="date"] {
  direction: rtl;
  text-align: right;
  font-family: 'Calibri', sans-serif;
}

/* כפתור הרשמה */
.register-box .primary-button {
  grid-column: 1 / -1;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #690b7c, #182848);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
  width: 250px;
  margin: 15px auto 0;
}

.register-box .primary-button:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

/* תיבת מחיר */
.register-box .price-box {
  grid-column: 1 / -1;
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  color: #1d3360;
}

/* כפתור חזרה */
.back-arrow {
  position: absolute;
  top: 25px;
  right: 40px;
  font-size: 18px;
  color: #ffffff;
  text-decoration: none;
  z-index: 10;
  transition: color 0.2s ease;
  background-color: rgba(0,0,0,0.2);
  padding: 8px 14px;
  border-radius: 6px;
}

.back-arrow:hover {
  color: #ffd2ff;
  background-color: rgba(0,0,0,0.3);
}

/* התאמה למובייל */
@media (max-width: 768px) {
  .register-box {
    width: 90%;
    padding: 30px;
  }

  .register-box .form-grid {
    grid-template-columns: 1fr;
  }

  .register-box .primary-button {
    width: 100%;
  }
}

/* -------------------------
   פוטר
------------------------- */
footer {
  background-color: #182848;
  color: white;
  text-align: center;
  padding: 20px;
  flex-shrink: 0;
}

/* ✅ מבנה עמוד מלא – פוטר יציב בתחתית */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;  /* חשוב מאוד */
}

/* גורם לתוכן לתפוס את כל השטח הזמין */
main,
.page-container,
.screen-title {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* אופציונלי: רקע אחיד לעמודים */
body {
  background-color: #f5f7fb;
}

/* -------------------------
   מבנה עמוד פנימי + פוטר
------------------------- */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-wrap {
  display: flex;
  flex: 1;
  min-height: 0;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.content {
  flex: 1;
}
/* -------------------------
   ריווח מסרגל צדדי ומרכוז תוכן במסכים פנימיים
------------------------- */
.page-wrap main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: start; /* right in Hebrew, left in English — every internal screen inherits it */
  padding: 0;
  margin-right: 250px;
  box-sizing: border-box;
  min-height: 100vh;
}
.page-wrap.sidebar-collapsed main { margin-right: 60px; }
.page-title {
  text-align: start;
  width: auto;
  margin-bottom: 0;
  color: #111827;
  font-weight: 700;
  font-size: 16px;
}
@media (max-width: 768px) {
  .page-wrap main,
  .page-wrap.sidebar-collapsed main,
  .page-wrap.sidebar-expanded main {
    margin-right: 0 !important;
    width: 100% !important;
    padding: 0 !important;
  }
}



#footer-container {
  flex-shrink: 0;
  width: 100%;
}

#footer-container footer {
  background-color: #182848;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 14px;
}

/* -------------------------
   פופאפ מותאם אישית
------------------------- */
.custom-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.custom-popup {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  padding: 0;
  max-width: 500px;
  width: 92%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9);
  animation: scaleIn 0.3s forwards;
}

@keyframes scaleIn {
  to {
    transform: scale(1);
  }
}

.custom-popup-header {
  background: linear-gradient(90deg, #690b7c, #d187dc);
  color: white;
  padding: 20px 25px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}

.custom-popup-content {
  padding: 20px 20px;
  text-align: center;
  font-size: 18px;
  color: #333;
  line-height: 1.6;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.custom-popup-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  padding: 0 25px 30px 25px;
}

.custom-popup-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
}

.custom-popup-btn-confirm {
  background: linear-gradient(90deg, #690b7c, #d187dc);
  color: white;
}

.custom-popup-btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(105, 11, 124, 0.4);
}

.custom-popup-btn-cancel {
  background: #e0e0e0;
  color: #333;
}

.custom-popup-btn-cancel:hover {
  background: #d0d0d0;
  transform: translateY(-2px);
}

.custom-popup-btn-ok {
  background: linear-gradient(90deg, #690b7c, #d187dc);
  color: white;
}

.custom-popup-btn-ok:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(105, 11, 124, 0.4);
}

/* הודעות סוג אזהרה */
.custom-popup-header.warning {
  background: linear-gradient(90deg, #ff6b6b, #ff8787);
}

.custom-popup-btn-confirm.warning:hover {
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* הודעות סוג הצלחה */
.custom-popup-header.success {
  background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.custom-popup-btn-ok.success:hover {
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

/* הודעות סוג שגיאה */
.custom-popup-header.error {
  background: linear-gradient(90deg, #f44336, #e57373);
}

.custom-popup-btn-ok.error:hover {
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}
.secondary-btn {
  position: relative;
}
.event-list {
  max-height: 55vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 2px;
}

.event-choice {
  border: 1.5px solid #e8ddf5;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 6px 0;
  cursor: pointer;
  text-align: right;
  transition: background 0.15s, border-color 0.15s;
  font-size: 14px;
}
.event-choice:hover {
  background: #f8f3ff;
  border-color: #c084e0;
}
.event-choice.selected {
  background: #f2e6ff;
  border-color: #690b7c;
}

/* popup mobile */
@media (max-width: 600px), (pointer: coarse) and (max-width: 768px) {
  .custom-popup {
    width: 96%;
    max-height: 92vh;
    border-radius: 14px;
  }
  .custom-popup-header {
    padding: 14px 16px;
    font-size: 16px;
  }
  .custom-popup-content {
    padding: 14px 14px;
    font-size: 14px;
  }
  .custom-popup-buttons {
    padding: 10px 14px;
    gap: 8px;
  }
  .custom-popup-btn {
    padding: 10px 16px;
    font-size: 14px;
    flex: 1;
  }
  .event-list {
    max-height: 48vh;
  }
  .event-choice {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* ===============================
   🟣 טולטיפ חדש - שורה אחת, לא נחתך
=============================== */
.ui-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  padding: 8px 12px;
  background: rgba(45, 18, 107, 0.95);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap; /* שורה אחת בלבד */
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.ui-tooltip.visible {
  opacity: 1;
  transform: scale(1);
}
/* ── תמיכת LTR לאנגלית ── */
.lang-ltr * {
  direction: ltr;
  unicode-bidi: plaintext;
}

.lang-ltr,
.lang-ltr h1,
.lang-ltr h2,
.lang-ltr h3,
.lang-ltr p,
.lang-ltr button,
.lang-ltr input,
.lang-ltr textarea {
  font-family: 'DM Sans', 'Heebo', sans-serif;
}
.lang-ltr .dd-panel a {
  flex-direction: row !important;
  text-align: left !important;
  direction: ltr !important;
  padding-right: 12px !important;
  padding-left: 12px !important;
}

.lang-ltr .dd-panel a:hover {
  padding-right: 12px !important;
  padding-left: 16px !important;
}

.lang-ltr .dd-panel {
  direction: ltr !important;
  padding-bottom: 12px !important;
}
.lang-ltr * {
  line-height: 1.6;
}

.lang-ltr button,
.lang-ltr a,
.lang-ltr span {
  overflow: visible !important;
}
.lang-ltr .auth-btn,
.lang-ltr .nav-btn,
.lang-ltr .dropbtn {
  height: auto !important;
  min-height: 38px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  line-height: 1.6 !important;
  overflow: visible !important;
}