/* ========== RESET בסיס ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #040814;
  color: #e3f2fd;
  direction: rtl;
}

/* מעבר חלק בין מצבים */
body,
header,
section,
.hero,
footer,
.card,
.grade-card,
.nav,
.hero-side-card {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus,
a:focus-visible,
button:focus,
button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ========== HEADER + NAV ========== */

.header-main {
  background: #020617;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 1rem;
}

/* צד ימין – לוגו + טקסט בית הספר */
.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-square {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.school-title-main {
  font-weight: 700;
  font-size: 0.95rem;
}

.school-title-sub {
  font-size: 0.8rem;
  opacity: 0.8;
}

.school-title-sub a {
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.78rem;
}

/* צד שמאל – תפריט */
.nav-right {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  align-items: center;
}

.nav-right a {
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.15s;
}

.nav-right a:hover {
  background: rgba(40, 150, 220, 0.2);
}

.btn-outline {
  border: 1px solid rgba(129, 212, 250, 0.7);
}

/* כפתור למרחב אישי */
.personal-btn {
  background: #1d4ed8;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 1040px;
  font-weight: 540;
  transition: 0.2s;
  display: inline-block;
}

.personal-btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

/* ========== כפתור המבורגר – דיפולט: מוסתר (דסקטופ) ========== */

/* ===== כפתור תפריט המבורגר – כמו פעם ===== */

.nav-toggle {
  display: flex; /* במובייל נראה, בדסקטופ מוחבא ע"י ה־@media */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* מצב פתוח – X */
.nav-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* לייט מוד – רקע לבן, קווים כהים */
html[data-theme="light"] .nav-toggle {
  background: #ffffff;
  border-color: #cbd5e1;
}

html[data-theme="light"] .nav-toggle span {
  background: #111827;
}

/* ========== כפתור מצב כהה/בהיר ========== */

button#theme-toggle {
  all: unset;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  color: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.7);
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

button#theme-toggle:hover {
  background: rgba(37, 99, 235, 0.95);
  border-color: rgba(129, 212, 250, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.9);
}

button#theme-toggle:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
}

/* ========== HERO ========== */

.hero {
  position: relative;
  color: #ffffff;
  overflow: hidden;
}

/* הירו של דף הבית */
.hero.hero-home {
  position: relative;
  min-height: 360px;
  padding: 40px 0 70px;
}

/* סליידר רקע */
.hero-slides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  animation: heroFade 25s infinite;
}

.hero-slide:nth-child(1) {
  background-image: url("img/campus_front.jpg");
  animation-delay: 0s;
}

.hero-slide:nth-child(2) {
  background-image: url("img/campus_yard.jpg");
  animation-delay: 5s;
}

.hero-slide:nth-child(3) {
  background-image: url("img/school_hallway.jpg");
  animation-delay: 10s;
}

.hero-slide:nth-child(4) {
  background-image: url("img/students_activity.jpg");
  animation-delay: 15s;
}

.hero-slide:nth-child(5) {
  background-image: url("img/school_aerial.jpg");
  animation-delay: 20s;
}

@keyframes heroFade {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  28%  { opacity: 1; }
  38%  { opacity: 0; }
  100% { opacity: 0; }
}

/* שכבת כהות */
.hero-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.6) 0%,
    rgba(0,0,0,0.35) 35%,
    rgba(0,0,0,0.0) 60%,
    rgba(0,0,0,0.8) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* תוכן ההירו */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.hero-text {
  flex: 1.6;
}

.hero-text h1 {
  font-size: 2.1rem;
  margin-bottom: 8px;
}

.hero-text p {
  font-size: 0.98rem;
  max-width: 520px;
  margin-bottom: 14px;
}

/* כפתורי פעולה */
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* כרטיס צד – מידע מהיר */
.hero-side-card {
  flex: 1;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(129, 212, 250, 0.5);
  font-size: 0.9rem;
}

.hero-side-card h3 {
  margin-bottom: 8px;
}

/* ========== כפתורים ========= */

