.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 900px;
    height: 80%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
}

.download-button {
    position: absolute;
    bottom: 20px;
    left: 20px;
    padding: 10px 15px;
    background-color: #0073e6;
    color: white;
    border-radius: 5px;
    text-decoration: none;
}
/* מכולת העבודה */
#work-container {
    font-family: "Alef", Arial, sans-serif;
    padding: 25px;
    max-width: 950px;
    margin: 25px auto;
    line-height: 1.7;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    min-height: 200px; /* מקום גם לפני טעינה */
    position: relative;
}

/* Loader */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0073e6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
}
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* כותרת העבודה */
.work-title {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid #e6e6e6;
    padding-bottom: 10px;
    color: #2a2a2a;
}

/* מידע כללי */
.work-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 30px;
    margin-bottom: 25px;
    font-size: 15px;
    color: #444;
}
.work-meta div strong {
    color: #111;
}

/* חלקי העבודה */
.work-section {
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 15px 18px;
    border-radius: 10px;
    border: 1px solid #e5e9ef;
}

.work-section h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.work-section p {
    font-size: 15px;
    margin: 0;
    color: #333;
}

/* אייקונים ופעולות */
.work-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.work-actions img {
    cursor: pointer;
    width: 34px;
    height: 34px;
    transition: transform 0.2s, opacity 0.2s;
}
.work-actions img:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* כפתור הורדה */
.download-button {
    text-decoration: none;
    font-size: 14px;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    background-color: #0073e6;
    transition: background-color 0.2s, transform 0.2s;
}
.download-button:hover {
    background-color: #005bb5;
    transform: translateY(-2px);
}

/* התאמה ל-RTL */
[dir="rtl"] #work-container { text-align: right; }
[dir="ltr"] #work-container { text-align: left; }

.loader {
  display: flex;                /* מרכזת פנימית */
  align-items: center;          /* יישור אנכי */
  justify-content: center;      /* יישור אופקי */
  position: absolute;           /* ממקם את כל ה-loader */
  top: 50%;                     /* מרכז אנכי */
  left: 50%;                    /* מרכז אופקי */
  transform: translate(-50%, -50%); /* תיקון המרכז המדויק */
  width: 100px;
  height: 100px;
  margin: 0 auto;
  z-index: 9999; /* שיישב מעל כל התוכן */
}

.spinner {
  width: 90px;
  height: 90px;
  border: 11px solid rgba(255, 255, 255, 1);
  border-right-color: rgba(217, 217, 217, 1);
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

.loader-text {
  position: absolute;
  color: rgba(0, 0, 0, 1);
  font-family: var(--font-varela);
  font-weight: var(--font-weight-normal);
  font-size: 16px;
  text-align: center;
  padding: 0 10px;
  direction: rtl;
}