/* ========================================
   BROKER-SPECIFIC STYLES
   Purple theme, professional tone
   ======================================== */

/* Broker hero */
.broker .hero {
  background-color: var(--color-purple-light);
}

.broker .hero h1 {
  color: var(--color-white);
}

.broker .hero h1 .accent {
  color: var(--color-green-accent);
}

.broker .hero--home {
  background: var(--color-purple-light);
  position: relative;
  padding-bottom: 60px;
}

/* Video background handled by .hero-video-bg element */

.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;        /* 16:9 of viewport width */
  min-height: 100%;
  min-width: 177.78vh;    /* 16:9 of viewport height — covers tall screens */
  transform: translate(-50%, -50%) scale(2);
  border: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease-out;
}

/* js/hero-video.js adds .is-playing once YouTube reports the video is playing */
.hero-video-bg.is-playing iframe {
  opacity: 1;
}

/* Broker page hero */
.broker .page-hero {
  background-color: var(--color-mint);
  min-height: auto;
}

.broker .page-hero .hero-label {
  color: var(--color-text);
}

.broker .page-hero h1 {
  color: var(--color-black);
}

/* Broker product cards - use green from components.css */

/* Broker CTA section */
.broker .cta-section--broker {
  background: transparent;
  border-radius: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  clip-path: none;
}

.cta-section-inner {
  background: var(--color-purple);
  padding: var(--space-3xl) 0;
}

.cta-curve {
  display: block;
  width: 100%;
  height: 60px;
  line-height: 0;
}

.cta-curve--top {
  margin-bottom: -1px;
}

.cta-curve--bottom {
  margin-top: -1px;
}
/* Curve dividers paint their shape over the neighbouring section's colour: the area outside the
   purple bump must match the section on the far side (white pledge section below the home CTA). */
