/* ============================================ */
/* הגדרות גלובליות ומשתני צבע                   */
/* ============================================ */
:root {
    --chabad-burgundy: #6a0f2b;
    --chabad-burgundy-light: #8b3a53;
    --chabad-orange: #f58220;
    --text-light: #ffffff;
    --text-dark: #333333;
    --background-light: #fef7f2;
    --section-bg-gradient: linear-gradient(135deg, #fdf0e7 0%, #f4e7ec 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Heebo', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    direction: rtl;
    text-align: right;
    background-color: var(--background-light);
    overflow-x: hidden;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

h1, h2, h3 {
    font-weight: 800;
    line-height: 1.3;
}

/* ============================================ */
/* סרגל ניווט עליון קבוע                      */
/* ============================================ */
.top-nav-header {
    background-color: rgba(106, 15, 43, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-right img {
    height: 65px;
    width: auto;
}

.nav-right span {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 800;
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5);
}

/* ... (שאר הסגנונות נשארים זהים עד אזור המוסדות) ... */
.main-btn, .secondary-btn { transition: all 0.3s ease; text-decoration: none; font-weight: bold; display: inline-block; border-radius: 30px; cursor: pointer; }
.main-btn { background-color: var(--chabad-orange); color: var(--text-light); padding: 14px 30px; font-size: 1.1rem; border: none; }
.main-btn--small { padding: 8px 20px; font-size: 0.9rem; }
.main-btn:hover { background-color: #e07010; transform: translateY(-3px); box-shadow: 0 6px 15px rgba(245, 130, 32, 0.3); }
.secondary-btn { background-color: transparent; color: var(--chabad-burgundy); border: 2px solid var(--chabad-burgundy); padding: 12px 28px; }
.secondary-btn:hover { background-color: var(--chabad-burgundy); color: var(--text-light); transform: translateY(-3px); }
.hero-section { background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/hero-background.jpg') no-repeat center center/cover; background-attachment: fixed; height: 100vh; display: flex; justify-content: center; align-items: center; text-align: center; position: relative; padding: 20px; }
.hero-content h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 1rem; background: linear-gradient(45deg, var(--chabad-orange), var(--text-light)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.8)); }
.hero-content p { font-size: 1.3rem; margin-bottom: 2rem; max-width: 600px; color: var(--text-light); text-shadow: 2px 2px 6px rgba(0,0,0,0.9); }
.section-title { font-size: 2.5rem; font-weight: 800; text-align: center; color: var(--chabad-burgundy); margin-bottom: 40px; }
.intro-section, .mission-section, .connect-section { padding: 70px 20px; position: relative; }
#intro { scroll-margin-top: 100px; background: var(--section-bg-gradient); }
.intro-text { max-width: 700px; margin: 0 auto; text-align: center; font-size: 1.3rem; line-height: 1.8; color: #444; }
.divider { width: 100px; height: 3px; background: linear-gradient(to left, var(--chabad-orange), var(--chabad-burgundy)); margin: 40px auto 0 auto; border-radius: 5px; }
.story-container { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 80px; }
.story-block { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; }
.story-block.reverse .story-text { grid-column: 2; }
.story-block.reverse .story-images { grid-column: 1; grid-row: 1; }
.story-text h3 { font-size: 2rem; color: var(--chabad-burgundy); margin-bottom: 15px; }
.story-text p { font-size: 1.1rem; line-height: 1.8; color: #555; }
.story-divider { margin: 20px 0 0 0; background: linear-gradient(to left, var(--chabad-orange), var(--chabad-burgundy-light)); }
.image-cluster { position: relative; width: 100%; aspect-ratio: 4 / 3; }
.cluster-image { position: absolute; display: block; width: 70%; aspect-ratio: 4 / 3; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border: 4px solid white; overflow: hidden; transition: all 0.3s ease-in-out; }
.cluster-image:hover { transform: scale(1.05) rotate(0deg) !important; z-index: 10 !important; box-shadow: 0 15px 40px rgba(0,0,0,0.25); }
.cluster-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cluster-image.image-1 { top: 0; left: 5%; transform: rotate(-8deg); z-index: 1; }
.cluster-image.image-2 { bottom: 0; right: 5%; transform: rotate(5deg); z-index: 2; }
.institutions-section { padding: 70px 20px; background-color: var(--chabad-burgundy); color: var(--text-light); }
.institutions-section .section-title { color: var(--text-light); }
.institutions-container { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; }
.institution-card { background-color: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 5px 25px rgba(0,0,0,0.07); text-align: right; position: relative; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; flex-basis: 300px; color: var(--text-dark); border-top: 5px solid var(--chabad-orange); }
.institution-card:hover { transform: translateY(-8px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
.institution-card .card-icon { font-size: 2.5rem; color: var(--chabad-orange); margin-bottom: 20px; text-align: center; }
.institution-card h3 { font-size: 1.5rem; color: var(--chabad-burgundy); margin-bottom: 10px; text-align: center; }
.institution-card .card-details { list-style: none; padding: 0; margin-top: 20px; border-top: 1px solid #eee; padding-top: 15px; }
.institution-card .card-details li { font-size: 0.95rem; color: #555; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }

/* ============================================ */
/* אזור שירותים נוספים                         */
/* ============================================ */
.more-services-section {
    padding: 70px 20px;
    background-color: var(--background-light);
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.service-card img {
    width: 100%;
    height: 220px; /* הוקטן מ-250px */
    object-fit: cover;
}

.service-card-content {
    padding: 25px; /* הוקטן מ-30px */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.service-card-content h3 {
    color: var(--chabad-orange);
    font-size: 1.5rem; /* הוקטן מ-1.6rem */
    margin-bottom: 15px;
}

.service-card-content p {
    color: #555;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* ... (שאר הקוד נשאר זהה) ... */
.connect-section { padding: 70px 20px; }
.connect-options { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-top: 40px; max-width: 900px; margin-left: auto; margin-right: auto; }
.option-card { background-color: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 5px 25px rgba(0,0,0,0.07); text-align: right; border-left: 5px solid var(--chabad-orange); position: relative; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; flex-basis: 400px; border: 1px solid #eee; }
.option-card:hover { transform: translateY(-8px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
.option-card h3 { color: var(--chabad-orange); font-size: 1.4rem; margin-bottom: 15px; }
.option-card p { margin-bottom: 20px; color: #555; }
.donate-section { background-color: var(--chabad-burgundy); color: var(--text-light); padding: 70px 20px; text-align: center; }
.donate-content { max-width: 700px; margin: 0 auto; }
.donate-content h2 { font-size: 3rem; margin-bottom: 15px; }
.donate-content p { font-size: 1.2rem; margin-bottom: 30px; }
.donate-btn-large { animation: pulse 2s infinite; font-size: 1.3rem; padding: 18px 40px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 130, 32, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(245, 130, 32, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 130, 32, 0); } }
.lightbox { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(5px); }
.lightbox.show { display: flex; justify-content: center; align-items: center; animation: fadeIn 0.3s ease; }
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#lightbox-img { width: 100%; height: auto; max-height: 90vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.close-btn { position: absolute; top: -40px; right: 0; color: var(--text-light); font-size: 2.5rem; font-weight: bold; cursor: pointer; z-index: 10000; width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; border-radius: 50%; background-color: rgba(0,0,0,0.7); transition: all 0.3s ease; }
.close-btn:hover { background-color: var(--chabad-orange); transform: scale(1.1); }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0,0,0,0.7); color: var(--text-light); border: none; font-size: 2rem; padding: 15px 20px; cursor: pointer; border-radius: 50%; transition: all 0.3s ease; z-index: 10001; }
.nav-btn:hover { background-color: var(--chabad-orange); transform: translateY(-50%) scale(1.1); }
.prev-btn { left: 20px; } .next-btn { right: 20px; }
.contact-footer { background: linear-gradient(135deg, var(--chabad-burgundy) 0%, var(--chabad-burgundy-light) 100%); color: var(--text-light); padding: 45px 0; }
.contact-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.contact-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; justify-items: center; }
.contact-item { display: flex; align-items: flex-start; gap: 20px; padding: 20px; background-color: rgba(255, 255, 255, 0.1); border-radius: 10px; transition: all 0.3s ease; width: 100%; min-height: 120px; }
.contact-item:hover { background-color: rgba(255, 255, 255, 0.15); transform: translateY(-3px); }
.contact-icon { background-color: var(--chabad-orange); color: var(--text-light); width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; flex-shrink: 0; }
.contact-details h4 { color: var(--chabad-orange-light); font-size: 1.1rem; margin-bottom: 5px; font-weight: 700; }
.contact-details a, .contact-details p { color: var(--text-light); text-decoration: none; font-size: 1rem; transition: color 0.3s ease; }
.contact-details a:hover { color: var(--chabad-orange-light); }
.bottom-footer { background-color: var(--background-dark); color: var(--text-light); padding: 20px 0; border-top: 3px solid var(--chabad-orange); }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-left p, .footer-right p { font-size: 0.9rem; color: #ccc; }
.footer-center { display: flex; align-items: center; gap: 15px; }
.footer-link { color: var(--chabad-orange); text-decoration: none; font-size: 0.9rem; transition: color 0.3s ease; }
.footer-link:hover { color: var(--chabad-orange-light); text-decoration: underline; }
.separator { color: #666; }
.developer-link { color: var(--chabad-orange-light); text-decoration: none; transition: color 0.3s ease; }
.developer-link:hover { color: var(--chabad-orange); text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--chabad-orange); outline-offset: 3px; border-radius: 5px; }

/* ============================================ */
/* התאמות רספונסיביות למובייל              */
/* ============================================ */
@media (max-width: 992px) {
    .contact-info {
        grid-template-columns: repeat(2, 1fr);
    }
    .services-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.8rem; }
    .hero-content p { font-size: 1.1rem; }
    .section-title { font-size: 2rem; }
    .story-text h3 { font-size: 1.6rem; }
    .nav-right span { font-size: 1.2rem; }
    .nav-right img { height: 50px; }
    .story-block { grid-template-columns: 1fr; gap: 30px; }
    .story-block.reverse .story-text, .story-block.reverse .story-images { grid-column: auto; grid-row: auto; }
    .story-text { text-align: center; }
    .story-divider { margin-left: auto; margin-right: auto; }
    .image-cluster { aspect-ratio: 1 / 1; }
    .contact-info { grid-template-columns: 1fr; }
    .footer-container { flex-direction: column; gap: 15px; }
    .footer-left, .footer-center, .footer-right { text-align: center; }
    .services-container {
        grid-template-columns: 1fr;
    }
}

/* 1. מאפשר לדפדפן לנהל את הגלילה החלקה בעצמו - הרבה יותר יעיל */
html {
    scroll-behavior: smooth;
}

/* 2. מבטיח שכל קפיצה לחלק בעמוד תשאיר מרווח מהתפריט העליון */
section[id] {
    scroll-margin-top: 100px;
}

/* 3. מסיר את האפקט שגורם לגלילה להיתקע */
.hero-section {
    background-attachment: scroll; /* משנה את ההגדרה הקודמת (fixed) */
}

/* אפקט קצה שקוף ללוגו */
.nav-right img {    
    /* יצירת המסיכה עם הדרגתיות רדיאלית (עגולה) */
    -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
    mask-image: radial-gradient(circle, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
}