.offer-grid {
  padding: 6rem 1rem;
  background-color: var(--blue-grey-50);
  overflow: hidden;
}

.offer-grid__header {
  text-align: center;
  margin-bottom: 3rem;
}

.offer-grid__pretitle {
  font-size: 0.8rem;
  margin-bottom: 0.8rem;
  display: inline-block;
  letter-spacing: 1px;
  color: var(--color-dark-blue);
  font-weight: 600;
}

.offer-grid__items {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 290px);
  gap: 2rem;
  justify-content: center;
}

.offer-grid__item {
  box-sizing: border-box;
  background: #fff;
  border-radius: 6px;
  min-height: 290px;
  max-height: 290px;
  padding: 2rem;
  text-align: left;
  transition: max-height 0.8s ease, transform 0.3s ease, box-shadow 0.3s ease;
  border: rgba(0, 0, 0, 0.15) 1px solid;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.offer-grid__item-header {
  display: flex;
}

.offer-grid__item .accordion {
  position: relative;
  cursor: pointer;
  width: 42px;
  height: 42px;
  margin-left: auto;
}

.offer-grid__item .accordion::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 2px;
  background-color: var(--smooth-dark);
  display: block;
}

.offer-grid__item .accordion::before {
  content: "";
  position: absolute;
  opacity: 1;
  transition: opacity 0.3s ease;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  width: 12px;
  height: 2px;
  background-color: var(--smooth-dark);
  display: block;
}

.accordion.no-icon::before {
  opacity: 0;
}

.offer-grid__item h3 {
  margin: 1rem 0 0.5rem;
}

/* KONTENER TEKSTU */
.offer_grid_text {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* PARAGRAF Z ELLIPSIS - KLUCZOWE STYLE */
.offer_grid_text p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; /* WAŻNE! */
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.5em; /* 3 linie * 1.5 line-height */
  margin: 0;
  line-height: 1.5;
}

/* DLA PRZEGLĄDAREK KTÓRE NIE OBSŁUGUJĄ -webkit-line-clamp */
.offer_grid_text.truncated p {
  position: relative;
  max-height: 4.5em;
  overflow: hidden;
}

.offer_grid_text.truncated p::after {
  content: "...";
  position: absolute;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, transparent, white 20%);
  padding-left: 10px;
  font-weight: bold;
}

/* ROZWINIĘTY STAN */
.height-unset {
  max-height: 1000px !important;
}

.height-unset .offer_grid_text p {
  -webkit-line-clamp: unset !important;
  display: block !important;
  overflow: visible !important;
  max-height: none !important;
  text-overflow: clip !important;
}

.height-unset .offer_grid_text.truncated p::after {
  display: none;
}

.offer-grid__item li {
  margin-top: 10px;
}

.offer-grid__icon img {
  width: 42px;
  height: 42px;
  background-color: var(--blue-grey-50);
  padding: 5px;
  border-radius: 4px;
}

@media (hover: hover) {
  .offer-grid__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: rgba(0, 0, 0, 0.212) 1px solid;
  }
}

/* CTA TILE */
.offer-grid__item--cta {
  background: var(--color-blue-grey-900);
  color: var(--blue-grey-50);
  font-size: clamp(1.2rem, 1rem + 1vw, 1.4rem);
  margin-bottom: 0.5em;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 1024px) {
  .offer-grid__items {
    grid-template-columns: repeat(2, 290px);
  }
}

@media (max-width: 768px) {
  .offer-grid__items {
    grid-template-columns: repeat(1, 290px);
  }
}