.btn,
.btn-outline {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.btn {
  background: linear-gradient(90deg, #29b6f6, #00e5ff);
  color: #01253b;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn-outline {
  background: transparent;
  color: #e3f2fd;
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* ========== HOME NEWS + EXAMS ========== */

section {
  padding: 40px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.grade-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(129, 212, 250, 0.25);
}

.grade-card h3 {
  margin-bottom: 10px;
}

.home-news-list,
.home-exams-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

/* חדשות */
.home-news-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(129, 212, 250, 0.35);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.home-news-item-with-image {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: flex-start;
}

.home-news-image-wrap {
  width: 100%;
  max-width: 80px;
  border-radius: 8px;
  overflow: hidden;
}

.home-news-image-wrap img {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(129, 212, 250, 0.6);
}

.home-news-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home-news-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.home-news-meta {
  color: #9cd2ff;
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 4px;
}

.home-news-body {
  color: #d9e8ff;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-line;
}

/* מבחנים */
.home-exam-item {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(129, 212, 250, 0.35);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
}

.home-exam-top {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 4px;
}

.home-exam-date {
  color: #4fc3f7;
}

.home-exam-subject {
  color: #ffd54f;
}

.home-exam-topic {
  font-size: 0.85rem;
  white-space: pre-line;
}

.home-exam-countdown {
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
}

.empty-msg {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* אזור "מבחן הבא" */
.home-exam-item-next {
  border-color: #81d4fa;
  box-shadow: 0 0 14px rgba(129, 212, 250, 0.6);
}

/* ========== לוח מודעות ========== */

.home-board-list,
.board-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.board-item {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(129, 212, 250, 0.4);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  font-size: 0.9rem;
}

.board-item-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.board-item-meta {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 4px;
  color: #9cd2ff;
}

.board-item-body {
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-line;
}

.board-item-image {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  display: flex;
  justify-content: center;
}

.board-item-image img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* ========== ABOUT / CONTACT ========== */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
  gap: 18px;
  margin-top: 10px;
}

.about-image-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(129, 212, 250, 0.25);
}

.about-text p + p {
  margin-top: 5px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: 20px;
}

.contact-box {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(129, 212, 250, 0.25);
  font-size: 0.9rem;
}

/* מפה קטנה */
.map-container-small {
  max-width: 350px;
  height: 230px;
  overflow: hidden;
  border-radius: 16px;
}

.map-container-small iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ========== FOOTER ========== */

footer {
  padding: 18px 0 24px;
  text-align: center;
  font-size: 0.85rem;
  background: #020816;
  margin-top: 16px;
}

/* מרחק גלילה לעוגנים */
#about,
#home-news,
#home-exams,
#grades,
#contact {
  scroll-margin-top: 120px;
}

/* ========== דפי שכבות (ז / ח / ט) ========== */

.grade-hero {
  background: linear-gradient(135deg, #0b1324, #020816);
  border-bottom: 1px solid rgba(129, 212, 250, 0.25);
  padding: 40px 0 32px;
}

.grade-hero h1 {
  font-size: 2rem;
  margin-bottom: 6px;
}

.grade-hero p {
  font-size: 0.95rem;
  opacity: 0.85;
}

.grade-news {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#grade-exams {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* לוח מודעות בדפי שכבה */
.board-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* כפתור חזרה למעלה */
#to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(2, 136, 209, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  z-index: 30;
}

/* ========== ADMIN PANEL (קיצור) ========== */

#login-section {
  max-width: 420px;
  margin: 40px auto;
  background: rgba(0, 0, 0, 0.45);
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(129, 212, 250, 0.25);
}

#login-section label {
  display: block;
  font-size: 0.85rem;
  margin-top: 8px;
  margin-bottom: 4px;
}

#login-section input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(129, 212, 250, 0.45);
  background: rgba(3, 11, 25, 0.95);
  color: #e3f2fd;
}

.admin-layout {
  margin-top: 30px;
}

.admin-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.card {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(129, 212, 250, 0.25);
  font-size: 0.9rem;
}

.admin-list {
  margin-bottom: 10px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.85rem;
}

.admin-item {
  background: rgba(0, 0, 0, 0.55);
  border-radius: 10px;
  padding: 6px 8px;
  margin-bottom: 6px;
}

.admin-item-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.admin-remove {
  margin-top: 4px;
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(239, 83, 80, 0.8);
  background: transparent;
  color: #ff8a80;
  cursor: pointer;
}

/* ========== נגישות ========== */

.accessibility-btn {
  position: fixed;
  bottom: 90px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: radial-gradient(circle at 30% 20%, #38bdf8, #1e3a8a);
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  z-index: 1200;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.accessibility-panel {
  position: fixed;
  bottom: 145px;
  right: 18px;
  width: 240px;
  max-width: 90vw;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.8);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9);
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #e5e7eb;
  z-index: 1199;
  display: none;
}

.accessibility-panel.open {
  display: block;
}

/* מצבי נגישות */
html.access-font-lg { font-size: 115%; }
html.access-font-xl { font-size: 125%; }

html.access-contrast body {
  filter: invert(1) hue-rotate(180deg);
}
html.access-contrast img,
html.access-contrast video,
html.access-contrast picture,
html.access-contrast canvas {
  filter: invert(1) hue-rotate(180deg);
}
html.access-links a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* ========== LIGHT MODE ========== */

html[data-theme="light"],
body.theme-light {
  background: #e5edf7;
  color: #0f172a;
}

