/* =========================
   Container
   ========================= */
.box-navigation {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  padding: 15px;
  box-sizing: border-box;
}

/* =========================
   Box items
   ========================= */
.box-navigation-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* start from top */
  
  width: 100%;
  height: 240px;
  min-height: 240px;

  padding: 1.5rem;
  background-color: #89BD24;
  color: #ffffff;
  text-decoration: none;
  box-sizing: border-box;

  /* Thin inner border */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.box-navigation-item:hover {
    background-color: #D2343A;
}

/* =========================
   Image container
   ========================= */
.box-navigation-item .icon-container {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem; /* space to title */
}

/* Image itself */
.box-navigation-item .icon-container img {
  max-width: 100px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* =========================
   Title
   ========================= */
.box-navigation-item span {
  color: #ffffff;
  font-size: 1.1rem;
  text-align: center;
  line-height: 1.3;
}

/* =========================
   Desktop layout (2 columns)
   ========================= */
@media (min-width: 768px) {
  .box-navigation-item {
    width: 50%;
  }

  /* ───── TOP ROW ───── */
  .box-navigation-item:nth-child(1) {
    border-top-left-radius: 15px;
  }

  .box-navigation-item:nth-child(2) {
    border-top-right-radius: 15px;
  }

  /* ───── BOTTOM ROW (EVEN COUNT) ───── */
  .box-navigation-item:nth-last-child(1):nth-child(even) {
    border-bottom-right-radius: 15px;
  }

  .box-navigation-item:nth-last-child(2):nth-child(odd) {
    border-bottom-left-radius: 15px;
  }

  /* ───── BOTTOM ROW (ODD COUNT, e.g. 3 items) ───── */
  .box-navigation-item:last-child:nth-child(odd) {
    border-bottom-left-radius: 15px;
  }
}

/* =========================
   Mobile layout (1 column)
   ========================= */
@media (max-width: 767px) {
  .box-navigation-item {
    width: 100%;
  }

  /* Top corners */
  .box-navigation-item:first-child {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
  }

  /* Bottom corners */
  .box-navigation-item:last-child {
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
  }
}
