:root {
  --primary-color: #ffffff;
  --background-color: #121212;
  --dark-grey: #1a1a1a;
  --gradient: linear-gradient(90deg, #9f50ff, #e64a85);
  --font-family: "Assistant", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--primary-color);
  line-height: 1.7;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 20px;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gradient);
}

p {
  margin-bottom: 15px;
  font-weight: 300;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(10px);
  transition: background 0.3s ease;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  padding: 0 15px;
}

.nav-links a {
  font-weight: 600;
  transition: color 0.3s ease;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  display: block;
  margin-top: 5px;
  right: 0;
  background: var(--gradient);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
  left: 0;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger .line {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  margin: 5px;
  transition: all 0.3s ease;
}

/* Hero Section */
#hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: url("https://cdn.jsdelivr.net/gh/yakir100/SBSiteAssets/assets/img/sagiv-ben-simon-profile-2.jpg")
    no-repeat center center/cover;
  position: relative;
}

#hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.hero-content {
  z-index: 1;
  max-width: 800px;
  padding: 0 20px;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.cta-button {
  display: inline-block;
  padding: 12px 30px;
  background: var(--gradient);
  color: var(--primary-color);
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* About Section */
.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 1;
}

.about-image {
  flex: 0.8;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  filter: grayscale(100%);
}

.wavy-divider {
  line-height: 0;
}
.wavy-divider svg {
  width: 100%;
  height: auto;
}

/* Services Section */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

/* --- Service Icon Styling --- */
.service-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px auto; /* Centers the icon */

  /* Set mask properties that are common to all icons */
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;

  /* Set the default color (white) */
  background-color: var(--primary-color);
  transition: background-color 0.3s ease-in-out;
}

.service-card {
  background-color: var(--dark-grey);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  border-top: 3px solid transparent;
  border-image: var(--gradient) 1;
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
}

/* On card hover, change the icon's color */
.service-card:hover .service-icon {
  background-color: #e64a85; /* The pink from our gradient */
}

/* Point each icon ID to its specific SVG file */
#icon-social-media {
  mask-image: url("https://cdn.jsdelivr.net/gh/yakir100/SBSiteAssets/assets/svg/social-media-posts.svg");
  -webkit-mask-image: url("https://cdn.jsdelivr.net/gh/yakir100/SBSiteAssets/assets/svg/social-media-posts.svg");
}

#icon-business {
  mask-image: url("https://cdn.jsdelivr.net/gh/yakir100/SBSiteAssets/assets/svg/besness-influencer-taking.svg");
  -webkit-mask-image: url("https://cdn.jsdelivr.net/gh/yakir100/SBSiteAssets/assets/svg/besness-influencer-taking.svg");
}

#icon-events {
  mask-image: url("https://cdn.jsdelivr.net/gh/yakir100/SBSiteAssets/assets/svg/party-events.svg");
  -webkit-mask-image: url("https://cdn.jsdelivr.net/gh/yakir100/SBSiteAssets/assets/svg/party-events.svg");
}

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 50px;
}

.portfolio-item {
  /* זה הטריק ליצירת קוביות אחידות! */
  aspect-ratio: 1 / 1; /* הופך כל קופסה לריבוע מושלם. אפשר לשנות ל-4/3 אם רוצים מלבן */
  overflow: hidden; /* מסתיר חלקים מהתמונה שיוצאים מהגבולות בזמן זום */
  border-radius: 12px; /* פינות עגולות למראה מודרני יותר */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* צל עדין להבלטה */
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* מוודא שהחלק המרכזי של התמונה מוצג */
  display: block; /* מונע מרווחים לבנים מעצבנים בתחתית התמונה */
  transition: transform 0.5s ease, filter 0.5s ease; /* אנימציה חלקה יותר */
}

/* אפקט הובר משודרג */
.portfolio-item:hover img {
  transform: scale(1.1); /* זום פנימה עדין */
  filter: brightness(1.1); /* מבהיר מעט את התמונה */
}

/* ===================================== */
/* === LOAD MORE BUTTON STYLING    === */
/* ===================================== */

.load-more-container {
  text-align: center;
  margin-top: 40px;
}

/* Showcase Image Section */
#showcase-image {
  min-height: 45vh;
  background: url("https://cdn.jsdelivr.net/gh/yakir100/SBSiteAssets/assets/img/sagiv-ben-simon-profile-3.jpeg")
    no-repeat center center/cover;
  background-attachment: fixed; /* Parallax effect */
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--primary-color);
}

