body {
  padding-top: 80px;
}

body.dark-mode {
    background-color: #121212 !important;
    color: #ffffff !important;
}

/* ביטול bg-light / text-dark */
body.dark-mode .bg-light {
    background-color: transparent !important;
}

body.dark-mode .text-dark,
body.dark-mode .text-muted {
    color: #ffffff !important;
}

/* Navbar */
body.dark-mode .navbar {
    background-color: #1f1f1f !important;
    color: #f1f1f1 !important;
}

/* קישורים */
body.dark-mode a {
    color: #4da6ff !important;
}

/* כפתורים */
body.dark-mode .btn-primary {
    background-color: #3399ff !important;
    border-color: #3399ff !important;
    color: #000 !important;
}

body.dark-mode .badge.bg-danger {
    outline: 2px solid #000;   /* פס שחור */
    outline-offset: 0;         /* להצמיד לעיגול */
    transition: outline 0.2s ease-in-out; /* אנימציה עדינה */
}

/* מצב לילה בסיסי לכפתור בתוך overlay החיפוש */
body.dark-mode #searchOverlay .overlay-box form .btn.btn-primary {
    background-color: #878787 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* מצב hover */
body.dark-mode #searchOverlay .overlay-box form .btn.btn-primary:hover {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

/* מצב focus למקלדת */
body.dark-mode #searchOverlay .overlay-box form .btn.btn-primary:focus,
body.dark-mode #searchOverlay .overlay-box form .btn.btn-primary:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 2px;
}

/* Dropdowns */
body.dark-mode .dropdown-menu {
    background-color: #1f1f1f !important;
    color: #f1f1f1 !important;
}

/* כל dropdown-item במצב לילה */
body.dark-mode .dropdown-item {
    color: #fff !important; /* טקסט שחור */
}

/* אייקונים שבתוך dropdown-item */
body.dark-mode .dropdown-item i {
    color: #fff !important; /* ברירת מחדל */
}

/* מצב hover - גם טקסט וגם אייקון */
body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:hover span,
body.dark-mode .dropdown-item:hover i {
    color: #000 !important;
    background-color: #fff !important;
}

/* אייקון חיפוש במצב לילה */
body.dark-mode #searchToggleDesktop i {
    color: #fff !important; /* ברירת מחדל */
}

/* --- מסגרת וצל ל-dropdown במצב לילה --- */
body.dark-mode .dropdown-menu {
    border: 1px solid #444 !important;            /* מסגרת עדינה */
    box-shadow: 0 0 10px rgba(255,255,255,0.08);  /* צל עדין */
}

/* לא לפגוע ב-dropdown של ה-offcanvas */
body.dark-mode .offcanvas.custom-offcanvas .dropdown-menu {
    border: 1px solid #333 !important;
    border-right: 1px solid #fff !important;
    box-shadow: 0 0 10px rgba(255,255,255,0.05);
}

/* --- פס תחתון + צל ל-navbar במצב לילה --- */
body.dark-mode #mainNav {
    background-color: #161616 !important; 
    border-bottom: 1px solid #a3a0a0 !important;
    box-shadow: 0 4px 12px rgba(255,255,255,0.4) !important;
}

/* תיקון לאייקון המשתמש */
body.dark-mode #adminDropdown i {
  color: #ff6b6b !important;
}

body.dark-mode #adminDropdown::after {
    border-top-color: #ff6b6b;
}

body.dark-mode #adminDropdown:hover::after,
body.dark-mode #adminDropdown:focus::after,
body.dark-mode #adminDropdown.show::after {
    border-top-color: #fff;
}

/* מסגרת וצל לכרטיסים במצב לילה */
body.dark-mode .card {
    border: 1px solid #aaa !important;              /* קו אפור בהיר */
    box-shadow: 0 0 12px rgba(255,255,255,0.12);     /* צל לבנבן עדין */
    background-color: #181818 !important;            /* רקע כהה למראה חלק */
    transition: 0.2s ease;                           /* מעבר חלק */
}

