/* ============================================================
   Red Buffalo Lending - custom site styles
   Loaded after style.css on every page.
   ============================================================ */

/* ---------- Header: center menu between left edge and logo ---------- */
@media (min-width: 992px) {
  .header-left {
    width: calc(50% - 100px);
  }
  .header-left drawer-menu,
  .header-left .header-nav {
    width: 100%;
  }
  .header-left .header-menu {
    justify-content: center;
    width: 100%;
  }
  .menu-link-main {
    padding: 37.5px 12px;
  }
}

@media (min-width: 992px) and (max-width: 1499px) {
  .header-left .header-menu {
    gap: 2px !important;
  }
  .menu-link-main {
    padding: 37.5px 8px;
    font-size: 15px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .header-left {
    width: calc(50% - 75px);
  }
  .header-left .header-menu {
    gap: 0 !important;
  }
  .menu-link-main {
    padding: 37.5px 4px;
    font-size: 12.5px;
  }
  .header-center img.main-logo {
    max-height: 80px !important;
  }
}

/* Dropdown caret on top-level menu items */
.menu-link-main > svg.menu-caret {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

/* Desktop submenu links: left-aligned, comfortable width */
@media (min-width: 992px) {
  .header-submenu.menu-absolute {
    min-width: 210px;
  }
}

/* ---------- Design consistency: circular icon chips + 18px cards ----------
   The whole site shares one language: icon chips are circles with a light
   RBL-red tint and red icon; floating cards/boxes use an 18px radius
   (10px on mobile, matching the template's radius18 behavior). */

/* Solutions cards: icon chip becomes a tinted red circle */
.multicolumn .card-icon {
  border-radius: 50%;
  --color-background: rgba(189, 0, 0, 0.08);
  --color-foreground: #bd0000;
}

/* On card hover (card turns red) the chip flips to white with a red icon */
.multicolumn .multicolumn-card:focus .card-icon,
.multicolumn .multicolumn-card:hover .card-icon {
  --color-background: rgba(255, 255, 255, 1);
  --color-foreground: #bd0000;
}

/* Floating boxes: one card radius everywhere */
.multicolumn .multicolumn-card,
.accordion-block,
.promotion-lists {
  border-radius: 18px;
}

/* One soft drop shadow for every floating box */
:root {
  --rbl-card-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.multicolumn .multicolumn-card,
.accordion-block,
.promotion-lists,
.contact-box,
.form-embed-placeholder,
.team-card .team-photo {
  box-shadow: var(--rbl-card-shadow);
}

/* FAQ: light gray section backdrop with white cards, matching the broker
   page's card treatment - white-on-white swallowed the shadow */
.faq {
  background-color: #f3f4f6;
  padding: 80px 0;
}

.faq .accordion-block {
  background-color: #ffffff;
}

@media (max-width: 767px) {
  .faq {
    padding: 60px 0;
  }
}

@media (max-width: 767px) {
  .multicolumn .multicolumn-card,
  .accordion-block,
  .promotion-lists,
  .feature-card,
  .form-embed-placeholder,
  .team-card .team-photo,
  .team-modal .team-modal-card {
    border-radius: 10px;
  }
  .team-modal .team-modal-photo img {
    border-radius: 10px 10px 0 0;
  }
}

/* ---------- Buttons: RBL red variant ---------- */
.button--red {
  --color-primary-button-text: rgba(255, 255, 255, 1);
  --color-primary-button-background: #bd0000;
  --color-primary-button-border: #bd0000;
  --color-primary-button-icon: #bd0000;
  --color-primary-button-icon-background: rgba(255, 255, 255, 1);
  --color-primary-button-hover-text: #bd0000;
  --color-primary-button-hover-background: rgba(255, 255, 255, 1);
  --color-primary-button-hover-border: #bd0000;
  --color-primary-button-hover-icon: rgba(255, 255, 255, 1);
  --color-primary-button-hover-icon-background: #ffffff;
}

/* ---------- Footer ---------- */
@media (min-width: 992px) {
  .footer-custom-row {
    grid-template-columns: 400px auto auto;
  }
}

@media (min-width: 1601px) {
  .footer-custom-row {
    grid-template-columns: 440px auto auto;
  }
}

/* Larger footer logo */
.footer-logo.footer-logo-lg {
  max-width: 260px;
}

.footer-logo.footer-logo-lg img {
  width: 100%;
  height: auto;
}

@media (max-width: 1279px) {
  .footer-logo.footer-logo-lg {
    max-width: 220px;
  }
}

@media (max-width: 767px) {
  .footer-logo.footer-logo-lg {
    max-width: 190px;
  }
}

/* Footer widget headings (footer background is light) */
.footer-main .widget-heading {
  color: #1a1a1a;
}

/* Footer links with an icon (phone, email, investor portal) */
.footer-menu .icon-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-menu .icon-link svg {
  flex: 0 0 auto;
}

/* ---------- Inner page banner (shared by subpages) ---------- */
.page-banner {
  --color-foreground: rgba(255, 255, 255, 1);
  --color-foreground-heading: rgba(255, 255, 255, 1);
  position: relative;
  overflow: hidden;
  height: 400px;
}

.page-banner .banner-media {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.page-banner .banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-banner::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(184.15deg, rgba(28, 37, 57, 0) -187.51%, #1c2539 96.62%);
}

.page-banner .banner-content {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  text-align: center;
}

.page-banner .breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.page-banner .breadcrumb a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  transition: 0.3s;
}

.page-banner .breadcrumb a:hover {
  color: rgba(255, 255, 255, 1);
}

.page-banner .breadcrumb .active {
  color: rgba(255, 255, 255, 1);
}

.page-banner .breadcrumb svg {
  color: rgba(255, 255, 255, 0.75);
  width: 12px;
  height: 12px;
}

@media (max-width: 767px) {
  .page-banner {
    height: 300px;
  }
}

/* ---------- Content sections on inner pages ---------- */
.page-section {
  padding: 80px 0;
}

.page-section--gray {
  background-color: #f3f4f6;
}

.page-section .section-intro {
  max-width: 760px;
  margin: 0 auto 50px;
  text-align: center;
}

.page-section .section-intro .text {
  margin-top: 20px;
}

@media (max-width: 767px) {
  .page-section {
    padding: 60px 0;
  }
}

/* ---------- Embedded form placeholder ---------- */
.form-embed-container {
  max-width: 800px;
  margin: 0 auto;
}

.form-embed-container iframe {
  width: 100%;
  border: none;
  display: block;
  background: transparent;
}

.form-embed-placeholder {
  background: #ffffff;
  border: 1px dashed rgba(93, 102, 111, 0.4);
  border-radius: 18px;
  padding: 50px 40px;
  text-align: center;
}

.form-embed-placeholder .heading {
  margin-bottom: 15px;
}

.form-embed-placeholder a {
  color: #bd0000;
  font-weight: 600;
}

/* ---------- Broker page layout ---------- */
.eyebrow {
  display: block;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #bd0000;
  margin-bottom: 18px;
}

.section-dark {
  background-color: #161616;
  --color-foreground: rgba(255, 255, 255, 0.85);
  --color-foreground-heading: #ffffff;
}

.section-dark .heading {
  color: #ffffff;
}

.section-dark .text {
  color: rgba(255, 255, 255, 0.85);
}

.red-divider {
  width: 60px;
  height: 3px;
  background: #bd0000;
  border: none;
  margin: 26px 0;
  opacity: 1;
}

.broker-hero {
  padding: 180px 0 100px;
}

.broker-hero .hero-media {
  position: relative;
}

.broker-hero .hero-media img {
  width: 100%;
  height: auto;
  display: block;
}

/* Fade the photo's edges into the dark hero background */
.broker-hero .hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, #161616 0%, rgba(22, 22, 22, 0) 32%),
    linear-gradient(to left, #161616 0%, rgba(22, 22, 22, 0) 18%),
    linear-gradient(to bottom, #161616 0%, rgba(22, 22, 22, 0) 22%),
    linear-gradient(to top, #161616 0%, rgba(22, 22, 22, 0) 22%);
}

/* Desktop: photo fills the full hero height, bleeds to the right edge of
   the screen, and fades into the dark background toward the text */
@media (min-width: 992px) {
  .broker-hero {
    position: relative;
    overflow: hidden;
  }
  .broker-hero .hero-media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 52%;
  }
  .broker-hero .hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .broker-hero .hero-media::after {
    background:
      linear-gradient(to right, #161616 0%, rgba(22, 22, 22, 0) 55%),
      linear-gradient(to top, rgba(22, 22, 22, 0.9) 0%, rgba(22, 22, 22, 0) 28%),
      linear-gradient(to bottom, rgba(22, 22, 22, 0.6) 0%, rgba(22, 22, 22, 0) 18%);
  }
  .broker-hero .row .col-lg-6:first-child {
    position: relative;
    z-index: 1;
  }
}

.broker-hero .hero-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 36px 0;
}

@media (max-width: 991px) {
  .broker-hero {
    padding: 150px 0 70px;
  }
  .broker-hero .hero-media {
    margin-top: 40px;
  }
}

/* Icon grid (two-column benefit list) */
.icon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 44px;
}

.icon-grid .icon-grid-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.1);
}

/* No divider under the last item in each column */
.icon-grid .icon-grid-item:nth-last-child(-n+2) {
  border-bottom: none;
}

@media (max-width: 767px) {
  .icon-grid .icon-grid-item:nth-last-child(2) {
    border-bottom: 1px solid rgba(26, 26, 26, 0.1);
  }
}

.icon-grid .grid-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(189, 0, 0, 0.08);
  color: #bd0000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

@media (max-width: 767px) {
  .icon-grid {
    grid-template-columns: 1fr;
  }
}

/* Dark checklist bullets */
.section-dark .text-lists .text-item {
  color: rgba(255, 255, 255, 0.9);
}

/* Numbered step cards */
.step-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 40px 32px;
  height: 100%;
  box-shadow: var(--rbl-card-shadow);
  position: relative;
}

