
/* REFERENCIAMUNKÁK */

.hb-references,
.hb-references * {
  box-sizing: border-box;
}

.hb-references {
  position: relative;
  background: #fff;
  padding: 110px 24px 90px;
  overflow: hidden;
}

.hb-references__inner {
  position: relative;
  max-width: 1500px;
  margin: 0 auto;
  min-height: 700px;
}

/* CÍMSOR */

.hb-references__heading {
  position: relative;
  z-index: 3;
  max-width: 570px;
}

.hb-references__eyebrow {
  color: #5bbd00;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
}

.hb-references__heading h2 {
  margin: 18px 0;
  color: #111713;
  font-size: clamp(32px, 3.5vw, 54px);
  font-weight: 900;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -2px;
}

.hb-references__heading h2 em {
  color: #75ed00;
  font-style: inherit;
}

.hb-references__heading p {
  max-width: 450px;
  margin: 0;
  color: #69716b;
  font-size: 16px;
  line-height: 1.6;
}

/* ASZIMMETRIKUS GALÉRIA */

.hb-references__gallery {
  position: relative;
  height: 550px;
  margin-top: -125px;
}

.hb-references__photo {
  position: absolute;
  overflow: hidden;
  background: #eef0ec;
  clip-path: polygon(11% 5%, 100% 0, 88% 100%, 0 100%);
  border-radius: 18px;
}

.hb-references__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.hb-references__photo:hover img {
  transform: scale(1.06);
}


/* A NÉGY KÉP ELHELYEZÉSE */

.hb-references__photo--1 {
  left: 0;
  top: 220px;
  width: 33%;
  height: 310px;
}

.hb-references__photo--2 {
  left: 34%;
  top: 0;
  width: 35%;
  height: 530px;
}

.hb-references__photo--3 {
  left: 71%;
  top: 60px;
  width: 17%;
  height: 245px;
}

.hb-references__photo--4 {
  left: 81%;
  top: 285px;
  width: 19%;
  height: 220px;
}


/* KÉPALÁÍRÁSOK */

.hb-references__caption {
  position: absolute;
  bottom: 18px;
  left: 12%;
  right: 12%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255,255,255,.86);
  border-radius: 8px;
}

.hb-references__caption > span {
  color: #9da49e;
  font-size: 32px;
  font-weight: 900;
}

.hb-references__caption strong,
.hb-references__caption small {
  display: block;
}

.hb-references__caption strong {
  color: #171c19;
  font-size: 12px;
}

.hb-references__caption small {
  margin-top: 3px;
  color: #69716b;
  font-size: 11px;
}

/* NEONVONAL */

.hb-references__neon {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hb-references__neon-glow,
.hb-references__neon-line {
  fill: none;
  stroke-linecap: round;
}


.hb-references__neon-glow {
  stroke: #75ff00;
  stroke-width: 7;
  opacity: .18;
  filter: blur(7px);
}

.hb-references__neon-line {
  stroke: #75ff00;
  stroke-width: 2;
  opacity: .85;
  filter: drop-shadow(0 0 4px #75ff00);
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: hb-reference-draw 2.5s ease forwards;
}


@keyframes hb-reference-draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* LAPOZÓGOMBOK */

.hb-references__footer {
  position: relative;
  z-index: 4;
  margin-top: 30px;
}

.hb-references__navigation {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hb-references__navigation button {
  width: 48px;
  height: 48px;
  border: 1px solid #e6eae5;
  border-radius: 50%;
  background: #fff;
  color: #111713;
  font-size: 25px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,.08);
}

.hb-references__counter {
  margin-left: 15px;
  color: #69cb00;
  font-size: 14px;
  font-weight: 800;
}

/* REFERENCIÁK ALSÓ RÉSZE */

.hb-references__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.hb-references__all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 16px 24px;
  border: 1.5px solid #76e900;
  border-radius: 4px;
  color: #171c19;
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  transition: background .25s ease, color .25s ease;
}

.hb-references__all:hover {
  background: #76e900;
  color: #111;
}

.hb-references__all span {
  font-size: 22px;
  line-height: 1;
}



/* MOBIL ELRENDEZÉS */

@media (max-width: 700px) {
  .hb-references__footer {
    flex-wrap: wrap;
  }

  .hb-references__all {
    width: 100%;
  }

}

/* TABLET ÉS MOBIL */

@media (max-width: 900px) {
  .hb-references {
    padding: 70px 20px;
  }

  .hb-references__inner {
    min-height: 0;
  }

  .hb-references__gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 16px;
    height: auto;
    margin-top: 40px;
  }

  .hb-references__photo {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: 300px;
  }

  .hb-references__neon {
    display: none;
  }
}