/* אפקט עדין בהובר */
body.dark-mode .card:hover {
    box-shadow: 0 0 16px rgba(255,255,255,0.20);
    border-color: #cfcfcf;
}

/* מצב לילה */
body.dark-mode article.bg-white,
body.dark-mode #share-bar,
body.dark-mode .card, body.dark-mode .page-content {
    background-color: #1f1f1f !important;
    color: #f1f1f1 !important;
}

/* קישורים בתוך מאמר וסרגל שיתוף */
body.dark-mode article.bg-white a,
body.dark-mode #share-bar a {
    color: #ffffff !important;
}

/* אייקונים בתוך הסרגל */
body.dark-mode #share-bar i {
    color: #ffffff !important;
}

body.dark-mode .card {
    background-color: #1f1f1f !important;
    color: #f1f1f1 !important;
}

/* טבלאות */
body.dark-mode table {
    background-color: #1f1f1f !important;
    color: #f1f1f1 !important;
}

/* אייקונים */
body.dark-mode .bi {
    color: #fff !important;
}

/* כל הטקסטים */
body.dark-mode span,
body.dark-mode div,
body.dark-mode p,
body.dark-mode a {
    color: #ffffff !important;
}

/* Footer מצב לילה */
body.dark-mode .footer {
    background: linear-gradient(to right, #0d0d0d, #1a1a1a) !important;
    color: #ffffff !important;
}

body.dark-mode .footer a {
    color: #4da6ff !important;
}

body.dark-mode .footer a:hover {
    color: #3399ff !important;
}

/* Overlay / modal */
body.dark-mode .overlay-box {
    background-color: #1f1f1f !important;
    color: #f1f1f1 !important;
}

body.dark-mode .overlay-backdrop {
    background: rgba(0,0,0,0.7) !important;
}

/* Hamburger */
body.dark-mode .hamburger-icon,
body.dark-mode .hamburger-icon::before,
body.dark-mode .hamburger-icon::after {
    background: #ffffff !important;
}

body.dark-mode .hamburger-btn.active .hamburger-icon {
    background: transparent !important;
}

/* Trend items */
body.dark-mode .trend-title,
body.dark-mode .trend-item,
body.dark-mode .trend-list a,
body.dark-mode .share-bar i,
body.dark-mode .trend-number {
    color: #ffffff !important;
}     

body.dark-mode .trend-list a:hover {
    background-color: #828385 !important;
} 

body.dark-mode .breadcrumb,
body.dark-mode .breadcrumb a,
body.dark-mode .breadcrumb .breadcrumb-item.active,
body.dark-mode .breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #fff !important;
}

body.dark-mode .breadcrumb a {
    text-decoration: none !important;
}
    
body.dark-mode .cookie-consent, body.dark-mode .cookie-consent * {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #000 !important;
}

body.dark-mode .cookie-consent {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #000 !important;
}

body.dark-mode .cookie-consent a {
    color: #000 !important;
}