.step-card .step-num {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 30px;
  color: #1a1a1a;
  display: block;
  margin-bottom: 14px;
}

.step-card .feature-icon {
  position: absolute;
  top: 32px;
  right: 28px;
  margin-bottom: 0;
  width: 58px;
  height: 58px;
}

.step-card .heading {
  margin-bottom: 14px;
  padding-right: 70px;
}

@media (max-width: 767px) {
  .step-card {
    border-radius: 10px;
  }
}

/* Dark CTA band */
.cta-band {
  padding: 70px 0;
}

.cta-band .cta-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.cta-band .cta-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #bd0000;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.cta-band .cta-heading {
  max-width: 340px;
}

.cta-band .cta-text {
  flex: 1 1 300px;
}

/* ---------- Embedded request forms (payoff / draw / broker) ---------- */
.form-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--rbl-card-shadow);
  padding: 44px 40px;
}

.form-card .form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.form-card .field {
  width: 100%;
}

.form-card .field.w-half {
  width: calc(50% - 8px);
}

.form-card .field input,
.form-card .field select,
.form-card .field textarea {
  width: 100%;
  background: var(--color-input-background);
  color: var(--color-input-text);
  border: var(--style-border-width-inputs) solid var(--color-input-border);
  border-radius: var(--style-border-radius-inputs);
  padding: 14px 16px;
  font-family: "Inter", sans-serif;
}

