/* =========================
   EGUD Courses UI (Clean) — FINAL (One source of truth)
   ========================= */

:root{
  --egud-accent: #f4e77a;
  --egud-border: #e9e9e9;
  --egud-text: #111;
  --egud-muted: #6b6b6b;
  --egud-bg: #ffffff;
  --egud-shadow: 0 12px 28px rgba(0,0,0,.07);

  /* אם יש Header קבוע שמכסה – שים כאן גובה אמיתי (למשל 80px) */
  --egud-header-offset: 0px;

  /* גובה Admin Bar בוורדפרס */
  --egud-adminbar: 32px;

  /* padding כללי של ה-wrap (מתחת להירו) */
  --egud-wrap-pad-top: 24px;
}

/* =========================
   Modal polish (login)
   ========================= */
.egud-login-modal{
  z-index: 9999;
}

.egud-login-dialog{
  width: min(520px, 92vw);
  border-radius: 18px;
  border: 1px solid var(--egud-border);
  box-shadow: 0 18px 44px rgba(0,0,0,.16);
}

.egud-login-body{
  padding-top: 6px;
}

/* כפתור סגירה נעים */
.egud-modal-close{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--egud-border);
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}


/* =====================================================
   RESET רווחים כלליים (רק כדי שה-HERO ייגע למעלה)
   ===================================================== */
html, body{
  margin: 0 !important;
  padding: 0 !important;
}

/* =====================================================
   WRAPPER
   ===================================================== */
.egud-wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--egud-wrap-pad-top) 16px 60px;
  direction: rtl;
  font-family: "Heebo", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  color: var(--egud-text);
}

/* בעמוד כל הקורסים – לא להוריד את ההירו למטה ע"י padding של ה-wrap */
body.egud-is-courses .egud-wrap{
  padding-top: 0 !important;
}

/* =====================================================
   HERO – FULL WIDTH + TEXT ON IMAGE
   ===================================================== */
.egud-hero{
  position: relative;
  width: 100vw;
  min-height: 420px;

  /* Full-bleed בתוך עמוד צר */
  margin-right: calc(50% - 50vw) !important;
  margin-left:  calc(50% - 50vw) !important;

  /* להצמיד לראש */
  margin-top: 0 !important;
  margin-bottom: 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 0;

  background-image:
    linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.25)),
    url("https://egud.org.il/wp-content/uploads/2026/01/michal_yosef_Ultra-realistic_black_and_white_photograph_of_a__16712805-01a8-425d-821c-eb3a585277c9_3.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* מקום לכפתור העליון */
  padding: calc(48px + var(--egud-header-offset)) 16px 32px;
}

/* כשמחוברים – Admin Bar למעלה */
body.admin-bar .egud-hero{
  padding-top: calc(48px + var(--egud-header-offset) + var(--egud-adminbar));
}

/* אם יש wrapper של Elementor / Theme שמוסיף רווח למעלה */
body.egud-is-courses .site-content,
body.egud-is-courses #content,
body.egud-is-courses .elementor-location-single,
body.egud-is-course  .site-content,
body.egud-is-course  #content,
body.egud-is-course  .elementor-location-single{
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.egud-hero__inner{
  max-width: 1100px;
  width: 100%;
  padding: 0 16px;
  text-align: center;
  z-index: 2;
}

/* כותרת Hero – ברירת מחדל צהוב */
.egud-hero__title{
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.15;
  text-align: center;
  color: #F2E86D;
  text-shadow: 0 10px 28px rgba(0,0,0,.25);
}
body.egud-is-courses .egud-hero__title{
  color:#F2E86D;
  text-shadow: none !important;
  position:relative;
}

/* תת כותרת */
.egud-hero__sub{
  font-size: clamp(15px, 1.6vw, 20px);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
     color: white; 
	text-shadow: 0 10px 28px rgba(0,0,0,.25);
}

/* =====================================================
   HERO TOPBAR (כפתור חזרה) – מעל התמונה, נורמלי ורספונסיבי
   ===================================================== */
.egud-hero{ position: relative; }

.egud-hero__topbar{
  position: absolute;
  top: calc(16px + var(--egud-header-offset));
  right: 16px;
  left: auto;
  width: auto;
  margin: 0;
  z-index: 100;
  pointer-events: none;
}
.egud-hero__topbar a{ pointer-events: auto; }

body.admin-bar .egud-hero__topbar{
  top: calc(16px + var(--egud-header-offset) + var(--egud-adminbar));
}

.egud-hero__topbar a{
  pointer-events: auto; /* להחזיר קליקים רק לכפתור */
}

/* עיצוב הכפתור (גם בתוך הירו וגם בטופבר רגיל) */
.egud-topbar .egud-link,
.egud-hero__topbar .egud-link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid #111 !important;
  background: rgba(255,255,255,.92) !important;
  font-weight: 900;
  text-decoration: none !important;
  color: #111 !important;
  transform: translateZ(0);
  white-space: nowrap;
}

