/* ===================== EMERYTURA (podstrona) ===================== */

/* 1) HERO */
.em-hero {
  background: url("/img/emerytura/em-tl1.webp") center/cover no-repeat;
  color: #fff;

  padding: 0;
  position: relative;
  overflow: hidden;

  min-height: min(620px, 100svh);
}


.em-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(18px, 4vw, 48px);

  min-height: min(620px, 100svh);
  height: 100%;

  padding:0;

  align-items: stretch;
}

.em-hero-content {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 0;
  padding: clamp(22px, 4vw, 44  px);

  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;

  min-height: 65vh;
}

.em-hero-content .btn {
  margin-top: 8px;
}

.em-hero-title {
  font-size: 4rem;
  line-height: 1.05;
  margin-bottom: 18px;
  font-family: "Libre Baskerville", serif;
  font-weight: bolder;
}

.em-hero-text {
  max-width: 56ch;
  opacity: 0.95;
  margin-bottom: 26px;
  font-size: clamp(1.02rem, 1.2vw, 1.18rem);
  line-height: 1.8;
}

.em-hero-photo {
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.em-hero-photo img {
  max-width: 420px;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.b1{
  border-radius: 5%;
}

/* 2) INFO BOX na tle zdjęcia monet */
.em-infobox {
  background: url("/img/emerytura/em-tl2.webp") center/cover no-repeat;
  padding: clamp(44px, 6vw, 70px) 0;
  position: relative;
}

.em-infobox .container {
  position: relative;
}

.em-infobox-card {
  max-width: 760px;
  margin: 0 auto;
  background: rgba(255,255,255,0.92);
  border: 2px solid black;
  border-radius: 12px;
  padding: clamp(18px, 3vw, 28px) clamp(16px, 3vw, 24px);
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.em-infobox-title {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.25;
  font-family: "Libre Baskerville", serif;
  font-weight: bolder;
}

.em-infobox-text {
  max-width: 640px;
  margin: 0 auto;
  font-size: clamp(1.0rem, 1.1vw, 1.1rem);
  line-height: 1.75;
}

/* 3) Programy emerytalne */
.em-section-title {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  text-align: center;
  margin-bottom: 22px;
  font-family: "Libre Baskerville", serif;
  font-weight: bolder;
}

.em-programs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 18px);
  margin-top: 16px;
}

/* wrapper jednej karty */
.em-program-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* listek nad kartą – bez absolute, jak w card-clients-leaf */
.em-program-leaf {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  padding-left: 0;
  margin-bottom: -28px; /* powoduje nachodzenie listka na box */
  z-index: 1;
}

.em-program-leaf img {
  width: 7rem;
  height: auto;
  pointer-events: none;
  user-select: none;
  transform: translateX(-30%);
}

/* właściwa karta z obramowaniem */
.em-program-box {
  background: #fff;
  border: 1px solid #e8d9ae;
  border-radius: 14px;
  padding: clamp(32px, 3vw, 38px) clamp(14px, 2vw, 18px) clamp(16px, 2vw, 20px);
  text-align: center;

  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

/* ikonka programu */
.em-program-icon {
  display: block;
  margin: 0 auto 12px;
  width: clamp(56px, 18vw, 92px);
  height: auto;
}

.em-program-card h3,
.em-program-title {
  font-family: "Libre Baskerville", serif;
  font-weight: bolder;
  font-size: clamp(1.05rem, 1.2vw, 1.18rem);
  line-height: 1.25;
  margin-bottom: 4px;
  color: #ba8913;
}

.em-program-text {
  font-size: clamp(0.98rem, 1.05vw, 1.06rem);
  line-height: 1.7;
  color: #333;
}

/* 4) Czarna sekcja 10% + zdjęcie */
.em-cta10 {
  background: #0f0f0f;
}

.em-cta10-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
}

.em-cta10-title {
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  line-height: 1.12;
  margin-bottom: 14px;
  font-family: "Libre Baskerville", serif;
  font-weight: bolder;
}

.em-cta10-text {
  max-width: 60ch;
  opacity: 0.95;
  margin-bottom: 18px;
  text-align: center;
  font-size: clamp(1.02rem, 1.15vw, 1.15rem);
  line-height: 1.8;
}

.em-cta10-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.em-cta10-photo {
  display: flex;
  justify-content: flex-end;
}

.em-cta10-photo img {
  max-width: 420px;
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
}

/* 5) Jasna sekcja “Im wcześniej…” */
.em-early {
  background: url("/img/emerytura/em-tl3.webp") center/cover no-repeat;
  position: relative;
}

.em-early.section-light {
  background: url("/img/emerytura/em-tl3.webp") center/cover no-repeat;
  background-color: transparent;
  position: relative;
  overflow: hidden;
  min-height: 420px;
  padding: 4rem 0;
}

.em-early.section-light::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.18);
  pointer-events: none;
}

