/* ========== 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,
:root {
  /* שקיפות לכרטיסים / סקשנים */
  --surface-bg: rgba(15, 23, 42, 0.90);   /* ברירת מחדל – דארק */
  --surface-border: rgba(148, 163, 184, 0.6);
  --surface-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);

  /* רקע שקוף לנב-בר */
  --nav-bg: rgba(15, 23, 42, 0.88);
  --nav-border: rgba(148, 163, 184, 0.5);
}

/* 🔆 לייט מוד */
:root[data-theme="light"] {
  --surface-bg: rgba(255, 255, 255, 0.92);
  --surface-border: rgba(148, 163, 184, 0.28);
  --surface-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);

  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-border: rgba(148, 163, 184, 0.25);
}

.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;
}

/* Remove default focus ring on mouse click */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* Show clear focus ring for keyboard navigation (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
  border-radius: 4px;
}

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

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

.header-main {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.80);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
}

:root[data-theme="light"] .header-main {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(209, 213, 219, 0.85);
}



.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;
}
/* כותרת הגיבור בלייט-מוד – טקסט כהה */
html[data-theme="light"] .hero-home .hero-text h1,
html[data-theme="light"] .hero-home .hero-text p {
  color: #0f172a;        /* כמעט שחור, כמו טקסט רגיל */
}

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

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 {
  min-height: 340px;
  padding-top: 40px;
  padding-bottom: 40px;
}

/* סליידר רקע */
.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);
}


/* Multiple images (home news) */
.home-news-images-row{
  width: 80px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-news-image-wrap-multi{
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: rgba(255,255,255,0.9);
}
.home-news-image-wrap-multi img{
  display: block;
  width: 80px;
  height: 80px;
  object-fit: cover;
}
.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-news-mini {
  margin-top: 8px;
}

.home-news-mini-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
}

.home-news-mini-image img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.home-news-mini-content {
  flex: 1;
  min-width: 0;
}

.home-news-mini-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.home-news-mini-meta {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 2px;
}

/* מגביל את האורך של התיאור – 2 שורות */
.home-news-mini-body {
  font-size: 0.8rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-news-mini-readmore {
  margin-top: 4px;
  font-size: 0.8rem;
}

.home-news-mini-readmore a {
  color: #16a34a;
  text-decoration: none;
}

.home-news-mini-readmore a:hover {
  text-decoration: underline;
}


/* מבחנים */
.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: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;              /* גוזר כל מה שיוצא מהעיגול */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;           /* רקע לבן סביב הלוגו */
  flex-shrink: 0;
}

.logo-circle .logo-img,
.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;             /* ממלא את העיגול בצורה יפה */
  display: block;
}


/* גרסה קטנה יותר בנייד */
@media (max-width: 900px) {
  .logo-circle {
    width: 55px;
    height: 55px;
    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%
    );
  }
  /* שורת הכרטיסים מתחת לכותרת הראשית */
