/*
 * Hibot Services: styles of the components used in the page HTML of
 * services and case studies (tank heating coil section, case study cards,
 * case study pages). Loaded on the pages the plugin renders.
 */

/*
 * SQUID service page: tank heating coil application and case
 * studies. Same look as the theme's product sections: dark background,
 * Roboto Slab, headings with the orange bar.
 *
 * Sizes follow the theme: 1rem = 10px at 1440px wide on desktop and at
 * 390px wide on mobile.
 */

/* -------------------------------------------------------------------------
 * Tank heating coils
 * ---------------------------------------------------------------------- */

.hb-coil {
  padding: 6rem 5rem 4rem; /* the boiler section below adds its own top padding */
}

.hb-coil h2,
.hb-coil h3.hb-coil__subttl,
.hb-cases h2 {
  border-left: .4rem solid #FF521C;
  padding-left: 1rem;
  color: #fff;
  font-weight: 400;
  line-height: 1.3em;
}

.hb-coil h2 {
  margin-bottom: 2.4rem;
  font-size: 2.7rem;
}

.hb-coil__intro {
  display: flex;
  align-items: flex-start;
  gap: 6rem;
}

.hb-coil__txt {
  flex: 1;
  padding-top: .4rem;
}

.hb-coil__txt p {
  color: #fff;
  font-size: 1.5rem;
  line-height: 1.86em;
}

.hb-coil__txt p + p {
  margin-top: 1.6rem;
}

.hb-coil__txt p.hb-coil__lead {
  margin-top: 2.6rem;
  color: #FF521C;
  font-size: 1.9rem;
  line-height: 1.5em;
}

.hb-coil__photo {
  flex-shrink: 0;
  width: 61rem;
}

.hb-coil__photo img {
  display: block;
  width: 100%;
  height: auto; /* the height attribute would win otherwise */
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: 50% 45%;
}

.hb-coil__photo figcaption {
  margin-top: 1rem;
  color: rgba(255, 255, 255, .6);
  font-size: 1.2rem;
  line-height: 1.5em;
}

/* Three steps */
.hb-coil__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem;
  margin-top: 6rem;
}

.hb-coil__steps li {
  padding: 2.4rem 2.8rem 3rem;
  border-top: .2rem solid #FF521C;
  background-color: rgba(0, 0, 0, .18);
}

.hb-coil__steps .hb-coil__num {
  display: block;
  margin-bottom: 1.4rem;
  color: #FF521C;
  font-size: 3.6rem;
  font-weight: 300;
  line-height: 1;
}

.hb-coil__steps h3 {
  margin-bottom: .8rem;
  color: #fff;
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.4em;
}

.hb-coil__steps p {
  color: rgba(255, 255, 255, .8);
  font-size: 1.4rem;
  line-height: 1.7em;
}

/* Comparison table and candidate checklist */
.hb-coil__compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8rem;
  margin-top: 7rem;
}

.hb-coil h3.hb-coil__subttl {
  margin-bottom: 2.4rem;
  font-size: 2.2rem;
}

.hb-coil__table {
  width: 100%;
  border-collapse: collapse;
}

.hb-coil__table th,
.hb-coil__table td {
  padding: 1.2rem 1rem 1.2rem 0;
  border-bottom: .1rem dotted rgba(255, 255, 255, .4);
  color: rgba(255, 255, 255, .8);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.5em;
  text-align: left;
  vertical-align: top;
}

.hb-coil__table thead th {
  padding-top: 0;
  color: #FF521C;
}

.hb-coil__table tbody th {
  width: 28%;
}

.hb-coil__table td + td {
  color: #fff;
  font-weight: 600;
}

.hb-coil__checklist li {
  position: relative;
  padding: .5rem 0 .5rem 2.6rem;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1.6em;
}

.hb-coil__checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #FF521C;
  font-size: 1.5rem;
}

