/* 🔹 תיקון ל-navbar, כפתורים ולוגו בנייד */
.navbar .navbar-brand {
    font-size: 1.5rem;       /* גודל לוגו קריא יותר */
    white-space: nowrap;     /* מונע שבירה של הלוגו לשורה חדשה */
    margin-right: 10px;
}

.navbar .d-flex.align-items-center {
    flex-wrap: wrap;         /* מאפשר לכפתורים לעבור שורה במידת הצורך */
    gap: 4px;
}

.navbar .btn {
    font-size: 0.75rem;      /* קטן יותר במכשירים קטנים */
    padding: 3px 6px;
}
.teacher-bio {
    white-space: pre-line;
}

@media (max-width: 576px) {
    .whatsapp-float {
        bottom: 60px;        /* מעלה את כפתור WhatsApp כדי שלא יסתיר את ה-navbar */
        font-size: 0.75rem;
        padding: 5px 10px;
    }
}

/* כפתור ניקוי פילטרים – עיצוב כמו הפילטרים */
.filter-clear-wrapper a {
    display: inline-block;
    width: 100%;
    max-width: 200px;
    padding: 6px 12px;
    font-size: 0.95rem;
    color: #004080;               /* צבע טקסט כמו הפילטרים */
    background: #fff;             /* רקע לבן */
    border: 1px solid #cfd8dc;   /* גבול דק כמו הפילטרים */
    border-radius: 12px;          /* פינות מעוגלות כמו הפילטרים */
    text-decoration: none;
    text-align: center;
    transition: 0.2s;
}

.filter-clear-wrapper a:hover {
    background: #f3f7ff;          /* רקע בהובר כמו הפילטרים */
    border-color: #3399ff;        /* שינוי צבע גבול קל */
}
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #cfd8dc;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  z-index: 5000;
  display: none; /* מוסתר כברירת מחדל */
}

.autocomplete-item {
  padding: 6px 10px;
  cursor: pointer;
}

.autocomplete-item:hover {
  background: #e8f0ff;
}

/* צבע וגודל מובלט לצ’קבוקס */
.highlight-checkbox {
    width: 22px;
    height: 22px;
    accent-color: #0d6efd;  /* הצבע כשהוא מסומן */
    cursor: pointer;
    border: 2px solid #0d6efd;  /* גבול כחול תמידי */
    border-radius: 4px;         /* פינות מעט מעוגלות */
    background-color: #fff;      /* רקע לבן */
    transition: background-color 0.2s, border-color 0.2s;
}

.highlight-checkbox:checked {
    background-color: #0d6efd;  /* מלא כחול כשהוא מסומן */
}

.highlight-checkbox + .form-check-label {
    font-weight: 600;
    color: #0d6efd;
    cursor: pointer;
}

.highlight {
    animation: highlightAnim 20s ease forwards;
}

@keyframes highlightAnim {
    0%   { background-color: #ffff99; } /* צהוב בוהק */
    100% { background-color: transparent; } /* חוזר לרקע הרגיל */
}

/* רספונסיביות לנייד */
@media (max-width: 768px) {
    .filter-clear-wrapper a {
        width: 90%;
        font-size: 0.9rem;
    }
}


/* 🔹 כפתור סגירה מותאם למודאלים */
.btn-close.btn-close-custom {
    width: 20px;      /* קטן יותר מהסטנדרטי */
    height: 20px;
    opacity: 0.6;     /* יותר עדין */
}

.btn-close.btn-close-custom:hover {
    opacity: 1;       /* כשמרחפים – מודגש */
}

.primary-btn {
  background: #16a34a; /* ירוק */
  color: white;
  font-weight: 600;
  border-radius: 14px;
  padding: 12px 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: .3s;
}
.primary-btn:hover {
  background: #15803d;
}

.secondary-btn {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #1f2937;
  border-radius: 14px;
  padding: 10px 20px;
  transition: .3s;
}
.secondary-btn:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card.deep-shadow {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.35); /* צל עמוק ושחור */
}

body {
  background: linear-gradient(270deg, #f0f4f8, #e0ecf5, #f0f4f8);
  background-size: 600% 600%;
  animation: gradientShift 20s ease infinite;
}

/* 🔹 כפתורי משחק */
.game-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;                /* רווח בין אייקון לטקסט */
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* עוטף הכפתורים */
.game-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px; /* רווח אחיד בין כפתורים */
  justify-content: center;
}

/* כל כפתור */
.game-btn {
  flex: 1 1 auto;       /* מאפשר גמישות */
  min-width: 180px;     /* רוחב מינימלי */
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;             /* רווח בין אייקון לטקסט */
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}



/* בנייד – כפתורים אחד מתחת לשני */
@media (max-width: 576px) {
  .game-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .game-btn {
    width: 100%;
    margin-bottom: 8px; /* רווח קטן בין כפתורים */
  }
  /* כדי שהכפתור האחרון לא יקבל רווח מיותר */
  .game-btn:last-child {
    margin-bottom: 0;
  }
}