.hero-cards-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* כרטיס ב-hero – משתמש באותו סטייל של grade-card אבל קצת מותאם */
.hero-card {
  border-radius: 24px;
  padding: 18px 20px;
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

/* כותרת הקטנה בכרטיס */
.hero-card h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

/* לייט/דרק מוד */
html[data-theme="dark"] .hero-card {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

@media (max-width: 900px) {
  .hero-cards-row {
    grid-template-columns: 1fr;   /* בפלאפון אחד מתחת לשני */
  }
}

}/* ===== לוגו עגול במובייל ===== */
@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 {
  background: linear-gradient(
    to bottom,
    rgba(15,23,42,0.35) 0%,
    rgba(15,23,42,0.22) 35%,
    rgba(15,23,42,0.05) 65%,
    rgba(15,23,42,0.40) 100%
  );
}
.hero-home-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero-home-header {
  text-align: center;
}
.hero-home-header h1 {
  margin-bottom: 8px;
}
.hero-home-header p {
  margin-bottom: 14px;
}
.hero-home-header .hero-actions {
  display: inline-flex;
  gap: 10px;
}

/* שלושת הכרטיסים בשורה אחת */
.hero-home-cards {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

/* הכרטיס של "מידע מהיר" – תוכן רשימה */
.hero-quick-card ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 0.9rem;
}

.hero-quick-card li + li {
  margin-top: 4px;
}

/* מובייל / טאבלט – שלא יתפרק */
@media (max-width: 1024px) {
  .hero-home-cards {
    grid-template-columns: 1fr 1fr;
  }

  .hero-quick-card {
    grid-column: 1 / -1; /* תופס שורה מלאה */
  }
}

@media (max-width: 768px) {
  .hero.hero-home {
    min-height: auto;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .hero-home-header .hero-actions {
    flex-direction: column;
  }

  .hero-home-cards {
    grid-template-columns: 1fr;
  }
}
/* התוכן (יחד צומחים וכו') מעל הכול */
.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 styles consolidated below */
.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;
}
/* ==== לוגו עגול בכוח ==== */
/* logo-circle styles defined below in nav section */
.about-btn {
  display: inline-block;
  padding: 10px 28px;
  border-radius: 14px;
  background: #e8f0fe;          /* כחול בהיר מאוד */
  color: #1e3a8a;               /* כחול כהה לטקסט */
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: 0.25s ease;
  border: 1px solid #c7d8ff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}


.about-btn:hover {
  background: #dce7ff;
  transform: translateY(-2px);
}
/* 🔹 כפתור חזרה כללי */
.back-btn-wrap {
  display: flex;
  justify-content: center;
  margin: 18px 0 8px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    transform 0.1s ease;
}

/* מצב רגיל – לייט */
:root[data-theme="light"] .back-btn {
  background: #f9fbff;
  color: #111827;
}

/* מצב רגיל – דארק */
:root[data-theme="dark"] .back-btn {
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  border-color: rgba(55, 65, 81, 0.9);
}

/* הובר */
.back-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

/* הובר לייט */
:root[data-theme="light"] .back-btn:hover {
  background: #eef4ff;
  border-color: #2563eb;
  color: #111827;
}

/* הובר דארק */
:root[data-theme="dark"] .back-btn:hover {
  background: rgba(30, 64, 175, 0.9);
  border-color: #60a5fa;
  color: #f9fafb;
}

.back-arrow {
  font-size: 1.1rem;
  line-height: 1;
}
/* 🔹 כפתור "אודות בית הספר" בעמוד הבית */
.about-link-wrap {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.about-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.33);
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.08s ease,
    color 0.2s ease;
}

/* לייט מוד – קצת יותר בהיר מהרקע */
:root[data-theme="light"] .about-link-button {
  background: #2563eb;
  color: #f9fafb;
}

/* דארק מוד */
:root[data-theme="dark"] .about-link-button {
  background: #1d4ed8;
  color: #e5e7eb;
}

.about-link-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.42);
}

.about-link-button:active {
  transform: translateY(0);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.30);
}
/* ========== שדרוג הירו בדף הבית ========== */

/* ההירו קצת פחות גבוה */
.hero.hero-home {
  min-height: 320px;
  padding-top: 40px;
  padding-bottom: 40px;
}

/* שהתמונה באמת תיראה – פחות שחור מעליה */
.hero-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.38) 0%,
    rgba(0,0,0,0.22) 35%,
    rgba(0,0,0,0.00) 65%,
    rgba(0,0,0,0.45) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* התוכן של ההירו – יושב יותר נורמלי */
.hero-home .hero-content {
  position: relative;
  z-index: 2;
  align-items: flex-start;
  gap: 24px;
}

/* שני הריבועים ליד הכותרת */
.hero-home-top-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

/* להסתיר את כרטיס "מידע מהיר" כדי שישארו רק 2 ריבועים */
.hero-home .hero-side-card {
  display: none;
}

