/***********************************************
* BEST RATE GUARANTEE PAGE
* Builds on the global critical / non-critical styles.
* Everything is scoped to main.best-rate-guarantee.
***********************************************/

/* "Guarantee" in the hero title uses the static ExtraBold file -
   the global variable font is only declared for weights 400-700. Page only. */
@font-face {
  font-family: "Montserrat ExtraBold";
  font-style: normal;
  font-weight: 800;
  src: url("/360-finance/assets/fonts/Montserrat-ExtraBold.woff2") format("woff2"),
       url("/360-finance/assets/fonts/Montserrat-ExtraBold.woff") format("woff");
  font-display: swap;
}

.best-rate-guarantee {
  --brg-light-bg: #f6f6f8;
  --brg-dark-bg: rgb(58, 56, 57);
}

/* HERO - black banner, photo anchored right, APPLY NOW button (design mockup)
   Mobile: text on black, photo strip at the bottom with the button over it.
   Laptop+: text left, button middle, photo fills the right side. */
.best-rate-guarantee .brg-hero {
  padding-top: 65px; /* clear fixed header */
  background-color: #000;
}

.best-rate-guarantee .brg-hero-media {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 290px;
  background-color: #000;
  background-image:
    linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0) 35%),
    url("/360-finance/assets/img/hero/best-rate-guarantee/brg-banner.png");
  background-image:
    linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0) 35%),
    image-set(
      url("/360-finance/assets/img/hero/best-rate-guarantee/brg-banner.webp") type("image/webp"),
      url("/360-finance/assets/img/hero/best-rate-guarantee/brg-banner.png") type("image/png")
    );
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 100% 100%, auto 100%;
}

.best-rate-guarantee .brg-hero-container.container {
  z-index: 1;
  padding-top: 2rem;
  padding-bottom: 130px; /* button sits over the photo strip */
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.best-rate-guarantee .brg-hero-text {
  width: 100%;
}

.best-rate-guarantee .brg-heading,
.best-rate-guarantee .brg-heading * {
  font-size: clamp(42px, 11vw, 64px);
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
}

.best-rate-guarantee .brg-heading {
  margin-bottom: 1.2rem;
  letter-spacing: -0.01em;
}

/* "Guarantee" - always on its own line */
.best-rate-guarantee .brg-heading .color-theme {
  display: block;
}

/* "Guarantee" - extra bold */
.best-rate-guarantee .brg-heading .color-theme,
.best-rate-guarantee .brg-heading .color-theme * {
  font-family: "Montserrat ExtraBold", "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 800;
}

/* red * after GUARANTEE - small, top aligned with the capitals */
.best-rate-guarantee .brg-heading .brg-asterisk {
  display: inline-block;
  font-size: 0.45em;
  line-height: 1;
  vertical-align: top;
  position: relative;
  top: 0.05em;
  margin-left: 0.04em;
  color: var(--color-theme);
  text-decoration: none;
}

.best-rate-guarantee .brg-hero-intro {
  font-size: calc(var(--text-size) * 1.05);
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 0.8rem;
}

.best-rate-guarantee .brg-fineprint,
.best-rate-guarantee .brg-fineprint a {
  font-size: calc(var(--text-size) * 0.85);
  color: #fff;
}

.best-rate-guarantee .brg-fineprint {
  margin-bottom: 0;
}

.best-rate-guarantee .brg-fineprint a {
  font-weight: 700;
  text-decoration: underline;
}

.best-rate-guarantee .brg-fineprint a:hover,
.best-rate-guarantee .brg-fineprint a:focus {
  color: var(--color-theme);
}

/* APPLY NOW - image button, opens the quick quote modal */
.best-rate-guarantee .brg-cta-button {
  display: block;
  margin-top: 1.5rem;
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
  transition: transform 0.2s ease;
}

.best-rate-guarantee .brg-cta-button img {
  display: block;
  width: 100%;
  height: 100%;
}

.best-rate-guarantee .brg-cta-button:hover,
.best-rate-guarantee .brg-cta-button:focus-visible {
  transform: scale(1.05);
}

.best-rate-guarantee .brg-cta-button:active {
  transform: scale(0.97);
}

/* HOW IT WORKS */
.best-rate-guarantee .brg-steps {
  padding-top: 3rem;
}

.best-rate-guarantee .brg-step-list {
  list-style: none;
  gap: 1.2rem;
}

.best-rate-guarantee .brg-step {
  width: 100%;
  padding: 1.8rem 1.6rem;
  border-radius: 16px;
  border-top: 6px solid var(--color-theme);
}

.best-rate-guarantee .brg-step-number {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: calc(var(--text-size) * 1.3);
  margin-bottom: 1.2rem;
}

.best-rate-guarantee .brg-step-title,
.best-rate-guarantee .brg-step-title * {
  font-size: calc(var(--text-size) * 1.3);
  margin-bottom: 0.4rem;
}

/* WHAT'S COVERED / NOT COVERED */
.best-rate-guarantee .brg-cover {
  gap: 1.5rem;
  padding-top: 1rem;
}

.best-rate-guarantee .brg-cover-box {
  width: 100%;
  background-color: var(--brg-light-bg);
  border-radius: 20px;
  padding: 1.8rem 1.6rem;
}

.best-rate-guarantee .brg-cover-box h2 {
  margin-bottom: 1.2rem;
}

.best-rate-guarantee .brg-cover-list {
  list-style: none;
}

.best-rate-guarantee .brg-cover-list li {
  position: relative;
  padding-left: 42px;
  margin-bottom: 1rem;
  font-size: calc(var(--text-size) * 1.05);
}

.best-rate-guarantee .brg-cover-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px;
}

