/* =========================================
   GENERAL SETTINGS & RESET
   ========================================= */
:root {
    --primary-color: #2c3e50;
    --accent-color: #e67e22;
    --whatsapp-color: #25D366;
    --light-bg: #f9f9f9;
    --gold: #f1c40f;
}

* {
    box-sizing: border-box; /* מונע מאלמנטים לגלוש בגלל פדינג */
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    direction: rtl;
    width: 100%;
    overflow-x: hidden; /* התיקון הקריטי למניעת גלישה הצידה */
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

header.scrolled, header:hover {
    background: rgba(44, 62, 80, 0.95);
    padding: 5px 0;
}

.header-container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0;
    text-shadow: 0 2px 5px rgba(0,0,0,0.6);
}

.brand-name {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-list li a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-list li a:hover, .nav-list li a.active {
    color: var(--gold);
}

/* =========================================
   HERO SECTIONS
   ========================================= */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../pic/hearo.webp') no-repeat center center / cover;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 120px 20px;
    text-align: center;
    width: 100%;
}

/* דריסות ספציפיות לדפי פנים - ללא !important מיותר */
.vitrage-hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../pic/studio1.webp') !important;
    min-height: 50vh;
}

.mixed-media-hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../pic/mixed-nedia-hiro.webp') !important;
    min-height: 50vh;
}



/* =========================================
   BUTTONS & CARDS
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 10px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, background 0.3s;
    cursor: pointer;
    border: none;
}

.btn-wa { background: var(--whatsapp-color); color: white !important; }
.btn-primary { background: var(--accent-color); color: white !important; }
.btn:hover { transform: scale(1.05); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

/* =========================================
   SECTIONS & LAYOUT
   ========================================= */
.section { padding: 60px 20px; max-width: 1100px; margin: auto; }

.heritage-wrapper {
    display: flex;
    align-items: flex-start; /* יישור קו עליון */
    justify-content: center; /* הצמדת הילדים למרכז המסך */
    gap: 40px;               /* המרווח המדויק שאתה רוצה בין התמונה לטקסט */
    max-width: 1000px;       /* הגבלת הרוחב הכולל של הסקשן */
    margin: 0 auto;          /* מירכוז הבלוק כולו */
}

.heritage-image, .heritage-text { flex: 1;max-width: 600px;text-align: right; }
.heritage-image img { flex: 0 0 auto; border-radius: 15px; }
/* box-shadow: 15px 15px 0px var(--gold);  */

/* הגבלת רוחב ומירכוז לכל הסקשנים */
.content-limiter {
    max-width: 1000px; /* רוחב אידיאלי לקריאה */
    margin: 0 auto;    /* מירכוז */
    padding: 0 20px;   /* מרווח ביטחון מהצדדים במובייל */
}

/* התאמה ספציפית ל-Hero (שיהיה במרכז) */
.course-hero .content-limiter {
    text-align: center;
}

/* התאמה ספציפית למורשת (תמונה וטקסט זה לצד זה) */
.heritage-wrapper.content-limiter {
    display: flex;
    align-items: center;
    gap: 50px;
    justify-content: center;
}

/* התאמה לפרטי הקורס */
.course-details-wrapper.content-limiter {
    text-align: right; /* יישור לימין של הרשימה */
}

/* תיקון למובייל - כולם עוברים לערימה אנכית */
@media (max-width: 768px) {
    .heritage-wrapper.content-limiter {
        flex-direction: column;
        text-align: center;
    }
    
    .heritage-image img {
        max-width: 100%; /* שהתמונה לא תצא מהמסך */
    }
}


/* =========================================
   MOBILE RESPONSIVE (החלק הכי חשוב)
   ========================================= */
