.modern-section {
  max-width: 1300px;
  margin: auto;
  padding: 60px 20px;
  background: linear-gradient(180deg, #eaf8e6, #ffffff);
  border-radius: 30px;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
  color: #063906;
}

.section-header h1 {
  font-size: clamp(2rem, 5vw, 48px);
  font-weight: 800;
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: clamp(1rem, 2.5vw, 24px);
  font-weight: 300;
  margin-bottom: 80px;
}

.tile-wrapper {
  display: flex;
  gap: 30px;
  margin: 0 auto;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap; /* domyślnie w rzędzie (powyżej 900px) */
  flex-direction: row;
}

.tile {
  background: white;
  border-radius: 25px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  color: #222;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 400px;
  overflow: visible; /* ważne dla badge */
  position: relative; /* aby badge miał punkt odniesienia */
  /* Stała szerokość i wysokość */
  width: 400px;
  height: 420px;
  transition: all 0.3s ease;
  font-size: 16px;
}

.tile:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

.tile-icon {
  width: 200px;
  height: 200px;
  background: white;
  border-radius: 50%;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.tile-content {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tile-content h3 {
  font-size: 28px;
  font-weight: 700;
  margin: 10px 0 8px;
  text-align: center;
}
.MNEMO h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 10px 0 8px;
  text-align: center;
}
.tile-content p {
  font-size: 14px;
  font-weight: 300;
  text-align: center;
  margin-bottom: 20px;
}

.tile-content button {
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  box-sizing: border-box;
  margin-top: auto;
  background: #44a049;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 25px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.tile-content button:hover {
  background: #347c38;
}

/* Gradienty tła dla kafelków */
.tile1 {
  background: linear-gradient(135deg, #FFF176, #f7d74f);
}
.tile2 {
  background: linear-gradient(135deg, #ffbb66, #ffa233);
}
.tile3 {
  background: linear-gradient(135deg, #81D4FA, #4fc3f7);
}

/* Badge */
.tile2 .badge {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #7fa77f;
  color: white;
  font-weight: 600;
  font-size: 14px;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
  opacity: 1 !important;
  pointer-events: auto;
}

.tile-button-link {
  display: inline-block;
  text-decoration: none;
}

.tile-button-link button {
  all: unset; /* resetuje domyślne style buttona */
  background: #44a049;
  color: white;
  border-radius: 50px;
  padding: 10px 25px;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  display: inline-block;
  transition: background 0.3s ease;
  user-select: none;
}

.tile-button-link button:hover {
  background: #347c38;
}
@media (min-width: 901px) and (max-width: 999px) {
  .tile-content h3 {
    font-size: clamp(20px, 4vw, 24px);
  }
  .MNEMO h3 {
    font-size: 18px !important;
  }
  .tile-content p {
    font-size: clamp(10px, 3vw, 14px);
  }
}
@media (max-width: 900px) {
  .tile-wrapper {
    flex-direction: column;
    align-items: center;
  }
  
  .tile {
    width: 70vw;   /* 70% szerokości ekranu */
    max-width: 500px;
    height: auto; /* wysokość dostosowuje się naturalnie */
    font-size: clamp(14px, 3vw, 16px);
  }
  
  .tile-content h3 {
    font-size: clamp(24px, 5vw, 28px);
  }
  .MNEMO h3 {
    font-size: clamp(20px, 5vw, 28px);
  }
  .tile-content p {
    font-size: clamp(12px, 3vw, 16px);
  }
}
@media (min-width:900px) and (max-width:1300px){
  .MNEMO h3{
    font-size: clamp(18px, 4vw, 22px);
  }
}
/* Ograniczenie szerokości kontenera powyżej 1300px */
@media (min-width: 1301px) {
  .modern-section {
    max-width: 1300px;
  }
  .tile-wrapper {
    max-width: 1300px;
    margin: 0 auto;
  }
}