.hb-coil__note {
  margin-top: 1.4rem;
  color: rgba(255, 255, 255, .6);
  font-size: 1.2rem;
  line-height: 1.6em;
}

/* -------------------------------------------------------------------------
 * Case studies
 * ---------------------------------------------------------------------- */

.hb-cases {
  padding: 6rem 5rem 8rem;
}

.hb-cases h2 {
  margin-bottom: 3rem;
  font-size: 3rem;
  letter-spacing: .02em;
}

.hb-case-card {
  display: flex;
  background-color: #fff;
  transition: opacity .4s;
}

.hb-case-card:hover {
  opacity: .85;
}

.hb-case-card__img {
  flex-shrink: 0;
  width: 48rem;
}

.hb-case-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hb-case-card__txt {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 5rem;
}

.hb-case-card__txt .hb-case-card__meta {
  margin-bottom: 1.4rem;
  color: #FF521C;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.hb-case-card__txt h3 {
  margin-bottom: 1.4rem;
  color: #37414F;
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.35em;
}

.hb-case-card__txt p {
  max-width: 64rem;
  margin-bottom: 2.2rem;
  color: #333;
  font-size: 1.5rem;
  line-height: 1.8em;
}

.hb-case-card__txt .hb-case-card__more {
  margin-bottom: 0;
  color: #FF521C;
  font-size: 1.4rem;
  font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Mobile
 * ---------------------------------------------------------------------- */

@media (max-width: 767px) {
  .hb-coil {
    padding: 4rem 2rem 2rem;
  }

  .hb-coil h2 {
    font-size: 2rem;
  }

  .hb-coil__intro {
    flex-direction: column;
    gap: 3rem;
  }

  .hb-coil__photo {
    width: 100%;
  }

  .hb-coil__txt p.hb-coil__lead {
    font-size: 1.7rem;
  }

  .hb-coil__steps {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    margin-top: 4rem;
  }

  .hb-coil__steps li {
    padding: 2rem 2rem 2.4rem;
  }

  .hb-coil__steps .hb-coil__num {
    font-size: 3rem;
  }

  .hb-coil__compare {
    grid-template-columns: 1fr;
    gap: 4.8rem;
    margin-top: 4.8rem;
  }

  .hb-coil h3.hb-coil__subttl {
    font-size: 2rem;
  }

  .hb-coil__table th,
  .hb-coil__table td {
    font-size: 1.3rem;
  }

  .hb-cases {
    padding: 4rem 2rem 5rem;
  }

  .hb-cases h2 {
    margin-bottom: 2rem;
    font-size: 2.4rem;
  }

  .hb-case-card {
    flex-direction: column;
  }

  .hb-case-card__img {
    width: 100%;
  }

  .hb-case-card__txt {
    padding: 2.4rem 2rem 2.8rem;
  }

  .hb-case-card__txt h3 {
    font-size: 2rem;
  }

  .hb-case-card__txt p {
    font-size: 1.4rem;
  }
}

/* Japanese: break lines between phrases, not inside words (Chrome/Edge). */
html[lang="ja"] .fv .squid-h6,
html[lang="ja"] .hb-coil h2,
html[lang="ja"] .hb-coil h3,
html[lang="ja"] .hb-case-card h3 {
  word-break: auto-phrase;
}
/*
 * Case study pages. Loaded after the
 * product-page stylesheet: dark background, Roboto Slab, orange accents.
 *
 * Sizes follow the theme: 1rem = 10px at 1440px wide on desktop and at
 * 390px wide on mobile. The theme also sets a font size on every inline
 * element (a, span, strong…), so nested ones repeat it with "inherit".
 */

/* -------------------------------------------------------------------------
 * Buttons
 * ---------------------------------------------------------------------- */

.hb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  height: 4.8rem;
  padding: 0 3rem;
  border: .1rem solid #FF521C;
  background-color: #FF521C;
  box-shadow: 0 .4rem .4rem rgba(0, 0, 0, .25);
  color: #fff;
  font-size: 1.5rem;
  white-space: nowrap;
  transition: opacity .4s;
}