/* מובייל – הריבועים אחד מעל השני והירו בגובה רגיל */
@media (max-width: 768px) {
  .hero.hero-home {
    min-height: auto;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .hero-home-top-cards {
    grid-template-columns: 1fr;
  }
}

/* ================================================
   ✨ אנימציית כניסה משוגעת ויוקרתית לכל האתר ✨
   ================================================ */

/* אפקט מסך כולל */
body {
  opacity: 0;
  backdrop-filter: blur(4px);
  transition:
    opacity 1s ease-out,
    backdrop-filter 1.5s ease-out;
}

body.page-loaded {
  opacity: 1;
  backdrop-filter: blur(0px);
}

/* 🌄 רקע ה-HERO עושה ZOOM IN איטי ואלגנטי */
.hero-home {
  animation: heroZoom 2.6s ease-out forwards;
  transform-origin: center;
  opacity: 0;
}

body.page-loaded .hero-home {
  opacity: 1;
}

@keyframes heroZoom {
  0% {
    transform: scale(1.08);
    filter: blur(2px);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: scale(1);
    filter: blur(0);
  }
}

/* 📝 כותרת ראשית – כניסה מלמטה, איטית וחזקה */
.hero-home-header h1 {
  opacity: 0;
  transform: translateY(35px);
  transition:
    opacity 0.9s ease-out 0.4s,
    transform 1s cubic-bezier(.17,.67,.45,1.23) 0.4s;
}

body.page-loaded .hero-home-header h1 {
  opacity: 1;
  transform: translateY(0);
}

/* ✍️ טקסט מתחת לכותרת – fade-in חלק */
.hero-home-header p {
  opacity: 0;
  transform: translateY(25px);
  transition:
    opacity 1s ease-out 0.75s,
    transform 1s ease-out 0.75s;
}

body.page-loaded .hero-home-header p {
  opacity: 1;
  transform: translateY(0);
}

/* 🔘 כפתורי "חדשות" / "מבחנים" – קפיצה קטנה */
.hero-actions a {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition:
    opacity 1s ease-out 1s,
    transform 0.9s cubic-bezier(.25,1.32,.33,1) 1s;
}

body.page-loaded .hero-actions a {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 🟦 כרטיסים – fade + slide + stagger + elevation */
.hero-home-cards .grade-card {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition:
    opacity 0.85s ease-out,
    transform 0.85s ease-out,
    box-shadow 1s ease-out;
}

body.page-loaded .hero-home-cards .grade-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* 🕒 סטיגרים */
body.page-loaded .hero-home-cards .grade-card:nth-child(1) {
  transition-delay: 1.05s;
}

body.page-loaded .hero-home-cards .grade-card:nth-child(2) {
  transition-delay: 1.25s;
}

body.page-loaded .hero-home-cards .grade-card:nth-child(3) {
  transition-delay: 1.45s;
}

/* 🌈 אפקט "glow fade" על כל הדף – סופר עדין */
@keyframes glowFade {
  0% { box-shadow: 0 0 200px rgba(56, 132, 255, 0.12); }
  100% { box-shadow: 0 0 0 rgba(56, 132, 255, 0); }
}

body.page-loaded {
  animation: glowFade 2.8s ease-out forwards;
}

/* למי שמעדיף בלי אנימציות */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
/* ✨ אפקט גלילה – מוסתר בהתחלה רק בדף הבית */
body[data-page="home"] .reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(6px);
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
}

body[data-page="home"] .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}


/* קצת סטייל פנימי – הכרטיסים בתוך סקשן שנחשף יעלו גם הם יותר עדין */
.reveal-on-scroll.is-visible .grade-card,
.reveal-on-scroll.is-visible .card,
.reveal-on-scroll.is-visible .contact-box {
  transition:
    transform 0.6s ease-out,
    box-shadow 0.6s ease-out;
}

.reveal-on-scroll.is-visible .grade-card:hover,
.reveal-on-scroll.is-visible .card:hover,
.reveal-on-scroll.is-visible .contact-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.18);
}

/* לילה / יום – שהאפקט יישב יפה בשני המצבים */
:root[data-theme="dark"] .reveal-on-scroll.is-visible .grade-card,
:root[data-theme="dark"] .reveal-on-scroll.is-visible .card,
:root[data-theme="dark"] .reveal-on-scroll.is-visible .contact-box {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

/* ✅ ביטול שקיפות / בלור בכל הדפים שהם לא דף הבית */
body:not([data-page="home"]) {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

/* ✅ גם אלמנטים עם reveal-on-scroll יהיו תמיד גלויים בדפים אחרים */
body:not([data-page="home"]) .reveal-on-scroll {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}
.grade-card,
.card,
.request-box,
.contact-box,
.hero-side-card,
.hero-quick-card {
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255,255,255,0.75), rgba(15,23,42,0.75));
  pointer-events: none;
}

:root[data-theme="light"] .hero-overlay {
  background: radial-gradient(circle at top, rgba(255,255,255,0.80), rgba(148,163,184,0.60));
}
.grade-card,
.card,
.request-box,
.contact-box,
.hero-quick-card,
.hero-side-card {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background-color 0.22s ease;
}

.grade-card:hover,
.card:hover,
.request-box:hover,
.contact-box:hover,
.hero-quick-card:hover,
.hero-side-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
  border-color: rgba(129, 140, 248, 0.7);
}
.header-main {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.80);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
}

:root[data-theme="light"] .header-main {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(209, 213, 219, 0.85);
}
.nav-right a {
  position: relative;
  padding: 4px 6px;
  font-size: 0.9rem;
  transition: color 0.18s ease;
}

.nav-right a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
}

.nav-right a:hover::after {
  transform: scaleX(1);
}
/* section-title consolidated below */
#to-top {
  position: fixed;
  inset-inline-end: 18px;
  bottom: 20px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  background: rgba(37, 99, 235, 0.95);
  color: #f9fafb;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