#showcase-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
}

.showcase-content {
  position: relative;
  z-index: 2;
}

.showcase-content h3 {
  font-size: 2.2rem;
  font-weight: 600;
}

.showcase-content p {
  font-size: 1.1rem;
  font-weight: 300;
}

/* Clients Scroller Section */
#clients {
  padding-top: 40px;
  padding-bottom: 40px;
}

#clients h2 {
  /* שינוי קטן לכותרת כדי שתתאים ל-HTML החדש */
  margin-bottom: 50px;
}

.scroller-container {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
  direction: ltr; /* חשוב לשמור על זה כדי למנוע קפיצות */
}

.logo-container {
  display: block;
  width: 45px;
  height: 45px;

  /* 1. Use the logo.svg file as a mask */
  mask-image: url("https://cdn.jsdelivr.net/gh/yakir100/SBSiteAssets/assets/svg/sagivlogo.svg");
  -webkit-mask-image: url("https://cdn.jsdelivr.net/gh/yakir100/SBSiteAssets/assets/svg/sagivlogo.svg"); /* For older Safari */

  /* 2. Set the mask properties */
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;

  /* 3. Fill the mask shape with our site's gradient */
  background: var(--gradient);
}

.logo-scroller {
  display: flex;
  align-items: center; /* ממקם את הלוגואים אנכית במרכז */
  width: fit-content;
  height: 90px;
  animation: scroll 30s linear infinite;
}

.logo-scroller:hover {
  animation-play-state: paused;
}

.logo-scroller img {
  height: 55px; /* גובה מעט קטן יותר למראה עדין יותר */
  margin: 0 45px; /* מרווח מעודכן */
  /* --- זה החלק החשוב --- */
  /* הוספת זוהר לבן עדין מסביב ללוגו כדי להבליט אותו מהרקע */
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-scroller img:hover {
  /* מגדילים מעט את הלוגו ומחזקים את הזוהר במעבר עכבר */
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 1));
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
/* Contact Section */
#contact {
  text-align: center;
}

#contact p {
  max-width: 600px;
  margin: 0 auto 30px auto;
}

#contact form {
  max-width: 600px;
  margin: 0 auto 30px auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#contact input,
#contact textarea {
  width: 100%;
  padding: 15px;
  background-color: var(--dark-grey);
  border: 1px solid #333;
  border-radius: 5px;
  color: var(--primary-color);
  font-family: var(--font-family);
}

#contact form .cta-button {
  align-self: center;
}

.social-links a {
  margin: 0 15px;
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background-color: var(--dark-grey);
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .nav-links {
    position: fixed;
    right: -100%;
    top: 0;
    height: 100vh;
    width: 60%;
    background: var(--dark-grey);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.4s ease-in-out;
  }

  .nav-links.nav-active {
    right: 0;
  }

  .nav-links li {
    padding: 20px 0;
    font-size: 1.2rem;
  }

  .hamburger {
    display: block;
    z-index: 1001; /* Above nav links */
  }

  .hamburger.toggle .line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  .hamburger.toggle .line:nth-child(2) {
    opacity: 0;
  }
  .hamburger.toggle .line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  .about-content {
    flex-direction: column-reverse;
  }

  /* Responsive adjustment for Showcase Image */
  #showcase-image {
    background-attachment: scroll; /* Disable parallax on mobile for performance */
    min-height: 35vh;
  }

  .showcase-content h3 {
    font-size: 1.8rem;
  }
}

/* ===================================== */
/* === 404 ERROR PAGE STYLING      === */
/* ===================================== */

.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh; /* Takes up the full height of the screen */
  padding: 20px;
  background-color: var(--background-color);
  color: var(--primary-color);
}

.error-container h1 {
  font-size: 12rem;
  font-weight: 700;
  line-height: 1;
  margin: 0;

  /* The magic trick to apply the gradient to the text */
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-container h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 15px;
}

.error-container p {
  font-size: 1.1rem;
  font-weight: 300;
  max-width: 500px; /* Keeps the text from being too wide on large screens */
  margin-bottom: 30px;
}

/* We can reuse the .cta-button class we already styled! */
.error-container .cta-button {
  /* No extra styles needed, it just works. */
}