.egud-topbar .egud-link::before,
.egud-hero__topbar .egud-link::before{
  content: "→";
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--egud-accent) !important;
  border: 1px solid #111 !important;
  font-weight: 900;
}

.egud-topbar .egud-link:hover,
.egud-hero__topbar .egud-link:hover{
  transform: translateY(-1px);
}

@media (max-width: 768px){
  .egud-hero{
    min-height: 320px;
    padding-top: calc(56px + var(--egud-header-offset));
  }
  body.admin-bar .egud-hero{
    padding-top: calc(56px + var(--egud-header-offset) + var(--egud-adminbar));
  }
  .egud-hero__topbar{
    right: 12px;
    top: calc(12px + var(--egud-header-offset));
    width: calc(100% - 24px);
  }
  body.admin-bar .egud-hero__topbar{
    top: calc(12px + var(--egud-header-offset) + var(--egud-adminbar));
  }
}

/* =====================================================
   TOPBAR רגיל (אם קיים מתחת להירו בעמודים אחרים)
   ===================================================== */
.egud-topbar{
  margin: 10px 0 18px;
}

/* =====================================================
   GRID
   ===================================================== */
.egud-grid{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 980px){
  .egud-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px){
  .egud-grid{ grid-template-columns: 1fr; }
}

/* =====================================================
   CARDS
   ===================================================== */
.egud-card{
  background: var(--egud-bg) !important;
  border: 1px solid var(--egud-border) !important;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: transform .18s ease, box-shadow .18s ease;
}
.egud-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--egud-shadow);
}
.egud-card__link{
  display: block;
  color: inherit;
  text-decoration: none;
}

.egud-card__media{
  height: 190px;
  background-size: cover;
  background-position: center;
  filter: saturate(0.35) contrast(1.05);
}

.egud-card__media--placeholder{
  background-image:
    linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.15)),
    url("https://images.unsplash.com/photo-1556761175-4b46a572b786?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.egud-card__body{
  padding: 16px 16px 18px;
}
.egud-card__title{
  font-weight: 900;
  font-size: 20px;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.egud-card__subtitle{
  color: #222;
  opacity: .85;
  font-weight: 700;
  margin-bottom: 10px;
}
.egud-card__text{
  color: var(--egud-muted);
  line-height: 1.65;
  font-size: 14px;
  margin-bottom: 12px;
}

.egud-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.egud-meta--center{
  justify-content: center;
}
.egud-pill{
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff !important;
  border: 1px solid var(--egud-border) !important;
  color: #222 !important;
  font-size: 13px;
  font-weight: 700;
}

.egud-cta{
  display: flex;
  justify-content: flex-start;
}

/* כפתורים – צהוב + מסגרת */
.egud-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #111 !important;
  background: var(--egud-accent) !important;
  color: #111 !important;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none !important;
  user-select: none;
}
.egud-btn--solid{
  width: fit-content;
}

/* =====================================================
   PANELS / LESSONS / QUIZ
   ===================================================== */
.egud-panel{
  background: #fff !important;
  border: 1px solid var(--egud-border) !important;
  border-radius: 18px;
  padding: 18px;
  margin: 14px 0;
}
.egud-panel__title{
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 10px;
}
.egud-panel__content{
  color:#222;
  line-height: 1.85;
}