.form-card .field select {
  height: 52px;
}

.form-card .form-question {
  width: 100%;
  margin-top: 6px;
}

.form-card .form-question .q-label {
  display: block;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.form-card .radio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.form-card .radio-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-card .radio-options input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #bd0000;
}

.form-card .check-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin-top: 6px;
}

/* The template's `form input { min-height: 54px; padding: 0 15px }` rule
   stretches checkboxes and radios - reset them to their natural size */
.form-card input[type="checkbox"],
.form-card input[type="radio"] {
  min-height: 0;
  padding: 0;
}

.form-card .check-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 3px;
  accent-color: #bd0000;
  cursor: pointer;
}

.form-card .check-field label {
  cursor: pointer;
}

.form-card .form-note {
  width: 100%;
  color: #5d666f;
  margin-top: 6px;
}

.form-card .form-divider {
  width: 100%;
  border: none;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  margin: 14px 0 4px;
}

.form-card .form-subheading {
  width: 100%;
  margin-top: 10px;
}

.form-card .form-button {
  width: 100%;
  margin-top: 14px;
}

/* Draw request work item rows */
.draw-item {
  display: flex;
  gap: 12px;
  width: 100%;
}

.draw-item .item-desc {
  flex: 1;
}

.draw-item .item-amt {
  width: 200px;
  flex: 0 0 200px;
}