@media (max-width: 768px) {
    /* Header & Nav */
    .menu-toggle { display: flex; }
    
    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: var(--primary-color);
        flex-direction: column;
        padding: 80px 20px;
        transition: 0.4s ease;
    }

    .nav-list.active { right: 0; }

    /* Layout Adjustments */
    .grid-2, .heritage-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .heritage-image { margin-bottom: 30px; }

    .brand-name { font-size: 1.4rem; }
    
    .hero h1 { font-size: 2rem; }
    
    .section { padding: 40px 15px; }

    /* Gallery Grid fix */
    .vitrage-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* 2 תמונות בשורה במובייל */
        gap: 10px;
        padding: 10px;
    }
}

/* =========================================
   GALLERY & OVERLAY (קוד משותף)
   ========================================= */
   /* עיצוב לחצני סינון (ראשיים ומשניים) */
.filter-btn, .sub-filter-btn {
    padding: 10px 20px;
    margin: 5px;
    border: 2px solid #e67e22; /* צבע המותג */
    background: white;
    color: #333;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
}



.filter-btn.active, .sub-filter-btn.active,
.filter-btn:hover, .sub-filter-btn:hover {
    background: #e67e22;
    color: white;
}

/* קבוצת לחצני המשנה - הדיב שמכיל אותם */
.sub-filter-group {
    display: none; /* מתחיל מוסתר, ה-JS יפתח אותו */
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0;
    padding: 20px;
    background: #fff5eb; 
    border-radius: 15px;
    justify-content: center;
    border: 1px dashed var(--accent-color);
    width: 100%;
}

/* --- תיקון לייטבוקס ומירכוז --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 99999; /* הרקע של הלייטבוקס */
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border: 3px solid white;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.close-lightbox {
    /* מיקום אבסולוטי ביחס למסך */
    position: fixed; 
    top: 30px;
    right: 30px;
    
    /* מראה */
    color: #ffffff !important;
    font-size: 60px !important;
    font-family: Arial, sans-serif;
    line-height: 0.8;
    
    /* שכבות ואינטראקציה */
    z-index: 100000 !important; /* גבוה יותר מהרקע של הלייטבוקס */
    cursor: pointer !important;
    pointer-events: auto !important;
    
    /* שטח לחיצה */
    padding: 15px;
    display: block !important;
}
/* מניעת הסתרה על ידי אלמנטים אחרים */
#lightbox-img, #lightbox-caption {
    z-index: 99998; /* נמוך מה-X */
}

.lightbox-content {
    max-width: 90%;
    max-height: 75vh;
    z-index: 10001;
    border: 3px solid white;
}


#lb-info {
    color: white;
    text-align: center;
    padding: 15px;
    max-width: 85%;
    font-family: sans-serif;
}

/* עיצוב כללי לחיצים */
.lb-arrow {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 100005 !important; /* מספר גבוה מאוד */
    background: rgba(0, 0, 0, 0.6) !important;
    color: white !important;
    border: none !important;
    padding: 20px !important;
    font-size: 40px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.prev-arrow { left: 20px !important; }
.next-arrow { right: 20px !important; }
/* חץ ימינה */
.next-arrow {
    right: 20px;
}

/* עיצוב כותרת וטקסט בתוך הלייטבוקס */
#lb-title {
    color: var(--gold) !important; /* זהב כדי שיבלוט */
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: bold;
}

#lb-artist {
    color: #cccccc !important; /* אפור בהיר מאוד לאמן */
    font-size: 1rem;
    margin-bottom: 10px;
}

#lb-desc {
    color: #ffffff !important; /* לבן בוהק לתיאור - שיהיה קריא! */
    font-size: 1.1rem;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* הבטחת מירכוז של כל אזור הכיתוב */
#lightbox-caption {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5); /* רקע כהה עדין מאחורי הטקסט למקרה שהתמונה בהירה */
    width: 100%;
    margin-top: 15px;
}

