* { box-sizing: border-box; }

body {
  font-family: 'Rubik', Arial, sans-serif;
  margin: 0;
  background-color: #0f1a2e;
}

.mySlides {
  display: none;
  position: relative;
  overflow: visible;
  min-height: calc(100vh - 80px);
}

img { vertical-align: middle; }

a { word-break: break-all; }

.slideshow-container {
  max-width: 100%;
  width: 100%;
  position: relative;
  margin: auto;
  min-height: 100vh;
}

.image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-center {
  position: relative;
}

/* image must be block to eliminate inline baseline gap —
   ensures container height == exact image height,
   matching the editor's slideContainer (also block img) */
.image-center > img {
  display: block;
}

/* ─── כפתורי ניווט ─── */
.prev, .next {
  cursor: pointer;
  position: fixed;
  width: auto;
  margin-top: 0px;
  user-select: none;
  bottom: 20px;
  z-index: 2;
  transition: transform 0.2s, filter 0.2s;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.next { right: 20px; }
.prev { right: 68px; }

.prev:hover, .next:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 4px 16px rgba(26,37,64,0.8));
  background-color: transparent;
}

/* ─── סרגל ניווט תחתון ─── */
.nav-background {
  background: #ffffff;
  border-top: 2px solid #a8c5d6;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 4px 130px 4px 90px; /* לוגו משמאל, חיצים מימין */
}

.nav-dots {
  display: grid;
  direction: ltr;
  gap: 4px;
  width: 100%;
  height: 100%;
  align-content: center;
  justify-items: center;
}

.nav-dot {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  background-color: #a8c5d6;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
  border: none;
  padding: 0;
  font-family: 'Rubik', Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nav-dot:hover {
  background-color: #1a2540;
  transform: scale(1.15);
}

.nav-dot.active {
  background-color: #1a2540;
}

/* עיגול עם אייקון SVG — שקפי מעבר (כתום!) */
.nav-dot-icon {
  padding: 0;
  background-color: #f6a67e;
}
.nav-dot-icon:hover {
  background-color: #e8834e;
}
.nav-dot-icon.active {
  background-color: #e8834e;
}
.nav-dot-icon svg {
  display: block;
}

/* Hide old nav elements */
.nav {
  display: none;
}

/* ─── בועות טקסט ─── */
.text {
  box-sizing: border-box;
  color: #ffffffcc;
  font-size: 16px;
  line-height: 1.6;
  padding: 16px 20px 20px 20px;
  width: 100%;
  background: #1a2540ee;
  /* width controlled by inline style from slides.json textWidth */
  border-radius: 14px;
  border: 2px solid #5b8fa8;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  backdrop-filter: blur(6px);
}

/* מספר שקף */
.text > div:first-child {
  font-size: 12px;
  font-weight: 700;
  color: #a8c5d6;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

/* ─── חצי בועה (מבוטל — בועות בלי שפיצים) ─── */
.text[class*="arrow-"]:after { display:none !important; }

.text.arrow-right:after {
  content: " ";
  position: absolute;
  right: -13px;
  top: 18px;
  border-top: 10px solid transparent;
  border-right: none;
  border-left: 14px solid #1a2540ef;
  border-bottom: 10px solid transparent;
}

.text.arrow-left:after {
  content: " ";
  position: absolute;
  left: -13px;
  top: 18px;
  border-top: 10px solid transparent;
  border-right: 14px solid #243350ef;
  border-left: none;
  border-bottom: 10px solid transparent;
}

.text.arrow-top-left:after {
  content: " ";
  position: absolute;
  left: 16px;
  top: -14px;
  border-top: none;
  border-right: 10px solid transparent;
  border-left: 10px solid transparent;
  border-bottom: 15px solid #1a2540ef;
}

.text.arrow-top-right:after {
  content: " ";
  position: absolute;
  right: 16px;
  top: -14px;
  border-top: none;
  border-right: 10px solid transparent;
  border-left: 10px solid transparent;
  border-bottom: 15px solid #1a2540ef;
}

.text.arrow-bottom-left:after {
  content: " ";
  position: absolute;
  left: 20px;
  bottom: -14px;
  border-top: 15px solid #243350ef;
  border-right: 10px solid transparent;
  border-left: 10px solid transparent;
  border-bottom: none;
}

.text.arrow-bottom-right:after {
  content: " ";
  position: absolute;
  right: 20px;
  bottom: -14px;
  border-top: 15px solid #243350ef;
  border-right: 10px solid transparent;
  border-left: 10px solid transparent;
  border-bottom: none;
}

/* ─── תיבת הדגשה (box) ─── */
.box {
  position: absolute;
  cursor: pointer;
  border: 4px solid #ff7c2a;
  border-radius: 10px;
  transition: background-color 0.2s, border-color 0.2s;
  box-shadow: 0 0 0 2px rgba(255,124,42,0.4), 0 0 16px rgba(255,124,42,0.6);
  animation: box-pulse 1.8s ease-in-out infinite;
}

@keyframes box-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255,124,42,0.4), 0 0 16px rgba(255,124,42,0.6); }
  50% { box-shadow: 0 0 0 4px rgba(255,124,42,0.6), 0 0 28px rgba(255,124,42,0.9); }
}

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,0.3), 0 6px 24px rgba(232,131,78,0.5); transform: scale(1); }
  50% { box-shadow: 0 0 0 6px rgba(246,166,126,0.4), 0 6px 28px rgba(232,131,78,0.8); transform: scale(1.06); }
}