.em-early-inner {
  position: relative;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.em-early-title {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.15;
  font-family: "Libre Baskerville", serif;
  font-weight: bolder;
}

.em-early-text {
  font-size: clamp(1.0rem, 1.1vw, 1.1rem);
  line-height: 1.6;
  max-width: 60ch;
  margin: 0 auto;
}

/* ===================== RESPONSYWNOŚĆ ===================== */

/* TABLET */
@media (max-width: 1024px){
  .em-hero-inner{
    grid-template-columns: 1fr;
    text-align: center;
  }

  .em-hero-photo{
    justify-content: center;
  }

  .em-hero-content{
    min-height: auto;
    max-height: none;
  }
}

/* MOBILE */
@media (max-width: 900px) {
  .em-hero {
    min-height: 100svh;
  }

  .em-hero-inner {
    display: flex;
    flex-direction: column;
    text-align: center;

    min-height: 100svh;

    padding: 64px 0 0;
    
    gap: 24px;
  }

  .em-hero-content {
    padding: 26px 20px;
    min-height: unset;
    max-width: none;
    margin: 0 auto;
  }

  .em-hero-photo {
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;

    padding-bottom: 0;
  }

  .em-hero-photo img {
    width: min(360px, 85%);
    max-width: 85%;
    height: auto;
  }

  .em-hero-title {
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.05;
  }

  .em-cta10-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .em-programs-grid {
    grid-template-columns: 1fr;
  }

  .em-infobox {
    padding: 50px 0;
  }

  .em-infobox-card {
    padding: 22px 18px;
  }

  .em-infobox-title {
    font-size: 1.45rem;
  }
}


/* === EM EARLY – usuń nadmiar pustej przestrzeni === */
.em-early.section-light {
  min-height: auto;        /* 🔥 usuwa sztuczną wysokość */
  padding-top: 4rem;       /* kontrolowana góra */
  padding-bottom: 4rem;    /* kontrolowany dół */
}

/* ===================== EMERYTURA (podstrona) ===================== */

/* 1) HERO */
.em-hero {
  background: url("/img/emerytura/em-tl1.webp") center/cover no-repeat;
  color: #fff;

  padding: 0;
  position: relative;
  overflow: hidden;

  min-height: min(620px, 100svh);
}


.em-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(18px, 4vw, 48px);

  min-height: min(620px, 100svh);
  height: 100%;

  padding:0;

  align-items: stretch;
}

.em-hero-content {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 0;
  padding: clamp(22px, 4vw, 44px);

  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;

  min-height: 65vh;
}

.em-hero-content .btn {
  margin-top: 8px;
}

.em-hero-title {
  font-size: 4rem;
  line-height: 1.05;
  margin-bottom: 18px;
  font-family: "Libre Baskerville", serif;
  font-weight: bolder;
}