body.dark-mode .cookie-consent button.btn-success {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

body.dark-mode .cookie-consent button.btn-outline-secondary {
    border-color: #000 !important;
    color: #000 !important;
}

/* רקע כללי של האופקאנבס */
body.dark-mode .offcanvas.custom-offcanvas {
    border: 1px solid #333 !important; /* המסגרת הכללית */
    border-right: 1px solid #aaa !important; 
    box-shadow: 2px 0 6px rgba(255,255,255,0.2); /* צל עדין מהקו */
    background-color: #000 !important;
    color: #fff !important;
}

/* טקסט וכותרת */
body.dark-mode .offcanvas.custom-offcanvas,
body.dark-mode .offcanvas.custom-offcanvas * {
    color: #fff !important;
}

/* Hover תקין (רקע שחור) לפריטי dropdown בתוך offcanvas – Dark Mode */
body.dark-mode .offcanvas.custom-offcanvas .dropdown-menu .dropdown-item:hover,
body.dark-mode .offcanvas.custom-offcanvas .dropdown-menu .dropdown-item:focus,
body.dark-mode .offcanvas.custom-offcanvas .dropdown-menu .dropdown-item:hover i,
body.dark-mode .offcanvas.custom-offcanvas .dropdown-menu .dropdown-item:focus i {
    color: #000 !important;
}

/* הקישורים בתפריט */
body.dark-mode .offcanvas.custom-offcanvas a.nav-link {
    color: #fff !important; /* מנטרל גם inline color */
}

/* אפס את כל האייקונים (Bootstrap Icons) */
body.dark-mode .offcanvas.custom-offcanvas i {
    color: #fff !important;
}

/* כפתור הסגירה */
body.dark-mode .offcanvas.custom-offcanvas .btn-close {
    filter: invert(1); /* הופך את ה-X לשחור */
}

/* קווים/הפרדות */
body.dark-mode .offcanvas.custom-offcanvas hr {
    border-color: #fff !important;
}

body.dark-mode .parasha-box {
    background: #fff !important;
    color: #000 !important;
}

body.dark-mode .parasha-box * {
    color: #000 !important;
}
    
/* הסרת נקודות מ-UL בתוך dropdown */
.dropdown-menu {
    list-style: none;   /* בלי נקודות */
    padding-left: 0;    /* אין פדינג מיותר */
}

/* הסרת נקודת פריט dropdown-header */
.dropdown-header {
    list-style: none;
}

/* אפשר גם לוודא שהפריטים עצמם לא מוסיפים נקודה */
.dropdown-item {
    list-style: none;
}

html body #nprogress .bar {
  background: #e74c3c !important; /* החלף ל-HEX הרצוי */
}

html body #nprogress .peg {
  box-shadow: 0 0 10px #e74c3c, 0 0 5px #e74c3c !important;
}

html body #nprogress .spinner-icon {
  border-top-color: #e74c3c !important;
  border-left-color: #e74c3c !important;
}

body.dark-mode .header_block_title span a,
body.dark-mode h2.header_block_title {
    background: #000 !important;
    color: #fff !important;
    transition: background 0.2s, opacity 0.4s;
    opacity: 0.8;
}

body.dark-mode .nav-item .nav-link.active + .category-bottom-bar {
    background-color: #fff !important; /* פס לבן במצב לילה */
}

/* צבע בסיס לכל הקישורים */
body.dark-mode .pagination .page-link {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #000 !important;
}

/* עמוד פעיל */
body.dark-mode .pagination .page-item.active .page-link {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

/* Hover + Focus – אותו רקע, רק צל לעידון */
body.dark-mode .pagination .page-link:hover,
body.dark-mode .pagination .page-link:focus,
body.dark-mode .pagination .page-link:focus-visible {
    background-color: #afacac !important;
    color: #fff !important;
    border-color: #000 !important;
    box-shadow: 0 0 8px rgba(0,0,0,0.35) !important; /* צל עדין */
    outline: none !important;
}

/* עמוד מושבת (למשל …) */
body.dark-mode .pagination .page-item.disabled .page-link {
    background-color: #e0e0e0 !important;
    color: #777 !important;
    border-color: #000 !important;
}

.navbar-nav .nav-link.active {
    font-weight: bold;
    border-bottom: 2px solid currentColor;
}

#mainNav {
    transition: top 0.3s ease-in-out; /* אנימציה חלקה להחלקת navbar */
}

.overlay-backdrop {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.5);
    z-index:1040;
}

.overlay-content {
    position: fixed;
    top:50%; left:50%;
    transform: translate(-50%,-50%);
    background: #fff;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    border-radius: .5rem;
    z-index:1050;
    min-width: 300px;
    width: 50%;
    max-width: 500px;
}

.category-block {
    position: relative;       /* הכרחי ל-sticky */
    margin-bottom: 30px;
}