#to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#to-top:hover {
  transform: translateY(-2px);
  background: rgba(30, 64, 175, 0.98);
}
/* ===== לייט מוד משודרג ===== */
:root[data-theme="light"] {
  /* רקע בהיר עם עומק עדין */
  --bg-color: #f7f9fc;
  --card-bg: rgba(255, 255, 255, 0.86);
  --card-border: rgba(0, 0, 0, 0.06);

  /* צבעי טקסט מדוייקים */
  --text-main: #0f172a;       /* כחול כהה מרגיע */
  --text-sub: #475569;        /* אפור עדין */
}

/* רקע כללי */
:root[data-theme="light"] body {
  background: var(--bg-color);
  color: var(--text-main);
  transition: background 0.4s ease, color 0.3s ease;
}

/* כותרות – יותר חיים */
:root[data-theme="light"] .section-title {
  color: #0f172a;
  text-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* קו תחתון יפה יותר בלייט */
:root[data-theme="light"] .section-title::after {
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
}

/* כרטיסים — בלונד, רך, מודרני */
:root[data-theme="light"] .grade-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

/* הובר עם חיים */
:root[data-theme="light"] .grade-card:hover {
  box-shadow: 0 6px 22px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

/* טקסט עזר */
:root[data-theme="light"] .section-subtitle {
  color: var(--text-sub);
}

/* navbar קצת יותר חי */
:root[data-theme="light"] .header-main {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* כפתורים בלייט מוד חזקים ויפים */
:root[data-theme="light"] .btn {
  background: #3b82f6;
  color: white;
  box-shadow: 0 4px 10px rgba(59,130,246,0.28);
}
:root[data-theme="light"] .btn:hover {
  background: #2563eb;
}

/* כפתור outline */
:root[data-theme="light"] .btn-outline {
  border: 1px solid #3b82f6;
  color: #1e3a8a;
}
:root[data-theme="light"] .btn-outline:hover {
  background: #eff6ff;
}
/* מעבר חלק בין מצבים */
html, body, .grade-card, .card, header, .section-light, .section-dark-strong{
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
/* ===== SAFE POLISH (add at end of style.css) ===== */

/* רקע לייט מוד קצת יותר חי */
:root[data-theme="light"] body{
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(37,99,235,0.12), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(56,189,248,0.10), transparent 55%),
    linear-gradient(180deg, #f8fbff, #f2f6ff);
}

/* טקסטים בלייט מוד יותר "חדים" */
:root[data-theme="light"] .section-title,
:root[data-theme="light"] h1,
:root[data-theme="light"] h2,
:root[data-theme="light"] h3{
  color:#0f172a;
}
:root[data-theme="light"] .section-subtitle,
:root[data-theme="light"] p{
  color:#334155;
}
/* ===== Fix: Contact visibility (light+dark) ===== */
#contact .contact-flex{
  gap: 18px;
  align-items: stretch;
}

#contact .contact-box{
  border-radius: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 28px rgba(15,23,42,.08);
  color: #0f172a;
}

#contact .contact-info p{
  margin: 10px 0;
  line-height: 1.7;
  color: inherit;
}

#contact .contact-info span{
  font-weight: 600;
}

:root:not([data-theme="light"]) #contact .contact-box{
  background: rgba(15,23,42,.78);
  border-color: rgba(148,163,184,.18);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  color: #e5e7eb;
}

:root:not([data-theme="light"]) #contact .contact-info span{
  color: #e5e7eb;
}
/* ===== Light mode: more lively background ===== */
:root[data-theme="light"] body{
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(56,189,248,.16), transparent 60%),
    radial-gradient(900px 420px at 15% 25%, rgba(37,99,235,.12), transparent 60%),
    linear-gradient(180deg, #f8fbff 0%, #f2f6ff 45%, #f8fbff 100%);
}

/* cards in light mode feel “floating” */
:root[data-theme="light"] .grade-card,
:root[data-theme="light"] .card{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}
/* ===== Safe micro-interactions ===== */
.grade-card, .card, .home-poll-card, .contact-box{
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

.grade-card:hover, .card:hover{
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15,23,42,.14);
}

/* Buttons feel smoother */
.btn, .btn-outline, .about-btn, .home-poll-link, .mini-link, .grade-btn{
  transition: transform .14s ease, box-shadow .14s ease, background-color .22s ease, color .22s ease, border-color .22s ease;
}

.btn:hover, .about-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(37,99,235,.25);
}
/* ===== כפתור "להמשך קריאה" בעמוד כתבה ===== */
.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 18px;

  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;

  border: 1px solid rgba(37, 99, 235, 0.45);
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.12),
    rgba(59, 130, 246, 0.18)
  );
  color: #1d4ed8;

  transition:
    transform 0.18s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.read-more-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.2),
    rgba(59, 130, 246, 0.28)
  );
}

