/*
 * Home page styles.
 * Loaded only on front-page.php.
 */

/* Shared */
.pm-section-has-custom-bg {
  background-repeat: no-repeat;
  background-size: 100% auto;
}

.pm-home-section-title,
.pm-home-hero__title {
  margin: 0;
  color: #f45f48;
  font-family: var(--pm-font-heading);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.pm-home-section-title {
  font-size: clamp(2.2rem, 4vw, 4rem);
  text-align: center;
}

.pm-home-section-lead {
  max-width: 860px;
  margin: 0 auto;
  color: #2f3b4a;
  font-size: clamp(19px, 1.28vw, 22px);
  font-weight: 600;
  line-height: 1.7;
  text-align: center;
}

/* Hero */
.pm-home-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3.5vw, 48px) 0 clamp(42px, 4.8vw, 68px);
  background-color: #fff7f0;
  background-position: center top;
}

.pm-home-hero > .container.pm-home-hero__inner,
.pm-home-hero > .pm-home-hero__inner {
  width: min(calc(100% - 40px), 1360px);
}

.pm-home-hero__inner {
  display: grid;
  grid-template-columns: minmax(440px, 0.86fr) minmax(560px, 1.14fr);
  gap: clamp(34px, 4.5vw, 72px);
  align-items: center;
  margin-bottom: 0;
}

.pm-home-hero__content {
  position: relative;
  z-index: 5;
  max-width: 780px;
  min-width: 0;
}

.pm-home-hero__title {
  max-width: 780px;
  font-size: clamp(2.7rem, 3.2vw, 3.9rem);
  line-height: 1.08;
  text-align: left;
  overflow: visible;
}

.pm-home-hero__title span {
  display: block;
  white-space: nowrap;
}

.pm-home-hero__lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: #563225;
  font-size: clamp(1.15rem, 1.35vw, 1.42rem);
  font-weight: 600;
  line-height: 1.8;
}

.pm-home-hero__visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: clamp(460px, 37vw, 660px);
}

.pm-home-hero__side-image,
.pm-home-hero__visual img,
.pm-home-hero__visual .pm-home-hero__side-image {
  position: relative;
  z-index: 2;
  display: block;
  width: min(118%, 1060px);
  max-width: none;
  height: auto;
  max-height: 740px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 26px 34px rgba(244, 95, 72, 0.13)) drop-shadow(0 10px 18px rgba(86, 50, 37, 0.08));
}

.pm-home-hero__cloud {
  display: none;
}


/* Values */
.pm-home-values-section {
  padding: clamp(46px, 5vw, 70px) 0 clamp(60px, 6vw, 86px);
  background-color: #fffaf3;
  background-position: center top;
}

.pm-home-values-section__heading {
  margin-bottom: clamp(34px, 4vw, 52px);
  text-align: center;
}

.pm-home-hero__cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
  margin-top: 0;
}

.pm-home-hero-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 245px;
  padding: 38px 28px 30px;
  border: 1px solid rgba(255, 160, 130, 0.35);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 40px rgba(78, 46, 29, 0.06);
  text-align: center;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.pm-home-hero-card:hover,
.pm-home-hero-card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(255, 160, 130, 0.55);
  box-shadow: 0 22px 48px rgba(78, 46, 29, 0.1);
}

