body {
  margin: 0;
  font-family: 'Dancing Script', cursive, Arial, sans-serif;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/background site.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  transition: background 0.8s, color 0.7s;
}

body.night {
  background: linear-gradient(rgba(25,19,37,0.7), rgba(30,18,50,0.8)), url('images/background site.jpg');
  background-size: cover;
  background-position: center;
  color: #d9e4fa;
}

body.night .letter-text { color: #fff !important; }
body.night .hero,
body.night .open-letter-btn,
body.night .gallery,
body.night .carousel-track,
body.night .video-section,
body.night footer {
  background: rgba(25,19,37,0.30);
  color: #e0def6;
}
body.night .carousel img { box-shadow: 0 2px 10px #1a1440c0; }

#loader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(240,240,250,0.96);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s;
}
#loader.hide { opacity: 0; pointer-events: none; }
.loader-animation {
  border: 6px solid #eee;
  border-top: 6px solid #7a3d40;
  border-radius: 50%;
  width: 60px; height: 60px;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.theme-switch {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 2100;
  width: 50px;
  height: 32px;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.switch-track {
  width: 50px;
  height: 32px;
  border-radius: 16px;
  background: #e9e9ee;
  transition: background 0.35s;
  box-shadow: 0 2px 8px #0001;
  position: relative;
}
.theme-switch.night .switch-track { background: #222; }
.switch-slider {
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px #0002;
  position: absolute;
  top: 2px;
  left: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    left 0.35s cubic-bezier(.73,-0.2,.37,1.34),
    background 0.3s;
  color: #f6b800;
}
.theme-switch.night .switch-slider {
  left: 20px;
  background: #111;
  color: #fff;
}
.switch-icon {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.switch-icon.sun { opacity: 1; }
.theme-switch.night .switch-icon.sun { opacity: 0; }
.switch-icon.moon { opacity: 0; }
.theme-switch.night .switch-icon.moon { opacity: 1; }

#sidebar-toggle {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 2100;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.hamburger-simple {
  display: flex; flex-direction: column; gap: 7px;
  width: 28px; height: 23px;
  justify-content: center; align-items: flex-start;
}
.hamburger-simple span {
  display: block;
  height: 4px; width: 100%;
  background: #fff !important;
  border-radius: 2px;
  transition: background 0.2s;
}
#sidebar-toggle.hamburger-black .hamburger-simple span {
  background: #222 !important;
}

.sidebar-nav {
  position: fixed; 
  right: -200px;  /* מעודכן - רוחב מינוס */
  top: 0; 
  bottom: 0; 
  width: 200px;   /* מעודכן - תפריט רחב */
  background: #fff;
  box-shadow: -2px 0 16px #0002;
  z-index: 2000;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  padding: 60px 0 0 0;
  transition: right 0.4s cubic-bezier(.8,.18,.56,1.03);
  border-radius: 20px 0 0 20px;
}
.sidebar-nav.open { right: 0; }
.sidebar-nav .nav-link {
  color: #7a3d40;
  text-decoration: none;
  font-size: 20px;
  font-weight: bold;
  padding: 20px 0;
  text-align: center;
  border-bottom: 1px solid #f4e9e6;
  background: none;
  border-radius: 0;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.5px;
}
.sidebar-nav .nav-link:last-child { border-bottom: none; }
.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link:hover {
  background: #fbe4ec;
  color: #7a3d40;
}

.letter-container {
  opacity: 0;
  transform: translateY(70px) scale(0.95);
  background: rgba(255,255,255,0.82);
  color: #232323;
  border-radius: 12px;
  padding: 20px 18px;
  max-width: 430px;
  margin: 28px auto 0 auto;
  box-shadow: 0 4px 24px rgba(31,38,135,0.10);
  font-size: 17px;
  line-height: 1.65;
  transition:
    opacity 1.5s cubic-bezier(.7,.3,.3,1.12),
    transform 1.5s cubic-bezier(.7,.3,.3,1.12);
  will-change: opacity, transform;
  pointer-events: none;
}
.letter-container.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition-delay: 0.08s;
}
body.night .letter-container,
body.night .letter-container.show {
  background: rgba(30, 21, 44, 0.85);
  color: #fff;
}

#content-hidden,
#content-hidden .gallery,
#content-hidden .video-section {
  opacity: 0;
  transform: translateY(70px) scale(0.95);
  transition:
    opacity 1.4s cubic-bezier(.7,.3,.3,1.12),
    transform 1.4s cubic-bezier(.7,.3,.3,1.12);
  will-change: opacity, transform;
  pointer-events: none;
}
#content-hidden.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition-delay: 0.35s;
}
#content-hidden.show .gallery {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition-delay: 0.7s;
}
#content-hidden.show .video-section {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition-delay: 1.1s;
}