/* התאמה למובייל - חיצים קטנים יותר */
@media (max-width: 768px) {
    .lb-arrow {
        font-size: 30px;
        padding: 15px 10px;
        background: rgba(0, 0, 0, 0.5);
    }
    .prev-arrow { left: 5px; }
    .next-arrow { right: 5px; }
}



.vitrage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.vitrage-item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 12px;
}

.vitrage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    display: flex;
    align-items: flex-end;
    padding: 15px;
    opacity: 0;
    transition: 0.3s;
    color: white;
}

.vitrage-item:hover .overlay { opacity: 1; }
.vitrage-item:hover img { transform: scale(1.1); }


/* תיקון מהיר לפאדינג של הטקסט */
.section, section, main {
    padding: 60px 20px !important;
    display: block;
}

/* =========================================
   FOOTER STRUCTURE (חלוקה לטורים)
   ========================================= */
footer {
    background: #2c3e50;
    color: white;
    padding: 60px 20px 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap; /* מאפשר ירידת שורה במובייל */
    justify-content: space-between;
    gap: 40px;
}

.footer-section {
    flex: 1;
    min-width: 250px; /* מבטיח שהם לא יהיו צרים מדי */
}

.footer-section h4 {
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.footer-section a:hover {
    color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* =========================================
   QUICK FIX FOR FORMS & PADDING (תיקון הטפסים והמרווחים)
   ========================================= */
.section {
    padding: 60px 20px !important;
}

form {
    max-width: 600px; /* רוחב אופטימלי לטופס קריא */
    margin: 0 auto;  /* מירכוז הטופס */
}

form input, 
form textarea, 
form select {
    width: 100% !important;
    padding: 12px !important;
    margin: 10px 0 !important;
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
    font-family: inherit;
    background-color: #ffffff !important;
    -webkit-appearance: none; /* מסיר עיצוב דפדפן ישן מה-Select */
    appearance: none;
    font-size: 1rem;
}

form button {
    background: var(--accent-color) !important;
    color: white !important;
    padding: 12px 30px !important;
    border: none !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    font-weight: bold;
}

/* התאמה למובייל של הפוטר */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

/* סידור הסקשן של אודות - תמונה משמאל טקסט מימין */
.about-home .grid-2 {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-direction: row; /* הופך את הסדר כך שהתמונה תהיה משמאל ב-RTL */
}

.about-text {
    flex: 1.2; /* נותן קצת יותר מקום לטקסט */
}

.about-image {
    flex: 0.8;
}

.about-image img {
width: 100% !important;
    max-width: 450px;
    display: block;
    margin: 0 auto;
    border-radius: 15px;
	  border: none;
   /*  box-shadow: 15px 15px 0px var(--gold); */
}

/* עיצוב רשימת הסטטיסטיקות (המסגרות) */
.stats-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
    justify-content: flex-start; /* מתחילים מימין */
}

.stats-list li {
    padding: 12px 20px;
    border: 2px solid var(--gold);
    border-radius: 50px;
    font-weight: bold;
    color: var(--primary-color);
    
    /* התיקון לרוחב זהה */
    flex: 0 1 250px; /* לא גדל, יכול להצטמצם, רוחב בסיס 200 פיקסלים */
    text-align: center; /* ממרכז את הטקסט בתוך התיבה */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* התאמה למובייל - שהתמונה תרד מתחת לטקסט */
@media (max-width: 768px) {
    .about-home .grid-2 {
        flex-direction: column; /* במובייל אחד מתחת לשני */
        text-align: center;
    }
    .about-image img {
        /* box-shadow: 0px 10px 0px var(--gold); במובייל צללית למטה בלבד */
        max-width: 80%; border: none;
    }
}

/* =========================================
   MOBILE MENU (החזרת ההמבורגר)
   ========================================= */

/* כפתור ההמבורגר עצמו */
.menu-toggle {
    display: none; /* מוסתר במחשב */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001; /* מעל ה-Header */
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #ffffff; /* צבע פסים לבן */
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* התאמות למובייל - חשיפת ההמבורגר */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex; /* מופיע רק במובייל */
		order: -1;
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%; /* מוחבא מחוץ למסך מימין */
        width: 250px;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        padding: 100px 30px;
        transition: 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
        z-index: 1000;
    }

    .nav-list.active {
        right: 0; /* נכנס למסך כשלוחצים */
    }

    .nav-list li {
        margin-bottom: 25px;
    }

    .nav-list li a {
        font-size: 1.2rem;
        display: block;
    }
}

//* עיצוב כפתורי המשנה שנוצרים בתוך התיאור הדינמי */
#dynamic-text .sub-filter-group {
    display: flex !important; /* הכרחי כי הם נוצרים בתוך HTML דינמי */
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(230, 126, 34, 0.05); /* רקע כתום בהיר מאוד */
    border-radius: 12px;
    border: 1px dashed var(--accent-color);
    justify-content: center;
}