.egud-lessons{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.egud-lessons__item{
  border: 1px solid var(--egud-border) !important;
  border-radius: 14px;
  overflow: hidden;
}
.egud-lessons__link{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  text-decoration: none !important;
  color: #111 !important;
  font-weight: 800;
  background: #fff !important;
}
.egud-lessons__link:hover{
  background: #fafafa !important;
}
.egud-lessons__go{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #111 !important;
  background: var(--egud-accent) !important;
  font-size: 13px;
}

.egud-video iframe,
.egud-video video{
  width: 100%;
  max-width: 100%;
  border-radius: 14px;
}

.egud-quiz{
  display: grid;
  gap: 14px;
}
.egud-q{
  border: 1px solid var(--egud-border) !important;
  border-radius: 14px;
  padding: 12px;
}
.egud-q__title{
  font-weight: 900;
  margin-bottom: 10px;
}
.egud-a{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--egud-border) !important;
  background: #fff !important;
  margin: 8px 0;
  cursor: pointer;
}
.egud-a input{ margin-top: 3px; }

.egud-success{
  border: 1px solid #cde7d0;
  background: #f3fbf4;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 14px 0;
}
.egud-empty{
  padding: 16px;
  border: 1px dashed var(--egud-border) !important;
  border-radius: 14px;
  color: var(--egud-muted);
}

/* =====================================================
   LESSON PAGE ONLY: NEVER SHOW HERO IMAGE
   ===================================================== */
body.egud-is-lesson .egud-hero{
  display:none !important;
  background:none !important;
  height:0 !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
}

body.egud-is-lesson .elementor-widget-theme-post-featured-image,
body.egud-is-lesson .elementor-widget-post-featured-image,
body.egud-is-lesson .post-thumbnail,
body.egud-is-lesson .wp-post-image{
  display:none !important;
}

body.egud-is-lesson header.entry-header,
body.egud-is-lesson .entry-header{
  display:none !important;
}

body.egud-is-lesson .elementor-location-single,
body.egud-is-lesson .site-content,
body.egud-is-lesson #content{
  margin-top:0 !important;
  padding-top:0 !important;
}
/* =========================
   COURSE PAGE FIXES
   1) שם הקורס שחור, בלי צל
   2) כפתור חזרה בצד ימין
   ========================= */

/* שם הקורס (בעמוד קורס) */
body.egud-is-course .egud-hero__title{
  color: #111 !important;
  text-shadow: none !important;
}

/* כפתור חזרה בתוך הירו (בעמוד קורס) – ימין */
body.egud-is-course .egud-hero__topbar{
	position:relative !important;
  right: 16px !important;
  left: auto !important;
  width: calc(100% - 32px) !important;
}

/* מובייל */
@media (max-width: 768px){
  body.egud-is-course .egud-hero__topbar{
    right: 12px !important;
  }
}
/* =========================
   HERO TOPBAR – תמיד ימין למעלה (בעמוד קורס)
   ========================= */

body.egud-is-course .egud-hero{
  position: relative !important;
}

