/* =========================
   SECTION: OFERTA
   Plik: _section-oferta.css
   - Desktop: 3 kolumny (3-3)
   - Tablet: 2 kolumny
   - Telefon: 1 kolumna
   + Scoped container (żeby nie kleiło do boków)
========================= */

.section-oferta {
  background-color: var(--white);
  padding-top: 4rem;
  padding-bottom: 4rem;
  position: relative;
  z-index: 1;
}

/* Scoped container – działa tylko w tej sekcji */
.section-oferta .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 480px) {
  .section-oferta .container {
    padding: 0 1.2rem;
  }
}

/* Header */
.section-oferta__header {
  margin-bottom: 3.5rem;
  text-align: center;
}

.section-oferta__title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  color: var(--brand-dark);
  font-weight: 700;
  margin-bottom: 1rem;
  display: inline-block;
}

.section-oferta__underline {
  width: 60px;
  height: 4px;
  background: var(--brand-red);
  margin: 0 auto;
  border-radius: 2px;
}

/* GRID: wymuszenie 3/2/1 (bez auto-fit) */
.section-oferta .offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  align-items: stretch;
}

/* Karta */
.section-oferta .offer-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  height: clamp(260px, 22vw, 350px);
}

/* Tło */
.section-oferta .offer-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
  will-change: transform;
}

.section-oferta .offer-card:hover .offer-bg {
  transform: scale(1.1);
}

/* Treść */
.section-oferta .offer-content {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(52, 58, 64, 0.95), transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: var(--white);
  min-width: 0;
}

.section-oferta .offer-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--white);
  border-bottom: 3px solid var(--brand-red);
  display: inline-block;
  padding-bottom: 5px;
  word-break: break-word;
}

/* Opis – rozwijany */
.section-oferta .offer-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: var(--transition);
  color: rgba(255, 255, 255, 0.85);
}

.section-oferta .offer-card:hover .offer-details {
  max-height: 120px;
  opacity: 1;
  margin-top: 10px;
}

/* TABLET: 2 kolumny */
@media (max-width: 1024px) {
  .section-oferta .offer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-oferta .offer-card {
    height: clamp(240px, 30vw, 340px);
  }
}

/* TELEFON: 1 kolumna */
@media (max-width: 768px) {
  .section-oferta .offer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .section-oferta .offer-content {
    padding: 1.5rem;
  }

  .section-oferta .offer-card {
    height: 300px;
  }
}

/* Preferencje ruchu */
@media (prefers-reduced-motion: reduce) {
  .section-oferta .offer-bg,
  .section-oferta .offer-details {
    transition: none;
  }

  .section-oferta .offer-card:hover .offer-bg {
    transform: none;
  }
}