.em-hero-text {
  max-width: 56ch;
  opacity: 0.95;
  margin-bottom: 26px;
  font-size: clamp(1.02rem, 1.2vw, 1.18rem);
  line-height: 1.8;
}

.em-hero-photo {
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.em-hero-photo img {
  max-width: 320px;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.b1{
  border-radius: 5%;
}

/* 2) INFO BOX na tle zdjęcia monet */
.em-infobox {
  background: url("/img/emerytura/em-tl2.webp") center/cover no-repeat;
  padding: clamp(44px, 6vw, 70px) 0;
  position: relative;
}

.em-infobox .container {
  position: relative;
}

.em-infobox-card {
  max-width: 760px;
  margin: 0 auto;
  background: rgba(255,255,255,0.92);
  border: 2px solid black;
  border-radius: 12px;
  padding: clamp(18px, 3vw, 28px) clamp(16px, 3vw, 24px);
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.em-infobox-title {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.25;
  font-family: "Libre Baskerville", serif;
  font-weight: bolder;
}

.em-infobox-text {
  max-width: 640px;
  margin: 0 auto;
  font-size: clamp(1.0rem, 1.1vw, 1.1rem);
  line-height: 1.75;
}

/* 3) Programy emerytalne */
.em-section-title {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  text-align: center;
  margin-bottom: 22px;
  font-family: "Libre Baskerville", serif;
  font-weight: bolder;
}

.em-programs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 18px);
  margin-top: 16px;
}

/* wrapper jednej karty */
.em-program-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* listek nad kartą – bez absolute, jak w card-clients-leaf */
.em-program-leaf {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  padding-left: 0;
  margin-bottom: -28px; /* powoduje nachodzenie listka na box */
  z-index: 1;
}

.em-program-leaf img {
  width: 7rem;
  height: auto;
  pointer-events: none;
  user-select: none;
  transform: translateX(-30%);
}

/* właściwa karta z obramowaniem */
.em-program-box {
  background: #fff;
  border: 1px solid #e8d9ae;
  border-radius: 14px;
  padding: clamp(32px, 3vw, 38px) clamp(14px, 2vw, 18px) clamp(16px, 2vw, 20px);
  text-align: center;

  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

/* ikonka programu */
.em-program-icon {
  display: block;
  margin: 0 auto 12px;
  width: clamp(56px, 18vw, 92px);
  height: auto;
}

.em-program-card h3,
.em-program-title {
  font-family: "Libre Baskerville", serif;
  font-weight: bolder;
  font-size: clamp(1.05rem, 1.2vw, 1.18rem);
  line-height: 1.25;
  margin-bottom: 4px;
  color: #ba8913;
}

.em-program-text {
  font-size: clamp(0.98rem, 1.05vw, 1.06rem);
  line-height: 1.7;
  color: #333;
}

/* 4) Czarna sekcja 10% + zdjęcie */
.em-cta10 {
  background: #0f0f0f;
}

.em-cta10-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
}

.em-cta10-title {
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  line-height: 1.12;
  margin-bottom: 14px;
  font-family: "Libre Baskerville", serif;
  font-weight: bolder;
}

.em-cta10-text {
  max-width: 60ch;
  opacity: 0.95;
  margin-bottom: 18px;
  text-align: center;
  font-size: clamp(1.02rem, 1.15vw, 1.15rem);
  line-height: 1.8;
}

.em-cta10-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.em-cta10-photo {
  display: flex;
  justify-content: flex-end;
}

.em-cta10-photo img {
  max-width: 420px;
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
}

/* 5) Jasna sekcja “Im wcześniej…” */
.em-early {
  background: url("/img/emerytura/em-tl3.webp") center/cover no-repeat;
  position: relative;
}

.em-early.section-light {
  background: url("/img/emerytura/em-tl3.webp") center/cover no-repeat;
  background-color: transparent;
  position: relative;
  overflow: hidden;
  min-height: 420px;
  padding: 4rem 0;
}

.em-early.section-light::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.18);
  pointer-events: none;
}