/* הכפתור: צף מעל ההירו, ימין למעלה, בלי להשתלט על רוחב */
body.egud-is-course .egud-hero__topbar{
  top: 16px !important;
  right: 16px !important;
  left: auto !important;
  width: auto !important;
  margin: 0 !important;
  z-index: 50 !important;

  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

/* כדי שהכותרת לא “תעלה” על הכפתור */
body.egud-is-course .egud-hero__inner{
  padding-top: 72px !important;
}

/* שם הקורס נקי (שחור בלי צל) */
body.egud-is-course .egud-hero__title{
  color: #111 !important;
  text-shadow: none !important;
}

/* מובייל */
@media (max-width: 768px){
  body.egud-is-course .egud-hero__topbar{
    top: 12px !important;
    right: 12px !important;
  }
  body.egud-is-course .egud-hero__inner{
    padding-top: 84px !important;
  }
}
body.egud-is-course .egud-hero{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

body.egud-is-course .egud-hero__topbar{
  top: 35px !important;
  right: 16px !important;
	text-align: right;
  left: auto !important;
  z-index: 50 !important;
}
body.egud-is-course .egud-hero__inner{
  margin-top: 140px !important; /* המרווח האמיתי מהחלק העליון */
  padding: 0 16px !important;
  text-align: center !important;
}
body.egud-is-course .egud-hero__title {
	position:relative;
	padding-top:29px;
}
/* =========================
   FIX: כפתור "חזרה לכל הקורסים" – ימין למעלה בעמוד קורס
   ========================= */

body.egud-is-course .egud-hero{
  position: relative !important;
}

body.egud-is-course .egud-hero__topbar{
  top: 45px !important;
  right: 24px !important;
  left: auto !important;

  width: auto !important;
  margin: 0 !important;

  display: block !important;
  z-index: 100 !important;
}

/* מובייל */
@media (max-width: 768px){
  body.egud-is-course .egud-hero__topbar{
    top: 12px !important;
    right: 12px !important;
  }
}
.egud-lesson-wrap{ position: relative; }

/* Modal polish */
.egud-login-modal{ z-index: 9999; }
.egud-login-dialog{
  width: min(520px, 92vw);
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 44px rgba(0,0,0,.16);
}

.egud-modal-close{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
/* Single course hero: בלי תמונת רקע ובלי פס כהה */
body.egud-is-course .egud-hero--course{
  background: none !important;
  background-image: none !important;
  min-height: auto !important; /* אם יש גובה ענק */
  padding-top: 48px;           /* תכווני לפי העיצוב שלך */
  padding-bottom: 48px;
}

/* אם יש שכבת החשכה (overlay) */
body.egud-is-course .egud-hero--course::before,
body.egud-is-course .egud-hero--course::after{
  content: none !important;
  display: none !important;
}
/* עמוד קורס: להוריד את ה"פס" הגבוה שהיה בשביל תמונת רקע */
body.egud-is-course .egud-hero--course{
  background: none !important;
  background-image: none !important;
  min-height: 0 !important;
  height: auto !important;
  padding-top: 48px !important;
  padding-bottom: 48px !important;
}

/* אם יש שכבת כהות/אוברליי על ההירו */
body.egud-is-course .egud-hero--course::before,
body.egud-is-course .egud-hero--course::after{
  content: none !important;
  display: none !important;
}
.egud-card__media{
  width: 100%;
  aspect-ratio: 16 / 9;      /* או 4/3 לפי טעם */
  background-size: cover;
  background-position: center;
  border-radius: 14px;       /* אם צריך */
}
.egud-card__media--placeholder{
  background: #f1f1f1;
}
/* SINGLE COURSE HERO: בלי תמונה ובלי גובה ענק */
body.egud-is-course .egud-hero.egud-hero--course{
  background: none !important;
  background-image: none !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 48px 16px 32px !important;
  margin-bottom: 24px !important;
}

body.egud-is-course .egud-hero.egud-hero--course::before,
body.egud-is-course .egud-hero.egud-hero--course::after{
  content: none !important;
  display: none !important;
}
/* רק בעמוד קורס, ורק בתוך ההירו של הקורס */
body.egud-is-course header.egud-hero--course .egud-hero__topbar a.egud-link{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;

  padding: 14px 22px 14px 18px;
  border-radius: 999px;
  border: 2px solid #111;
  background: #fff;

  color: #111;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

/* העיגול של החץ */
body.egud-is-course header.egud-hero--course .egud-hero__topbar a.egud-link::after{
  content: "→";
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;
  border-radius: 50%;

  background: #F4E76E;
  color: #111;
  font-size: 18px;
  font-weight: 700;

  transition: transform .2s ease;
}

body.egud-is-course header.egud-hero--course .egud-hero__topbar a.egud-link:hover::after{
  transform: translateX(-3px);
}

/* מיקום כמו בתמונה */
body.egud-is-course header.egud-hero--course .egud-hero__topbar{
  display: flex;
  justify-content: flex-end;
  padding: 24px 24px 0;
}
.egud-modal{
  z-index: 999999 !important;
  pointer-events: auto !important;
}

.egud-modal *{
  pointer-events: auto !important;
}

.egud-modal-dialog{
  position: relative;
  z-index: 1000000 !important;
}
/* ==================================================
   EGUD Lesson Login Modal — full screen lock + center
   ================================================== */

/* שכבת מודאל מלאה שמכסה את כל המסך וחוסמת אינטראקציה עם הרקע */
.egud-modal.egud-login-modal{
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  background: rgba(0,0,0,0.72) !important;
  backdrop-filter: blur(3px);

  z-index: 9999999 !important;
  pointer-events: auto !important;
}

/* לא לאפשר קליקים “לדלוף” */
.egud-modal.egud-login-modal *{
  pointer-events: auto !important;
}

/* הדיאלוג עצמו – ממורכז, עם גובה בטוח במובייל */
.egud-modal.egud-login-modal .egud-modal-dialog{
  position: relative !important;
  z-index: 10000000 !important;

  width: min(620px, calc(100vw - 24px)) !important;
  max-height: calc(100vh - 24px) !important;
  overflow: auto !important;

  margin: 0 !important;
}

/* כדי שלא תוכל לגלול את הדף מאחור (גם אם JS לא תפס) */
body[data-egud-scroll-lock-lesson-login]{
  overflow: hidden !important;
}
.egud-modal.egud-login-modal{
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0,0,0,0.75) !important;
  z-index: 9999999 !important;
}

.egud-modal.egud-login-modal .egud-modal-dialog{
  width: min(620px, calc(100vw - 24px)) !important;
  max-height: calc(100vh - 24px) !important;
  overflow: auto !important;
  margin: 0 !important;
}
/* שכבת הרקע */
.egud-modal.egud-login-modal {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.75) !important;
  z-index: 999999 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* הדיאלוג (הטופס) – שכבה מעל הרקע */
.egud-modal.egud-login-modal .egud-modal-dialog {
  position: relative !important;
  z-index: 1000000 !important;

  background: #fff !important;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);

  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
/* הטקסט מעל טופס UM */
.egud-login-body .egud-login-text{
  display:block !important;
  margin: 0 0 14px 0;
  padding: 0 0 14px 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
  text-align: center;
  position: relative;
  z-index: 5;           /* מעל UM אם הוא “מכסה” */
}

.egud-login-body .egud-login-text h3{
  margin: 0 0 6px 0;
  font-size: 18px;
  line-height: 1.2;
}

.egud-login-body .egud-login-text p{
  margin: 0;
  color: #555;
  font-size: 14px;
}

/* לפעמים UM מייצר שכבות/position שמבלבל */
.egud-login-body .um{
  position: relative;
  z-index: 4;
}
/* =========================
   EGUD Comments (Lesson)
   ========================= */

.egud-panel .egud-comments {
  margin-top: 8px;
}

.egud-panel .comment-list {
  display: grid;
  gap: 12px;
}

/* כל תגובה ככרטיס */
.egud-panel .comment-list > li.comment,
.egud-panel .comment-list > li {
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

/* מבנה פנימי של comment */
.egud-panel .comment-body {
  display: grid;
  gap: 8px;
}

/* כותרת תגובה: שם + תאריך */
.egud-panel .comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px dashed #eef1f6;
}

.egud-panel .comment-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.egud-panel .comment-author .avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: block;
}

.egud-panel .comment-metadata,
.egud-panel .comment-metadata a {
  font-size: 12px;
  color: #6b7280;
  text-decoration: none;
}

/* גוף התגובה */
.egud-panel .comment-content {
  color: #111827;
  line-height: 1.6;
  font-size: 14px;
}

.egud-panel .comment-content p {
  margin: 0;
}

/* פעולות (reply/edit) */
.egud-panel .reply {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.egud-panel .reply a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #eef1f6;
  color: #111827;
  text-decoration: none;
  font-size: 13px;
  background: #fafbfc;
}

.egud-panel .reply a:hover {
  background: #f3f4f6;
}

/* תגובות משנה */
.egud-panel .children {
  margin-top: 12px;
  padding-right: 12px; /* RTL */
  border-right: 2px solid #eef1f6;
  display: grid;
  gap: 10px;
}

/* =========================
   Comment form
   ========================= */

.egud-panel #respond {
  margin-top: 16px;
  background: #fbfcfe;
  border: 1px solid #eef1f6;
  border-radius: 14px;
  padding: 14px;
}

.egud-panel #respond .comment-reply-title {
  margin: 0 0 10px;
  font-size: 16px;
}

.egud-panel #commentform {
  display: grid;
  gap: 10px;
}