.read-more-link::after {
  content: "←";
  font-weight: 900;
  transition: transform 0.2s ease;
}

.read-more-link:hover::after {
  transform: translateX(-3px);
}

/* ===== דארק מוד ===== */
:root[data-theme="dark"] .read-more-link {
  color: #e5f0ff;
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.7),
    rgba(30, 64, 175, 0.45)
  );
}

:root[data-theme="dark"] .read-more-link:hover {
  box-shadow: 0 14px 30px rgba(56, 189, 248, 0.25);
}
/* ===== NAV עם לוגו באמצע ===== */

.nav-centered {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

/* צדדים */
.nav-side {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-right-links {
  justify-content: flex-end; /* RTL */
}

.nav-left-links {
  justify-content: flex-start;
}

/* מרכז */
.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.9);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 900px) {
  .nav-centered {
    display: flex;
    justify-content: space-between;
  }

  .nav-side {
    display: none;
  }

  .nav-center {
    margin: 0 auto;
  }
}
/* ===================================================
   SAFE POLISH – PREMIUM TOUCH (NO HTML / NO JS)
   Safe to remove anytime
   =================================================== */

/* אחידות טיפוגרפיה */
.section-title{
  letter-spacing: .2px;
}
.section-subtitle{
  letter-spacing: .15px;
}

/* קו תחתון עדין לכותרות */
.section-title::after{
  opacity:.9;
}

/* כרטיסים – תחושת עומק עדינה */
.grade-card,
.card,
.contact-box,
.hero-side-card{
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.grade-card:hover,
.card:hover,
.contact-box:hover{
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15,23,42,.18);
}

/* כפתורים – תחושה חלקה */
.btn,
.btn-outline,
.about-btn,
.grade-btn{
  transition:
    transform .14s ease,
    box-shadow .14s ease,
    background-color .22s ease,
    color .22s ease;
}

.btn:hover,
.about-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(37,99,235,.28);
}

/* ניווט – underline אלגנטי */
.nav-right a::after{
  opacity:.9;
}

/* לייט מוד – טיפה יותר חי, בלי לגעת בלוגיקה */
:root[data-theme="light"] body{
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(56,189,248,.12), transparent 60%),
    radial-gradient(900px 420px at 15% 25%, rgba(37,99,235,.10), transparent 60%),
    linear-gradient(180deg, #f8fbff 0%, #f2f6ff 100%);
}

/* לייט מוד – כרטיסים מרגישים “מרחפים” */
:root[data-theme="light"] .grade-card,
:root[data-theme="light"] .card{
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}

/* personal-btn: earlier definitions removed — consolidated in FINAL OVERRIDE below */
/* =========================
   PERSONAL BTN – FINAL OVERRIDE
   (put at VERY END of style.css)
   ========================= */

.header-main .nav .nav-right a.personal-btn,
.header-main .nav .nav-side a.personal-btn,
.header-main .nav a.personal-btn,
a.personal-btn{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 10px 20px !important;
  border-radius: 999px !important;

  font-size: 0.95rem !important;
  font-weight: 800 !important;
  letter-spacing: .2px !important;

  color: #ffffff !important;
  text-decoration: none !important;

  border: 0 !important;
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;

  box-shadow: 0 10px 28px rgba(37,99,235,.35) !important;

  transition:
    transform .15s ease,
    box-shadow .2s ease,
    filter .2s ease !important;
}

.header-main .nav .nav-right a.personal-btn:hover,
.header-main .nav a.personal-btn:hover,
a.personal-btn:hover{
  transform: translateY(-2px) !important;
  filter: brightness(1.08) !important;
  box-shadow: 0 16px 44px rgba(37,99,235,.50) !important;
}

.header-main .nav .nav-right a.personal-btn:active,
.header-main .nav a.personal-btn:active,
a.personal-btn:active{
  transform: translateY(0) !important;
  box-shadow: 0 8px 20px rgba(37,99,235,.35) !important;
}

/* גם בלייט וגם בדארק: טקסט תמיד לבן */
html[data-theme="light"] a.personal-btn,
html[data-theme="dark"] a.personal-btn{
  color: #ffffff !important;
}

/* במובייל: שיראה “כפתור” מלא במגירה */
@media (max-width: 900px){
  .nav-right a.personal-btn{
    width: 100% !important;
  }
}
/* =========================
   HERO FADE (Top + Bottom)
   ========================= */

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

