/* עיצוב כללי */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: #f8fafc;
    color: #222;
    margin: 0;
    padding: 0;
    direction: rtl;
}

/* כותרת האתר */
header {
    background-color: #1a4b8b;
    color: white;
    padding: 15px 30px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    margin: 10px 0;
    font-size: 1.4rem; /* הקטנה קלה */
    font-weight: 600;
    flex: 1;
    text-align: center;
}

header .logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header img {
    height: 60px; /* הקטנת הלוגואים בראש הדף */
    width: auto;
}

header .copyright-sub {
    font-size: 0.7rem;
    color: #f0f4ff;
    margin-top: 4px;
}

/* מבנה העמוד המרכזי */
main {
    display: flex; /* מחזיר את ה-flex כדי ליצור עמודות */
    flex-direction: row-reverse; /* תפריט מימין, תוכן משמאל */
    gap: 25px;
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    align-items: flex-start;
}

/* סרגל ניווט צדדי */
.sidebar-nav {
    position: sticky;
    top: 20px;
    width: 230px; /* הצרה של התפריט */
    flex-shrink: 0;
    background: #ffffff;
    padding: 15px;
    border-radius: 10px;
    border-right: 4px solid #1a4b8b;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    height: fit-content;
    max-height: 90vh;
    overflow-y: auto;
}

.sidebar-nav h2 {
    font-size: 1.1rem;
    margin-top: 0;
    border: none;
    text-align: center;
    padding-bottom: 10px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    background: none;
    padding: 6px 0;
    margin: 0;
    border-bottom: 1px solid #eee;
    border-radius: 0;
}

.sidebar-nav li:hover {
    background: #fcfcfc;
}

.sidebar-nav a {
    font-size: 0.95rem;
    color: #1a4b8b;
    font-weight: 600;
}

.nav-hint {
    display: block;
    font-size: 0.8rem;
    color: #666;
    font-weight: normal;
    margin-top: 2px;
}

/* אזור התוכן המרכזי */
.content-area {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    min-width: 0;
}

/* כותרות וטקסט בתוך התוכן */
h2 {
    color: #1a4b8b;
    border-bottom: 2px solid #1a4b8b;
    padding-bottom: 5px;
    font-size: 1.3rem; /* פרופורציה קטנה יותר */
    margin-top: 30px;
}

h3 {
    font-size: 1.1rem;
    color: #333;
}

p {
    line-height: 1.5;
    font-size: 0.95rem;
    color: #444;
}

/* רשימות של דפי עבודה */
.content-area ul li {
    background: #f0f4ff;
    margin: 8px 0;
    padding: 10px 15px;
    border-radius: 6px;
    border-right: 4px solid #1a4b8b;
    font-size: 0.9rem;
}

.content-area ul li:hover {
    background: #e2e8f0;
}

/* קישורים */
a {
    color: #1e40af;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.back-to-top {
    font-size: 0.8rem;
    margin-right: 10px;
    font-weight: normal;
}

/* פינת ה-AI */
.ai-corner {
    background: #f7faff;
    border: 1px solid #4b74c4;
    border-radius: 12px;
    padding: 20px;
    margin-top: 40px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ai-corner-icon {
    width: 45px; /* אייקון קטן יותר */
    position: absolute;
    left: 15px;
    top: 15px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
}

.ai-corner h2 {
    margin-top: 0;
    color: #2b4d8f;
    font-size: 1.2rem;
    border: none;
}

.ai-item {
    background: #e9f1ff !important; /* דריסת צבע הרשימה הרגילה */
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    border-right: 4px solid #4b74c4 !important;
}


footer {
    display: block;
    clear: both;
    width: 100%;
    text-align: center;
    padding: 30px 0;
    margin: 40px auto 0 auto; /* מרכוז חיצוני */
    border-top: 1px solid #eee;
    background-color: #f8fafc;
}

/* התאמה לניידים */
@media (max-width: 900px) {
    main {
        flex-direction: column; /* תפריט עובר למעלה */
        padding: 15px;
    }
    .sidebar-nav {
        position: static;
        width: 100%;
        border-right: none;
        border-bottom: 4px solid #1a4b8b;