/* white tick on red */
.best-rate-guarantee .brg-yes::before {
  background-color: var(--color-theme);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.8' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 14px;
}

/* white cross on grey */
.best-rate-guarantee .brg-no::before {
  background-color: var(--color-light-grey);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 2l6 6M8 2l-6 6' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 11px;
}

/* FAQS (shared faq-template partial) */
.best-rate-guarantee .faq-container .heading {
  text-align: left;
  color: var(--color-grey);
  font-weight: 700;
}

/* FULL TERMS */
.best-rate-guarantee .brg-terms {
  scroll-margin-top: 100px;
}

.best-rate-guarantee .brg-terms-list {
  padding-left: 1.4rem;
}

.best-rate-guarantee .brg-terms-list li {
  margin-bottom: 0.9rem;
  padding-left: 0.3rem;
}

.best-rate-guarantee .brg-terms-list li::marker {
  color: var(--color-theme);
  font-weight: 700;
}

/* LICENSING LINE */
.best-rate-guarantee .brg-licensing {
  background-color: var(--brg-dark-bg);
  margin-top: 2rem;
}

.best-rate-guarantee .brg-licensing p {
  font-size: calc(var(--text-size) * 0.9);
  opacity: 0.9;
}

/* QUICK QUOTE MODAL - guarantee line
   The modal sits outside <main>, so these are not scoped to .best-rate-guarantee.
   Rendered by partials/quick-quote.php only when config 'quick-quote' => ['guarantee-line'] is set. */
.brg-quote-line {
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border: 2px dashed var(--color-theme);
  border-radius: 10px;
  background-color: #fff3f4;
  text-align: left;
}

.brg-quote-line .brg-quote-tick {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--color-theme);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.8' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.brg-quote-line a {
  color: var(--color-theme);
  font-weight: 700;
  font-size: calc(var(--text-size) * 1);
  line-height: 1.3;
  text-decoration: underline;
}

.brg-quote-line a:hover,
.brg-quote-line a:focus {
  color: #9c0414;
}

/***********************************************
* TABLET 768px+
***********************************************/
@media only screen and (min-width: 768px) {
  .best-rate-guarantee .brg-hero-media {
    height: 340px;
  }

  .best-rate-guarantee .brg-hero-container.container {
    padding-bottom: 150px;
  }

  .best-rate-guarantee .brg-hero-text {
    max-width: 640px;
  }

  .best-rate-guarantee .brg-heading,
  .best-rate-guarantee .brg-heading * {
    font-size: 68px;
  }

  .best-rate-guarantee .brg-cta-button {
    width: 180px;
    height: 180px;
  }

  .best-rate-guarantee .brg-cover {
    flex-wrap: nowrap;
  }

  .best-rate-guarantee .brg-cover-box {
    width: calc(50% - 0.75rem);
  }
}