/* Honeypot - hidden from humans */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 767px) {
  .form-card {
    padding: 30px 22px;
    border-radius: 10px;
  }
  .form-card .field.w-half {
    width: 100%;
  }
  .draw-item {
    flex-wrap: wrap;
  }
  .draw-item .item-amt {
    width: 100%;
    flex: 1 1 100%;
  }
}

/* ---------- Feature cards (brokers page) ---------- */
.feature-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 40px 32px;
  height: 100%;
  box-shadow: var(--rbl-card-shadow);
}

.feature-card .feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(189, 0, 0, 0.08);
  color: #bd0000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-card .heading {
  margin-bottom: 14px;
}

/* ---------- Privacy policy content ---------- */
.policy-content {
  max-width: 860px;
  margin: 0 auto;
}

.policy-content .policy-date {
  color: #5d666f;
  margin-bottom: 40px;
}

.policy-content h2 {
  font-size: 24px;
  margin: 40px 0 14px;
}

.policy-content p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.policy-content a {
  color: #bd0000;
}

.policy-content address {
  font-style: normal;
  line-height: 1.8;
}

/* ---------- Team section ---------- */
.team-section .team-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 50px;
}

.team-card {
  width: 340px;
  max-width: 100%;
  text-align: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}

.team-card .team-photo {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}

.team-card .team-photo img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.team-card:hover .team-photo img,
.team-card:focus-visible .team-photo img {
  transform: scale(1.04);
}

.team-card .team-photo::after {
  content: "View Bio +";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px;
  background: rgba(26, 26, 26, 0.75);
  color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-card:hover .team-photo::after,
.team-card:focus-visible .team-photo::after {
  opacity: 1;
}

.team-card .team-name {
  margin-top: 22px;
  margin-bottom: 4px;
}

.team-card .team-title {
  color: #bd0000;
  font-weight: 600;
}

/* Team bio modal */
.team-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.team-modal.open {
  display: flex;
}

.team-modal .team-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.7);
}

.team-modal .team-modal-card {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  max-width: 900px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
}

.team-modal .team-modal-photo {
  flex: 0 0 320px;
  max-width: 320px;
}

.team-modal .team-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 18px 0 0 18px;
}

.team-modal .team-modal-body {
  flex: 1 1 400px;
  padding: 40px;
}

.team-modal .team-modal-title {
  color: #bd0000;
  font-weight: 600;
  margin-bottom: 18px;
}

.team-modal .team-modal-bio {
  line-height: 1.7;
}

.team-modal .team-modal-contacts {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-modal .team-modal-contacts a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.3s;
}

.team-modal .team-modal-contacts a:hover {
  color: #bd0000;
}

.team-modal .team-modal-contacts svg {
  flex: 0 0 auto;
  color: #bd0000;
}

.team-modal .team-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(26, 26, 26, 0.06);
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
  z-index: 1;
}

.team-modal .team-modal-close:hover {
  background: #bd0000;
  color: #ffffff;
}

@media (max-width: 767px) {
  .team-modal .team-modal-photo {
    flex: 1 1 100%;
    max-width: 100%;
    max-height: 320px;
    overflow: hidden;
  }
  .team-modal .team-modal-photo img {
    border-radius: 18px 18px 0 0;
  }
  .team-modal .team-modal-body {
    padding: 28px 24px;
  }
}

body.team-modal-open {
  overflow: hidden;
}