.hb-btn:hover {
  opacity: .7;
}

.hb-btn--ghost {
  border-color: #fff;
  background-color: transparent;
  box-shadow: none;
}

.hb-btn img {
  width: 1.6rem;
}

/* -------------------------------------------------------------------------
 * Hero
 * ---------------------------------------------------------------------- */

.hb-case-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 40rem;
  padding: 12rem 5rem 5rem;
  overflow: hidden;
}

.hb-case-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

/* Darker on the left for the title, and at the top for the header. */
.hb-case-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(29, 33, 40, .55) 0, rgba(29, 33, 40, 0) 14rem),
    linear-gradient(90deg, rgba(29, 33, 40, .85) 0, rgba(29, 33, 40, .55) 45%, rgba(29, 33, 40, .2) 100%);
}

.hb-case-hero__txt {
  position: relative;
  z-index: 1;
}

.hb-breadcrumb {
  display: flex;
  gap: .8rem;
  margin-bottom: 1.6rem;
  color: rgba(255, 255, 255, .8);
  font-size: 1.3rem;
}

.hb-breadcrumb a,
.hb-breadcrumb span {
  color: inherit;
  font-size: inherit;
}

.hb-breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.hb-case-hero .hb-case-hero__meta {
  margin-bottom: 1.6rem;
  color: #FF8A5C;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
}

.hb-case-hero h1 {
  max-width: 70rem;
  color: #fff;
  font-size: 4.4rem;
  font-weight: 400;
  line-height: 1.25em;
}

/* The mobile layout shows the contact button in the hero. */
.hb-case-hero__btn {
  display: none;
}

/* -------------------------------------------------------------------------
 * Stat strip
 * ---------------------------------------------------------------------- */

.hb-stats {
  background-color: #FF521C;
}

.hb-stats ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.hb-stats li {
  padding: 3.6rem 3rem 3.8rem;
  border-left: .1rem solid rgba(255, 255, 255, .35);
  color: #fff;
}

.hb-stats li:first-child {
  padding-left: 5rem;
  border-left: 0;
}

.hb-stats strong {
  display: block;
  margin-bottom: 1rem;
  font-size: 4.4rem;
  font-weight: 600;
  line-height: 1.1em;
}

.hb-stats span {
  display: block;
  max-width: 24rem;
  font-size: 1.3rem;
  line-height: 1.5em;
}

.hb-stats .hb-stats__short {
  display: none;
}

/* -------------------------------------------------------------------------
 * Four-part story
 * ---------------------------------------------------------------------- */

.hb-story {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4rem;
  padding: 6rem 5rem 5rem;
}

.hb-story h2,
.hb-case-cta h2 {
  border-left: .4rem solid #FF521C;
  padding-left: 1rem;
  color: #fff;
  font-weight: 400;
  line-height: 1.3em;
}

.hb-story h2 {
  margin-bottom: 1.6rem;
  font-size: 2.2rem;
}

.hb-story p {
  color: rgba(255, 255, 255, .85);
  font-size: 1.4rem;
  line-height: 1.8em;
}

/* -------------------------------------------------------------------------
 * Evidence: C-scan and site photos
 * ---------------------------------------------------------------------- */

.hb-evidence {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 1.6rem;
  align-items: start;
  padding: 1rem 5rem 6rem;
}

.hb-evidence a {
  display: block;
  font-size: inherit;
  transition: opacity .4s;
}

.hb-evidence a:hover {
  opacity: .8;
}

.hb-evidence__scan a {
  padding: 1.2rem;
  background-color: #fff;
}

.hb-evidence__scan img {
  display: block;
  width: 100%;
  height: auto;
}

.hb-evidence__scan figcaption {
  margin-top: 1rem;
  color: rgba(255, 255, 255, .6);
  font-size: 1.2rem;
  line-height: 1.5em;
}