/* שכבה עליונה */
.hero.hero-home::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;

  /* שני פיידים: עליון + תחתון */
  background:
    linear-gradient(to bottom,
      rgba(255,255,255,0.95) 0%,
      rgba(255,255,255,0.55) 18%,
      rgba(255,255,255,0.00) 45%
    ),
    linear-gradient(to top,
      rgba(239,243,251,1.00) 0%,
      rgba(239,243,251,0.65) 22%,
      rgba(239,243,251,0.00) 55%
    );
}

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

/* דארק מוד – אותו רעיון אבל כהה */
html[data-theme="dark"] .hero.hero-home::before{
  background:
    linear-gradient(to bottom,
      rgba(2,6,23,0.75) 0%,
      rgba(2,6,23,0.35) 18%,
      rgba(2,6,23,0.00) 45%
    ),
    linear-gradient(to top,
      rgba(4,8,20,0.95) 0%,
      rgba(4,8,20,0.55) 22%,
      rgba(4,8,20,0.00) 55%
    );
}
/* =========================
   NO UGLY THEME TRANSITION
   ========================= */

/* אל תעשה transition לרקעים/פילטרים של ההירו והסליידים */
.hero-home,
.hero-home::before,
.hero-home::after,
.hero-overlay,
.hero-slide,
.hero-slides {
  transition: none !important;
}

/* בזמן החלפת מצב – מבטלים טרנזישן/אנימציה לכל האתר */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: none !important;
  animation: none !important;
}
/* אם עדיין יש פייד קטן – מבטל מעבר על שינוי צבעים */
body, .grade-card, .card, .contact-box, .hero-side-card, .hero-quick-card, header, section, footer {
  transition: none !important;
}
/* ===== HERO ACTIONS – nicer in LIGHT MODE ===== */
html[data-theme="light"] .hero-actions a{
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(15,23,42,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

html[data-theme="light"] .hero-actions a:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15,23,42,0.14);
  filter: brightness(1.03);
}

/* הכפתור הריק (מבחנים קרובים) – זכוכית לבנה עדינה */
html[data-theme="light"] .hero-actions .btn-outline{
  background: rgba(255,255,255,0.82) !important;
  color: #0f172a !important;
  border: 1px solid rgba(148,163,184,0.55) !important;
}

/* הכפתור הכחול (חדשות ועדכונים) – כחול “פרימיום” */
html[data-theme="light"] .hero-actions .btn{
  background: linear-gradient(135deg, #2563eb, #38bdf8) !important;
  color: #ffffff !important;
  border: 1px solid rgba(37,99,235,0.25) !important;
  box-shadow: 0 14px 34px rgba(37,99,235,0.22);
}

/* אם אתה משתמש ב-a בלי class btn/btn-outline, זה לפחות ייראה יפה */
html[data-theme="light"] .hero-actions a:not(.btn):not(.btn-outline){
  background: rgba(255,255,255,0.82);
  color: #0f172a;
  border: 1px solid rgba(148,163,184,0.55);
}
/* ===== HERO TITLE – glow עדין לקריאות על תמונות בהירות ===== */

.hero-home .hero-text h1 {
  color: #ffffff;
  text-shadow:
    0 2px 6px rgba(0,0,0,0.45),   /* צל רך לקריאות */
    0 0 12px rgba(255,255,255,0.25); /* זוהר לבן עדין */
}

/* תת־כותרת */
.hero-home .hero-text p {
  color: #f8fafc;
  text-shadow:
    0 1px 4px rgba(0,0,0,0.35),
    0 0 8px rgba(255,255,255,0.18);
}
/* ===== HERO – Fade bottom only (נמס למטה) ===== */

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

/* הפייד למטה */
.hero.hero-home::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 160px;                 /* שחק עם זה: 120–220 */
  pointer-events: none;
  z-index: 3;                    /* מעל התמונה */

  /* דארק מוד – יורד לרקע של האתר */
  background: linear-gradient(
    to bottom,
    rgba(4, 8, 20, 0) 0%,
    rgba(4, 8, 20, 0.55) 55%,
    rgba(4, 8, 20, 0.95) 100%
  );
}

/* לייט מוד – יורד ללבן/רקע */
html[data-theme="light"] .hero.hero-home::after{
  background: linear-gradient(
    to bottom,
    rgba(238, 243, 251, 0) 0%,
    rgba(238, 243, 251, 0.70) 55%,
    rgba(238, 243, 251, 1) 100%
  );
}
/* =========================
   REGISTER PAGE (Admin)
   ========================= */

body.admin-page.register-page{
  min-height: 100vh;
}

.register-shell{
  padding-top: 28px;
  padding-bottom: 48px;
}

.register-hero{
  text-align: center;
  margin: 18px auto 18px;
  max-width: 860px;
}

.register-title{
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: .2px;
}