.cta-section--broker .cta-curve--bottom { background: #ffffff; }


.broker .cta-section--broker h2 {
  font-size: 52px;
  font-weight: 900;
  color: var(--color-white);
}

.broker .cta-section--broker p {
  font-size: 18px;
  font-weight: 400;
  color: #ffffff;
  opacity: 1;
  line-height: 1.6;
}

.broker .cta-section--broker .btn {
  font-weight: 800;
  border: none;
}

.cta-inner {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.cta-illustration {
  flex: 0 0 50%;
  max-width: 50%;
  position: relative;
}

.cta-bg-icon {
  position: absolute;
  top: 50%;
  left: calc(50% - 100px);
  transform: translate(-50%, -50%);
  width: 72%;
  height: auto;
  opacity: 0.5;
  z-index: 0;
}

.cta-illustration > img:not(.cta-bg-icon) {
  position: relative;
  z-index: 1;
}

.cta-inner .cta-content {
  flex: 0 0 calc(50% - var(--space-2xl));
}

.cta-illustration img {
  width: 100%;
  height: auto;
}

/* Broker hero wave */
.hero-wave--broker {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 2;
  line-height: 0;
}

.hero-wave--broker svg {
  width: 100%;
  height: 60px;
  display: block;
}

/* Broker process steps accent */
.broker .process-step h3 {
  color: var(--color-purple);
}

/* Broker pledge cards */
.broker .pledge-card {
  border: none;
  background: #F8F8F8;
}

/* Broker enquiry form colors */
.broker .enquiry-section .btn--primary {
  background: var(--color-green-accent);
  border-color: var(--color-black);
  color: var(--color-black);
}

/* News card date color */
.broker .news-card-date {
  color: var(--color-purple);
}

/* Specific purple accents */
.broker .criteria-item::before {
  color: var(--color-purple);
}

/* Broker footer accreditations */
.broker .footer-badges {
  margin-top: 0;
}

/* Broker "How Clever Lending Handles a ... Case" process step tiles */
.broker .svc-process-step {
  background: #4B2870;
}

.broker .svc-process-step p {
  color: #ffffff;
}

.broker .svc-faq .faq-answer-inner {
  line-height: 24px;
  color: #000000;
}

/* Broker enquiry description — solid white */
.broker .svc-enquiry-desc {
  color: #ffffff;
}

/* Inheritance loans page-specific overrides */
.page-inheritance .svc-criteria-list h2 {
  line-height: 62px;
}

.page-inheritance .svc-ready--single .svc-ready-grid,
.svc-ready--single .svc-ready-grid {
  grid-template-columns: 1fr;
}

/* Service hero phone button - no black hover background */
.broker .svc-hero-actions .btn--outline:hover {
  background: transparent;
  color: #fff;
}

/* ========================================
   BROKER HOMEPAGE (mirrors live cleverlending.co.uk — values measured at 1696px / 375px)
   ======================================== */
body.broker-home .hero--home {
  background: #EBD9FE;
  padding: 121px 0 119px;
  min-height: 660px;
  position: relative;
  overflow: hidden;
  display: block;
}
body.broker-home .hero--home .container { max-width: 1420px; padding: 0 10px; position: relative; z-index: 1; }
body.broker-home .hero-headline-group { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin: 0; min-height: 420px; }
body.broker-home .hero--home .hero-headline-group h1:not(.hero-headline) {
  font-size: 18px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: none;
  color: #fff;
  margin: 0 0 12px;
}
body.broker-home .hero-headline { font-size: 60px; line-height: 60px; font-weight: 900; color: #fff; margin: 0; }
body.broker-home .hero-headline--accent { font-size: 140px; line-height: 140px; color: #67EEBC; margin: 0 0 30px; }
body.broker-home .hero--home .intro-shape { z-index: 2; }
body.broker-home .hero--home .intro-shape--bottom svg { width: calc(105% + 1.3px); height: 22px; }

/* Trustpilot + products share one grey block on live (gutters 10px left / 20px right) */
body.broker-home .trustpilot-section { background: #F8F8F8; padding: 50px 0 31px; max-height: none; overflow: visible; }
body.broker-home .trustpilot-section .container,
body.broker-home .products-section .container { max-width: 1430px; padding: 0 20px 0 10px; }

body.broker-home .products-section { background: #F8F8F8; padding: 15px 0 93px; position: relative; overflow: hidden; }
body.broker-home .products-section .container { position: relative; z-index: 1; }
body.broker-home .products-section .intro-shape--bottom svg { width: calc(106% + 1.3px); height: 31px; }
body.broker-home .products-section h2 { font-size: 52px; line-height: 52px; font-weight: 900; text-align: center; text-transform: none; color: #000; margin: 0 0 40px; }
body.broker-home .product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
body.broker-home .product-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  position: relative;
  min-height: 600px;
  padding-bottom: 60px;
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
}
body.broker-home .product-card-image { width: 100%; height: 365px; display: flex; justify-content: center; align-items: center; margin: 0 0 20px; background: none; }
body.broker-home .product-card-image img { width: 90%; height: 365px; object-fit: contain; }
body.broker-home .product-card h3 { font-size: 28px; line-height: 28px; font-weight: 800; color: #000; margin: 0 0 10px; }
body.broker-home .product-card h3 a { color: inherit; text-decoration: none; }
body.broker-home .product-card p { font-size: 18px; line-height: 27px; font-weight: 400; color: #2E2E2E; margin: 0; }
body.broker-home .product-card .bh-btn { position: absolute; left: 0; bottom: 0; }

body.broker-home .bh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #67EEBC;
  color: #000;
  font-size: 16px;
  line-height: 16px;
  font-weight: 800;
  padding: 12px 25px;
  border-radius: 50px;
  border: none;
  box-shadow: none;
  text-decoration: none;
  white-space: nowrap;
}
body.broker-home .bh-btn:hover { background: #50d9a0; color: #000; }

body.broker-home .bh-intro-copy { max-width: 1050px; margin: 40px auto 0; padding: 80px 0 0; text-align: center; }
body.broker-home .bh-intro-copy p { font-size: 25px; line-height: 37.5px; font-weight: 600; color: #000; margin: 0 0 14.4px; }

/* "Get A Quote" purple band */
body.broker-home .quote-section { background: #56317D; position: relative; overflow: hidden; }
body.broker-home .quote-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/borrower-home/Logo-Icon.webp') no-repeat 29px 48px / 32% auto;
  opacity: 0.5;
  pointer-events: none;
}
body.broker-home .quote-section .intro-shape--top svg { width: calc(115% + 1.3px); height: 15px; }
body.broker-home .quote-section .intro-shape--bottom svg { height: 16px; }
body.broker-home .quote-section .container { max-width: 1420px; padding: 0 10px 7px; position: relative; z-index: 1; }
body.broker-home .quote-inner { display: flex; gap: 60px; align-items: center; min-height: 672px; }
body.broker-home .quote-image { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; margin: 25px 0; }
body.broker-home .quote-image img { width: 90%; height: auto; display: block; }
body.broker-home .quote-text { flex: 1 1 0; min-width: 0; padding: 100px 0; }
body.broker-home .quote-text h2 { font-size: 52px; line-height: 52px; font-weight: 900; color: #fff; text-transform: none; margin: 0 0 20px; }
body.broker-home .quote-text p { font-size: 18px; line-height: 27px; font-weight: 400; color: #fff; margin: 0 0 14.4px; }
body.broker-home .quote-text .bh-btn { margin-top: 5.6px; }

/* Pledge tiles */
.pledge-section--live { background: #fff; padding: 100px 0; }
.pledge-section--live .container { max-width: 1420px; padding: 0 10px; }
.pledge-section--live h2 { font-size: 52px; line-height: 52px; font-weight: 900; text-align: center; text-transform: none; color: #000; margin: 0 0 40px; }
.pledge-section--live .pledge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; grid-auto-rows: auto; align-items: start; }
.pledge-section--live .pledge-card {
  background: #F8F8F8;
  border: none;
  box-shadow: none;
  border-radius: 20px;
  padding: 25px 25px 0;
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
  text-align: left;
}
.pledge-section--live .pledge-card-text { flex: 0 0 63%; max-width: 63%; padding: 0 0 25px; }
.pledge-section--live .pledge-card-image { flex: 0 0 34%; max-width: none; min-width: 0; margin: 0; display: flex; align-items: center; justify-content: center; align-self: center; }
.pledge-section--live .pledge-card-image img { width: 259px; max-width: 259px; height: auto; object-fit: contain; }
.pledge-section--live .pledge-card h4 { font-size: 32px; line-height: 32px; font-weight: 800; color: #000; margin: 0 0 10px; }
.pledge-section--live .pledge-card p { font-size: 16px; line-height: 24px; font-weight: 400; color: #1F1F1F; margin: 0 0 14.4px; }

/* Latest news: text-only grey cards */
.news-section--live { background: #fff; padding: 100px 0; }
.news-section--live .container { max-width: 1420px; padding: 0 10px; }
.news-section--live h2 { font-size: 52px; line-height: 52px; font-weight: 900; text-align: center; text-transform: none; color: #000; margin: 0; padding: 0 0 40px; }
.news-section--live .news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 20px; align-items: flex-start; }
.news-section--live .news-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: #F5F5F5;
  border-radius: 20px;
  box-shadow: 0 0 2px #D9D9D9;
  padding: 20px;
  border: none;
  transform: none;
}
.news-section--live .news-card:hover { transform: none; box-shadow: 0 0 2px #D9D9D9; }
.news-section--live .news-card h3 { font-size: 28px; line-height: 28px; font-weight: 700; color: #000; margin: 0 0 10px; }
.news-section--live .news-card h3 a { color: inherit; text-decoration: none; }
.news-section--live .news-meta { display: flex; align-items: center; gap: 6px; font-size: 16px; line-height: 24px; color: #000; margin: 0; }
.news-section--live .news-meta svg { width: 14px; height: 14px; flex: 0 0 14px; }
.news-section--live .news-card p { font-size: 16px; line-height: 24px; color: #000; margin: 10px 0 14.4px; }
.news-section--live .news-card .btn {
  background: #56317D;
  color: #fff;
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 50px;
  border: none;
  margin: 0;
}
.news-section--live .news-card .btn:hover { background: #432561; color: #fff; }

@media (max-width: 1024px) {
  body.broker-home .product-grid { grid-template-columns: repeat(2, 1fr); }
  .news-section--live .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  body.broker-home .hero--home { padding: 77px 0 100px; min-height: 427px; }
  body.broker-home .quote-section .container { padding: 0 10px; }
  body.broker-home .hero-headline-group { min-height: 250px; }
  body.broker-home .hero--home .container { padding: 0 20px; }
  body.broker-home .hero--home .hero-headline-group h1:not(.hero-headline) { font-size: 14px; line-height: 14px; }
  body.broker-home .hero-headline { font-size: 30px; line-height: 30px; }
  body.broker-home .hero-headline--accent { font-size: 77px; line-height: 77px; }

  body.broker-home .trustpilot-section { padding: 100px 0 50px; }
  body.broker-home .trustpilot-section .container { padding: 0 30px; }
  body.broker-home .products-section { padding: 40px 0 50px; }
  body.broker-home .products-section .container { padding: 0 10px; }
  body.broker-home .products-section h2 { font-size: 42px; line-height: 42px; margin-bottom: 40px; }
  body.broker-home .product-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  body.broker-home .product-card { min-height: 400px; padding-bottom: 62px; }
  body.broker-home .product-card-image { height: 150px; }
  body.broker-home .product-card-image img { height: 150px; }
  body.broker-home .product-card h3 { font-size: 20px; line-height: 20px; }
  body.broker-home .product-card p { font-size: 14px; line-height: 16.8px; }
  body.broker-home .bh-btn { padding: 15px; }
  body.broker-home .bh-intro-copy { padding-top: 0; }
  body.broker-home .bh-intro-copy p { font-size: 16px; line-height: 24px; }

  body.broker-home .quote-section::before { background-size: 492px auto; background-position: 0 356px; }
  body.broker-home .quote-inner { flex-direction: column; gap: 40px; padding: 50px 0; min-height: 0; }
  body.broker-home .quote-image { margin: 0; width: 100%; }
  body.broker-home .quote-image img { width: 100%; }
  body.broker-home .quote-text { padding: 0; width: 100%; }
  body.broker-home .quote-text h2 { font-size: 42px; line-height: 42px; }
  body.broker-home .quote-text p { font-size: 16px; line-height: 24px; }
  body.broker-home .quote-text .bh-btn { margin-top: 20px; }

  /* `body` prefix: responsive.css (loaded later) carries .broker .pledge-card / .news-section rules of equal specificity */
  body.broker .pledge-section--live, body .pledge-section--live { padding: 75px 0; }
  body .pledge-section--live h2 { font-size: 42px; line-height: 42px; margin-bottom: 20px; }
  body .pledge-section--live .pledge-grid { grid-template-columns: 1fr; gap: 20px; }
  body .pledge-section--live .pledge-card { flex-direction: column; padding: 25px; gap: 20px; min-height: 0; }
  body .pledge-section--live .pledge-card > div:not(.pledge-card-image) { flex: none; max-width: 100%; width: 100%; padding: 0 0 25px; }
  body .pledge-section--live .pledge-card:first-child > div:not(.pledge-card-image) { padding-bottom: 0; }
  body .pledge-section--live .pledge-card .pledge-card-image { flex: none; width: 150px; max-width: 150px; margin: -45px 0 0; justify-content: flex-start; align-self: flex-start; }
  body .pledge-section--live .pledge-card:first-child .pledge-card-image { margin-top: -20px; }
  body .pledge-section--live .pledge-card:nth-child(n) .pledge-card-image img { width: 150px; max-width: 150px; height: auto; margin: 0; }   /* beats the per-tile desktop widths */
  body .pledge-section--live .pledge-card h4 { font-size: 28px; line-height: 28px; }
  body .pledge-section--live .pledge-card p { font-size: 16px; line-height: 19.2px; }

  body .news-section--live { padding: 25px 0 50px; }
  body .news-section--live .container { padding: 0 20px; }
  body .news-section--live h2 { font-size: 42px; line-height: 42px; margin-bottom: 20px; padding-bottom: 40px; }
  body.broker.page-about .news-section--live h2 { padding-bottom: 25px; }
  body .news-section--live .news-grid { grid-template-columns: 1fr; gap: 40px; }
  body .news-section--live .news-card:nth-child(n+3) { display: none; }
}

/* ========================================
   BROKER ABOUT PAGE — team grid (mirrors live /brokers/about-brokers/)
   ======================================== */
.broker.page-about .svc-clever { background: #fff; }
.broker.page-about .svc-clever-image img { width: 100%; border-radius: 25px; }
.broker.page-about .svc-clever-content h2 { font-size: 52px; line-height: 52px; }
.broker.page-about .section--team { background: #F8F8F8; padding: 100px 0 125px; position: relative; overflow: hidden; }
.broker.page-about .section--team .intro-shape--top svg { width: calc(122% + 1.3px); height: 10px; }
.broker.page-about .section--team .intro-shape--bottom svg { width: calc(106% + 1.3px); height: 30px; }
.broker.page-about .section--team .container { max-width: 1420px; padding: 0 10px; position: relative; z-index: 1; }
.broker.page-about .about-team-heading { font-size: 52px; line-height: 52px; font-weight: 900; text-align: left; text-transform: none; color: #000; margin: 0 0 40px; }
.broker.page-about .team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.broker.page-about .team-card { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.broker.page-about .team-card-image {
  width: 396px;
  max-width: 100%;
  height: 400px;
  padding: 10px;
  border: 5px solid #000 !important;
  border-radius: 20px !important;
  margin: 0 0 20px;
  overflow: hidden;
  background: none;
}
.broker.page-about .team-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 8px; }
.broker.page-about .team-card h3 { font-size: 32px; line-height: 32px; font-weight: 800; color: #000; margin: 0 0 10px; }
.broker.page-about .team-card .team-role { font-size: 24px; line-height: 24px; font-weight: 600; color: #000; margin: 0 0 20px; display: block; }
.broker.page-about .team-card p { font-size: 16px; line-height: 24px; font-weight: 400; color: #000; margin: 0 0 14.4px; }

@media (max-width: 767px) {
  .broker.page-about .svc-clever { padding: 50px 0; }
  .broker.page-about .svc-clever::before { background-size: 275px auto; background-position: 126px 620px; }
  .broker.page-about .section--team { padding: 50px 0; }
  .broker.page-about .section--team .container { padding: 0 20px; }
  .broker.page-about .about-team-heading { font-size: 42px; line-height: 42px; }
  .broker.page-about .team-grid { grid-template-columns: 1fr; gap: 40px; }
  .broker.page-about .team-card-image { width: 302px; height: 350px; }
  .broker.page-about .team-card h3 { font-size: 28px; line-height: 28px; }
  .broker.page-about .team-card p { line-height: 19.2px; }
  .broker.page-about .svc-clever-content h2 { font-size: 38px; line-height: 38px; margin-bottom: 30px; }
  .broker.page-about .about-team-heading { text-align: center; }
  .broker.page-about .team-card:nth-child(4) .team-card-image { width: 335px; }
  .broker.page-about .team-card:nth-child(5) .team-card-image { width: 268px; }
}

/* Live-style pledge tiles: cancel the legacy component sizing */
.pledge-section--live .pledge-card > div:not(.pledge-card-image) { padding: 0 0 25px; max-width: 63%; flex: 0 0 63%; }
.pledge-section--live .pledge-card-image { min-height: 0; height: auto; padding: 0; margin: 0; }
.pledge-section--live .pledge-card--last .pledge-card-image img,
.pledge-section--live .pledge-card-image img { width: auto; max-width: 259px; height: auto; margin: 0; }
/* live: each tile image has its own max-width (259 / 250 / 275 / 188px) and overflows the 34% column */
.pledge-section--live .pledge-card:nth-child(1) .pledge-card-image { justify-content: flex-start; }
.pledge-section--live .pledge-card:nth-child(1) .pledge-card-image img { width: 259px; max-width: 259px; }
.pledge-section--live .pledge-card:nth-child(2) .pledge-card-image img { width: 250px; max-width: 250px; }
.pledge-section--live .pledge-card:nth-child(3) .pledge-card-image img { width: 275px; max-width: 275px; }
.pledge-section--live .pledge-card:nth-child(4) .pledge-card-image img { width: 188px; max-width: 188px; }

/* Brokers Illustration: the two headline lines are h1s on this page */
body.broker-home .hero--home h1.hero-headline { font-size: 60px; line-height: 60px; font-weight: 900; letter-spacing: normal; color: #fff; margin: 0; }
body.broker-home .hero--home h1.hero-headline--accent { font-size: 140px; line-height: 140px; color: #67EEBC; margin: 0 0 30px; }
@media (max-width: 767px) {
  body.broker-home .hero--home h1.hero-headline { font-size: 30px; line-height: 30px; }
  body.broker-home .hero--home h1.hero-headline--accent { font-size: 77px; line-height: 77px; }
}
@media (max-width: 767px) {
  /* Brokers Illustration keeps the tall product images on phones */
  body.illustration-page .product-card-image, body.illustration-page .product-card-image img { height: 365px; }
}