#dynamic-text .sub-filter-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--accent-color);
    color: var(--primary-color);
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.3s;
}

#dynamic-text .sub-filter-btn:hover, 
#dynamic-text .sub-filter-btn.active {
    background: var(--accent-color);
    color: white;
}




/* עיצוב בסיסי למובייל - סרגל מלא בתחתית */
.floating-contact-notch {
    position: fixed;
    bottom: 0 !important;
    left: 0;
    width: 100%;
    height: 44px;
   /*  background: #1a1a1a; */
	 background: rgba(0, 51, 102, 0.8); /* כחול כהה שקוף */
    display: flex;
    align-items: center;
    z-index: 10000;
    font-family: 'Noto Sans Hebrew', Segoe, "Segoe UI", Verdana, sans-serif;
    
    /* אנימציה והסתרה */
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease-in-out;
    transform: translateY(100%); /* מוחבא לגמרי מתחת למסך */
    
    /* פינות מעוגלות רק למעלה */
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    
    box-shadow: 0 -1px 4px rgba(0,0,0,0.3);
    padding-bottom: env(safe-area-inset-bottom); /* תמיכה באייפון */
}

/* המצב שבו הסרגל מופיע בגלילה */
.floating-contact-notch.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0); /* חוזר למקום המדויק בתחתית */
}

.notch-btn {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px; /* הגדלתי מעט מ-12px כדי שיהיה קריא יותר */
    gap: 8px;
	border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.chat-btn:hover, .notch-btn:hover { 
    background: #25d366; 
    color: #000000; /* טקסט שחור בתוך רקע ירוק */
}

.notch-separator {
    width: 1px;
    height: 25px;
    background: rgba(255,255,255,0.3);
}

/* אפקטים במעבר עכבר/לחיצה */
.chat-btn:active, .chat-btn:hover { background: #25d366; }
.call-btn:active, .call-btn:hover { background: #ff6a00; }

/* --- עיצוב למחשב (מעל 768px) --- */
@media screen and (min-width: 769px) {
    .floating-contact-notch {
        width: auto;
        min-width: 320px;
        left: 50%;
        /* כאן ה-transform חייב לכלול גם את המירכוז וגם את ההסתרה */
        transform: translateX(-50%) translateY(100px); 
        bottom: 0px; 
        height: 40px; /* הגדלתי מעט מ-30px כדי שיהיה נוח ללחוץ */
        background: rgba(0, 51, 102, 0.8); /* כחול כהה שקוף */
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.1);
        border-bottom: none; /* שלא יראו בורדר למטה כשהוא צמוד לרצפה */
    }

    .floating-contact-notch.show {
        /* במצב תצוגה במחשב: ממרכז ויושב על הרצפה */
        transform: translateX(-50%) translateY(0);
    }
    
    .notch-btn {
        padding: 0 25px;
    }
}

/* ריווח לגוף הדף במובייל */
@media screen and (max-width: 768px) {
    body { padding-bottom: 60px; }
}