/* ===== N360 Contact Form - FORCE OVERRIDE VERSION ===== */
/* גרסה זו משתמשת ב-!important כדי לדרוס CSS ישן */

/* משתנים להתאמה אישית */
:root {
  --n360-line-width: 100%;  /* ברירת מחדל - ידרס ע"י inline style */
  --n360-line-color-start: #ffd400;
  --n360-line-color-end: #ffe48c;
}

/* מיכל ראשי */
.n360-contact{ 
  margin-top: 40px !important;
  direction: rtl !important;
  position: relative !important;
  padding-top: 0 !important;  /* מבטל padding ישן */
}

@media (min-width:992px){ 
  .n360-contact{ 
    margin-top: 50px !important; 
  } 
}

/* מבטלים ::before ישנים אם יש */
.n360-contact::before,
.n360-contact::after {
  content: none !important;
  display: none !important;
}

/* === חלק 1: הכותרת - מעל הקו, מיושרת לימין === */
.n360-contact .n360-ct-title{
  font-size: 24px !important;
  font-weight: 800 !important;
  color: #1e3c72 !important;
  margin: 0 0 20px 0 !important;
  padding: 0 !important;
  text-align: right !important;
  direction: rtl !important;
  display: block !important;
  position: relative !important;
  z-index: 2 !important;
  background: transparent !important;
  border: none !important;
  border-bottom: none !important;
  width: auto !important;
  right: auto !important;
  left: auto !important;
  top: auto !important;
}

/* מבטלים כל before/after על הכותרת */
.n360-contact .n360-ct-title::before,
.n360-contact .n360-ct-title::after {
  content: none !important;
  display: none !important;
}

/* === חלק 2: הקו המוזהב - נפרד לחלוטין === */
.n360-contact .n360-ct-line{
  width: var(--n360-line-width) !important;
  height: 2px !important;
  background: linear-gradient(90deg, var(--n360-line-color-start) 0%, var(--n360-line-color-end) 100%) !important;
  border-radius: 2px !important;
  margin: 0 0 20px 0 !important;
  display: block !important;
  position: relative !important;
  padding: 0 !important;
  right: auto !important;
  left: auto !important;
  top: auto !important;
}

/* מסגרת הטופס */
.n360-contact .n360-ct-form{
  background: #f1f4f8 !important;
  border: 1px solid #e5eaf1 !important;
  border-radius: 14px !important;
  padding: 20px !important;
  direction: rtl !important;
}

/* גריד השדות */
.n360-contact .n360-ct-grid{
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 14px !important;
}

/* שדה בודד */
.n360-contact .n360-ct-field{
  display: flex !important;
  flex-direction: column !important;
  text-align: right !important;
}

.n360-contact .n360-ct-field label{
  font-weight: 700 !important;
  color: #123567 !important;
  margin-bottom: 6px !important;
  font-size: 14px !important;
  text-align: right !important;
}

/* שדות קלט */
.n360-contact input[type="text"],
.n360-contact input[type="tel"],
.n360-contact input[type="email"],
.n360-contact select,
.n360-contact textarea{
  background: #fff !important;
  border: 1px solid #dfe6ef !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  font: inherit !important;
  text-align: right !important;
  direction: rtl !important;
  transition: border-color 0.2s !important;
}

.n360-contact input:focus,
.n360-contact select:focus,
.n360-contact textarea:focus{
  outline: none !important;
  border-color: #ffd400 !important;
}

.n360-contact textarea{
  resize: vertical !important;
  min-height: 100px !important;
  font-family: inherit !important;
}

.n360-contact .n360-ct-field--wide{
  grid-column: 1 / -1 !important;
}

/* === שדה הסכמה - ימין === */
.n360-contact .n360-ct-field--consent{
  grid-column: 1 / -1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;  /* ימין ב-RTL */
  direction: rtl !important;
  margin-top: 8px !important;
  text-align: right !important;
}

.n360-contact .n360-ct-check{
  display: inline-flex !important;
  gap: 8px !important;
  align-items: center !important;
  font-weight: 600 !important;
  color: #203a63 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  flex-direction: row !important;
  text-align: right !important;
}

.n360-contact .n360-ct-check input[type="checkbox"]{
  width: 18px !important;
  height: 18px !important;
  cursor: pointer !important;
  margin: 0 !important;
  order: 1 !important;  /* הצ'ק בוקס בצד ימין */
}

.n360-contact .n360-ct-check span{
  order: 2 !important;  /* הטקסט אחרי הצ'ק בוקס */
  text-align: right !important;
}

/* === כפתורים - צד ימין === */
.n360-contact .n360-ct-actions{
  margin-top: 16px !important;
  display: flex !important;
  justify-content: flex-start !important;  /* ימין ב-RTL */
  align-items: center !important;
  gap: 14px !important;
  direction: rtl !important;
}

.n360-contact .n360-ct-btn{
  background: linear-gradient(90deg, #ffd400, #ffe48c) !important;
  color: #133a73 !important;
  font-weight: 800 !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 12px 28px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 16px !important;
  transition: all 0.2s !important;
  box-shadow: 0 2px 8px rgba(255, 212, 0, 0.3) !important;
  margin: 0 !important;  /* מבטל כל margin */
}

.n360-contact .n360-ct-btn:hover{
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(255, 212, 0, 0.4) !important;
}

.n360-contact .n360-ct-btn:active{
  transform: translateY(0) !important;
}

/* הודעות */
.n360-contact .n360-msg{
  min-height: 1.25em !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}

.n360-contact .n360-msg.is-ok{
  color: #1a8e4b !important;
}

.n360-contact .n360-msg.is-err{
  color: #b3261e !important;
}

/* התאמה ל-nice-select plugin */
.n360-contact .nice-select {
  float: none !important;
  direction: rtl !important;
  text-align: right !important;
  background: #fff !important;
  border: 1px solid #dfe6ef !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
}

.n360-contact .nice-select .current {
  text-align: right !important;
}

.n360-contact .nice-select .list {
  text-align: right !important;
}

/* === התאמות רספונסיביות === */

/* מסכים בינוניים */
@media (max-width: 980px){
  .n360-contact .n360-ct-grid{
    grid-template-columns: 1fr 1fr !important;
  }
  
  .n360-contact .n360-ct-title{
    font-size: 22px !important;
  }
}

/* מובייל */
@media (max-width: 640px){
  .n360-contact{
    margin-top: 30px !important;
  }
  
  .n360-contact .n360-ct-title{
    font-size: 20px !important;
    margin-bottom: 15px !important;
  }
  
  .n360-contact .n360-ct-line{
    margin-bottom: 15px !important;
  }
  
  .n360-contact .n360-ct-grid{
    grid-template-columns: 1fr !important;
  }
  
  .n360-contact .n360-ct-form{
    padding: 16px !important;
  }
  
  .n360-contact .n360-ct-actions{
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  .n360-contact .n360-ct-btn{
    width: 100% !important;
    justify-content: center !important;
  }
  
  .n360-contact .n360-ct-field--consent{
    justify-content: center !important;
  }
}

/* === Override ספציפי למקרה שיש CSS ישן מאוד === */
section.n360-contact {
  padding-top: 0 !important;
}

section.n360-contact::before {
  display: none !important;
}

section.n360-contact h3.n360-ct-title {
  position: static !important;
  right: auto !important;
  top: auto !important;
  background: transparent !important;
  display: block !important;
}