/* צבעים שונים לכל משחק */
.game-btn.easy {
  background: linear-gradient(135deg, #a7f3d0, #34d399);
  color: #064e3b;
}
.game-btn.easy:hover {
  background: linear-gradient(135deg, #6ee7b7, #10b981);
  transform: translateY(-2px);
}

.game-btn.hard {
  background: linear-gradient(135deg, #fecaca, #f87171);
  color: #7f1d1d;
}
.game-btn.hard:hover {
  background: linear-gradient(135deg, #fca5a5, #ef4444);
  transform: translateY(-2px);
}

.game-btn.memory {
  background: linear-gradient(135deg, #fef3c7, #facc15);
  color: #78350f;
}
.game-btn.memory:hover {
  background: linear-gradient(135deg, #fde68a, #eab308);
  transform: translateY(-2px);
}

/* אייקון קטן */
.game-btn i {
  font-size: 1.2rem;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#gameCanvas {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

h1 {
  margin-bottom: 40px; /* רווח גדול מתחת לכותרת */
}

#difficulty {
  margin-top: 20px; /* רווח מעל הכפתורים */
}

.action-btn.option {
  background: #f3f4f6;       /* אפור בהיר */
  color: #111;               /* טקסט כהה */
  padding: 8px 14px;         /* גודל נעים */
  font-size: 15px;
  border-radius: 6px;
  margin: 6px 0;             /* רווח אנכי בין הכפתורים */
  width: 100%;               /* כל כפתור ברוחב מלא */
  text-align: left;          /* טקסט מיושר לשמאל */
  transition: background 0.2s ease;
}

.action-btn.option:hover {
  background: #dbeafe;       /* כחול בהיר בהובר */
}

.quiz-option {
  display: block;
  width: 50%;               /* כל כפתור ברוחב מלא */
  padding: 2px 12px;        /* יותר גובה ורוחב */
  margin: 10px 0;            /* רווח אנכי נעים */
  font-size: 18px;           /* טקסט גדול וברור */
  font-weight: 500;          /* טקסט מודגש מעט */
  text-align: right;          /* מיושר לשמאל */
  background: #e0f2fe;       /* כחול בהיר */
  color: #111;               /* טקסט כהה */
  border-radius: 8px;        /* פינות עגולות יותר */
  border: 2px solid #38bdf8; /* מסגרת כחולה עדינה */
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.quiz-option:hover {
  background: #bae6fd;       /* כחול בהיר יותר בהובר */
  transform: scale(1.03);    /* אפקט קל של גדילה */
}

#question {
  font-weight: bold;
  color: #2c3e50;   /* צבע כהה */
  font-size: 21px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 12px; /* רווח קטן יותר */
}

.action-btn {
  padding: 6px 12px;   /* פחות גובה ורוחב */
  font-size: 14px;     /* טקסט קטן יותר */
  border-radius: 6px;  /* פינות פחות עגולות */
  cursor: pointer;
  border: none;
}

.action-btn.primary {
  background: #a855f7; /* סגול */
  color: #000;
}

.action-btn.secondary {
  background: #e5e7eb; /* אפור בהיר */
  color: #000;
}

.action-btn.primary:hover { background: #c084fc; }
.action-btn.secondary:hover { background: #9ca3af; }

.game-btn.match3 {
  background: linear-gradient(45deg, #ff9ff3, #fbc531);
  color: #fff;
  font-weight: bold;
}
#matchCanvas {
  background: #1f2937;
  border-radius: 8px;
  margin-top: 10px;
}

#matchScore, #matchMoves {
  font-size: 26px;   /* גודל גדול יותר */
  font-weight: bold; /* בולט */
  color: #2c3e50;    /* צבע כהה */
}

.game-btn.english {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: white;
}

.big-answer {
  font-size: 1.5rem;   /* גודל גדול יותר */
  font-weight: bold;   /* מודגש */
}
.correct {
  color: green;
}
.wrong {
  color: red;
}

#side-menu a.highlight-link {
  background: #dceeff;   /* כחול בהיר יותר כהה */
  padding: 6px 10px;
  border-radius: 6px;
}

#side-menu a.highlight-link:hover {
  background: #c5e0ff;   /* כהה עוד קצת בהובר */
}

#side-menu hr {
  margin: 6px 0;   /* פחות מרווח מלמעלה ולמטה */
  border: none;
  border-top: 1px solid #11042d; /* קו עבה יותר ובולט */
}

/* מסך מלא לרשת הרבעים */
.landing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;  /* שני טורים */
  grid-template-rows: 1fr 1fr;     /* שתי שורות */
  height: 100vh;                   /* כל גובה המסך */
  width: 100vw;                    /* כל רוחב המסך */
  margin: 0;
}

/* ריבוע אחד */
.landing-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  text-align: center;
  gap: 12px;
}

/* גרדיאנטים כהים יותר */
.bg-blue {
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
}
.bg-blue::before {
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 70%),
              radial-gradient(circle at 70% 70%, rgba(173,216,230,0.2), transparent 60%);
}

.bg-yellow {
  background: linear-gradient(135deg, #d97706, #b45309);
}
.bg-yellow::before {
  background: radial-gradient(circle at 20% 40%, rgba(255,255,255,0.25), transparent 70%),
              radial-gradient(circle at 80% 60%, rgba(255,223,0,0.2), transparent 60%);
}

.bg-green {
  background: linear-gradient(135deg, #059669, #065f46);
}
.bg-green::before {
  background: radial-gradient(circle at 40% 20%, rgba(255,255,255,0.25), transparent 70%),
              radial-gradient(circle at 60% 80%, rgba(144,238,144,0.2), transparent 60%);
}

.bg-purple {
  background: linear-gradient(135deg, #7c3aed, #a21caf);
}
.bg-purple::before {
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.25), transparent 70%),
              radial-gradient(circle at 30% 70%, rgba(221,160,221,0.2), transparent 60%);
}


/* כפתור לבן */
.tile-button {
  background: #fff;
  color: #111827;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.tile-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
  background: #f3f4f6;
}

html, body {
  height: 100%;
  margin: 0;
}

.landing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* שני טורים */
  grid-template-rows: 1fr 1fr;    /* שתי שורות */
  height: 100vh;
  width: 100vw;
}

.landing-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 20px;
}