@media (max-width: 550px) {
  .hb-references__gallery {
    grid-template-columns: 1fr;
  }

  .hb-references__photo {
    height: 270px;
  }

  .hb-references__heading h2 {
    letter-spacing: -1px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hb-references__neon-line {
    animation: none;
    stroke-dashoffset: 0;
  }

  .hb-references__photo img {
    transition: none;
  }
}

/* =========================================
   REFERENCIÁK – ÚJ VIZUÁLIS ELRENDEZÉS
========================================= */

@media (min-width: 901px) {

  .hb-references {
    padding: 80px 24px 70px;
  }

  .hb-references__inner {
    max-width: 1800px;
    min-height: 0;
  }

  /* Kompakt címsor */

  .hb-references__heading {
    max-width: 540px;
  }

  .hb-references__heading h2 {
    font-size: clamp(24px, 2.2vw, 42px);
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin: 14px 0 10px;
  }

  .hb-references__heading p {
    max-width: 390px;
    font-size: 14px;
    line-height: 1.5;
  }

  /* Galéria */

  .hb-references__gallery {
    height: clamp(360px, 34vw, 580px);
    margin-top: -145px;
  }

  .hb-references__photo {
    clip-path: polygon(
      16% 15%,
      100% 0,
      84% 100%,
      0 100%
    );
    border-radius: 16px;
  }

  /* Első kép */

  .hb-references__photo--1 {
    left: 0;
    top: 36%;
    width: 34%;
    height: 64%;
  }

  /* Második kép */

  .hb-references__photo--2 {
    left: 30%;
    top: 0;
    width: 31%;
    height: 100%;
  }

  /* Harmadik kép */

  .hb-references__photo--3 {
    left: 57%;
    top: 7%;
    width: 25%;
    height: 93%;
  }

  /* Negyedik kép */

  .hb-references__photo--4 {
    left: 78%;
    top: 19%;
    width: 22%;
    height: 81%;
  }

  /* Fehérbe átmenetes képalj */

  .hb-references__photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      #fff 0%,
      rgba(255,255,255,.95) 8%,
      rgba(255,255,255,.65) 20%,
      rgba(255,255,255,0) 42%
    );
    pointer-events: none;
  }

  /* Képfeliratok */

  .hb-references__caption {
    z-index: 1;
    bottom: 12px;
    left: 9%;
    right: 18%;
    padding: 0;
    gap: 12px;
    background: transparent;
    border-radius: 0;
  }

  .hb-references__caption > span {
    color: #c5c9c6;
    font-size: clamp(28px, 3vw, 54px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
  }

  .hb-references__caption > div {
    border-left: 1px solid #75ed00;
    padding-left: 12px;
  }

  .hb-references__caption strong {
    font-size: 13px;
    font-weight: 800;
    color: #111713;
  }

  .hb-references__caption small {
    font-size: 11px;
    color: #69716b;
  }

  /* Erősebb neonragyogás */

  .hb-references__neon-glow {
    stroke-width: 14;
    opacity: .4;
    filter: blur(9px);
  }

  .hb-references__neon-line {
    stroke-width: 3;
    opacity: 1;
    filter:
      drop-shadow(0 0 4px #75ff00)
      drop-shadow(0 0 9px #75ff00);
  }

  /* Középre igazított lapozás */

  .hb-references__footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-top: 24px;
  }

  .hb-references__navigation {
    grid-column: 2;
    gap: 18px;
  }

  .hb-references__prev {
    order: 1;
  }

  .hb-references__counter {
    order: 2;
    margin-left: 0;
  }

  .hb-references__next {
    order: 3;
  }

  .hb-references__all {
    grid-column: 3;
    justify-self: end;
  }

}

/* =========================================
   REFERENCIÁK – SZÉLESSÉG ÉS KÉPSZÉLEK
========================================= */

@media (min-width: 901px) {

  /* Nagyobb oldalsó margók */

  .hb-references {
    padding-left: 6%;
    padding-right: 6%;
  }

  .hb-references__inner {
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Szürkés körvonal eltávolítása */

  .hb-references__photo {
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 0;
  }

  /* A képek alja teljesen beleolvad a háttérbe */

  .hb-references__photo img {
    -webkit-mask-image: linear-gradient(
      to bottom,
      #000 65%,
      transparent 100%
    );

    mask-image: linear-gradient(
      to bottom,
      #000 65%,
      transparent 100%
    );
  }

  .hb-references__photo::after {
    background: none;
  }

}

/* =========================================
   REFERENCIÁK – MÁSODIK OLDAL
========================================= */

@media (min-width: 901px) {

  /* 05 – Széles, alacsonyabb kép */

  .hb-references__gallery[data-page="1"]
  .hb-references__photo--1 {
    left: 0;
    top: 43%;
    width: 34%;
    height: 57%;

    clip-path: polygon(
      15% 20%,
      100% 0,
      83% 100%,
      0 100%
    );
  }

  /* 06 – Magas, balra döntött kép */

  .hb-references__gallery[data-page="1"]
  .hb-references__photo--2 {
    left: 30%;
    top: 12%;
    width: 30%;
    height: 88%;

    clip-path: polygon(
      18% 14%,
      100% 0,
      82% 100%,
      0 100%
    );
  }

  /* 07 – Ellentétes felső dőlésszög */

  .hb-references__gallery[data-page="1"]
  .hb-references__photo--3 {
    left: 56%;
    top: 0;
    width: 27%;
    height: 100%;

    clip-path: polygon(
      18% 0,
      100% 14%,
      81% 100%,
      0 100%
    );
  }

  /* 08 – Emelkedő felső képszél */

  .hb-references__gallery[data-page="1"]
  .hb-references__photo--4 {
    left: 79%;
    top: 18%;
    width: 21%;
    height: 82%;

    clip-path: polygon(
      19% 22%,
      100% 0,
      84% 100%,
      0 100%
    );
  }

}
