

/* HOME MENU */

.home-container {
  width: 100%;
  margin-bottom: 20vh;
}

.menu-home-menu-container {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 100vh;
}

.home-menu {
  display: flex;
  align-items: center;
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;                 /* Enable wrapping */
  justify-content: center;        /* Center items horizontally */
  align-content: center;          /* Center multiple rows vertically */
  height: 100%;  
}

/* Each menu element has a fixed margin around it */
.home-menu li {
  flex: 1 0 0;               /* Equal widths */
  aspect-ratio: 1 / 1;       /* Makes each square */
  overflow: hidden;
  white-space: nowrap;
  display: flex;             /* Center content */
  align-items: center;
  justify-content: center;
  font-size: 1.4vw;
  letter-spacing: var(--main-uppercase-spacing);
  text-transform: uppercase;
  transition: border-right-color var(--transition-time-long) ease, border-left-color var(--transition-time-long) ease, border-top-color var(--transition-time-long) ease, border-bottom-color var(--transition-time-long) ease;
}




.home-menu a {
    color: white;
    margin-right: -0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    transition: color var(--transition-time) ease;
}
  

.home-menu li:hover a {
  color: var(--main-red-color);
}



@media (min-width: 901px) {
  /* First item: only right border */
  .home-menu li:first-child {
    border-right: 0.1px solid rgb(49, 49, 49);
    border-left: 0.1px solid var(--main-background-color);
    border-top: 0.1px solid var(--main-background-color);
    border-bottom: 0.1px solid var(--main-background-color);
  }


  /* Last item: only left border */
  .home-menu li:last-child {
    border-left: 0.1px solid rgb(49, 49, 49);
    border-right: 0.1px solid var(--main-background-color);
    border-top: 0.1px solid var(--main-background-color);
    border-bottom: 0.1px solid var(--main-background-color);
  }

  /* All other (middle) items: left and right borders */
  .home-menu li:not(:first-child):not(:last-child) {
    border-left: 0.1px solid rgb(49, 49, 49);
    border-right: 0.1px solid rgb(49, 49, 49);
    border-top: 0.1px solid var(--main-background-color);
    border-bottom: 0.1px solid var(--main-background-color);
  }
}


@media (max-width: 900px) {

  .home-container {
    margin-bottom: 25vh;
  }

  .home-menu li {
    flex: 0 0 33.333%; /* each takes 1/3 of the row */
    font-size: 2.8vw;
    border-left: 0.1px solid rgb(49, 49, 49);
    border-right: 0.1px solid rgb(49, 49, 49);
    border-top: 0.1px solid var(--main-background-color);
    border-bottom: 0.1px solid var(--main-background-color);
  }

  /* First row bottom border */
  .home-menu li:nth-child(-n+3) {
    border-bottom: 0.1px solid rgb(49, 49, 49);
    border-top: 0.1px solid var(--main-background-color);
  }

  /* Second row top border */
  .home-menu li:nth-child(n+4) {
    border-top: 0.1px solid rgb(49, 49, 49);
    border-bottom: 0.1px solid var(--main-background-color);
  }

  /* First item in each row: remove left border */
  .home-menu li:nth-child(1),
  .home-menu li:nth-child(4) {
    border-left: 0.1px solid var(--main-background-color);
  }

  /* Last item in each row: remove right border */
  .home-menu li:nth-child(3),
  .home-menu li:nth-child(6) {
    border-right: 0.1px solid var(--main-background-color);
  }
}

@media (max-width: 480px) {

  .home-container {
    margin-bottom: 30vh;
  }

  .home-menu {
    flex-wrap: wrap;        /* allow wrapping into rows */
    align-content: center;   /* center the rows vertically if needed */
  }

  .home-menu li {
    flex: 0 0 50%;           /* two items per row */
    aspect-ratio: 1 / 1;     /* keep square shape */
    display: flex;
    align-items: center;
    font-size: 4.2vw;
    justify-content: center;
    border-left: 0.1px solid rgb(49, 49, 49);
    border-right: 0.1px solid rgb(49, 49, 49);
    border-top: 0.1px solid var(--main-background-color);
    border-bottom: 0.1px solid var(--main-background-color);
    border-top: none;
    border-bottom: none;
  }

  /* Row 1 (items 1 & 2) */
  /* Item 1: bottom + right */
  .home-menu li:nth-child(1) {
    border-left: 0.1px solid var(--main-background-color);
    border-right: 0.1px solid rgb(49, 49, 49);
    border-bottom: 0.1px solid rgb(49, 49, 49);
  }
  /* Item 2: bottom + left */
  .home-menu li:nth-child(2) {
    border-left: 0.1px solid rgb(49, 49, 49);
    border-right: 0.1px solid var(--main-background-color);
    border-bottom: 0.1px solid rgb(49, 49, 49);
  }

  /* Row 2 (items 3 & 4) */
  /* Item 3: top + bottom + right */
  .home-menu li:nth-child(3) {
    border-top:    0.1px solid rgb(49, 49, 49);
    border-bottom: 0.1px solid rgb(49, 49, 49);
    border-left: 0.1px solid var(--main-background-color);
    border-right:  0.1px solid rgb(49, 49, 49);
  }
  /* Item 4: top + bottom + left */
  .home-menu li:nth-child(4) {
    border-top:    0.1px solid rgb(49, 49, 49);
    border-bottom: 0.1px solid rgb(49, 49, 49);
    border-left:   0.1px solid rgb(49, 49, 49);
    border-right: 0.1px solid var(--main-background-color);
  }

  /* Row 3 (items 5 & 6) */
  /* Item 5: top + right */
  .home-menu li:nth-child(5) {
    border-top:    0.1px solid rgb(49, 49, 49);
    border-left: 0.1px solid var(--main-background-color);
    border-bottom: 0.1px solid var(--main-background-color);
    border-right:  0.1px solid rgb(49, 49, 49);
  }
  /* Item 6: top + left */
  .home-menu li:nth-child(6) {
    border-top:    0.1px solid rgb(49, 49, 49);
    border-right: 0.1px solid var(--main-background-color);
    border-bottom: 0.1px solid var(--main-background-color);
    border-left:   0.1px solid rgb(49, 49, 49);
  }
}
