/* ============================================================
   GLOBALNY HERO — BAZA
============================================================ */
.hero-page {
  position: relative;
  width: 100%;
  height: clamp(180px, 18vw, 260px);
  overflow: hidden;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Obraz wewnętrzny – zabezpieczenie */
.hero-page img {
  display: none;
}

/* ============================================================
   SZKŁO Z TYTUŁEM
============================================================ */
.hero-page-text {
  position: absolute;
  left: 35%;
  top: 70px;
  transform: translateX(-50%);

  display: inline-block;
  padding: 12px 26px;

  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  border-radius: 10px;
  text-align: center;
  box-sizing: border-box;

  min-width: 220px;
  max-width: 320px;
  white-space: normal;
  z-index: 2;
}

.hero-page-text h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  color: #000;
  white-space: normal;
  overflow-wrap: break-word;
}

.marginalia-hero .hero-page-text p {
  margin: 6px auto 0 auto;
  font-size: 17px;
  line-height: 1.3;
  color: #333;
  max-width: 220px;
  text-align: center;
}

/* ============================================================
   PODSTRONY – PROSTE TŁA
============================================================ */
.pietaszek-hero {
  background-image: url("../img/Pietaszek.jpg");
}

.ulacy-hero {
  background-image: url("../img/UlaCy.jpg");
}

.przemowy-hero {
  background-image: url("../img/Przemowy.jpg");
  background-size: cover;
  background-position: right;
  background-repeat: no-repeat;
}

/* ============================================================
   PODSTRONY – TŁO STRONY POD SPODU + OBRAZ NA WARSTWIE
============================================================ */
.zapiski-hero,
.rysunki-hero,
.marginalia-hero {
  position: relative;
  overflow: hidden;

  background-image: url("../img/tlo.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.zapiski-hero::before,
.rysunki-hero::before,
.marginalia-hero::before {
  content: "";
  position: absolute;
  inset: 0;

  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.05);

  z-index: 0;
}

.zapiski-hero::before {
  background-image: url("../img/Zapiski.jpg");
  background-position: center;
  opacity: 0.72;
}

.rysunki-hero::before {
  background-image: url("../img/2.jpg");
  background-position: center 35%;
  opacity: 0.72;
  filter: blur(1.5px);
}

.marginalia-hero::before {
  background-image: url("../img/obrazek.jpg");
  background-position: center 35%;
  opacity: 0.72;
  filter: blur(1.2px) brightness(1.05);
}

/* wszystko w środku ma być nad warstwą obrazka */
.zapiski-hero > *,
.rysunki-hero > *,
.marginalia-hero > * {
  position: relative;
  z-index: 1;
}

/* ============================================================
   MOBILE
============================================================ */
@media (max-width: 768px) {
  .hero-page {
    height: 190px;
  }

  .hero-page-text {
    top: 45px;
    padding: 10px 18px;
    min-width: 180px;
    max-width: 240px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .hero-page-text h1 {
    font-size: 17px;
    line-height: 1.15;
    font-weight: 500;
    margin: 0;
  }

  .marginalia-hero .hero-page-text p {
    margin: 2px 0 0 0;
    font-size: 9px;
    line-height: 1.15;
    font-weight: 400;
  }
}