.egud-panel #commentform textarea#comment {
  width: 100%;
  min-height: 110px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  background: #fff;
}

.egud-panel #commentform textarea#comment:focus {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 4px rgba(148,163,184,.25);
}

/* שדות שם/מייל (אם מופיעים) */
.egud-panel #commentform input[type="text"],
.egud-panel #commentform input[type="email"],
.egud-panel #commentform input[type="url"] {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.egud-panel #commentform input[type="text"]:focus,
.egud-panel #commentform input[type="email"]:focus,
.egud-panel #commentform input[type="url"]:focus {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 4px rgba(148,163,184,.25);
}

/* כפתור שליחה כבר אצלך עם egud-btn, אבל נוודא שנראה טוב בתוך comment_form */
.egud-panel #commentform .form-submit {
  margin: 0;
}

.egud-panel #commentform input#submit {
  cursor: pointer;
}

/* הודעת "אין תגובות" */
.egud-panel .egud-empty {
  background: #fbfcfe;
  border: 1px dashed #e5e7eb;
  border-radius: 14px;
  padding: 14px;
}
/* =========================
   EGUD – Comment Form (nice RTL)
   ========================= */

/* כל איזור התגובות בתוך הפאנל */
.egud-panel #respond{
  margin-top: 8px;
  border: 1px solid #eef1f6;
  background: #fbfcfe;
  border-radius: 18px;
  padding: 18px;
}