.register-subtitle{
  margin: 0 auto;
  max-width: 720px;
  opacity: .88;
  line-height: 1.6;
  font-weight: 600;
}

.register-card{
  max-width: 920px;
  margin: 18px auto 0;
  padding: 22px;
  border-radius: 22px;
  background: rgba(2,6,23,.55);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}

.register-form .field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.register-form label{
  font-weight: 800;
  font-size: .92rem;
  color: rgba(226,232,240,.92);
}

.register-form .hint{
  margin-top: -2px;
  font-size: .82rem;
  opacity: .78;
}

.register-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.register-grid .full{
  grid-column: 1 / -1;
}

.register-form input,
.register-form textarea{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.25);
  background: rgba(2,6,23,.35);
  color: #e5e7eb;
  outline: none;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.register-form textarea{
  resize: vertical;
  min-height: 110px;
}

.register-form input::placeholder,
.register-form textarea::placeholder{
  color: rgba(226,232,240,.55);
  font-weight: 600;
}

.register-form input:focus,
.register-form textarea:focus{
  border-color: rgba(56,189,248,.6);
  box-shadow: 0 0 0 4px rgba(56,189,248,.14);
  background: rgba(2,6,23,.5);
}

.register-actions{
  margin-top: 16px;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.register-submit-btn{
  width: min(520px, 100%);
  padding: 13px 18px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg,#2563eb,#38bdf8);
  box-shadow: 0 16px 44px rgba(37,99,235,.40);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.register-submit-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 22px 60px rgba(37,99,235,.55);
  filter: brightness(1.05);
}

.register-status{
  margin: 0;
  text-align: center;
  font-weight: 800;
  min-height: 22px;
}

/* ירוק הצלחה / אדום כשל */
.register-status.ok{ color: #22c55e; }
.register-status.err{ color: #ef4444; }

.register-footer{
  margin-top: 12px;
  text-align: center;
}

.link-soft{
  color: rgba(147,197,253,.95);
  text-decoration: none;
  font-weight: 750;
}
.link-soft:hover{
  text-decoration: underline;
}

/* מובייל */
@media (max-width: 720px){
  .register-card{ padding: 18px; border-radius: 18px; }
  .register-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 600px){
  .urgent-banner, .urgent-message, .urgent-pill, .urgent-alert{
    font-size: 0.92rem !important;
    padding: 10px 12px !important;
  }

  .urgent-banner .urgent-text,
  .urgent-message .urgent-text,
  .urgent-pill .urgent-text,
  .urgent-alert .urgent-text{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}
#footer-text {
  font-size: 1.15rem;   /* כמו Peretzinho */
  font-weight: 800;
  color: #000;
  text-align: center;
}

.footer-devlink {
  font-size: inherit;   /* בדיוק אותו גודל */
  font-weight: 900;     /* טיפה יותר חזק */
  color: #000;
  text-decoration: none;
  margin: 0 6px;
}

.footer-devlink:hover {
  opacity: 0.75;
}
#footer-text {
  font-size: 1.3rem;        /* גדול */
  font-weight: 900;         /* הכי בולט */
  color: #000;              /* שחור חזק */
  letter-spacing: 0.4px;    /* פרימיום */
  text-align: center;
}

.footer-devlink {
  font-size: inherit;
  font-weight: 900;
  color: #000;
  text-decoration: none;
  margin: 0 8px;
  text-transform: uppercase; /* נותן כוח */
}

.footer-devlink:hover {
  opacity: 0.8;
}
/* ===================================
   FINAL POLISH — CLEAN OVERRIDE
   שים ממש בסוף הקובץ
=================================== */

/* 1) קו תחתון לכותרות — אחד, אחיד, לא 100 גרסאות */
.section-title{
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}
.section-title::after{
  content:"";
  position:absolute;
  right:0;
  bottom:0;
  height:3px;
  width: 92%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #38bdf8, #93c5fd);
  opacity:.9;
}

/* 2) כרטיסים — הובר עדין ויוקרתי */
.grade-card,
.card,
.contact-box,
.board-item,
.home-news-item,
.home-exam-item{
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.grade-card:hover,
.card:hover,
.contact-box:hover,
.board-item:hover,
.home-news-item:hover,
.home-exam-item:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15,23,42,.18);
  border-color: rgba(56,189,248,.55);
}

/* 3) ניווט — underline אלגנטי רק על קישורים רגילים (לא על הכפתורים) */
.nav-right a:not(.personal-btn):not(.btn):not(.btn-outline){
  position: relative;
}
.nav-right a:not(.personal-btn):not(.btn):not(.btn-outline)::after{
  content:"";
  position:absolute;
  left:8px; right:8px;
  bottom:-4px;
  height:2px;
  border-radius:999px;
  transform: scaleX(0);
  transition: transform .18s ease;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  opacity:.9;
}
.nav-right a:not(.personal-btn):not(.btn):not(.btn-outline):hover::after{
  transform: scaleX(1);
}

/* 4) כפתור מרחב אישי — גרסה אחת בלבד, נקייה */
a.personal-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 850;
  color:#fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 10px 28px rgba(37,99,235,.35);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
a.personal-btn:hover{
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 16px 44px rgba(37,99,235,.48);
}

/* 5) לייט מוד — רקע חי עדין (בלי להפוך הכל ללבן משעמם) */
html[data-theme="light"] body{
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(56,189,248,.12), transparent 60%),
    radial-gradient(900px 420px at 15% 25%, rgba(37,99,235,.10), transparent 60%),
    linear-gradient(180deg, #f8fbff 0%, #f2f6ff 100%);
}

/* =========================
   FOOTER — SAME AS INDEX
   ========================= */

.site-footer{
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 16px 0;
}

.site-footer .footer-text{
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .2px;
  color: #0b1120;
}

.site-footer .footer-devlink{
  font-weight: 900;
  color: #0b1120;
  text-decoration: none;
  margin: 0 8px;
}

.site-footer .footer-devlink:hover{
  opacity: .75;
}
/* =========================
   MICRO ANIMATIONS (GLOBAL)
   ========================= */

/* smooth */
* { scroll-behavior: smooth; }

a, button, .btn, .btn-outline, .card, .admin-btn, input, select, textarea {
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease,
              border-color .2s ease, color .2s ease, opacity .2s ease, filter .2s ease;
}

/* hover lift */
.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}