html[data-theme="light"] .header-main {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] footer {
  background: #ffffff;
  color: #111827;
  border-top: 1px solid #e5e7eb;
}

html[data-theme="light"] .grade-card,
html[data-theme="light"] .about-image-card,
html[data-theme="light"] .contact-box,
html[data-theme="light"] .card {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .home-news-item {
  background: #ffffff;
  border-color: #c7d2fe;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .board-item {
  background: #ffffff;
  border-color: #bfdbfe;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .home-news-title {
  color: #0b1120;
}

html[data-theme="light"] .home-news-body {
  color: #111827;
}

html[data-theme="light"] .home-news-meta,
html[data-theme="light"] .board-item-meta {
  color: #2563eb;
}

/* הירו לייט */
html[data-theme="light"] .hero-home::before {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.6) 0%,
    rgba(255,255,255,0.8) 60%,
    rgba(245,247,251,1) 100%
  );
}

/* כפתור מצב בהיר */
html[data-theme="light"] button#theme-toggle {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 6px 16px rgba(148, 163, 184, 0.6);
}

/* כרטיס מידע מהיר בלייט – לא שחור */
html[data-theme="light"] .hero-side-card {
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.65);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

/* כפתור Admin בלייט שלא נעלם */
html[data-theme="light"] .btn-outline {
  color: #1d4ed8;
  border-color: #1d4ed8;
  background-color: #ffffff;
  font-weight: 600;
}

html[data-theme="light"] .btn-outline:hover {
  background-color: #1d4ed8;
  color: #ffffff;
}

/* כפתור המבורגר בלייט – אייקון כהה */
html[data-theme="light"] .nav-toggle {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(148, 163, 184, 0.9);
}
html[data-theme="light"] .nav-toggle span {
  background: #0f172a;
}

/* ========== RESPONSIVE (מובייל) ========== */

@media (max-width: 900px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .logo-square {
    width: 30px;
    height: 30px;
  }

  /* הירו – יותר גבוה למובייל */
  .hero.hero-home {
    min-height: 520px;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-side-card {
    width: 100%;
    font-size: 0.85rem;
  }

  section {
    padding: 28px 0;
  }

  .home-grid {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .grade-hero {
    text-align: center;
  }

  /* תפריט המבורגר – מופיע רק במובייל */
  .nav-toggle {
    display: flex;
  }

  /* nav-right הופך למגירת צד שנפתחת עם class="open" */
  .nav-right {
    position: fixed;
    top: 70px;
    right: 12px;
    width: min(260px, 90vw);
    max-height: calc(100vh - 90px);
    padding: 14px 18px;
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(15, 23, 42, 0.98);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition:
      opacity 0.22s ease,
      visibility 0.22s ease,
      transform 0.22s ease;
    z-index: 60;
  }

  .nav-right.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-right a {
    display: block;
    font-size: 0.95rem;
    padding: 6px 2px;
    color: #e5f0ff;
  }

  .nav-right .personal-btn,
  .nav-right .btn-outline {
    width: 100%;
    justify-content: center;
  }

  body.nav-open {
    overflow: hidden;
  }

  /* לייט מוד – תפריט לבן */
  html[data-theme="light"] .nav-right {
    background: rgba(255, 255, 255, 0.98);
    color: #0f172a;
  }
  html[data-theme="light"] .nav-right a {
    color: #0f172a;
  }

  /* התאמות כפתור חזרה למעלה ונגישות */
  #to-top {
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
  }

  .accessibility-btn {
    bottom: 80px;
    right: 14px;
  }

  .accessibility-panel {
    right: 14px;
    bottom: 135px;
  }
}

/* דסקטופ – מבטיח שהתפריט בצד שמאל מלא וההמבורגר מוסתר */
@media (min-width: 901px) {
  .header-main .container {
    display: flex;
    justify-content: center;
  }

  .header-main .container .nav {
    width: 100%;
    max-width: 1150px;
    padding-inline: 24px;
    align-items: center;
    justify-content: space-between; /* ימין – לוגו, שמאל – תפריט */
  }

  .nav-right {
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-toggle {
    display: none !important;
  }
}
/* =========================
   1) תפריט המבורגר – נפתח משמאל במובייל
   ========================= */
@media (max-width: 900px) {
  .nav-right {
    right: auto !important;
    left: 0 !important;
    border-radius: 0 22px 22px 0 !important;
    transform: translateX(-100%) !important;  /* מתחבא משמאל */
  }

  .nav-right.open {
    transform: translateX(0) !important;      /* נכנס משמאל */
  }
}

/* =========================
   2) צבע לייט מוד – קצת יותר נקי ובהיר
   ========================= */
html[data-theme="light"] body {
  background: #eef3fb;        /* טיפה כחול בהיר במקום אפור-ורדרד */
  color: #0b1120;
}

html[data-theme="light"] .hero-home {
  background-color: #eef3fb;
}

/* שכבת ההירו בלייט – פחות "שרופה" */
html[data-theme="light"] .hero-home::before {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.75) 0%,
    rgba(239,243,251,0.92) 45%,
    rgba(239,243,251,1) 100%
  );
}