.em-early-inner {
  position: relative;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.em-early-title {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.15;
  font-family: "Libre Baskerville", serif;
  font-weight: bolder;
}

.em-early-text {
  font-size: clamp(1.0rem, 1.1vw, 1.1rem);
  line-height: 1.6;
  max-width: 60ch;
  margin: 0 auto;
}

/* ===================== RESPONSYWNOŚĆ ===================== */

/* TABLET */
@media (max-width: 1024px){
  .em-hero-inner{
    grid-template-columns: 1fr;
    text-align: center;
  }

  .em-hero-photo{
    justify-content: center;
  }

  .em-hero-content{
    min-height: auto;
    max-height: none;
  }
}

/* MOBILE */
@media (max-width: 900px) {
  .em-hero {
    min-height: 100svh;
  }

  .em-hero-inner {
    display: flex;
    flex-direction: column;
    text-align: center;

    min-height: 100svh;

    padding: 64px 0 0;
    
    gap: 24px;
  }

  .em-hero-content {
    padding: 26px 20px;
    min-height: unset;
    max-width: none;
    margin: 0 auto;
  }

  .em-hero-photo {
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;

    padding-bottom: 0;
  }

  .em-hero-photo img {
    width: min(360px, 85%);
    max-width: 85%;
    height: auto;
  }

  .em-hero-title {
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.05;
  }

  .em-cta10-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .em-programs-grid {
    grid-template-columns: 1fr;
  }

  .em-infobox {
    padding: 50px 0;
  }

  .em-infobox-card {
    padding: 22px 18px;
  }

  .em-infobox-title {
    font-size: 1.45rem;
  }
}


/* === EM EARLY – usuń nadmiar pustej przestrzeni === */
.em-early.section-light {
  min-height: auto;        /* 🔥 usuwa sztuczną wysokość */
  padding-top: 4rem;       /* kontrolowana góra */
  padding-bottom: 4rem;    /* kontrolowany dół */
}

@media (max-width: 900px) {
  .em-hero-inner { padding-top: 0; }
  .em-hero-content { padding-top: 0; }
}

@media (max-width: 900px) {
  .em-hero-inner {
    padding-top: 0;     /* zostaje: bez odstępu u góry */
    gap: 0;             /* opcjonalnie: mniej przerwy między czarnym a zdjęciem */
  }

  .em-hero-content {
    padding-top: 0;     /* zostaje */
    min-height: 55vh;   /* <-- tu zwiększasz czarny panel */
  }
}


/* EM EARLY – ciaśniej tylko na mobile */
@media (max-width: 768px) {
  .em-early.section-light {
    padding-top: 1.5rem;   /* było 4rem */
    padding-bottom: 1.5rem;
  }

  .em-early-title {
    margin-bottom: 0.75rem; /* zmniejszamy odstęp pod nagłówkiem */
  }
}


/* ===================== EM HERO – bez szczeliny pod headerem + lekki padding mobile ===================== */

/* usuń jakąkolwiek przerwę między sticky headerem a pierwszą sekcją */
.em-hero{
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* panel czarny ma border – robi “cienką linię” na styku z headerem */
.em-hero-content{
  border-top: 0 !important; /* zostawia boki/dół, zabija linię u góry */
}

/* MOBILE / TABLET: wywal padding-top, który spycha czarną sekcję w dół */
@media (max-width: 900px){
  .em-hero-inner{
    padding-top: 0 !important;      /* było 64px/0 w różnych miejscach */
  }

  /* lekki padding na mobile (żeby tekst nie kleił się do krawędzi) */
  .em-hero-content{
    padding: 22px 16px 26px !important;  /* możesz zmienić np. na 20px */
  }
}

/* jeszcze ciaśniej na małych ekranach */
@media (max-width: 480px){
  .em-hero-content{
    padding: 20px 14px 24px !important;
  }
}
