html, body {
  height: 100%;
  overflow: hidden;
  transition: opacity 300ms ease;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
  width: 74%;
  margin: 106px auto 100px;
  position: relative;
  z-index: 30;
}

.article-btn {
  font-family: 'Michroma', sans-serif;
  font-size: 16px;
  font-weight: 500;
  background: white;
  color: rgba(57, 57, 57, 1);
  border: none;
  padding: 50px 80px;
  border-radius: 28px;
  box-shadow: 0px 10px 22px rgba(0,0,0,0.32);
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0px 12px 26px rgba(0,0,0,0.36);
}

.modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease;
}


.modal.active {
  display: flex;            /* lub block, aby modal był widoczny */
  visibility: visible;
}


.modal.show {
  opacity: 1;
}

.modal-content {
  position: relative;
  background: white;
  max-width: 75%;
  max-height: 80vh;
  overflow-y: auto;
  padding-top: 60px;
  padding-left: 70px;
  padding-right: 75px;
  padding-bottom: 80px;
  border-radius: 28px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.32);
  transform: scale(0.95);
  transition: transform 300ms ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-content h1 {
  font-family: 'Michroma', sans-serif;
  font-size: 25px;
  margin-bottom: 18px;
  color: rgba(57, 57, 57, 1);
}

.modal-content p,
.modal-content li {
  font-family: 'Lexend Exa', sans-serif;
  font-size: 15px;
  color: rgba(57, 57, 57, 1);
  letter-spacing: -0.1em;
  text-align: justify;
  line-height: 1.3em;
  margin-bottom: 12px;
}

.modal-content ul,
.modal-content ol {
  padding-left: 20px;
  margin-bottom: 20px;
}

.close-btn {
  position: sticky;
  top: 8px;
  right: 0;
  float: right;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: -10px;
  z-index: 200;
}

.close-btn img {
  width: 34px;
  height: 34px;
}

::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.3);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(236, 236, 236, 0.7);
  border-radius: 10px;
  border: 3px solid rgba(236, 236, 236, 0.7);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(236, 236, 236, 0.7);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(236, 236, 236, 0.7);
}


/* =========================================================
   🟦 ROZSZERZENIE TEKSTU POPRZEZ MNIEJSZE MARGINESY (900–1200px)
=========================================================*/
@media(min-width:900px) and (max-width:1200px){

  .articles-grid{
      width:85%;
      gap:28px 40px;
      margin-top:110px;
  }

  /* 🔥 kluczowa zmiana — MNIEJSZY PADDING = WIĘKSZA SZEROKOŚĆ NA TEKST */
  .article-btn{
      padding:28px 40px;   /* zamiast 55px 100px - duuużo więcej miejsca na napis */
      height:auto;
      font-size:14px;
      border-radius:24px;
  }
}







/* =========================================================
   📲 TABLET — max 900px
   przyciski w jednej kolumnie, szerokie
=========================================================*/
@media (max-width: 900px) {

  /* ===========================================
   🟢 PRZYWRACAMY SCROLL STRONY
   — Mobile, tablet i desktop
===========================================*/

html, body {
    height: auto;          /* zamiast 100% */
    overflow: auto;        /* ODBLOKOWANIE przewijania */
}

/* ================================
   SKRÓCENIE NADMIERNEJ DŁUGOŚCI STRONY
================================ */

.gradient-layer {
    height: 80vh !important;  /* zamiast 11000px */
    max-height: 2500px;        /* zabezpieczenie */
}


/* 🔥 przewijanie zostaje tylko wewnątrz modala */
.modal-content {
    overflow-y: auto !important;
    max-height: 90vh;      /* nie wychodzi poza ekran */
}


  .articles-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    width: 90%;
    margin: 110px auto 80px;
    margin-top:40px;
    width:70%; /* ustaw tu swoją wartość: 70% / 60% / 50% */
  }

  .article-btn {
    height: auto;
    padding: 30px 24px;
    font-size: 15px;
  }

   .page-title,
  .topic h1,
  .container h1{
      font-size:25px !important;
      line-height:1.22;
      margin:20px 15px 22px 15px;
  }

  .modal-content{
    max-width:95% !important;   /* było 75% — zmień na 90%/95% aby bardziej wypełnił ekran */
    max-height:88vh !important; /* było 80vh — modal wyższy */
}
.modal-content h1{
    font-size:16px !important;   /* było 25px */
}

.modal-content p,
.modal-content li{
    font-size:12px !important;   /* było 15px */
    line-height:1.45 !important; /* czytelniejszy tekst */
}
}


/* =========================================================
   📱 TELEFON — max 520px
   jeden pod drugim, maksymalnie rozciągnięte
=========================================================*/
@media (max-width: 520px) {

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    width: 92%;
    margin: 100px auto 70px;
    margin-top:20px;
    width:90%; /* ustaw tu swoją wartość: 70% / 60% / 50% */
  }

  .article-btn {
    height: auto;
    padding: 22px 18px;
    font-size: 14px;
    border-radius: 22px;
  }

  .modal-content {
    max-width: 90%;
    padding: 40px 22px 50px 22px;
  }
}