.pm-home-hero-card::before,
.pm-home-hero-card::after {
  position: absolute;
  z-index: 0;
  display: block;
  width: 44px;
  height: 35px;
  pointer-events: none;
  content: "";
  background-image: url("../img/butterfly-pink-card.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.72;
}

.pm-home-hero-card > * {
  position: relative;
  z-index: 1;
}

.pm-home-hero-card:nth-child(1)::before {
  top: 18px;
  right: 22px;
  width: 46px;
  height: 36px;
  transform: rotate(13deg);
}

.pm-home-hero-card:nth-child(1)::after {
  left: 22px;
  bottom: 22px;
  width: 38px;
  height: 30px;
  opacity: 0.62;
  transform: rotate(-17deg) scaleX(-1);
}

.pm-home-hero-card:nth-child(2)::before {
  top: 28px;
  right: 26px;
  width: 42px;
  height: 33px;
  opacity: 0.64;
  transform: rotate(-11deg) scaleX(-1);
}

.pm-home-hero-card:nth-child(2)::after {
  left: 24px;
  bottom: 24px;
  width: 44px;
  height: 35px;
  transform: rotate(9deg);
}

.pm-home-hero-card:nth-child(3)::before {
  top: 20px;
  right: 20px;
  width: 40px;
  height: 32px;
  opacity: 0.58;
  transform: rotate(22deg);
}

.pm-home-hero-card:nth-child(3)::after {
  right: 28px;
  bottom: 18px;
  left: auto;
  width: 45px;
  height: 36px;
  transform: rotate(-15deg) scaleX(-1);
}

.pm-home-hero-card:nth-child(4)::before {
  top: 22px;
  right: 20px;
  width: 48px;
  height: 38px;
  transform: rotate(-8deg);
}

.pm-home-hero-card:nth-child(4)::after {
  left: 26px;
  bottom: 24px;
  width: 36px;
  height: 29px;
  opacity: 0.54;
  transform: rotate(18deg) scaleX(-1);
}

.pm-home-hero-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 124px;
  height: 124px;
  margin-bottom: 26px;
  border-radius: 58% 42% 55% 45% / 45% 56% 44% 55%;
}

.pm-home-hero-card:hover .pm-home-hero-card__icon,
.pm-home-hero-card:focus-within .pm-home-hero-card__icon {
  animation: pmHeroCardIconFloat 1.8s ease-in-out infinite;
}

.pm-home-hero-card__icon svg {
  width: 64px;
  height: 64px;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pm-home-hero-card__icon--custom {
  overflow: hidden;
}

.pm-home-hero-card__custom-icon {
  display: block;
  width: 98px;
  height: 98px;
  max-width: 98px;
  max-height: 98px;
  object-fit: contain;
  border: 0;
  padding: 0;
  background: transparent;
}

.pm-home-hero-card--coral .pm-home-hero-card__icon {
  color: #f45f48;
  background: #ffe6df;
}

.pm-home-hero-card--yellow .pm-home-hero-card__icon {
  color: #936b00;
  background: #fff3c8;
}

.pm-home-hero-card--green .pm-home-hero-card__icon {
  color: #48a56d;
  background: #e6f4ea;
}

.pm-home-hero-card--blue .pm-home-hero-card__icon {
  color: #3c94cd;
  background: #e5f3fb;
}

.pm-home-hero-card h3,
.pm-home-hero-card__title {
  margin: 0;
  color: #472313;
  font-family: var(--pm-font-display);
  font-size: clamp(1.28rem, 1.55vw, 1.65rem);
  line-height: 1.2;
}

.pm-home-hero-card__line {
  display: block;
  width: 34px;
  height: 4px;
  margin: 18px auto;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.65;
}

.pm-home-hero-card p {
  margin: 0;
  color: #4e3a31;
  font-size: 1rem;
  line-height: 1.65;
}

@keyframes pmHeroCardIconFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-5px) rotate(-2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pm-home-hero-card,
  .pm-home-hero-card__icon {
    transition: none;
    animation: none;
  }
}

/* Latest posts */
.home-latest-posts-section {
  background-position: center bottom;
}

.posts-section .posts-section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 42px;
  text-align: center;
}

.posts-section .posts-section-heading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.home-latest-posts-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-latest-posts-grid--6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.posts-section .post-card {
  border: 1px solid rgba(242, 107, 79, 0.14);
  background: #fffdfb;
  box-shadow: 0 14px 35px rgba(120, 70, 45, 0.1);
}

.posts-section .posts-section-more {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 44px;
  text-align: center;
}

.posts-section .posts-section-more .btn {
  margin-inline: auto;
}

/* Recruitment CTA */
.cta-section.home-recruitment-cta {
  padding-top: 56px;
  padding-bottom: 190px;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% auto;
}