/***********************************************
* LAPTOP 1024px+
***********************************************/
@media only screen and (min-width: 1024px) {
  .best-rate-guarantee .brg-hero {
    padding-top: 85px;
  }

  .best-rate-guarantee .brg-step-list {
    flex-wrap: nowrap;
    gap: 2rem;
  }

  .best-rate-guarantee .brg-step {
    width: calc((100% - 4rem) / 3);
  }

  .best-rate-guarantee .brg-cover {
    gap: 2.5rem;
  }

  .best-rate-guarantee .brg-cover-box {
    width: calc(50% - 1.25rem);
    padding: 2.2rem 2.4rem;
  }

  .best-rate-guarantee .faq {
    width: 100%;
  }
}

/***********************************************
* DESKTOP 1400px+ - hero side by side, following the mockup (image 3).
* Sizes are in vw (measured from the mockup at ~1900px wide) so the whole
* composition - title, button, photo - keeps the same proportions at any width.
* Left edge lines up with the header logo (50 / 100 / 130px).
***********************************************/
@media only screen and (min-width: 1400px) {
  /* photo: ~118% of the banner height, anchored right, so the ute reaches the button */
  .best-rate-guarantee .brg-hero-media {
    top: 85px;
    height: auto;
    background-image: url("/360-finance/assets/img/hero/best-rate-guarantee/brg-banner.png");
    background-image: image-set(
      url("/360-finance/assets/img/hero/best-rate-guarantee/brg-banner.webp") type("image/webp"),
      url("/360-finance/assets/img/hero/best-rate-guarantee/brg-banner.png") type("image/png")
    );
    background-position: right 85%;
    background-size: auto 118%;
  }

  .best-rate-guarantee .brg-hero-container.container {
    --brg-heading-size: 6.75vw;
    /* gap between the top of the H1 line box and the top of the capitals */
    --brg-cap-offset: calc(var(--brg-heading-size) * 0.13);
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 2.6vw 50px 2.7vw;
    flex-direction: row;
    align-items: center;
  }

  .best-rate-guarantee .brg-hero-text {
    position: relative;
    width: 41vw;
    max-width: none;
    flex: 0 0 auto;
  }

  .best-rate-guarantee .brg-heading,
  .best-rate-guarantee .brg-heading * {
    font-size: var(--brg-heading-size);
    line-height: 0.92;
  }

  .best-rate-guarantee .brg-heading {
    margin-bottom: 1.2vw;
    white-space: nowrap;
  }

  /* mockup: GUARANTEE is about as wide as BEST RATE */
  .best-rate-guarantee .brg-heading .color-theme {
    font-size: calc(var(--brg-heading-size) * 0.88);
    letter-spacing: -0.02em;
  }

  .best-rate-guarantee .brg-hero-intro {
    font-size: 0.95vw;
    line-height: 1.3;
    margin-bottom: 0.6vw;
  }

  .best-rate-guarantee .brg-fineprint,
  .best-rate-guarantee .brg-fineprint a {
    font-size: 0.74vw;
  }

  /* button is as tall as the text block: top = top of "BEST RATE", bottom = bottom of the disclaimer */
  .best-rate-guarantee .brg-cta-button {
    position: absolute;
    top: var(--brg-cap-offset);
    bottom: 0;
    left: calc(100% + 1.4vw);
    width: auto;
    height: auto;
    margin-top: 0;
    aspect-ratio: 1 / 1;
  }
}

@media only screen and (min-width: 1600px) {
  .best-rate-guarantee .brg-hero-container.container {
    padding-left: 100px;
    padding-right: 100px;
  }
}

@media only screen and (min-width: 1800px) {
  .best-rate-guarantee .brg-hero-container.container {
    padding-left: 130px;
    padding-right: 130px;
  }
}