/* כותרת */
.tile-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

/* כפתור */
.tile-button {
  background: #fff;
  color: #111827;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  text-decoration: none;
  transition: all 0.3s ease;
}
.tile-button:hover {
  transform: scale(1.05);
  background: #f3f4f6;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

/* צבעי רקע */
.bg-blue    { background: linear-gradient(135deg, #3b82f6, #1e40af); }
.bg-yellow  { background: linear-gradient(135deg, #f59e0b, #f97316); }
.bg-green   { background: linear-gradient(135deg, #10b981, #0f766e); }
.bg-purple  { background: linear-gradient(135deg, #8b5cf6, #ec4899); }

/* התאמה לנייד */
/* התאמה לנייד */
@media (max-width: 768px) {
  .landing-grid {
    grid-template-columns: 1fr 1fr;        /* שני טורים */
    grid-template-rows: repeat(2, 30vh);   /* שתי שורות – כל אחת 30vh */
    height: auto;                          /* לא מכריח 100vh */
    width: 100%;                          
    margin: 0 auto;                       
    gap: 8px;                             
    padding: 0 8px;                       
    box-sizing: border-box;
  }

  .landing-tile {
    min-height: 30vh;                      /* מתאים לגובה השורה */
    padding: 10px;
    border-radius: 12px;
  }

  .tile-title {
    font-size: 1.4rem;
  }

  .tile-button {
    padding: 6px 14px;   /* פחות גובה ורוחב */
    font-size: 0.7rem;   /* טקסט קטן יותר */
    border-radius: 8px;  /* גם פינות קטנות יותר אם תרצה */
  }

    .bg-blue {
    background: linear-gradient(135deg, #93c5fd, #1e40af); /* כחול בהיר → כחול כהה */
  }

  .bg-yellow {
    background: linear-gradient(135deg, #fde68a, #f59e0b); /* צהוב בהיר → כתום כהה */
  }

  .bg-green {
    background: linear-gradient(135deg, #6ee7b7, #065f46); /* ירוק בהיר → ירוק כהה */
  }

  .bg-purple {
    background: linear-gradient(135deg, #d8b4fe, #6b21a8); /* סגול בהיר → סגול כהה */
  }
}

.landing-tile {
  backdrop-filter: blur(8px);
  border-radius: 24px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.15);
  overflow: hidden;
  position: relative;
}

.landing-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.15); /* שכבת כהות עדינה */
  pointer-events: none;
}

/* אנימציית כניסה */
.landing-tile {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

/* השהייה בין ריבועים */
.landing-tile:nth-child(2) {
  animation-delay: 0.1s;
}
.landing-tile:nth-child(3) {
  animation-delay: 0.2s;
}
.landing-tile:nth-child(4) {
  animation-delay: 0.3s;
}

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

/* דסקטופ – התאמה אמיתית לתמונה */
.hero-section {
  background-image: url("/static/img/gomorim-index.png");
  background-size: 91% auto; /* ← מותח לרוחב בלבד */
  background-position: center 40%;
  background-repeat: no-repeat;
  padding: 80px 10px;
  border-radius: 12px;
  margin-bottom: 25px;
}

/* 🔥 בנייד – התאמה מיוחדת לתמונה שלך */
@media (max-width: 600px) {
  .hero-section {
    background-size: cover;
    background-position: center 98%; /* מושך את האנשים למעלה */
    padding:30px 20px; /* גובה קטן כדי שלא ייחתך */
  }
}


.hero-title-box {
  font-size: 1.7rem;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 25px;
  border-radius: 10px;
  display: block;        /* ← זה מה שמרכז */
  margin: 0 auto 20px;   /* ← עכשיו עובד */
  width: fit-content;    /* ← שומר על רוחב יפה */
}

@media (max-width: 600px) {
  .hero-title-box {
    font-size: 1.1rem; /* קטן יותר בנייד */
    padding: 10px 18px; /* אפשר גם להקטין את הריווח */
  }
}


@media (min-width: 768px) {
  .filter-form-with-icons {
    padding-top:90px; /* רק הפילטרים זזים */
  }
}



