/* =========================================================
   MezegIL – modern aesthetic v2 (2025‑07‑07)
   =======================================================*/

/* -------- Global tokens -------- */
:root {
  --bg:            #f8fafc;
  --bg-grad:       radial-gradient(circle at 5% 5%, #e0f2fe 0%, #f8fafc 70%);
  --text:          #0f172a;
  --accent:        #0284c7;
  --accent-dark:   #0369a1;
  --accent-light:  #38bdf8;
  --muted:         #94a3b8;
  --card-bg:       #ffffff;
  --radius:        1rem;
  --shadow:        0 6px 24px rgba(0,0,0,.08);
}

/* -------- Base reset -------- */
*,*::before,*::after{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family:'Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  color:var(--text);
  background:var(--bg-grad);
  display:flex;
  flex-direction:column;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block;}
button,select,input{font:inherit;}

/* ===== Header bar ============================================================== */
.site-header{
  display:flex;
  align-items:flex-start;
  flex-shrink:0;
  gap:.85rem;
  background:linear-gradient(135deg,var(--accent) 0%,var(--accent-dark) 100%);
  color:#fff;
  padding:1rem 1.25rem;
  height:80px;
  box-shadow:var(--shadow);

  position:relative;   /* מאפשר z-index */
  z-index:10;          /* מביא את הפס (והלוגו) קדימה */
  overflow:hidden;

}



/* ===== Logo size =============================================================== */
.site-logo{
  height:56px;         /* כפי שביקשת */
  width:auto;
  flex-shrink:0;       /* שלא יתכווץ במסך צר */
}

/* רזולוציות ‘רטינה’ – רק path, לא משנה גודל */
@media (min-device-pixel-ratio:1.5){
  .site-logo{ content:url('/static/logo/logo-mezegil.png'); }
}


.site-title{
    display: none;
}

/* ===== Selectors – mobile first ===================================== */
.selectors{
  display:flex;
  flex-direction:row;          /* במקום column */
  flex-wrap:nowrap;            /* לא נשבר לשורה שנייה */
  gap:.5rem;
  overflow-x:auto;             /* גלילה אופקית בעת צורך */
  scrollbar-width:none;        /* מסתיר פס גלילה בפיירפוקס */
  -ms-overflow-style:none;     /* מסתיר באקספלורר ישן */
}
.selectors::-webkit-scrollbar{display:none;}  /* מסתיר כרום/ספארי */

.selectors select{
  flex:0 0 auto;               /* שומר על רוחב קבוע */
  min-width:120px;             /* שלא יתכווצו מדי */
}

.field { margin: 0.5rem 0; }
label  { display:block; font-weight:600; margin-bottom:0.25rem; }
.layer-wrapper { display:flex; align-items:center; }
.info-btn{ background:none;border:none;font-size:1rem;cursor:pointer;margin-left:4px;}


/* מסכים רחבים – מחזירים את הפריסה הישנה (כמו שהיה) */
@media (min-width:768px){
  .selectors{
    flex-direction:row;        /* כבר היה */
    overflow:visible;          /* אין צורך בגלילה */
  }
}

/* ===================================================== */
/* Main content */
/* ===================================================== */
main{flex:1;display:flex;flex-direction:column;align-items:center;padding:1.25rem .75rem;gap:1.25rem;}

.maps{
  background:var(--card-bg);
  padding:1.2rem;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  border:1px solid #e2e8f0;
  transition:transform .2s; /* subtle lift */
}
.maps:hover{transform:translateY(-3px);}

.maps img{
  border-radius:.65rem;
  cursor:zoom-in;
  box-shadow:0 4px 30px rgba(0,0,0,.14);
  transition:transform .25s ease;
  max-height:70vh;          /* ← תכנס במסך כברירת‑מחדל */
  object-fit:contain;
}
.maps img:hover{transform:scale(1.02);}

/* Last-update badge */
.last-update{
  width:100%;
  margin:6px 0 4px;
  font-size:0.9rem;
  font-weight:500;
  text-align:center;
}

/* ===================================================== */
/* Slider & controls */
/* ===================================================== */
#slider-wrap{
  width:100%;
  max-width:900px;
  background:var(--card-bg);
  padding:1.1rem 1.3rem 1.4rem;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:1rem;
}

#controls{display:flex;flex-wrap:wrap;gap:.6rem;justify-content:center;}
#controls button{
  flex:1 1 42%;
  min-width:130px;
  padding:.6rem 1rem;
  border:none;
  border-radius:.55rem;
  background:var(--muted);
  color:#fff;
  font-weight:500;
  cursor:pointer;
  transition:background .2s ease,transform .1s ease;
}
#controls button:hover{transform:translateY(-2px);}
#resetBtn{background:var(--accent);}           /* blue */
#resetBtn:hover{background:var(--accent-dark);}
#playBtn{background:#10b981;}                 /* green */
#playBtn.pause{background:#ef4444;}           /* red when paused */
#prevBtn,#nextBtn{background:var(--muted);}   /* grey */

@media (min-width:650px){#controls button{flex:0 0 auto;}}

/* Slider */
input[type="range"]{
  -webkit-appearance:none;
  width:100%;height:6px;
  border-radius:3px;
  background:#cbd5e1;
  outline:none;
}
input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  height:20px;width:20px;
  border-radius:50%;
  background:var(--accent);
  border:3px solid #fff;
  box-shadow:0 1px 5px rgba(0,0,0,.25);
  cursor:pointer;
  margin-top:-8px;
  transition:background .2s ease;
}
input[type="range"]::-webkit-slider-thumb:hover{background:var(--accent-dark);}
input[type="range"]::-moz-range-track{background:#cbd5e1;border-radius:3px;height:6px;}
input[type="range"]::-moz-range-thumb{height:20px;width:20px;border:none;border-radius:50%;background:var(--accent);box-shadow:0 1px 5px rgba(0,0,0,.25);cursor:pointer;}

#timeLabel{
  font-size:1rem;
  color:var(--muted);
  font-weight:500;
  display: none;
}

/* ===================================================== */
/* Image overlay (zoom‑in) */
/* ===================================================== */
#fullOverlay.hide{display:none;}
#fullOverlay{
  position:fixed;inset:0;
  background:rgba(0,0,0,.85);
  overflow:auto;               /* נגלל ואפשר גם drag‑to‑pan */
  text-align:center;
  cursor:grab;
  padding:2rem 1rem;
  z-index:1000;
}
#fullOverlay.grabbing{cursor:grabbing;}

#fullImg{
  box-shadow:0 4px 30px rgba(0,0,0,.5);
  cursor:zoom-out;
  /* אין מגבלת גודל – כל התמונה במלואה */
}


#closeFull{
  position:absolute;top:1rem;left:1rem;
  background:#ffffff;border:none;border-radius:50%;
  width:40px;height:40px;cursor:pointer;font-size:1.25rem;
  box-shadow:0 2px 10px rgba(0,0,0,.15);
  transition:transform .15s;
}
#closeFull:hover{transform:rotate(90deg);}
@media (min-width:768px){#closeFull{top:1.5rem;left:1.5rem;}}

/* ===================================================== */
/* Utility */
/* ===================================================== */
.fade-in{animation:fade .4s ease-out both;}
@keyframes fade{from{opacity:0}to{opacity:1}}