/* כרטיסים חשובים בלייט – לבן נקי */
html[data-theme="light"] .grade-card,
html[data-theme="light"] .hero-side-card,
html[data-theme="light"] .card,
html[data-theme="light"] .home-exam-item,
html[data-theme="light"] .home-news-item {
  background: #ffffff;
  color: #0b1120;
}

/* טיימר מבחן בלייט – שחור חזק */
html[data-theme="light"] .home-exam-countdown {
  color: #111827;
}

/* =========================
   3) הקטנת התמונה של הבית ספר (Hero)
   ========================= */
.hero.hero-home {
  min-height: 320px;     /* היה גבוה יותר */
  padding: 32px 0 56px;  /* קצת פחות רווח */
}

@media (max-width: 900px) {
  .hero.hero-home {
    min-height: 420px;   /* היה 520 – מקטין במובייל */
    padding: 28px 0 52px;
  }

  /* טקסט בהירו במובייל שיהיה קצת יותר צפוף ונעים */
  .hero-text h1 {
    font-size: 1.9rem;
  }
  .hero-text p {
    font-size: 0.95rem;
  }
}
/* === הקטנת תפריט המובייל === */
@media (max-width: 900px) {
  .nav-right {
    width: min(180px, 60vw);   /* היה 260px, עכשיו קטן יותר */
    padding: 12px 16px 24px;   /* פחות ריווח פנימי */
    gap: 10px;
  }

  .nav-right a {
    font-size: 0.88rem;        /* טיפה יותר קטן */
    padding: 4px 0;
  }

  .nav-right .personal-btn,
  .nav-right .btn-outline {
    font-size: 0.85rem;
    padding: 6px 10px;
  }
}
/* ===== טקסט שחור בלייט מוד בכל האזורים ===== */

html[data-theme="light"] body,
html[data-theme="light"] .hero-text h1,
html[data-theme="light"] .hero-text p,
html[data-theme="light"] .section-title,
html[data-theme="light"] .section-subtitle,
html[data-theme="light"] .grade-card,
html[data-theme="light"] .hero-side-card,
html[data-theme="light"] .home-news-title,
html[data-theme="light"] .home-news-body,
html[data-theme="light"] .home-exam-item,
html[data-theme="light"] .board-item,
html[data-theme="light"] footer,
html[data-theme="light"] .about-text,
html[data-theme="light"] .contact-box,
html[data-theme="light"] .nav-right a {
    color: #0f172a !important; /* שחור כהה */
}

/* טקסט שמופיע בתוך קופסאות */
html[data-theme="light"] .hero-side-card p,
html[data-theme="light"] .hero-side-card li,
html[data-theme="light"] .quick-info-box li {
    color: #111827 !important;
}

/* קישורים בלייט מוד */
html[data-theme="light"] a {
    color: #0f172a !important;
}

/* כפתורי תפריט בחלק העליון */
html[data-theme="light"] .nav-right .btn-outline,
html[data-theme="light"] .btn-outline {
    color: #1e3a8a !important;        
    border-color: #1e3a8a !important;
    background: #ffffff !important;
}

html[data-theme="light"] .btn-outline:hover {
    background: #1e3a8a !important;
    color: #ffffff !important;
}

/* טקסט בהירו — למנוע שקיפות בהירה מדי בלייט */
html[data-theme="light"] .hero-home::before {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.95) 40%,
        rgba(255, 255, 255, 1) 100%
    ) !important;
}

html[data-theme="light"] .hero-text h1,
html[data-theme="light"] .hero-text p {
    text-shadow: none !important;
}


/* =========================
   🔧 חיזוק רקע הירו בלייט מוד
   (שלא יהיה שקוף מדי)
   ========================= */
html[data-theme="light"] .hero-home::before {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.92) 0%,
    rgba(255,255,255,0.95) 40%,
    rgba(245,247,251,1) 100%
  ) !important;
}


/* =========================
   🔧 תפריט המבורגר – צד שמאל
   וגודל קצת קטן
   ========================= */
