/* Reset בסיסי */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  max-width: 100%;
  /* מוודא שכל האלמנטים לא יחרגו מרוחב המסך */
}

body {
  direction: rtl;
  font-family: 'Heebo', sans-serif;
  background-color: #ffffff;
  color: #1a1a1a;
  line-height: 1.6;
  overflow-x: hidden;
  /* מונע גלילה אופקית */
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 10%;
  background-color: #f8f9fa;
  gap: 2rem;
  flex-wrap: wrap;
  padding-left: 5%;
  padding-right: 5%;
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  font-size: 3.5rem;
  background: linear-gradient(45deg, #8e52db, #00c48c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  line-height: 1;
}

.hero p {
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-block;
  margin-top: 1rem;
  background-color: #00c48c;
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #00a77a;
}

.hero-image img {
  max-width: 500px;
  width: 100%;
}

/* Services */
.services {
  padding: 4rem 10%;
  background-color: #f8f9fa;
  text-align: center;
  padding-left: 5%;
  padding-right: 5%;
}

.services h2 {
  font-size: 2.8rem;
  color: #8e52db;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 15px;
}

.services h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #8e52db, #00c48c);
  border-radius: 2px;
}

.service-cards {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
}

.service-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  width: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(142, 82, 219, 0.15);
}

.service-card img {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.5rem;
  color: #007c91;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 10px;
}

.service-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background-color: #00bcd4;
  border-radius: 1.5px;
}

/* Target Audience */
.target-audience {
  padding: 4rem 10%;
  background-color: #f8f9fa;
  text-align: center;
}

.target-audience h2 {
  font-size: 2.8rem;
  color: #8e52db;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 15px;
}

.target-audience h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #8e52db, #00c48c);
  border-radius: 2px;
}

.audience-list {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.audience-item {
  width: 200px;
  text-align: center;
}

.audience-item img {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

/* Why Us */
/* Redesigned Why Us Section */
.why-us {
  padding: 4rem 5%;
  /* התאמת ריווח לפי הצורך */
  background-color: #f8f9fa;
  text-align: center;
}

.why-us h2 {
  font-size: 2.8rem;
  color: #8e52db;
  margin-bottom: 1rem;
  /* צמצום רווח לפני כותרת המשנה */
  position: relative;
  padding-bottom: 15px;
}

.why-us h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #8e52db, #00c48c);
  border-radius: 2px;
}

/* סגנון לכותרת המשנה אם הוספת אותה */
.why-us .section-subtitle {
  font-size: 1.2rem;
  color: #555;
  max-width: 800px;
  margin: -1rem auto 2.5rem auto;
}


/* עיצוב כל כרטיסייה */
.why-us-card {
  background-color: #fff;
  border-radius: 12px;
  /* פינות מעוגלות יותר */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  /* צל מודגש יותר */
  padding: 2rem;
  text-align: center;
  /* תוכן ממורכז */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 4px solid #00c48c;
  /* פס עליון בצבע ירוק-טורקיז */
}

.why-us-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(142, 82, 219, 0.12);
  /* צל סגול בהרחפה */
}


/* עיצוב הכותרת (H3) בתוך הכרטיסייה */
.why-us-card h3 {
  font-size: 1.5rem;
  color: #003366;
  /* כחול כהה */
  margin-bottom: 1rem;
}

/* עיצוב הטקסט (P) בתוך הכרטיסייה */
.why-us-card p {
  font-size: 1rem;
  color: #333;
  line-height: 1.7;
}

/* Redesigned Why Us Section - Updated Grid and Icons */

/* הגדרת הרשת (Grid) - *מעודכן ל-4 עמודות* */
.why-us-cards-grid {
  display: grid;
  /* התאמה ל-4 עמודות: 
     הקטנו את הרוחב המינימלי ל-250px כדי לאפשר ל-4 להיכנס ברוחב 1200px.
     במסכים צרים יותר, זה ירד אוטומטית ל-3, 2 או 1 עמודות.
  */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  /* אפשר להקטין מעט את הרווח אם צפוף */
  max-width: 1200px;
  /* שמירה על רוחב מקסימלי */
  margin: 2rem auto 0 auto;
}

/* עיצוב האייקון בתוך הכרטיסייה - *גדול יותר* */
.why-us-icon-card {
  width: 70px;
  /* הגדלה מ-60px */
  height: 70px;
  /* הגדלה מ-60px */
  margin-bottom: 1.2rem;
  /* אפשר להתאים את הרווח מתחת */
}

/* התאמות למובייל - *נשאר זהה* */
@media (max-width: 600px) {
  .why-us-cards-grid {
    grid-template-columns: 1fr;
    /* עמודה אחת בלבד */
  }
}

