/* style.css - Full Restored Layout */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --bg: #fff; 
    --main: #000; 
    --muted: #888; 
    --nav-width: 320px; 
    --grid-gap: 35px;
}

* { box-sizing: border-box; }

html, body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Inter', sans-serif; 
    background: var(--bg); 
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased; 
}

/* --- מבנה האתר ותנועת הסיידבר --- */
#site-wrapper { 
    position: relative; 
    width: 100%; 
    transition: all 0.9s cubic-bezier(0.23, 1, 0.32, 1); 
    background: var(--bg); 
    min-height: 100vh; 
    z-index: 1000; 
}

body.nav-open #site-wrapper { 
    margin-left: var(--nav-width); 
    width: calc(100% - var(--nav-width)); 
}

#side-nav { 
    position: fixed; 
    top: 0; 
    left: calc(-1 * var(--nav-width)); 
    width: var(--nav-width); 
    height: 100vh; 
    background: var(--bg); 
    z-index: 3000; 
    padding: 40px 30px; 
    overflow-y: auto; 
    transition: left 0.9s cubic-bezier(0.23, 1, 0.32, 1); 
    text-align: left; 
    border-right: 1px solid #f0f0f0; 
    direction: ltr; 
}

body.nav-open #side-nav { left: 0; }

/* --- ניווט טקסטואלי עליון --- */
.nav-wrapper { 
    position: absolute; 
    left: 5%; 
    top: 52px; 
    z-index: 4000; 
}

.main-nav-links { 
    display: flex; 
    align-items: center; 
    gap: 30px; 
    direction: ltr; 
}

.nav-label { 
    font-size: 13px; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    text-decoration: none; 
    color: var(--main); 
    font-weight: 500; 
    transition: 0.3s; 
    cursor: pointer; 
}

.nav-label:hover { color: var(--muted); }

/* --- הגדרות סיידבר --- */
.project-index-title { 
    font-size: 11px; 
    text-transform: uppercase; 
    color: var(--muted); 
    margin-bottom: 15px; 
    border-top: 1px solid #eee; 
    padding-top: 20px; 
    letter-spacing: 2px; 
}

.project-list-nav a { 
    font-size: 15px; 
    text-decoration: none; 
    color: var(--main); 
    display: block; 
    margin-bottom: 25px; 
    font-weight: 400; 
    line-height: 1.2; 
    transition: 0.3s; 
}

.project-list-nav a:hover { color: var(--muted); transform: translateX(8px); }

/* --- Header & Logo --- */
header { 
    position: relative; 
    min-height: 100px; 
    padding: 40px 5% 20px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    border-bottom: 1px solid #f0f0f0; 
}

.logo {
    font-size: 29px;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-decoration: none;
    color: #000;
}

.logo-h1 {
    font-size: inherit;
    letter-spacing: inherit;
    font-weight: inherit;
    margin: 0;
    padding: 0;
    color: inherit;
}

/* --- דף הבית (גריד פרויקטים) --- */
.portfolio-grid { 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: var(--grid-gap); 
    padding: 60px 5% 100px; 
    max-width: 1800px; 
    margin: 0 auto; 
    min-height: 100vh;
}

.project-card { 
    display: flex; 
    flex-direction: column; 
    text-decoration: none; 
    position: relative; 
    z-index: 1; 
}

.img-container { 
    width: 100%; 
    aspect-ratio: 4/3; 
    overflow: hidden; 
    background: #f7f7f7; 
    position: relative;
    transform: translateZ(0);
}

.img-container img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    backface-visibility: hidden;
}

.img-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.2); 
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.project-card:hover .img-container::after { opacity: 1; }

.project-info { 
    padding: 12px 0; 
    opacity: 0; 
    transition: opacity 0.4s ease; 
    text-align: left; 
    direction: ltr; 
}

.project-card:hover .project-info { opacity: 1; }

.project-title { 
    font-size: 11px; 
    letter-spacing: 1.2px; 
    text-transform: uppercase; 
    color: var(--main); 
    font-weight: 500; 
}

/* --- חצים --- */
.nav-arrow { 
    position: fixed; 
    top: 50%; 
    transform: translateY(-50%); 
    z-index: 2500; 
    text-decoration: none; 
    color: var(--main); 
    font-size: 30px; 
    opacity: 0.2; 
    padding: 20px; 
    transition: all 0.3s ease; 
}

.nav-arrow:hover { 
    opacity: 1; 
    color: var(--muted); 
    transform: translateY(-50%) scale(1.1); 
}

/* --- דף פרויקט פנימי --- */
.project-meta { max-width: 1200px; margin: 30px auto 20px; padding: 0 5%; display: flex; flex-direction: column; gap: 5px; direction: ltr; text-align: left; }
.meta-item .label { font-weight: 400; color: var(--muted); margin-right: 8px; }
.meta-item .value { font-weight: 600; color: var(--main); }
.project-description { max-width: 1200px; margin: 0 auto 50px; padding: 0 5%; font-size: 18px; line-height: 1.55; text-align: left; direction: ltr; white-space: pre-wrap; }
.project-description a { color: inherit; text-decoration: none; transition: all 0.3s ease; border-bottom: 1px solid transparent; }
.project-description a:hover { color: var(--muted); border-bottom: 1px solid var(--muted); }

.gallery { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 5%; 
}

.gallery img { 
    width: 100%; 
    height: auto; 
    margin-bottom: 40px; 
    display: block; 
}

/* --- מובייל --- */
@media (max-width: 768px) {
    header { padding-top: 30px; min-height: auto; align-items: center; }
    .nav-wrapper { position: relative; left: auto; top: auto; margin-bottom: 25px; width: 100%; display: flex; justify-content: center; }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    body.nav-open #site-wrapper { transform: translateX(var(--nav-width)); margin-left: 0; width: 100%; }
}