@media (max-width: 900px) {

  /* כפתור המבורגר */
  .nav-toggle {
    width: 34px !important;
    height: 34px !important;
    border-radius: 999px;
  }
  .nav-toggle span {
    width: 16px;
    height: 2px;
  }

  /* תפריט נפתח – שמאל */
  .nav-right {
    right: auto !important;
    left: 0 !important;
    width: min(230px, 78vw) !important;
    border-radius: 0 18px 18px 0 !important;
  }

  /* לייט מוד של התפריט */
  html[data-theme="light"] .nav-right {
    background: rgba(255,255,255,0.98) !important;
    color: #0f172a !important;
  }
  html[data-theme="light"] .nav-right a {
    color: #0f172a !important;
  }
}


/* === לייט מוד – רקע התמונה פחות שקוף (יותר לבן, טקסט נשאר קריא) === */
html[data-theme="light"] .hero-home::before {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.98) 40%,
    #f3f4f8 100%
  );
}
/* הזזת תמונת הרקע + הקטנה */
.hero-home .hero-slides .hero-slide {
  background-position: center right 8% !important;
  background-size: 115% !important;
}

@media (max-width: 900px) {
  .hero-home .hero-slides .hero-slide {
    background-position: center right 4% !important;
    background-size: 160% !important;
  }
}
/* לייט מוד – פחות שקוף, יותר תמונה */
html[data-theme="light"] .hero-home::before {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.50) 0%,
    rgba(255,255,255,0.65) 40%,
    rgba(255,255,255,0.85) 100%
  ) !important;
}

/* =========================
   🔧 רקע הירו – פחות שקוף, יותר ברור
   ========================= */
.hero-home::before {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.25) 0%,      /* במקום 0.6 – הרבה פחות כהה */
    rgba(0,0,0,0.18) 25%,
    rgba(0,0,0,0.10) 50%,
    rgba(0,0,0,0.20) 100%
  ) !important;
}

html[data-theme="light"] .hero-home::before {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.30) 0%,   /* היה 0.6 – עכשיו רואים את התמונה */
    rgba(255,255,255,0.40) 40%,
    rgba(245,247,251,0.70) 100%
  ) !important;
}
/* ============================
   לוגו מעוצב מחדש – מבוסס על הגרסה הישנה
   ============================ */
.logo-circle {
  width: 65px;        /* גדול מהישן (44px), אבל לא מוגזם */
  height: 65px;
  border-radius: 50%;
  background: radial-gradient(circle at top, #29b6f6, #01579b);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  
  /* הזזה למיקום שביקשת */
  top: -6px;     /* מעלה קצת */
  right: -8px;   /* מזיז קצת ימינה */
}

.logo-circle .logo-img {
  width: 122%;      /* בדיוק כמו שהיה – ממלא יפה */
  height: 122%;
  object-fit: cover;
  object-position: 50% 60%;
  display: block;
}

/* גרסה קטנה יותר בנייד */
@media (max-width: 900px) {
  .logo-circle {
    width: 55px;
    height: 55x;
    top: -4px;
    right: -6px;
  }

  .logo-circle .logo-img {
    width: 125%;
    height: 125%;
  }
}
/* פייד עדין בתחתית ההירו בדארק מוד */
html:not([data-theme="light"]) .hero-home::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px; /* כמה גבוה שהפייד יהיה – אפשר לשחק עם זה */
  background: linear-gradient(
    to bottom,
    rgba(4, 8, 20, 0) 0%,
    rgba(4, 8, 20, 0.85) 60%,
    rgba(4, 8, 20, 1) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* לוודא שהתוכן מעל הפייד */
.hero-home .hero-content {
  position: relative;
  z-index: 2;
}

/* ===== תיקון שכבת HERO בדפי שכבה במצב בהיר ===== */

html[data-theme="light"] .grade-hero,
body.theme-light .grade-hero {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.92),
    rgba(240,243,248,1)
  ) !important;
  color: #0f172a !important;
}

