@import url('variables.css');
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;600;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=David+Libre:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Taamey+Ashkenaz:wght@400;700&display=swap');

:root {
    --prayer-bg: #f8f1e5;
}

[data-theme="dark"] {
    --prayer-bg: var(--card-bg);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Heebo', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

/* הוספתי פדינג גדול יותר כדי להבטיח ששום דבר לא נחתך על ידי הסרגל באף עמוד */
main {
  padding-top: calc(var(--header-height) + 40px);
  min-height: calc(100vh - 100px); 
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px; }

.btn-primary {
  background-color: var(--primary-color); color: #fff;
  border: none; padding: 12px 24px; border-radius: 8px;
  font-size: 1.1rem; font-weight: 600; cursor: pointer;
  width: 100%; transition: opacity 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.btn-primary:active { opacity: 0.8; transform: translateY(1px); }

.mobile-navbar { background-color: var(--primary-color); color: white; position: fixed; top: 0; width: 100%; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; height: var(--header-height); }
.hamburger-btn { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.hamburger-line { width: 25px; height: 3px; background-color: white; border-radius: 2px; }

.logo-link { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: white; transition: transform 0.2s; }
.logo-link:active { transform: scale(0.95); }
.logo-title { font-weight: 800; font-size: 1.5rem; line-height: 1.1; letter-spacing: 1px; }
.logo-subtitle { font-size: 0.75rem; color: var(--secondary-color); font-weight: 600; letter-spacing: 0.5px; }

.theme-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.theme-toggle-btn { background: none; border: none; font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 0; margin-bottom: 2px; }
.theme-text { font-size: 0.65rem; font-weight: 600; opacity: 0.9; }

.side-menu { position: fixed; top: 0; right: -250px; width: 250px; height: 100vh; background-color: var(--card-bg); color: var(--text-color); transition: right 0.3s ease; z-index: 1001; box-shadow: -2px 0 10px rgba(0,0,0,0.1); }
.side-menu.open { right: 0; }
.side-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid rgba(0,0,0,0.1); }
.close-btn { background: none; border: none; font-size: 2rem; color: var(--text-color); cursor: pointer; }
.menu-links { list-style: none; padding: 20px; }
.menu-links li { margin-bottom: 20px; }
.menu-links a { text-decoration: none; color: var(--text-color); font-size: 1.1rem; font-weight: 600; display: block;}
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.5); opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 1000; }
.overlay.open { opacity: 1; visibility: visible; }

.site-footer { margin-top: 40px; padding: 30px 20px; text-align: center; border-top: 1px solid rgba(150, 150, 150, 0.2); background-color: var(--card-bg); color: var(--text-color); transition: background-color 0.3s ease, color 0.3s ease; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 15px; list-style: none; padding: 0; }
.footer-links a { color: var(--secondary-color); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 0.8; }
.copyright { font-size: 0.85rem; opacity: 0.7; }
.admin-login-btn { display: inline-block; padding: 8px 25px; border: 2px solid var(--secondary-color); color: var(--secondary-color); border-radius: 25px; text-decoration: none; font-size: 1rem; font-weight: bold; transition: all 0.3s ease; }
.admin-login-btn:hover { background-color: var(--secondary-color); color: var(--primary-color); }


/* העתק את כל הקוד למטה והדבק אותו בסוף קובץ global.css שלך */

/* ==========================================
   עיצוב תפריט הניווט (Navbar) ותפריט הצד
   ========================================== */
.mobile-navbar {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

[data-theme="dark"] .mobile-navbar {
    box-shadow: 0 2px 15px rgba(0,0,0,0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* כפתור המבורגר */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: 0.3s;
}

/* לוגו */
.logo-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.logo-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* כפתור תצוגה */
.theme-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.theme-toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
}

.theme-text {
    font-size: 0.7rem;
    color: var(--text-color);
    margin-top: 3px;
}

/* תפריט צד (Side Menu) - עודכן הרוחב ל-350px */
.side-menu {
    position: fixed;
    top: 0;
    right: -350px; /* מוסתר מחוץ למסך */
    width: 350px; /* מורחב ל-350px */
    height: 100vh;
    background-color: var(--bg-color);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1002;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .side-menu {
    box-shadow: -5px 0 15px rgba(0,0,0,0.6);
}

.side-menu.open {
    right: 0; /* מחליק פנימה */
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(150,150,150,0.2);
}

.side-menu-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-color);
    cursor: pointer;
    line-height: 1;
}

.menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

/* עיצוב פריטי התפריט - עודכן המרווח האנכי ל-25px */
.menu-links li a {
    display: block;
    padding: 25px 20px; /* מרווח אנכי גדול יותר לרווח בין שורות */
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(150,150,150,0.1);
    transition: background 0.2s, color 0.2s;
}

/* אפקט ריחוף - הוספת צבע רקע טיפה יותר מודגש */
.menu-links li a:hover {
    background-color: rgba(205, 164, 52, 0.2); /* צבע רקע משני עם שקיפות */
    color: var(--secondary-color);
}

/* רקע כהה כשפותחים את התפריט */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   עיצוב הפוטר (Footer)
   ========================================== */
.site-footer {
    background-color: var(--card-bg);
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid rgba(150,150,150,0.2);
    margin-top: auto; /* דוחף את הפוטר לתחתית העמוד */
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 0 0 20px 0;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.admin-login-btn {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid rgba(150,150,150,0.3);
    transition: background 0.2s;
}

.admin-login-btn:hover {
    background-color: rgba(150,150,150,0.1);
}

.copyright {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
}