.box:hover {
  background-color: rgba(255, 124, 42, 0.2);
  border-color: #ffaa70;
}

/* ─── מסך רקע (כותרת/סיום) ─── */
.background {
  background: linear-gradient(135deg, #0f1a2e 0%, #1a2540 50%, #1e3050 100%);
  height: 100%;
  width: 100%;
}

.title {
  color: white;
  font-size: 48px;
  text-align: center;
  padding-top: 30vh;
  padding-bottom: 20px;
  max-width: 1100px;
  font-weight: bold;
  margin: auto;
}

.subtitle {
  color: #a8c5d6;
  font-size: 28px;
  text-align: center;
  padding: 0px 0px 8px 0px;
  max-width: 500px;
  margin: auto;
}

/* ─── כפתור התחל ─── */
.button {
  cursor: pointer;
  width: 150px;
  height: 32px;
  background: linear-gradient(135deg, #1a2540, #3d5a80);
  border: 2px solid white;
  border-radius: 20px;
  margin: 20px 10px 10px 10px;
  text-align: center;
  align-self: end;
  color: white;
  line-height: 28px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(26,37,64,0.4);
}

.button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(26,37,64,0.6);
}

.button.start {
  margin: 50px auto;
  width: 200px;
  height: 44px;
  line-height: 40px;
  font-size: 16px;
  background: linear-gradient(135deg, #f6a67e, #e8834e);
  box-shadow: 0 6px 20px rgba(246,166,126,0.4);
}

/* ─── fade animation ─── */
.fade {
  animation-name: fade;
  animation-duration: 0.4s;
}

@keyframes fade {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}

/* ─── זכוכית מגדלת ─── */
.magnifier-btn {
  position: fixed;
  z-index: 10;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #e8834e;
  background: linear-gradient(135deg, #e8834e, #f6a67e);
  cursor: pointer;
  display: none; /* shown + positioned by JS */
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 4px 16px rgba(232,131,78,0.4);
}
.magnifier-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(232,131,78,0.6);
}
.magnifier-btn.active {
  border-color: #fff;
  background: linear-gradient(135deg, #d4702e, #e8834e);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3), 0 6px 24px rgba(232,131,78,0.5);
  animation: btn-pulse 1.8s ease-in-out infinite;
}
.magnifier-btn svg {
  pointer-events: none;
}

.magnifier-lens {
  position: fixed;
  width: 420px;
  height: 300px;
  border-radius: 12px;
  border: 3px solid #f6a67e;
  box-shadow: 0 0 0 3px rgba(246,166,126,0.3), 0 8px 32px rgba(0,0,0,0.5);
  pointer-events: none;
  z-index: 9;
  display: none;
  overflow: hidden;
  background-color: #0f1a2e;
}

.magnifier-active .image-center {
  cursor: none;
}

.magnifier-esc-hint {
  position: fixed;
  z-index: 10;
  background: rgba(15, 26, 46, 0.9);
  color: #a8c5d6;
  font-size: 12px;
  line-height: 1.5;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #5b8fa844;
  text-align: center;
  display: none;
  direction: rtl;
}

/* ─── הקראה בקול ─── */
.tts-btn {
  position: fixed;
  z-index: 10;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #e8834e;
  background: linear-gradient(135deg, #e8834e, #f6a67e);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 4px 16px rgba(232,131,78,0.4);
}
.tts-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(232,131,78,0.6);
}
.tts-btn.active {
  border-color: #fff;
  background: linear-gradient(135deg, #d4702e, #e8834e);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3), 0 6px 24px rgba(232,131,78,0.5);
  animation: btn-pulse 1.8s ease-in-out infinite;
}
.tts-btn svg {
  pointer-events: none;
}


/* ─── responsive ─── */
@media only screen and (max-width: 300px) {
  .prev, .next, .text { font-size: 13px; }
}

br {
  display: block;
  content: "";
  margin-top: 10px;
}