/* Make it responsive for smaller screens */
@media (max-width: 768px) {
  .error-container h1 {
    font-size: 8rem;
  }
  .error-container h2 {
    font-size: 1.5rem;
  }
}

/* ===================================== */
/* === CUSTOM LIGHTBOX STYLING (V2)  === */
/* ===================================== */

/* Portfolio Item Adjustments */
.portfolio-item {
  position: relative;
  cursor: pointer;
  overflow: hidden; /* חשוב כדי שהסרט לא יגלוש החוצה */

  /* מוסיפים שכבת כיסוי עדינה שתופיע בהובר ותבליט את הכפתור */
  &::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  /* --- התווית החדשה --- */
  &::before {
    /* לוקחים את הטקסט מה-HTML */
    content: attr(data-category);

    position: absolute;
    bottom: 20px;
    left: -5px; /* מתחיל מעט מחוץ למסך לאפקט */
    z-index: 5;

    /* עיצוב התווית */
    background: var(--gradient);
    color: white;
    padding: 6px 15px;
    font-size: 0.8rem; /* מעט קטן יותר כדי לא להפריע לתמונה */
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 5px 0 0 5px; /* פינות מעוגלות רק בצד אחד */
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.4);

    /* מאחר והתווית תמיד גלויה, אין צורך באנימציה או שקיפות */
    transform: translateX(0);
    opacity: 1;
  }
}

/* כשהעכבר על התמונה, התווית נכנסת פנימה */
.portfolio-item:hover::before {
  transform: translateX(0);
  opacity: 1;
}

/* The View Button (Hover/Focus) */
.view-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9); /* מתחיל מעט קטן */
  width: 60px;
  height: 60px;
  background-color: rgba(18, 18, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10; /* מעל שכבת הכיסוי */

  /* --- תיקון הנגישות --- */
  opacity: 0; /* שקוף לחלוטין */
  pointer-events: none; /* לא ניתן ללחיצה */
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(5px);
}

/* הצגת הכפתור במעבר עכבר או בקבלת פוקוס (Tab) */
.portfolio-item:hover .view-btn,
.view-btn:focus {
  opacity: 1;
  pointer-events: auto; /* הופך ללחיץ */
  transform: translate(-50%, -50%) scale(1);
}

.view-btn svg {
  width: 32px;
  height: 32px;
}

/* --- אייקון חדש למובייל --- */
.mobile-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 5px;
  background-color: rgba(18, 18, 18, 0.6);
  border-radius: 50%;
  display: none; /* מוסתר במחשב שולחני */
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none; /* כדי שהלחיצה תעבור לתמונה עצמה */
}
.mobile-indicator svg {
  width: 16px;
  height: 16px;
  color: white;
}

/* Lightbox Overlay and Content (No changes here, remains the same) */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-image {
  max-width: 95vw; /* מקסימום 90% מרוחב המסך */
  max-height: 95vh; /* מקסימום 85% מגובה המסך */
  object-fit: contain;
  border-radius: 5px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}
/* Navigation and Close Buttons (No changes here, remains the same) */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(26, 26, 26, 0.7);
  color: white;
  border: none;
  cursor: pointer;
  z-index: 2001;
  transition: background-color 0.2s ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: rgba(0, 0, 0, 0.9);
}
.lightbox-close {
  top: -40px;
  right: 0;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
}
.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  padding: 15px;
  border-radius: 5px;
}
.lightbox-prev {
  left: -60px;
}
.lightbox-next {
  right: -60px;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  /* הצגת האייקון הקבוע במובייל */
  .mobile-indicator {
    display: flex;
  }

  /* במובייל, אין צורך בכפתור הגדול שמופיע בהובר */
  .view-btn {
    display: none;
  }

  /* עדכון מיקום החצים והסגירה במובייל */
  .lightbox-prev,
  .lightbox-next {
    padding: 10px;
    font-size: 1.2rem;
  }
  .lightbox-prev {
    left: 5px;
  }
  .lightbox-next {
    right: 5px;
  }
  .lightbox-close {
    top: 5px;
    right: 5px;
  }
}

/* ========================================= */
/* === SOME MORE ACCESSIBILITY FEATURES  === */
/* ========================================= */

/* Adds a highly visible outline when an element is focused via keyboard */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #e64a85; /* Or any other color that stands out */
  outline-offset: 2px;
  transition: outline 0.1s ease-in-out;
}