/* כותרת "השאירי תגובה" */
.egud-panel #respond .comment-reply-title{
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .2px;
}

/* שורה של "Logged in as..." */
.egud-panel #respond .logged-in-as{
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px dashed #e5e7eb;
  border-radius: 14px;
  background: #fff;
  font-size: 13px;
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

/* להפוך קישורים שם ל"כדורים" */
.egud-panel #respond .logged-in-as a{
  text-decoration: none;
  border: 1px solid #eef1f6;
  background: #fafbfc;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #111827;
}
.egud-panel #respond .logged-in-as a:hover{
  background: #f3f4f6;
}

/* טקסט "שדות חובה" */
.egud-panel #respond .comment-notes,
.egud-panel #respond .form-allowed-tags{
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 12px;
}

/* מבנה הטופס */
.egud-panel #commentform{
  display: grid;
  gap: 12px;
  direction: rtl;
}

/* לייבל של "התגובה שלך" */
.egud-panel .comment-form-comment > label{
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  color: #111827;
}

/* textarea */
.egud-panel #commentform textarea#comment{
  width: 100%;
  min-height: 160px;           /* פחות "אינסופי" */
  resize: vertical;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px;
  font-size: 15px;
  line-height: 1.7;
  outline: none;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,.03);
}

/* פוקוס */
.egud-panel #commentform textarea#comment:focus{
  border-color: #cbd5e1;
  box-shadow: 0 0 0 4px rgba(148,163,184,.22);
}

/* אם מופיעים שדות (שם/מייל) */
.egud-panel #commentform input[type="text"],
.egud-panel #commentform input[type="email"],
.egud-panel #commentform input[type="url"]{
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  background: #fff;
}
.egud-panel #commentform input[type="text"]:focus,
.egud-panel #commentform input[type="email"]:focus,
.egud-panel #commentform input[type="url"]:focus{
  border-color: #cbd5e1;
  box-shadow: 0 0 0 4px rgba(148,163,184,.22);
}

/* כפתור שליחה – ימין למטה, יפה */
.egud-panel #commentform .form-submit{
  margin: 0;
  display: flex;
  justify-content: flex-start; /* RTL: זה יישב מימין */
}

