/* Section Navigation Component styles */

/* Layout for pages with navigation */
.home-layout {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Fixed Right Navigation */
.section-nav {
  position: fixed;
  top: 640px;
  right: 40px;
  width: 220px;
  height: fit-content;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Toggle button — hidden on desktop */
.section-nav-toggle {
  display: none;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list li {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #666;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: #0071E3;
}

.nav-link.active {
  color: #0071E3;
  background-color: var(--fsp-hover-bg);
}

/* ── Tablet (768px – 1024px) ─────────────────────── */

@media (max-width: 1024px) {
  .home-layout {
    flex-direction: column;
  }

  .section-nav {
    position: sticky;
    top: 50px;
    right: auto;
    width: 100%;
    max-height: none;
    order: -1;
    margin-bottom: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    background: #fff;
    z-index: 90;
  }

  .section-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border: none;
    border-bottom: 1px solid #e8e8e8;
    cursor: pointer;
    font-family: "Open Sans Hebrew", "Open Sans", sans-serif;
    font-size: 0.9rem;
    color: #0071E3;
    direction: rtl;
  }

  .section-nav-toggle-label {
    font-weight: 500;
  }

  .section-nav-toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
    color: #999;
  }

  .section-nav-toggle-icon.open {
    transform: rotate(180deg);
  }

  .nav-list {
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
  }

  .nav-list.is-expanded {
    display: flex;
  }

  .nav-list li {
    margin-bottom: 0;
  }

  .nav-link {
    padding: 0.6rem 1.25rem;
    border-radius: 0;
    font-size: 0.9rem;
  }

  .nav-link.active {
    border-right: 3px solid #0071E3;
    border-radius: 0;
  }
}

/* ── Phone (< 768px) ────────────────────────────── */

@media (max-width: 767px) {
  .section-nav {
    top: 48px;
  }

  .section-nav-toggle {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }

  .nav-link {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
  }
}