/* תתי־כותרות + טקסט בתוך ההירו */
html[data-theme="light"] .grade-hero h1,
html[data-theme="light"] .grade-hero p,
body.theme-light .grade-hero h1,
body.theme-light .grade-hero p {
  color: #0f172a !important;
  opacity: 1 !important;
}
/* מובייל – תפריט צד יותר קטן ו״נחמד״ */
@media (max-width: 768px) {
  .nav-right {
    position: fixed;
    top: 64px;
    right: 10px;
    bottom: auto;
    width: min(220px, 78vw);
    max-height: calc(100vh - 80px);
    padding: 14px 18px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 60;
  }

  .nav-right.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-right a {
    width: 100%;
    font-size: 0.9rem;
    padding: 4px 0;
    text-align: right;
  }

  .nav-right .personal-btn,
  .nav-right .btn-outline {
    width: 100%;
    justify-content: center;
  }

  /* דארק מוד – אותה מסגרת, רק רקע כהה */
  html[data-theme="dark"] .nav-right {
    background: #020617;
  }
}
/* מובייל – תמונת הרקע ותקרת הפייד */
@media (max-width: 768px) {
  .hero-home {
    background-position: center top;  /* יותר "יישור" של התמונה */
  }

  /* בברייט מוד – רואים את התמונה יותר טוב, אבל עדיין קריא */
  html[data-theme="light"] .hero-home::before {
    background: linear-gradient(
      to bottom,
      rgba(255,255,255,0.85) 0%,
      rgba(255,255,255,0.65) 18%,
      rgba(255,255,255,0.25) 45%,
      rgba(255,255,255,0.0) 80%
    );
  }
}/* ===== לוגו עגול במובייל ===== */
@media (max-width: 768px) {
  .logo-square,
  .logo-circle {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .logo-circle .logo-img,
  .logo-square img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}
/* כפתור למרחב האישי – טקסט לבן בלייט ודארק */
.header-right .personal-area-btn,
.personal-area-btn {
  color: #ffffff !important;
}

/* דואג שגם בתוך ההמבורגר הטקסט יהיה לבן */
.mobile-menu .personal-area-btn {
  color: #ffffff !important;
}

a.personal-area-btn span,
.personal-area-btn span {
  color: #ffffff !important;
}
/* --- תיקון לייט מוד לדפי שכבות --- */
body.light-mode .grade-hero {
  background: #f5f8ff !important; /* רקע בהיר */
  color: #0d1b2a !important; /* טקסט כהה */
}

body.light-mode .grade-hero h1,
body.light-mode .grade-hero p {
  color: #0d1b2a !important;
}
/* כפתורי כיתות בתוך כרטיס המבחנים */
.class-links {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.5);
  font-size: 0.85rem;
}

.class-links-label {
  display: block;
  margin-bottom: 6px;
  opacity: 0.9;
}

.class-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.class-links-row a {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(129, 212, 250, 0.7);
  font-size: 0.8rem;
  cursor: pointer;
}

/* לייט מוד – שיהיה יפה גם בברייט */
html[data-theme="light"] .class-links-row a {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #ffffff;
}

html[data-theme="light"] .class-links-row a:hover {
  background: #e0edff;
}
/* ===== כפתורי בחירת כיתה (בדף הראשי) ===== */

.grades-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.grade-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: linear-gradient(135deg,
    rgba(59, 130, 246, 0.06),
    rgba(56, 189, 248, 0.14)
  );
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

/* דארק מוד */
[data-theme="dark"] .grade-btn {
  border-color: rgba(148, 163, 184, 0.5);
  background: linear-gradient(135deg,
    rgba(15, 23, 42, 0.9),
    rgba(30, 64, 175, 0.8)
  );
  color: #e5f0ff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.7);
}

.grade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  border-color: rgba(37, 99, 235, 0.85);
}

.grade-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

@media (max-width: 768px) {
  .grades-buttons {
    justify-content: center;
  }
}
/* תמונות בתוך כרטיסים באדמין – חדשות / לוח מודעות וכו' */
.admin-image-wrapper {
  margin-top: 6px;
}

.admin-image {
  display: block;
  max-width: 100%;
  width: 100%;          /* שיישב יפה ברוחב הכרטיס */
  max-height: 220px;    /* כמה גובה מקסימלי שאתה רוצה */
  object-fit: cover;    /* חותך יפה במקום למעוך */
  border-radius: 12px;
  border: 1px solid #1e293b;
}
.card img,
.admin-item img {
  max-width: 100%;
  height: auto;
  max-height: 260px; /* כדי שלא יהיו ענקיות */
  object-fit: cover;
  border-radius: 10px;
}
/* =========================
   POLLS PAGE – LIGHT MODE
   ========================= */

/* כדי שזה יתפוס, אחד מאלה חייב להיות על ה-body:
   body.light-mode או body.theme-light או data-theme="light"
   (כנראה יש לך light-mode – השאר זה גיבוי)
*/

/* ===== POLLS – LIGHT / DARK ===== */