.hb-evidence__photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.hb-evidence__photos img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* -------------------------------------------------------------------------
 * Regional contact
 * ---------------------------------------------------------------------- */

.hb-case-cta {
  padding: 0 5rem 8rem;
}

.hb-case-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding: 3.6rem 4rem;
  border-left: .4rem solid #FF521C;
  background-color: rgba(0, 0, 0, .18);
}

.hb-case-cta h2 {
  margin-bottom: 1.2rem;
  padding-left: 0;
  border-left: 0;
  font-size: 2.4rem;
}

.hb-case-cta p {
  color: rgba(255, 255, 255, .85);
  font-size: 1.4rem;
  line-height: 1.7em;
}

.hb-case-cta .hb-case-cta__contact {
  margin-top: .8rem;
  color: #fff;
}

.hb-case-cta__contact strong,
.hb-case-cta__contact a {
  color: #fff;
  font-size: inherit;
}

.hb-case-cta__contact strong {
  font-weight: 600;
}

.hb-case-cta__btns {
  display: flex;
  flex-shrink: 0;
  gap: 1.6rem;
}

/* -------------------------------------------------------------------------
 * Mobile
 * ---------------------------------------------------------------------- */

@media (max-width: 767px) {
  .hb-btn {
    height: 4.4rem;
    padding: 0 2rem;
    font-size: 1.4rem;
  }

  .hb-case-hero {
    min-height: 44rem;
    padding: 10rem 2rem 4rem;
  }

  .hb-case-hero::after {
    background:
      linear-gradient(180deg, rgba(29, 33, 40, .6) 0, rgba(29, 33, 40, 0) 12rem),
      linear-gradient(0deg, rgba(29, 33, 40, .85) 0, rgba(29, 33, 40, .35) 100%);
  }

  .hb-breadcrumb {
    display: none;
  }

  .hb-case-hero .hb-case-hero__meta {
    font-size: 1.1rem;
  }

  .hb-case-hero h1 {
    font-size: 2.8rem;
  }

  .hb-case-hero__btn {
    display: inline-flex;
    margin-top: 2.4rem;
  }

  .hb-stats ul {
    grid-template-columns: 1fr 1fr;
  }

  .hb-stats li,
  .hb-stats li:first-child {
    padding: 2rem;
  }

  .hb-stats li:nth-child(odd) {
    border-left: 0;
  }

  .hb-stats li:nth-child(n + 3) {
    border-top: .1rem solid rgba(255, 255, 255, .35);
  }

  .hb-stats strong {
    margin-bottom: .6rem;
    font-size: 2.8rem;
  }

  .hb-stats span {
    font-size: 1.2rem;
  }

  .hb-stats .hb-stats__long {
    display: none;
  }

  .hb-stats .hb-stats__short {
    display: block;
  }

  .hb-story {
    grid-template-columns: 1fr;
    gap: 3.2rem;
    padding: 4rem 2rem;
  }

  .hb-story h2 {
    margin-bottom: 1.2rem;
    font-size: 2rem;
  }

  .hb-evidence {
    grid-template-columns: 1fr;
    gap: 2.4rem;
    padding: 0 2rem 4rem;
  }

  .hb-evidence__photos {
    gap: .8rem;
  }

  .hb-case-cta {
    padding: 0 2rem 5rem;
  }

  .hb-case-cta__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 2.4rem;
    padding: 2.8rem 2rem;
  }

  .hb-case-cta h2 {
    font-size: 2rem;
  }

  .hb-case-cta__btns {
    flex-direction: column;
    gap: 1.2rem;
  }
}

/* Japanese: break lines between phrases, not inside words (Chrome/Edge;
   other browsers keep the default). Avoids a lone character on the last line. */
html[lang="ja"] .hb-case-hero h1,
html[lang="ja"] .hb-stats span,
html[lang="ja"] .hb-case-cta h2 {
  word-break: auto-phrase;
}