/* שאר הסגנונות של .why-us-card, h3, p נשארים כפי שהיו */
.why-us-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 4px solid #b10dd6;
}

.why-us-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(142, 82, 219, 0.12);
}

.why-us-card h3 {
  font-size: 1.5rem;
  color: #003366;
  margin-bottom: 1rem;
}

.why-us-card p {
  font-size: 1rem;
  color: #333;
  line-height: 1.7;
}

/* --- ודא שגם שאר הסגנונות של אזור why-us קיימים --- */
.why-us {
  padding: 4rem 5%;
  background-color: #f8f9fa;
  text-align: center;
}

.why-us h2 {
  font-size: 2.8rem;
  color: #8e52db;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 15px;
}

.why-us h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #8e52db, #00c48c);
  border-radius: 2px;
}

.why-us .section-subtitle {
  font-size: 1.2rem;
  color: #555;
  max-width: 800px;
  margin: -1rem auto 2.5rem auto;
}

/* --- --- */

/* Testimonials */
.testimonials {
  padding: 4rem 10%;
  background-color: #f8f9fa;
  text-align: center;
  padding-left: 5%;
  padding-right: 5%;
}

.testimonials h2 {
  font-size: 2.8rem;
  color: #8e52db;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 15px;
}

.testimonials h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #8e52db, #00c48c);
  border-radius: 2px;
}