/* buttons */
button:hover, .btn:hover, .btn-outline:hover, .admin-btn:hover{
  transform: translateY(-1px);
}
button:active, .btn:active, .btn-outline:active, .admin-btn:active{
  transform: translateY(0px) scale(.99);
}

/* focus */
input:focus, select:focus, textarea:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(56,189,248,.22);
  border-color: rgba(56,189,248,.65);
}

/* subtle fade-in for sections/cards */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card, section, .section-header{
  animation: fadeUp .35s ease both;
}

/* reduce motion */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}
/* =========================
   EXAM STATUS PILL
   ========================= */
.exam-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: .82rem;
  line-height: 1;
  border: 1px solid transparent;
  user-select: none;
}

.exam-status.s-today{
  background: rgba(239,68,68,.14);
  border-color: rgba(239,68,68,.35);
}
.exam-status.s-tomorrow{
  background: rgba(245,158,11,.16);
  border-color: rgba(245,158,11,.38);
}
.exam-status.s-week{
  background: rgba(34,197,94,.14);
  border-color: rgba(34,197,94,.35);
}
.exam-status.s-soon{
  background: rgba(59,130,246,.14);
  border-color: rgba(59,130,246,.35);
}
.exam-status.s-past{
  opacity: .65;
  background: rgba(148,163,184,.14);
  border-color: rgba(148,163,184,.28);
}
/* =========================
   EXAM CARD – CLEAN LOOK
   ========================= */

.exam-card,
.exam-item {
  background: var(--card-bg, #f8fafc);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* מקצוע */
.exam-title {
  font-size: 1.05rem;
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--text-main, #0f172a);
}

/* תאריך + שעה */
.exam-meta {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg,#60a5fa,#38bdf8);
  color: #fff;
  margin-bottom: 10px;
}

/* נושא המבחן */
.exam-topic {
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15,23,42,0.04);
  color: #1e293b;
}

/* DARK MODE */
[data-theme="dark"] .exam-card,
[data-theme="dark"] .exam-item {
  background: rgba(15,23,42,.6);
  border-color: rgba(148,163,184,.15);
}

[data-theme="dark"] .exam-title {
  color: #e5e7eb;
}

[data-theme="dark"] .exam-topic {
  background: rgba(2,6,23,.55);
  color: #e5e7eb;
}
/* HERO עם תמונה + ריבועים + fade למטה */
.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

/* שכבת כהות עדינה על כל התמונה */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.20) 0%,
    rgba(0,0,0,0.35) 50%,
    rgba(0,0,0,0.50) 100%
  );
  z-index: 1;
}

/* FADE למטה – מעבר חלק לרקע האתר */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(
    to bottom,
    rgba(246,248,255,0) 0%,
    rgba(246,248,255,0.85) 65%,
    rgba(246,248,255,1) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* כל התוכן (כותרת + ריבועים) מעל השכבות */
.heroContent {
  position: relative;
  z-index: 3;
}