.cta-section.home-recruitment-cta .home-recruitment-cta-heading {
  margin-bottom: 0;
  text-align: center;
}

.cta-section.home-recruitment-cta .pm-home-section-title {
  max-width: 920px;
  margin: 0 auto 24px;
  line-height: 1.08;
}

.cta-section.home-recruitment-cta .pm-home-section-lead {
  max-width: 860px;
  margin: 0 auto;
  color: #2f3b4a;
  font-size: clamp(19px, 1.28vw, 22px);
  font-weight: 600;
  line-height: 1.7;
  text-align: center;
}

.home-recruitment-docs-wrap {
  margin-top: 34px;
}

.home-recruitment-docs-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 220px));
  gap: 16px;
  align-items: stretch;
  justify-content: center;
  max-width: 1180px;
  margin-inline: auto;
}

.home-recruitment-doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 330px;
  padding: 22px 18px 24px;
  box-sizing: border-box;
  color: #172536;
  text-align: center;
  text-decoration: none;
  border: 1px solid rgba(242, 107, 79, 0.18);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(21, 38, 56, 0.065);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-recruitment-doc:hover {
  transform: translateY(-3px);
  border-color: rgba(242, 107, 79, 0.32);
  box-shadow: 0 14px 34px rgba(21, 38, 56, 0.085);
}

.home-recruitment-doc .recruitment-doc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 126px;
  margin-bottom: 16px;
}

.home-recruitment-doc .recruitment-doc-icon img {
  display: block;
  width: auto;
  max-width: 128px;
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.12));
  transition: transform 0.22s ease, filter 0.22s ease;
}

.home-recruitment-doc:hover .recruitment-doc-icon img {
  transform: translateY(-4px) scale(1.05);
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.16));
}

.home-recruitment-doc .recruitment-doc-title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 192px;
  min-height: 86px;
  margin: 0 auto 18px;
  color: #172536;
  font-family: var(--pm-font-heading);
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