.hero {
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  width: fit-content;
  margin: 40px auto 20px auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.hero h1 {
  font-size: 40px;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.hero h2 {
  font-size: 24px;
  margin: 5px 0 20px;
  color: #a05353;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.open-letter-btn {
  background: linear-gradient(45deg, #7a3d40, #ffb3c1);
  border: none;
  padding: 12px 20px;
  border-radius: 30px;
  color: white;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.open-letter-btn:hover { transform: scale(1.05); }
.letter-text {
  font-size: 16px;
  color: inherit;
  line-height: 1.6;
  text-align: right;
}
.gallery { margin-top: 40px; }

.carousel {
  overflow-x: scroll;
  cursor: grab;
  user-select: none;
  touch-action: pan-x;
  height: 170px;
  -webkit-overflow-scrolling: auto;
  width: 100%;
  max-width: 100vw;
  overscroll-behavior-x: contain;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel { -ms-overflow-style: none; scrollbar-width: none; }
.carousel-track {
  display: inline-flex;
  width: max-content;
}
.carousel img {
  flex: 0 0 auto;
  height: 150px;
  margin: 0 10px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  object-fit: cover;
}

.video-section { margin: 40px 0; }
video {
  width: 90%;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.hearts {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: -1;
}
.heart {
  position: absolute;
  color: #ff6fa0;
  font-size: 20px;
  animation: fall 25s linear infinite;
}
@keyframes fall {
  to { transform: translateY(100vh); opacity: 0; }
}

@media (max-width: 700px) {
  #theme-switch { left: 7px; top: 7px; }
  #sidebar-toggle { right: 7px; top: 7px; }
  .sidebar-nav { width: 200px; min-width: 150px; right: -200px; }  /* תפריט צד רחב גם במובייל */
  .sidebar-nav.open { right: 0; }
  .sidebar-nav .nav-link { font-size: 18px; padding: 17px 0; }
  .hamburger-simple { width: 20px; height: 13px; gap: 4px; }
  .hero h1 { font-size: 32px; }
  .hero h2 { font-size: 20px; }
  .carousel img { height: 120px; }
}

.collage-banner-wrapper {
  width: 100vw;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  justify-content: center;
  background: none;
  margin: 0 auto 0 auto;
  opacity: 0;
  transform: translateY(70px) scale(0.97);
  transition:
    opacity 1.5s cubic-bezier(.7,.3,.3,1.12),
    transform 1.5s cubic-bezier(.7,.3,.3,1.12);
  will-change: opacity, transform;
  pointer-events: none;
}
.collage-banner-wrapper.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition-delay: 1.6s;
}
.collage-banner {
  width: auto;
  max-width: 100vw;
  height: 300px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 0 18px #0002;
}
@media (max-width: 700px) {
  .collage-banner {
    height: 220px;
    max-width: 100vw;
    border-radius: 0;
  }
}

footer {
  padding: 0;
  background: none;
  text-align: center;
  margin: 12px 0;
}

/* ----------- Reveal אפקטים ----------- */
.reveal {
  opacity: 0;
  transform: translateY(60px) scale(0.96);
  transition:
    opacity 1.2s cubic-bezier(.7,.3,.3,1.12),
    transform 1.2s cubic-bezier(.7,.3,.3,1.12);
  will-change: opacity, transform;
}

.reveal.show {
  opacity: 1;
  transform: none;
}

.reveal.left { transform: translateX(-80px) scale(0.96); }
.reveal.right { transform: translateX(80px) scale(0.96); }
.reveal.up { transform: translateY(80px) scale(0.96); }
.reveal.left.show, .reveal.right.show, .reveal.up.show {
  transform: none;
}