.header_block_title {
    position: sticky;
    top: 0;
    z-index: 10;
    /** padding: 0.5rem 0; **/
    font-weight: 600;
    margin: 0 0 25px 0;
    transition: background 0.2s ease;
}

.header_block_title span {
    border-bottom: 4px solid var(--heading-sub-color);
}

h2.header_block_title {
    border-bottom: 3px solid #dcdcdc;
    display: flex;
}
.type-icon {
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 100% !important;
    width: 50px;
    height: 50px;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* מצב התחלתי של התמונה */
.type-icon-image {
    transition: filter 0.3s ease;
}

/* כשהעכבר מעל ה־wrapper */
.type-icon-wrapper:hover .type-icon {
    opacity: 1;
    transform: scale(1);
}
.type-icon-wrapper:hover .type-icon-image {
    filter: brightness(70%);
}

.thumb-wrapper {
    width: 130px;
    height: 100px;
    overflow: hidden;
    flex-shrink: 0;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navbar */
.navbar-nav { list-style:none; margin:0; padding:0; display:flex; align-items:center; }
.navbar-nav .nav-item { position: relative; }
.navbar-nav .nav-link { padding:0.5rem 0.75rem; cursor:pointer; transition: color 0.3s; }
.category-top-bar, .category-bottom-bar { position:absolute; left:0; right:0; height:3px; }
.category-top-bar { top:0; }
.category-bottom-bar { bottom:0; }

/* Overlay חיפוש */
#searchOverlay {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:1000;
}
#searchOverlay.d-none { display:none; }

.overlay-backdrop {
  position:absolute;
  top:0; left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.5);
  z-index:1;
}

.overlay-box {
  position: relative;
  z-index:2; /* מעל ה-backdrop */
  background:#fff;
  padding:20px;
  border-radius:8px;
  width:90%;
  max-width:400px;
  box-shadow:0 0 20px rgba(0,0,0,0.3);
  display:flex;
  align-items:center;
  justify-content:space-between;
}

/* כפתור סגירה X */
.btn-close-overlay {
    position: fixed;
    bottom: 70px;         /* מרחק מהתחתית */
    left: 50%;            /* מתחיל באמצע המסך */
    transform: translateX(-50%); /* מזיז חצי רוחב אחורה כדי למרכז */
    z-index: 3001;

    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.0rem;

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* אנימציה כפתור המבורגר */
.hamburger-btn { width:40px; height:40px; display:flex; align-items:center; justify-content:center; cursor:pointer; border:none; background: transparent; padding:0; }
.hamburger-icon { width:25px; height:3px; background:#000; display:block; position:relative; transition: all 0.4s ease; }
.hamburger-icon::before, .hamburger-icon::after { content:''; position:absolute; width:25px; height:3px; background:#000; transition: all 0.4s ease; }
.hamburger-icon::before { top:-8px; }
.hamburger-icon::after { top:8px; }
.hamburger-btn.active .hamburger-icon { background: transparent; }
.hamburger-btn.active .hamburger-icon::before { transform: rotate(45deg) translate(5px,5px); }
.hamburger-btn.active .hamburger-icon::after { transform: rotate(-45deg) translate(5px,-5px); }
.hamburger-btn:focus { outline: none; box-shadow: none; }

/* RTL מובייל */
.offcanvas-body .nav-link { text-align: right; }
.offcanvas-body .category-bottom-bar { position:absolute; bottom:0; height:3px; width:100%; }
/* Custom width for offcanvas */
.custom-offcanvas {
  width: 70% !important;       /* רוחב של 70% */
  max-width: 70% !important;   /* מגבלת רוחב מקסימלית */
}

.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  left: 2rem; /* שמאל */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #1a1a2e;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  pointer-events: none;
}

.scroll-top-btn.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.scroll-top-btn:hover {
  background: #16213e;
  transform: scale(1.1);
}

/* SVG Ring */
.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  transform: rotate(-90deg);
  pointer-events: none;
  overflow: visible;
}

.progress-ring__track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 2.5;
}

