/* ============================
   Base (Mobile-First) Styles
   ============================ */

/* For smallest screens, position static to avoid conflicts.
   You can switch to 'position: sticky' if you prefer. */
   @media (max-width: 384px) {
    .arrow-down{
      display: none;
    }
  
    .nav-link {
      display: flex;
      align-items: center;
      gap: 3px !important;
      text-decoration: none;
      color: inherit;
      font-weight: 600
    }
    .nav-item {
      padding: 5px;    /* Decrease padding for a tighter fit */
      font-size: 0.8em; /* Optionally reduce font size */
    }
  }
  
  
  .navbar {
    position: fixed;
    top: 0;
    z-index: 10;
  
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
    background-color: #fff;
    color: #000;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    direction: rtl; /* For Hebrew text direction */
  }
  
  .navbar-content {
    display: flex !important;
    align-items: flex-start;
    width: 100%;
    direction: rtl; /* For Hebrew text direction */
  }
  
  /* #logo img {
     width:30px;
     height: 30px;
     border-radius: 25px;
  } */
  
  #logo img {
    display: none;
  }
  
  .nav-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    margin: 0;
    justify-content: center; /* or 'flex-start' if you prefer */
    text-overflow: hidden;
  }
  
  /* Nav Item styling */
  .nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center; /* horizontally center text/icon */
    height: auto; /* let content define height on mobile */
    padding: 10px;
    box-sizing: border-box;
    background-color: #fff;
    color: #000;
    border-radius: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  
    /* Transition only relevant properties */
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
    cursor: pointer;
  }
  
  .nav-item.active {
    background-color: #061A9A; /* Change to your desired background color */
    color: #ffffff; /* Change to your desired text color */
  }
  
  .nav-item.active .nav-icon {
    fill: #ffffff; /* Change icon color to white */
  }
  
  .nav-item:hover {
    background-color: #061A9A;
    color: #fff;
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
  }
  
  /* Outline is hidden on mobile by default */
  .outline {
    display: none; 
  }
  
  /* 'decorate' can remain visible on mobile; or you can hide it if you like. */
  .decorate {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #E94D8C;
    background: linear-gradient(to bottom, #061A9A, #020F6A);
    color: #fff;
    border-radius: 25px;
    padding: 0 15px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .decorate:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4), inset 0 0 0 1px #E94D8C;
  }
  
  .decorate:active {
    transform: scale(0.95);
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #E94D8C;
    background: linear-gradient(to bottom, #020F6A, #061A9A);
  }
  
  /* Nav link text/icon */
  .nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: inherit; 
    font-weight: 600;
  }
  
  .nav-link span {
    white-space: nowrap;
  }
  
  /* Icons */
  .nav-icon {
    max-width: 27.6px;
    height: 20px;
    fill: #061A9A;
    overflow: auto;
    min-width: 20px;
  }
  
  .nav-item:hover .nav-icon {
    fill: #fff;
  }
  
  /* ============================
     Dropdown
     ============================ */
  .dropdown-content {
    display: none;
    position: absolute;
    top: 100%; /* below the .nav-item */
    transform:translate(50%);
    right:50%;
    background-color: #fff;
    border-radius: 4px;
    min-width: 140px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 999;
    flex-direction: column;
    text-align: right; /* for RTL, text on the right edge */
  }
  
  .dropdown-content a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000;
    text-decoration: none;
    padding: 8px 10px;
    white-space: nowrap;
    z-index: 999;
  }
  
  .dropdown-content .nav-icon.sub {
    fill: #061A9A;
  }
  
  .dropdown-content a:hover {
    background-color: #061A9A;
    color: #fff;
  }
  
  .dropdown-content a:hover .nav-icon {
    fill: #fff;
  }
  
  /* Hover rule for desktop. 
     On small screens we rely on JS click to open/close. */
  .dropdown:hover .dropdown-content {
    display: flex;
  }
  
  /* Footer: keep it static so it doesn't hide content on small screens */
  footer {
    position: static;
    bottom: auto;
    width: 100%;
    background-color: white;
    color: black;
    box-sizing: border-box;
    padding: 10px 20px;
    display: none;
    justify-content: center;
  }
  
  /* ================================
     (Optional) Small breakpoint:
     Switch to 3 columns at 430px
     ================================ */
  @media (min-width: 430px) {
    .nav-links {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  
  /* ================================
     smally (min-width: 383px)
     ================================ */
  @media (min-width: 383px) {
    .navbar {
      position: fixed;
      top: 0;
      z-index: 10000;
    
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    
      width: 100%;
      box-sizing: border-box;
      padding: 20px;
      background-color: #fff;
      color: #000;
      border-bottom-left-radius: 50px;
      border-bottom-right-radius: 50px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      direction: rtl; /* For Hebrew text direction */
    }
  
    nav-links {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      width: 100%;
      margin: 0;
      justify-content: center; /* or 'flex-start' if you prefer */
      text-overflow: hidden;
      word-break: break-word;
    }
  
    .navbar-content {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      flex-wrap: wrap;
    }
  
    #logo {
      display: flex;
      align-items: center;
      gap: 8px;
    }
  
    #logo img {
      display: none;
    }
  
    .nav-links {
      display: grid;
      gap: 12px;
      flex-basis: 100%;
      /* If you want to center horizontally on wide screens:
         @media (min-width: 915px) { margin: 0 auto; } */
      justify-content: flex-start;
    }
  
    .nav-item {
      height: 40px;
      padding: 0 8px;
      margin: 5px 0;
    }
  }
  
  /* ================================
     Desktop (min-width: 915px)
     ================================ */
  @media (min-width: 915px) {
    .navbar-content {
      display: flex;
      flex-wrap: nowrap;
      min-height: 50px;
    }
    .navbar {
      position: fixed;
      border-bottom-left-radius: 50px;
      border-bottom-right-radius: 50px;
      justify-content: center;
    }
  
    .nav-links {
      display: flex;
      justify-content: center;
    }
  
    .nav-item {
      justify-content: center;
    }
  
    #logo img {
      width: 50px;
      height: 50px;
    }
  
    .nav-links {
      gap: 20px;
      flex-basis: auto;
    }
  
    footer {
      position: fixed;
      bottom: 0;
      width: 100%;
      background-color: white;
      color: black;
      box-sizing: border-box;
      padding: 10px 20px;
      display: flex;
      justify-content: center; /* Centers the footer-content horizontally */
      z-index: 10;
    }
    
    .footer-content {
      display: inline-flex;
      align-items: center;
      gap: 10px; /* Provides exactly 10px spacing between each element (link, divider, link) */
    }
    
    .divider-line {
      width: 1px;           /* Thickness of the divider line */
      height: 20px;         /* Height of the divider line */
      background-color: #000; /* Color of the divider line */
    }
  
    footer a {
      color: black;
      text-decoration: none;
      text-align: left;
    }
  
    footer a:hover {
      text-decoration: underline;
    }
  }
  
  .notification-badge {
    position: absolute;
    top: -11px;
    left: 17px;
    background-color: red;
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .profile-icon-wrapper {
    position: relative;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    display: flex;
    padding-left: 2px;
  }
  
  .profile-icon-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #061A9A;
  }

 
  
  /* =============== For invitations in the profileModal =============== */
  .invitations-list {
    margin-top: 1rem;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 0.5rem;
    border-radius: 5px;
  }
  .invitation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 1rem;
  }
  .invitation-buttons button {
    margin-left: 0.5rem;
    cursor: pointer;
    background-color: #ccc;
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
  }
  .invitation-buttons button:hover {
    background-color: #bbb;
  }
  .invitation-item span {
    font-size: 0.9rem;
  }