.sections {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 20px;
}

.section-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  width: 100%;
}

.section-item, .section-item.smaller {
  position: relative;
  width: calc(33.333% - 20px);
  aspect-ratio: 1 / 1;
  margin: 10px;
  text-align: center;
  padding: 20px;
  border-radius: 20px;
  background-color: #e9e9e8;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.section-item h3.white-text, .section-item.smaller h3.white-text {
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
}

.section-item h3, .section-item.smaller h3 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
  color: #000000;
  position: absolute;
  top: 20px;
  left: 20px;
  text-align: left;
  z-index: 2;
}

.section-item img, .section-item.smaller img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 20px;
  z-index: 0;
}


.section-item button, .section-item.smaller button {
  background-color: black;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 10px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  width: auto;
  max-width: 200px;
  height: auto;
  margin: 0 auto;
  z-index: 2;
  box-sizing: border-box;
  text-transform: initial;
  text-shadow: none;
}


.section-item p, .section-item.smaller p {
  color: black;
  position: absolute;
  bottom: 25%;
  left: 20px;
  right: 20px;
  text-align: center;
  margin: 0;
  z-index: 2;
  font-size: 14px;
  line-height: 1.4;
}


.section-item h3.white-text, .section-item.smaller h3.white-text {
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
}


.section-item.smaller button {
  font-size: 14px;
  padding: 8px 15px;
  bottom: 15px;
  max-width: 150px;
  background-color: #007bff;
  color: white;
}

.section-item.smaller button:hover {
  background-color: #0056b3 !important;
}


@media (max-height: 1200px) and (max-width: 820px), (orientation: portrait) {
  .section-item.smaller p {
    bottom: 30%;
    font-size: 12px;
  }
}



@media only screen and (min-width: 150px) and (max-width: 768px) and (orientation: portrait) {

    #homepagetilesset.sections .section-row {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    #homepagetilesset.sections .section-row .section-item {
        width: calc(100% - 20px);
    }
    #homepagetilesset.sections .section-row .section-item.smaller {
        width: calc(100% - 20px);
    }
    

}

@media (max-width: 768px) {
  .sections div {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}