.home-recruitment-doc::after {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: auto;
  padding: 10px 18px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  content: "Pobierz PDF →";
  border-radius: 999px;
  background: linear-gradient(135deg, #e8795f 0%, #cc4b33 100%);
  box-shadow: 0 8px 18px rgba(242, 107, 79, 0.18);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.home-recruitment-doc:hover::after {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #e36d53 0%, #cc4b33 100%);
  box-shadow: 0 10px 22px rgba(242, 107, 79, 0.24);
}

/* Responsive */
@media (max-width: 1180px) {
  .pm-home-hero > .container.pm-home-hero__inner,
  .pm-home-hero > .pm-home-hero__inner {
    width: min(calc(100% - 40px), var(--pm-container));
  }

  .pm-home-hero__inner {
    grid-template-columns: 1fr;
  }

  .pm-home-hero__content {
    max-width: 100%;
    text-align: center;
  }

  .pm-home-hero__title {
    max-width: 12.5ch;
    margin-inline: auto;
  }

  .pm-home-hero__title span {
    white-space: normal;
  }

  .pm-home-hero__lead {
    margin-inline: auto;
  }

  .pm-home-hero__visual {
    max-width: 940px;
    min-height: 0;
    margin-inline: auto;
  }

  .pm-home-hero__visual .pm-home-hero__side-image,
  .pm-home-hero__visual img {
    width: min(100%, 940px);
    max-width: 100%;
    max-height: 680px;
  }

  .pm-home-hero__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-latest-posts-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-recruitment-docs-grid {
    grid-template-columns: repeat(2, minmax(0, 220px));
    max-width: 720px;
    gap: 18px;
  }
}

@media (max-width: 1024px) {
  .pm-home-hero__title,
  .pm-home-section-title {
    font-size: clamp(2.4rem, 7vw, 4rem);
  }
}

@media (max-width: 900px) {
  .cta-section.home-recruitment-cta {
    padding-top: 44px;
    padding-bottom: 150px;
  }

  .cta-section.home-recruitment-cta .pm-home-section-title {
    margin-bottom: 18px;
  }

  .cta-section.home-recruitment-cta .home-recruitment-docs-wrap {
    margin-top: 28px;
  }
}

@media (max-width: 760px) {
  .pm-home-hero {
    padding-top: 34px;
    padding-bottom: 42px;
  }

  .pm-home-hero > .container.pm-home-hero__inner,
  .pm-home-hero > .pm-home-hero__inner {
    width: min(calc(100% - 28px), var(--pm-container));
  }

  .pm-home-hero__visual .pm-home-hero__side-image,
  .pm-home-hero__visual img {
    width: 100%;
    max-height: none;
  }

  .pm-home-values-section {
    padding: 42px 0 58px;
  }

  .pm-home-values-section__heading {
    margin-bottom: 28px;
  }

  .pm-home-hero__cards {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .pm-home-hero-card__icon {
    width: 108px;
    height: 108px;
  }

  .pm-home-hero-card__icon svg {
    width: 56px;
    height: 56px;
  }

  .pm-home-hero-card__custom-icon {
    width: 86px;
    height: 86px;
    max-width: 86px;
    max-height: 86px;
  }
}

@media (max-width: 720px) {
  .home-latest-posts-grid--4,
  .home-latest-posts-grid--6 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .pm-home-hero__title,
  .pm-home-section-title {
    font-size: clamp(2.05rem, 10vw, 3rem);
    line-height: 1.08;
  }

  .cta-section.home-recruitment-cta {
    padding-top: 36px;
    padding-bottom: 120px;
  }

  .cta-section.home-recruitment-cta .pm-home-section-lead {
    font-size: 17px;
    line-height: 1.6;
  }

  .home-recruitment-docs-grid {
    grid-template-columns: minmax(0, 360px);
    max-width: 360px;
    gap: 24px;
  }

  .home-recruitment-doc {
    min-height: 315px;
  }

  .home-recruitment-doc .recruitment-doc-icon {
    min-height: 116px;
  }

  .home-recruitment-doc .recruitment-doc-icon img {
    max-width: 118px;
  }

  .home-recruitment-doc .recruitment-doc-title {
    min-height: 72px;
  }
}


/* Contrast improvement */
.news-card,.post-card,.pm-post-card{background:#fff!important;border:1px solid rgba(0,0,0,.06)!important;box-shadow:0 10px 30px rgba(0,0,0,.06)!important;}


/* Homepage heading normalization
 * Keeps all main headings on the front page visually consistent:
 * hero title, latest posts heading and recruitment heading.
 */
.pm-home-hero__title,
.pm-home-section-title,
.posts-section .pm-home-section-title,
.cta-section.home-recruitment-cta .pm-home-section-title {
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.pm-home-hero__title {
  max-width: 780px;
}

.pm-home-section-title,
.posts-section .pm-home-section-title,
.cta-section.home-recruitment-cta .pm-home-section-title {
  max-width: 920px;
}

@media (max-width: 1024px) {
  .pm-home-hero__title,
  .pm-home-section-title,
  .posts-section .pm-home-section-title,
  .cta-section.home-recruitment-cta .pm-home-section-title {
    font-size: clamp(2.2rem, 6.4vw, 3.6rem);
    line-height: 1.12;
  }
}

@media (max-width: 640px) {
  .pm-home-hero__title,
  .pm-home-section-title,
  .posts-section .pm-home-section-title,
  .cta-section.home-recruitment-cta .pm-home-section-title {
    font-size: clamp(2rem, 9vw, 2.8rem);
    line-height: 1.12;
  }
}


/* Fix values section */
.pm-home-values-section__heading,
.pm-home-values-section .pm-home-section-title{
    text-align:center !important;
    width:100%;
    margin-left:auto;
    margin-right:auto;
}

/* Remove decorative butterflies inside cards */
.pm-home-hero-card::before,
.pm-home-hero-card::after{
    display:none !important;
    content:none !important;
}