.progress-ring__fill {
  fill: none;
  stroke: #e94560;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 100.53; /* 2 * π * 16 — r=16 */
  stroke-dashoffset: 100.53;
  transition: stroke-dashoffset 0.1s linear;
}

.sticky-top {
  z-index: 100 !important;
}

#articles.list-view > .article-item {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

#articles.list-view .article-card {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: flex-start;
}

#articles.list-view .article-card .card-img-top {
    width: 150px;
    height: 150px;
    object-fit: cover;
    flex: 0 0 150px;
    border-radius: 6px;
}

#articles.list-view .article-card .card-body {
    flex: 1 1 auto;
}

.article-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.feed-badge { color: #fff; }

.article-title-type5-3-lines,
.article-title-type6-3-lines,
.article-title-type7-3-lines {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-height: calc(1.4em * 3);
}

@media (max-width: 768px) {
  .list-view .article-excerpt {
    display: none;
  }
}

.footer {
    background: linear-gradient(to right, #1a1c20, #2c3e50);
    color: #ffffff;
    padding: 70px 0 30px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #3498db, #2ecc71);
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-about {
    color: #a4b5c6;
    margin-bottom: 25px;
    line-height: 1.6;
}

.footer h5 {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
}

.footer h5::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -10px;
    width: 30px;
    height: 2px;
    background: #3498db;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #a4b5c6;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #3498db;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #3498db;
    transform: translateY(-3px);
    color: #fff;
}

.footer-newsletter {
    position: relative;
    margin-top: 20px;
}

.footer-newsletter input {
    padding: 12px 15px;
    border-radius: 25px;
    border: none;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
    padding-right: 50px;
}

.footer-newsletter input::placeholder {
    color: #a4b5c6;
}

.newsletter-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: 40px;
    border-radius: 50%;
    background: #3498db;
    border: none;
    color: #fff;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    background: #2980b9;
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #a4b5c6;
}

.footer-bottom-links {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-bottom-links a {
    color: #a4b5c6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #3498db;
}

.page-content iframe {
    margin-bottom: 15px;
    margin-top: 15px;
}

.trend-item {
    display: flex;
    line-height: 1.4rem;
    transition: background 0.2s;
    position: relative;
}

        .trend-list a {
            display: block;
            padding: 8px 12px;
            text-decoration: none;
            color: #212529;
            transition: background 0.2s;
        }
.trend-list .col-md-6 a:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
}        
        .trend-list a:hover {
            background-color: #f1f3f5;
        }
        
.trend-number {
    font-weight: 600;
    color: #2ecc71;
    margin-left: 8px; /* רווח מהכותרת */
    flex-shrink: 0; /* לא יתכווץ */
    font-size: 1rem;
}

.trend-title {
    flex: 1;
    font-size: 0.9rem;
    color: #212529;
    display: -webkit-box;
    -webkit-line-clamp: 1; /* עד שתי שורות */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.trend-list a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.tradingview-widget-container
 {
    background-color: #031d48;
    border-radius: 16px;
    margin: 0 0 10px;
}

.link-preview-mini {
    max-width: 420px;
    min-height: 60px;
    max-height: 80px;
    overflow: hidden;
    border-radius: .5rem;
}
.link-preview-mini .fw-semibold {
    font-size: 0.9rem;
}
.link-preview-mini .text-muted {
    font-size: 0.8rem;
}
.link-preview-mini .text-secondary {
    font-size: 0.7rem;
}
.link-preview-mini .preview-img-wrap {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.link-preview-mini .preview-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-preview-mini:hover {
    background-color: rgba(0,0,0,.03);
}

@media (max-width: 768px) {
    .footer-section {
        margin-bottom: 40px;
    }
    .trend-list .col-md-6 a {
        border-bottom: 1px solid #e9ecef;
    }
    .trend-list .col-md-6:last-child a:last-child {
        border-bottom: none;
    }    
}

@media (max-width: 992px) {
  body { padding-top: 56px; }
}