.testimonial {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.testimonial-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.client-logo img {
  max-height: 60px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.client-logo {
  flex: 0 0 100px;
  max-width: 100px;
  margin-right: 1rem;
}

.client-info {
  flex: 1;
}

.client-name {
  font-weight: bold;
  color: #003366;
  font-size: 1rem;
  margin: 0;
}

/* Call to Action */
.cta {
  padding: 4rem 10%;
  background-color: #f8f9fa;
  text-align: center;
  padding-left: 5%;
  padding-right: 5%;
}

.cta h2 {
  font-size: 2.8rem;
  color: #8e52db;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 15px;
}

.cta h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #8e52db, #00c48c);
  border-radius: 2px;
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.cta-button {
  min-width: 250px;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  text-align: center;
}

.cta-button.primary {
  background: linear-gradient(45deg, #8e52db, #3b86f7);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(44, 123, 229, 0.2);
}

.cta-button.secondary {
  background: white;
  border: 2px solid #8e52db;
  color: #8e52db;
}

.cta-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 123, 229, 0.3);
}

.cta-button.secondary:hover {
  background: rgba(44, 123, 229, 0.05);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
  margin: 2% auto;
  padding: 2.5rem;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  position: relative;
  direction: rtl;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  animation: modalFadeIn 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-button {
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  font-size: 1.8rem;
  color: #666;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-button:hover {
  color: #2c7be5;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.7rem;
  color: #333;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #2c7be5;
  outline: none;
  box-shadow: 0 0 0 4px rgba(44, 123, 229, 0.1);
}

.form-group.services-checkboxes {
  margin-bottom: 2rem;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-item input[type="checkbox"] {
  width: auto;
  margin-left: 0.5rem;
}

.checkbox-item label {
  margin: 0;
  font-weight: normal;
}

.char-count {
  display: block;
  text-align: left;
  color: #666;
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

.form-submit {
  text-align: center;
  margin-top: 2rem;
}

.form-submit button {
  margin: 0 auto;
}

/* עדכון סגנון השדות - יופעל רק לאחר ניסיון שליחה */
.was-validated .form-group input:invalid,
.was-validated .form-group textarea:invalid {
  border-color: #ff4444;
}

.was-validated .form-group input:invalid:focus,
.was-validated .form-group textarea:invalid:focus {
  box-shadow: 0 0 0 4px rgba(255, 68, 68, 0.1);
}

.modal-content h2 {
  color: #2c7be5;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

/* Form Layout Styles */
.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-group:not(.form-row .form-group) {
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .cta-buttons {
    flex-direction: column;
  }

  .modal-content {
    margin: 10% auto;
    padding: 2rem;
  }

  .form-row {
    flex-direction: column;
    gap: 1rem;
  }

  .form-row .form-group {
    margin-bottom: 0.5rem;
  }
}

/* Footer */
footer {
  background-color: #bba6e8;
  color: white;
  padding: 2rem 10%;
  text-align: center;
  padding-left: 5%;
  padding-right: 5%;
}

.footer-logo {
  max-width: 200px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 12px rgba(60, 30, 90, 0.25));
}

.footer-nav a {
  color: white;
  margin: 0 1rem;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.social-media a img {
  width: 24px;
  height: 24px;
  margin: 0 0.5rem;
}

.contact-info p {
  margin: 0.5rem 0;
}

footer .copyright {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.copyright,
.copyright-text {
  color: #fff;
}

.footer-link {
  color: #fff !important;
}

/* עיצוב כותרות משודרג */
h1,
h2,
h3 {
  position: relative;
  font-family: 'Heebo', sans-serif;
  letter-spacing: 0.5px;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 10%;
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 1px solid #e0e0e0;
  background-color: rgba(255, 255, 255, 0.85);
  /* רקע חצי-שקוף */
  backdrop-filter: blur(10px);
  /* אפקט הטשטוש */
  -webkit-backdrop-filter: blur(10px);
  /* תמיכה בספארי */
}

.top-nav .logo img {
  max-height: 48px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links li a {
  text-decoration: none;
  color: #003366;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #00bcd4;
}

.testimonial {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  margin: 2rem auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  position: relative;
  text-align: right;
  transition: transform 0.3s ease;
}

.testimonial:hover {
  transform: translateY(-5px);
}

.testimonial::before {
  content: "“";
  font-size: 4rem;
  color: #00bcd4;
  position: absolute;
  top: -20px;
  right: 20px;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial p {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 1rem;
}

.client-name {
  font-weight: bold;
  color: #003366;
  font-size: 1rem;
}

.client-name img {
  display: block;
  margin-top: 0.5rem;
  max-height: 40px;
}

/* Modern Footer */
.modern-footer {
  background: #bba6e8;
  color: white;
  padding: 3rem 10%;
  font-size: 0.95rem;
}

.modern-footer .footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.modern-footer .footer-brand {
  flex: 1;
  min-width: 220px;
}

.modern-footer .footer-brand .footer-logo {
  max-width: 180px;
}

.modern-footer .footer-brand .tagline {
  margin-top: 0.8rem;
  font-size: 1rem;
  color: #fff;
}

.modern-footer .footer-links {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modern-footer .footer-links a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.modern-footer .footer-links a:hover {
  color: #00bcd4;
}

.modern-footer .footer-contact {
  flex: 1;
  min-width: 220px;
}

.modern-footer .footer-contact a {
  color: #00bcd4;
  text-decoration: none;
}

.modern-footer .footer-contact a:hover {
  text-decoration: underline;
}

.modern-footer .footer-contact .social-media {
  margin-top: 1rem;
}

.modern-footer .footer-contact .social-media a img {
  width: 28px;
  height: 28px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.modern-footer .footer-bottom {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: #aaa;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .modern-footer .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .modern-footer .footer-links,
  .modern-footer .footer-contact {
    align-items: center;
  }

  .modern-footer .footer-contact .social-media {
    justify-content: center;
  }
}

.back-to-top {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(45deg, #3b86f7, #8e52db);
  color: #fff;
  font-size: 1.4rem;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: none;
  /* מופיע רק בגלילה */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1000;
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.back-to-top:active {
  transform: scale(0.95);
}

.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.article-content p {
  font-size: 1.1rem;
  /* מעט גדול יותר (17-18px) */
  line-height: 1.8;
  /* ריווח שורות נדיב יותר */
  color: #333;
  /* צבע טקסט כהה וברור */
  margin-bottom: 1.5rem;
  /* ריווח בין פסקאות */
}

.article-content ul,
.article-content ol {
  padding-right: 20px;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* עיצוב הודעות המשוב */
.form-feedback {
  display: none;
  /* מוסתר כברירת מחדל */
  padding: 1rem;
  margin-top: 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
}

.form-feedback.success {
  background-color: #e6f9f0;
  color: #008a4c;
  border: 1px solid #b6e9d2;
}

.form-feedback.error {
  background-color: #fdeeee;
  color: #d93030;
  border: 1px solid #f8c6c6;
}

/* עיצוב ה-Spinner שיהיה בתוך הכפתור */
.btn-spinner {
  display: none;
  /* מוסתר כברירת מחדל */
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* אנימציית הסיבוב של ה-Spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* מצב טעינה של הכפתור */
.cta-button.is-loading {
  cursor: not-allowed;
  opacity: 0.8;
}

/* כשהכפתור בטעינה, הסתר את הטקסט */
.cta-button.is-loading .btn-text {
  display: none;
}

/* כשהכפתור בטעינה, הצג את ה-Spinner */
.cta-button.is-loading .btn-spinner {
  display: block;
  margin: 0 auto;
  /* ממקם את ה-Spinner באמצע הכפתור */
}

/* --- עיצוב צ'אטבוט iDone - גרסה מתוקנת --- */
#idone-chat-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  font-family: 'Heebo', sans-serif;
  direction: rtl;
}

/* כפתור הפתיחה העגול */
#chat-toggle-btn {
  width: 65px;
  /* הגדלה קלה */
  height: 65px;
  border-radius: 50%;
  background: white;
  /* רקע לבן נקי כדי להבליט את הרובוט */
  border: 1px solid #eee;
  /* מסגרת עדינה */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#chat-toggle-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(142, 82, 219, 0.25);
}

#chat-toggle-btn img {
  width: 45px;
  /* תמונה גדולה יותר */
  height: 45px;
  /* הוסר הפילטר שהפך את התמונה ללבנה - כעת יראו את המקור */
}

/* הגדרות בסיס לחלונית הצ'אט (תצוגת מחשב) */
#chat-window {
  position: fixed;
  /* קיבוע ביחס למסך כולו ולא לכפתור */
  bottom: 100px;
  /* מיקום: 25px מרווח תחתון + 65px גובה כפתור + 10px רווח */
  right: 25px;
  /* צמוד לימין, בקו אחד עם הכפתור */
  width: 380px;
  /* רוחב סטנדרטי ונוח למחשב */
  height: 600px;
  /* גובה המאפשר ראיית היסטוריה */
  max-height: 80vh;
  /* הגבלה שלא יעבור 80% מגובה המסך */
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10000;
  /* שכבה עליונה תמיד */

  /* אנימציית פתיחה */
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: bottom right;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

/* מצב מוסתר */
#chat-window.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.95);
}

/* כותרת הצ'אט */
.chat-header {
  background: linear-gradient(135deg, #8e52db, #00c48c);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-info img {
  width: 40px;
  height: 40px;
  background: white;
  /* רקע לבן סביב הלוגו בכותרת */
  border-radius: 50%;
  padding: 4px;
  object-fit: contain;
  /* שומר על פרופורציות התמונה */
}

.chat-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
}

.chat-header span {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 400;
}

#chat-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 0.5;
  padding: 0 5px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

#chat-close-btn:hover {
  opacity: 1;
}

/* אזור ההודעות */
#chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: #f4f6f8;
  /* צבע רקע אפור בהיר מאוד ונעים */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* גלילה מותאמת אישית לאזור ההודעות */
#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bot-message {
  background-color: #ffffff;
  color: #333;
  align-self: flex-start;
  border-bottom-right-radius: 2px;
  border: 1px solid #ebebeb;
}

.user-message {
  background: linear-gradient(135deg, #8e52db, #7a46bd);
  color: white;
  align-self: flex-end;
  border-bottom-left-radius: 2px;
}

.typing-indicator {
  font-size: 0.85rem;
  color: #666;
  margin-right: 15px;
  margin-top: 5px;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* אזור ההקלדה */
.chat-input-area {
  padding: 15px;
  background: white;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  align-items: center;
}

#chat-input {
  flex: 1;
  border: 1px solid #e1e1e1;
  border-radius: 25px;
  padding: 12px 20px;
  outline: none;
  font-size: 0.95rem;
  transition: all 0.3s;
  background-color: #f8f9fa;
}

#chat-input:focus {
  border-color: #8e52db;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(142, 82, 219, 0.1);
}

#chat-send-btn {
  background: linear-gradient(135deg, #8e52db, #7a46bd);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 196, 140, 0.3);
}

#chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 196, 140, 0.4);
}

#chat-send-btn svg {
  margin-right: -2px;
  /* תיקון אופטי קטן לאייקון */
}

/* התאמה קריטית למובייל */
@media (max-width: 480px) {
  #chat-window {
    position: fixed;
    /* במובייל - מתנתק מהכפתור ומתייחס למסך כולו */
    bottom: 90px;
    /* גובה מהתחתית */
    right: 5vw;
    /* מרווח מימין (5% מרוחב המסך) */
    width: 90vw;
    /* רוחב של 90% מהמסך - פותר את בעיית הכיווץ */
    height: 60vh;
    /* גובה יחסי למסך */
    max-height: 600px;
    z-index: 10000;
    /* מוודא שהוא תמיד למעלה */
  }
}

#chat-toggle-btn {
  width: 55px;
  height: 55px;
}

/* --- עיצוב תוכן הודעות הבוט (Markdown) --- */

/* הסרת רווחים מיותרים מהפסקאות שהבוט יוצר */
.bot-message p {
  margin: 0 0 8px 0;
}

.bot-message p:last-child {
  margin-bottom: 0;
}

/* עיצוב רשימות (בולטים) */
.bot-message ul,
.bot-message ol {
  margin: 5px 0;
  padding-right: 20px;
  /* הזחה לימין כי אנחנו בעברית */
}

.bot-message li {
  margin-bottom: 4px;
}

/* הדגשות */
.bot-message strong {
  font-weight: 700;
  color: #8e52db;
  /* צבע סגול להדגשות, אופציונלי */
}

/* קישורים (אם הבוט שולח לינקים) */
.bot-message a {
  color: #00c48c;
  text-decoration: underline;
}