/* Frontend - style dla Numbered Sections */

/* ========================================
   KONTENER
   ======================================== */

.numbered-sections-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 60px auto;
  padding: 0 20px;
  position: relative;
}

/* ========================================
   POJEDYNCZA SEKCJA (ITEM)
   ======================================== */

.numbered-section-item {
  display: grid;
  gap: 40px;
  align-items: start;
  padding: 40px 0;
  margin: 0 0 60px 0;
  position: relative;
}
.numbered-section-content {
  position: relative;
  z-index: 1;
}

/* Ostatnia sekcja bez marginesu na dole */
.numbered-section-item:last-child {
  margin-bottom: 0;
}

/* Liczba po LEWEJ stronie */
.numbered-section-item.number-position-left {
  grid-template-columns: auto 1fr;
  grid-template-areas: "number content";
}

.numbered-section-item.number-position-left .numbered-section-number {
  grid-area: number;
}

.numbered-section-item.number-position-left .numbered-section-content {
  grid-area: content;
}

/* Liczba po PRAWEJ stronie */
.numbered-section-item.number-position-right {
  grid-template-columns: 1fr auto;
  grid-template-areas: "content number";
}

.numbered-section-item.number-position-right .numbered-section-number {
  grid-area: number;
}

.numbered-section-item.number-position-right .numbered-section-content {
  grid-area: content;
}

/* ========================================
   NUMER - duża szara cyfra jak na projekcie
   ======================================== */

.numbered-section-item .numbered-section-number {
  font-size: 400px;
  font-weight: 400;
  line-height: 0.9;
  color: #e8e8e8;
  user-select: none;
  padding: 0 30px;
  opacity: 0.5;
  position: absolute;
}
.number-position-right .numbered-section-number {
  right: 0;
  top:-50px
}
.number-position-left .numbered-section-number {
  left: 0;
  top:-50px
}
/* ========================================
   TREŚĆ
   ======================================== */

.numbered-section-item .numbered-section-content {
  padding: 20px 0;
}

/* Domyślne style dla elementów w treści */
.numbered-section-item .numbered-section-content > h1,
.numbered-section-item .numbered-section-content > h2,
.numbered-section-item .numbered-section-content > h3 {
  margin-top: 0;
  margin-bottom: 20px;
  line-height: 1.3;
}

.numbered-section-item .numbered-section-content > p {
  margin-bottom: 20px;
  line-height: 1.7;
}

.numbered-section-item .numbered-section-content > *:last-child {
  margin-bottom: 0;
}

/* ========================================
   ANIMACJE - domyślnie widoczne
   ======================================== */

.numbered-sections-wrapper[data-animation-enabled="true"] .numbered-section-item {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* JavaScript doda klasę 'will-animate' */
.numbered-sections-wrapper[data-animation-enabled="true"] .numbered-section-item.will-animate {
  opacity: 0;
  transform: translateY(50px);
}

/* Po wejściu w viewport */
.numbered-sections-wrapper[data-animation-enabled="true"] .numbered-section-item.will-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 992px) {
  .numbered-section-item {
    gap: 30px;
    padding: 30px 0;
    margin-bottom: 40px;
  }
  
  .numbered-section-item .numbered-section-number {
    font-size: 140px;
    padding: 0 20px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .numbered-sections-wrapper {
    margin: 40px auto;
  }
  
  .numbered-section-item {
    grid-template-columns: 1fr !important;
    grid-template-areas: "number" "content" !important;
    gap: 20px;
    padding: 20px 0;
    margin-bottom: 30px;
  }
  
  .numbered-section-item .numbered-section-number {
    font-size: 100px;
    text-align: center;
    padding: 0;
  }
  
  .numbered-section-item .numbered-section-content {
    padding: 0;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .numbered-section-item .numbered-section-number {
    font-size: 80px;
  }
}