.egud-panel #commentform input#submit{
  appearance: none;
  border: 1px solid #111827;
  background: #f4ea67;         /* תואם את הכפתור הצהוב אצלך */
  color: #111827;
  font-weight: 800;
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
  transition: transform .08s ease, box-shadow .08s ease;
}

.egud-panel #commentform input#submit:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0,0,0,.10);
}

.egud-panel #commentform input#submit:active{
  transform: translateY(0);
}

/* כוכבית חובה – פחות צעקנית */
.egud-panel #respond .required{
  color: #ef4444;
  font-weight: 700;
}
/* להסיר לגמרי Logged in as... */
.egud-panel #respond .logged-in-as{
  display: none !important;
}
.egud-panel #respond .comment-reply-title{
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 16px;
}
/* ביטול קישור מהתאריך */
.egud-comments .comment-metadata a,
.egud-comments .comment-meta a {
  pointer-events: none;
  text-decoration: none !important;
  color: #7a7a7a !important;
  cursor: default;
}
.egud-success {
  background: #f6f9f3;
  border: 1px solid #d6e4c8;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #3f5d2b;
  text-align: center;
}
.egud-lesson-layout{
  display:flex;
  gap:24px;
  align-items:flex-start;
}

.egud-lesson-main{
  flex: 2;
  min-width: 0;
}

.egud-lesson-comments{
  flex: 1;
  max-width: 420px;
  position: sticky;
  top: 90px;
}

/* מובייל: חוזר לטור אחד */
@media (max-width: 1024px){
  .egud-lesson-layout{ flex-direction: column; }
  .egud-lesson-comments{ max-width: 100%; position: static; }
}
.egud-lesson-grid{
  display: grid;
  grid-template-columns: 420px 1fr; /* שמאל: תגובות, ימין: תוכן */
  gap: 24px;
  align-items: start;
}

/* מיקומים */
.egud-lesson-comments{ grid-column: 1; grid-row: 1; }
.egud-lesson-video{ grid-column: 2; grid-row: 1; }
.egud-lesson-quiz{ grid-column: 2; grid-row: 2; }

/* תגובות sticky */
.egud-lesson-comments{
  position: sticky;
  top: 90px;
}

/* מובייל */
@media (max-width: 1024px){
  .egud-lesson-grid{
    grid-template-columns: 1fr;
  }
  .egud-lesson-comments,
  .egud-lesson-video,
  .egud-lesson-quiz{
    grid-column: 1;
  }
  .egud-lesson-comments{ position: static; }
}
/* שהתגובות יהיו רספונסיביות בתוך העמודה */
.egud-lesson-comments,
.egud-lesson-comments .egud-panel,
.egud-lesson-comments .egud-comments,
.egud-lesson-comments #respond,
.egud-lesson-comments .comment-respond,
.egud-lesson-comments form#commentform {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

/* textarea + כפתור */
.egud-lesson-comments #comment,
.egud-lesson-comments textarea,
.egud-lesson-comments input[type="text"],
.egud-lesson-comments input[type="email"],
.egud-lesson-comments input[type="url"]{
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
/* להפריד שכבות */
.egud-lesson-video { position: relative; z-index: 1; }
.egud-lesson-comments { position: sticky; z-index: 2; }

/* לוודא שאין overflow שמכווץ */
.egud-lesson-comments .egud-panel { overflow: visible; }
@media (max-width: 900px){
  .egud-lesson-grid{
    grid-template-columns: 1fr !important;
  }
  .egud-lesson-video{ grid-row: 1; }
  .egud-lesson-comments{ grid-row: 2; position: static; top: auto; }
  .egud-lesson-quiz{ grid-row: 3; }
}
.egud-lesson-comments .comment-form-comment{
  margin: 0;
}
.egud-lesson-comments textarea#comment{
  min-height: 140px;
  border-radius: 14px;
  padding: 12px 14px;
}
.egud-lesson-comments .form-submit{
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
.egud-lesson-comments .form-submit input#submit{
  padding: 12px 18px;
  border-radius: 14px;
}