/* דארק מוד – מה שיש לך עכשיו בערך */
:root[data-theme="dark"] .polls-main-card {
  background: radial-gradient(circle at top left, #1e293b, #020617);
  color: #e5e7eb;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

:root[data-theme="dark"] .polls-stat-card {
  background: #020617;
  color: #e5e7eb;
  border-radius: 24px;
  border: 1px solid rgba(34, 197, 94, 0.5);
}

/* לייט מוד – רקע בהיר, טקסט כהה */
:root[data-theme="light"] .polls-main-card {
  background: #f9fafb;
  color: #0f172a;
  border-radius: 24px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

:root[data-theme="light"] .polls-stat-card {
  background: #ffffff;
  color: #0f172a;
  border-radius: 24px;
  border: 1px solid #d1d5db;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}
#home-exams h2.section-title {
  white-space: nowrap;
}
/* תיקון שבירת שורה בכותרות "מבחנים · שכבת X" */
.exams-grade-card .section-title,
.exams-grade-card h2.section-title,
.exams-grade-card h3.section-title {
  white-space: nowrap !important;
}
.news-slider {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin-top: 8px;
}

.news-slider-inner {
  position: relative;
  width: 100%;
  height: 210px;
}

.news-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-slide.active {
  opacity: 1;
}

.news-slider-nav {
  position: absolute;
  inset: auto 8px 8px 8px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.news-slider-btn {
  pointer-events: auto;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.85);
  color: #e5f0ff;
  padding: 3px 10px;
  font-size: 0.75rem;
  cursor: pointer;
}

html[data-theme="light"] .news-slider-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border-color: #cbd5e1;
}
/* === קרוסלה לתמונות בלוח מודעות === */
.board-item-images {
  margin-top: 8px;
  position: relative;
}

.board-item-image {
  display: none;
}

.board-item-image.active {
  display: block;
}

.board-slider-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.board-slider-controls button {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.85);
  padding: 2px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

/* לייט מוד */
html[data-theme="light"] .board-slider-controls button {
  background: #ffffff;
  border-color: #cbd5e1;
}
/* ===== תיקון HERO – טקסט מעל סליידר ===== */

.hero.hero-home {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* הסליידר תמיד כרקע מאחורה */
.hero-home .hero-slides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ההכהיה נשארת מעל הסליידר */
.hero-home .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* כל התוכן (טקסט + כרטיס צדדי) מעל שניהם */
.hero-home .hero-content {
  position: relative;
  z-index: 2;
}

/* במובייל – נותנים קצת גובה כדי שהתמונה והטקסט יהיו יחד */
@media (max-width: 768px) {
  .hero.hero-home {
    min-height: 280px;
  }

  .hero-home .hero-content {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}
/* ===== FIX HERO במובייל – טקסט על הסליידר, לא מעליו ===== */

.hero.hero-home {
  position: relative !important;
  width: 100% !important;
  min-height: 280px !important;
  overflow: hidden !important;
}

/* הסליידר – תמיד כרקע שמתפרס על כל הסקשן */
.hero.hero-home .hero-slides {
  position: absolute !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
}

/* כל סלייד ממלא את הגובה של ההירו */
.hero.hero-home .hero-slide {
  width: 100% !important;
  height: 100% !important;
}

/* שכבת ההכהיה מעל הסליידר */
.hero.hero-home .hero-overlay {
  position: absolute !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1 !important;
}

/* התוכן (יחד צומחים וכו') מעל הכול */
.hero.hero-home > .container.hero-content {
  position: relative !important;
  z-index: 2 !important;
}

/* במובייל – קצת יותר קומפקטי אבל עדיין על התמונה */
@media (max-width: 768px) {
  .hero.hero-home {
    min-height: 260px !important;
  }

  .hero.hero-home > .container.hero-content {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}
/* ===== HERO במובייל – אותו מראה כמו בדסקטופ ===== */

.hero.hero-home {
  position: relative !important;
  width: 100% !important;
  overflow: hidden !important;
}

/* הסליידר כ"רקע" מלא מאחורה */
.hero.hero-home .hero-slides {
  position: absolute !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
}

.hero.hero-home .hero-slide {
  width: 100% !important;
  height: 100% !important;
  background-size: cover !important;
  background-position: center !important;
}

/* שכבת ההכהיה */
.hero.hero-home .hero-overlay {
  position: absolute !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1 !important;
}

/* התוכן (יחד צומחים וכו') מעל הכול */
.hero.hero-home > .container.hero-content {
  position: relative !important;
  z-index: 2 !important;
}

/* ===== מובייל ===== */
@media (max-width: 640px) {
  .hero.hero-home {
    min-height: 360px !important;
    display: flex !important;
    align-items: flex-end !important;
  }

  .hero.hero-home > .container.hero-content {
    width: 100% !important;
    padding: 16px 16px 24px !important;
  }

  /* הטקסט עצמו בתוך קופסה כהה על התמונה */
  .hero.hero-home .hero-text {
    background: rgba(15, 23, 42, 0.72) !important;
    color: #f9fafb !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
  }

  .hero.hero-home .hero-text h1 {
    font-size: 1.3rem !important;
    margin-bottom: 4px !important;
  }

  .hero.hero-home .hero-text p {
    font-size: 0.9rem !important;
    margin: 0 !important;
  }

  .hero.hero-home .hero-actions {
    margin-top: 10px !important;
  }
}
/* ===== HERO במובייל גם בדארק מוד ===== */

@media (max-width: 640px) {
  :root[data-theme="dark"] .hero.hero-home {
    position: relative !important;
    width: 100% !important;
    min-height: 360px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: flex-end !important;
  }

  :root[data-theme="dark"] .hero.hero-home .hero-slides {
    position: absolute !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
  }

  :root[data-theme="dark"] .hero.hero-home .hero-slide {
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
  }

  :root[data-theme="dark"] .hero.hero-home .hero-overlay {
    position: absolute !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1 !important;
  }

  :root[data-theme="dark"] .hero.hero-home > .container.hero-content {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    padding: 16px 16px 24px !important;
  }

  :root[data-theme="dark"] .hero.hero-home .hero-text {
    background: rgba(15, 23, 42, 0.85) !important;
    color: #f9fafb !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
  }

  :root[data-theme="dark"] .hero.hero-home .hero-text h1 {
    font-size: 1.3rem !important;
    margin-bottom: 4px !important;
  }

  :root[data-theme="dark"] .hero.hero-home .hero-text p {
    font-size: 0.9rem !important;
    margin: 0 !important;
  }

  :root[data-theme="dark"] .hero.hero-home .hero-actions {
    margin-top: 10px !important;
  }
}
/* === HERO FINAL OVERRIDE – גם לייט, גם דארק, גם מובייל === */

.hero-home::before,
.hero-home::after {
  content: none !important;
}

/* קופסת הירו הכללית */
.hero.hero-home {
  position: relative !important;
  width: 100% !important;
  min-height: 340px !important;
  display: flex !important;
  align-items: flex-end !important;
  overflow: hidden !important;
}

/* הסליידר כרקע מלא שממשיך לזוז */
.hero.hero-home .hero-slides {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
}

.hero.hero-home .hero-slide {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  background-size: cover !important;
  background-position: center !important;
}

/* שכבת כהות מעל הרקע */
.hero.hero-home .hero-overlay {
  position: absolute !important;
  inset: 0;
  z-index: 1 !important;
  background: linear-gradient(
    to bottom,
    rgba(15,23,42,0.45),
    rgba(15,23,42,0.88)
  ) !important;
}

/* התוכן (יחד צומחים וכו') – תמיד מעל */
.hero.hero-home > .container.hero-content {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  padding: 16px 16px 28px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

/* הקופסה של הטקסט בהירו */
.hero.hero-home .hero-text {
  background: rgba(15, 23, 42, 0.82) !important;
  color: #f9fafb !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
}

/* לייט מוד – קופסה לבנה, טקסט שחור */
:root[data-theme="light"] .hero.hero-home .hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.75),
    rgba(255,255,255,0.98)
  ) !important;
}

:root[data-theme="light"] .hero.hero-home .hero-text {
  background: rgba(255,255,255,0.92) !important;
  color: #0f172a !important;
}

/* בדסקטופ – טקסט + כרטיס צד אחד ליד השני */
@media (min-width: 900px) {
  .hero.hero-home > .container.hero-content {
    flex-direction: row !important;
    align-items: center !important;
  }

  .hero.hero-home .hero-text {
    max-width: 520px !important;
  }
}

/* במובייל – אותו לוק כמו ששלחת, רק על התמונה */
@media (max-width: 640px) {
  .hero.hero-home {
    min-height: 360px !important;
  }
}
/* ===== POLLS – לייט מוד לבן לגמרי ===== */
html[data-theme="light"] .polls-main-card,
html[data-theme="light"] .polls-stat-card {
  background: #ffffff !important;
  color: #0f172a !important;
  border-radius: 24px !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10) !important;
}

/* רקע האזור של הסקרים בלייט – קצת אפור בהיר עדין */
html[data-theme="light"] body[data-page="polls"] {
  background: #eef3fb !important;
}
.page-building {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #1f2937, #020617);
  color: #e5f0ff;
}

.building-card {
  text-align: center;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 24px;
  padding: 40px 32px;
  max-width: 420px;
  box-shadow: 0 30px 70px rgba(0,0,0,.6);
}

.building-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.building-card h1 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.building-card p {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 22px;
}

.building-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #38bdf8;
  color: #020617;
  text-decoration: none;
  font-weight: 600;
}
.page-building {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eef3fb, #e5ecf7);
}

.building-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  max-width: 420px;
  width: 100%;
}

.building-icon {
  font-size: 3.2rem;
  margin-bottom: 12px;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

.building-card h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #0f172a;
}

.building-card p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.6;
}

.building-note {
  margin-top: 10px;
  font-size: 0.85rem;
  opacity: 0.7;
}

.building-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.25s ease, transform 0.15s ease;
}

.building-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}
.home-news-read-more {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #16a34a;
}
.home-news-read-more:hover {
  text-decoration: underline;
}
.news-article img,
.home-board-list img {
  max-width: 80%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
}
