/* ========================================
   GLOBAL STYLES - Clever Lending
   ======================================== */

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "soleil", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #000000;
  background-color: #F8F8F8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
}

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  /* Shared colors */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-text: #000000;
  --color-text-light: #000000;
  --color-bg-light: #F8F8F8;
  /* already #F8F8F8 */
  --color-bg-dark: #1a1a2e;
  --color-green-accent: #67EEBC;
  /* already #67EEBC */
  --color-green-btn: #4ECB71;
  --color-purple: #56317D;
  --color-purple-light: #EBD9FE;
  --color-mint: #C5F5E3;
  --color-mint-light: #E8FFF5;

  /* Typography */
  --font-primary: "soleil", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
  --font-size-4xl: 3.5rem;
  --font-size-hero: 5rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Layout */
  --container-max: 1400px;
  --container-narrow: 1140px;
  --header-height: 80px;
  --border-radius: 8px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --border-radius-pill: 50px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--space-3xl) 0;
}

.section--light {
  background-color: var(--color-bg-light);
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-white);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Flex */
.flex { display: flex; }
.flex--center { align-items: center; justify-content: center; }
.flex--between { align-items: center; justify-content: space-between; }
.flex--col { flex-direction: column; }
.flex--wrap { flex-wrap: wrap; }
.flex--gap { gap: var(--space-lg); }

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }

/* ========================================
   HEADER (shared structure)
   ======================================== */
.site-header {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 30px);
  max-width: calc(var(--container-max) - 80px);
  z-index: 1000;
  background: var(--color-white);
  border: none;
  border-radius: var(--border-radius-lg);
  padding: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: box-shadow var(--transition-base);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  gap: var(--space-lg);
}

.header-logo img {
  height: 45px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.header-nav a {
  font-weight: 800;
  font-size: var(--font-size-base);
  color: var(--color-text);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.header-nav a:hover {
  color: var(--color-purple);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown > a::after {
  content: '';
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover > a::after,
.nav-dropdown.active > a::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: fixed;
  top: 85px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--container-max) - 80px) !important;
  max-width: calc(100vw - 30px) !important;
  background: var(--color-white);
  border: none;
  border-radius: var(--border-radius-xl);
  padding: 30px !important;
  box-sizing: border-box !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  z-index: 100;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.dropdown-menu--simple {
  position: absolute !important;
  width: 220px !important;
  max-width: 220px !important;
  top: calc(100% + 10px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  padding: var(--space-sm) !important;
  border-radius: var(--border-radius-lg) !important;
}

/* 5px spacing between items in the simple (Insight) sub menu */
.dropdown-menu--simple .dropdown-item + .dropdown-item {
  margin-top: 5px;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 15px;
}

.dropdown-header {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: var(--space-md);
}

.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  min-width: 0;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #F8F8F8;
  transition: background var(--transition-fast);
  min-width: 0;
}

.dropdown-item:hover {
  background: #efefef;
}

.dropdown-item-icon {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
}

.dropdown-item-text {
  flex: 1;
  min-width: 0;
}

.dropdown-item-text p {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.dropdown-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dropdown-item-text h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #000000;
  white-space: normal;
}

.dropdown-item-text p {
  font-size: 13px;
  color: #555555;
  line-height: 1.4;
  font-weight: 400;
}

.dropdown-cta {
  background: #67EEBC;
  border-radius: var(--border-radius-xl);
  padding: 25px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

/* Live: the purple dot-circle logo (245px, 60% opacity) sits lower-right, clipped by the tile edge */
.dropdown-cta::after {
  content: '';
  position: absolute;
  right: -39px;   /* live: 245px dot-circle, 123px in from the left of a 329px tile (39px overflow), 112px down */
  top: 112px;
  width: 245px;
  height: 245px;
  background: url('../brand/Logos & Icons/Purple-Logo-Large.webp') no-repeat center / contain;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.dropdown-cta > * {
  position: relative;
  z-index: 1;
}

.dropdown-cta h3 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: var(--space-xs);
  color: #000000;
}

.dropdown-cta p {
  font-size: 14px;
  margin-bottom: var(--space-md);
  color: #000000;
}

.dropdown-cta .btn {
  background: var(--color-purple);
  color: var(--color-white);
  border: none;
}

/* Header phone (matches live: icon + number before the search icon) */
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  white-space: nowrap;
  transition: color var(--transition-fast);
}
.header-phone:hover { color: var(--color-purple); }

/* Header search — hidden until the search icon is clicked, then a full-width
   bar that replaces the header row (as on the live site) */
.header-inner { position: static; }   /* the fixed .site-header is the overlay's containing block, so the open search covers the whole header card */
.header-search {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1200;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
}
.header-search.active { display: flex; }
.header-search-submit {
  background: #56317D;
  color: var(--color-white);
  padding: 0 22px;
  height: 44px;
  border: none;
  border-radius: var(--border-radius-pill);
  font-family: inherit;
  font-weight: 800;
  font-size: var(--font-size-sm);
  cursor: pointer;
  white-space: nowrap;
}
.header-search-submit:hover { opacity: 0.85; }
.header-search-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  padding: 10px;
  color: var(--color-text);
  cursor: pointer;
}

/* AJAX results dropdown — styled like the search pill */
.header-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 280px;
  background: #F8F8F8;
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  z-index: 1100;
  max-height: 400px;
  overflow-y: auto;
}

.header-search-results.is-open {
  display: block;
}

.header-search-result {
  display: block;
  padding: 10px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: #000;
  transition: background 0.15s ease;
}

.header-search-result:hover,
.header-search-result.is-active {
  background: #ffffff;
}

.header-search-result-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #000;
  margin-bottom: 2px;
}

.header-search-result-desc {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #555;
  line-height: 1.35;
}

/* Borrower-svc: match bordered pill style */
.borrower-svc .header-search-results {
  background: #ffffff;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
}

.borrower-svc .header-search-result:hover,
.borrower-svc .header-search-result.is-active {
  background: #F8F8F8;
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: var(--font-size-sm);
  background: #F8F8F8;
  border-radius: var(--border-radius-pill);
  padding: 0 18px;
  height: 44px;
}

/* Search icon button (opens the search bar) */
.btn-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 44px;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.btn-search:hover {
  color: var(--color-purple);
}

.btn-switcher {
  background: #67EEBC;
  color: var(--color-black);
  padding: 0 24px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--border-radius-pill);
  font-weight: 800;
  font-size: var(--font-size-base);
  border: none;
  transition: background var(--transition-fast);
  white-space: nowrap;
}

.btn-switcher:hover {
  background: var(--color-green-accent);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-black);
  transition: transform var(--transition-base);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: auto;
}

/* Mobile-only cloned switcher — hidden on desktop */
.mobile-switcher {
  display: none;
}

/* Footer contact block (phone / email / address under the badges, as on live) */
.footer-contact {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}
.footer-contact svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #67EEBC;
}
/* Footer disclaimer links (complaints email + ombudsman) are the mint brand colour on live, both sides */
.footer-brand p a,
.footer-brand p a:visited {
  color: #67EEBC;
  text-decoration: none;
  font-weight: 400;
}
.footer-brand p a:hover { text-decoration: underline; }

.footer-contact a {
  color: inherit;
}
.footer-contact a:hover {
  color: #67EEBC;
}

/* Live Title-Cases hero H1s and section headings on product/landing pages via CSS
   (source copy is sentence case). Calculator pages are the exception on live. */
.svc-hero h1,
.borrower .hero h1,
.svc-clever h2,
.svc-criteria h2,
.svc-process h2,
.svc-ready h2,
.svc-faq h2,
.svc-enquiry h2,
.products-section h2,
.cta-section h2,
.pledge-section h2,
.testimonials-section h2 {
  text-transform: capitalize;
}

body.calc-page h2,
body.calc-page .svc-hero h1 {
  text-transform: none;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--border-radius-pill);
  font-weight: 800;
  font-size: 18px;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-green-accent);
  color: var(--color-black);
  border-color: var(--color-black);
}

.btn--primary:hover {
  background: #50d9a0;
}

.btn--secondary {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

.btn--secondary:hover {
  background: #333;
}

/* Keep Get In Touch button in mega menu stable on hover */
.dropdown-cta .btn:hover,
.dropdown-cta .btn--secondary:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

.btn--outline {
  background: transparent;
  color: var(--color-black);
  border-color: var(--color-black);
}

.btn--outline:hover {
  background: var(--color-black);
  color: var(--color-white);
}

.btn--purple {
  background: var(--color-purple);
  color: var(--color-white);
  border-color: var(--color-purple);
}

.btn--purple:hover {
  background: #4a2373;
}

.btn--white {
  background: var(--color-white);
  color: var(--color-black);
  border-color: var(--color-white);
}

.btn--white:hover {
  background: #f0f0f0;
}

.btn--sm {
  padding: 10px 20px;
  font-size: var(--font-size-sm);
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: #222222;
  color: var(--color-white);
  padding: var(--space-2xl) 0 0;
  border-top: 3px solid #67EDBC;
}

.footer-top {
  display: grid;
  grid-template-columns: 45fr 18fr 18fr 18fr;
  gap: var(--space-md);
  padding-bottom: var(--space-2xl);
  border-bottom: none;
}

.footer-brand .footer-logo {
  margin-bottom: var(--space-md);
}

.footer-brand .footer-logo img {
  height: 50px;
}

.footer-brand p {
  font-size: var(--font-size-sm);
  color: #ffffff;
  line-height: 21px;
  margin-bottom: var(--space-md);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.footer-social a {
  color: var(--color-white);
  font-size: var(--font-size-lg);
  transition: opacity var(--transition-fast);
}

.footer-social a:hover {
  opacity: 0.7;
}

.footer-social svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.footer-col {
  word-wrap: break-word;
}

.footer-col h4 {
  display: none;
}

.footer-col ul li {
  margin-bottom: var(--space-xs);
}

.footer-col ul li a {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--color-white);
}

/* Live layout: the two Moneyfacts badges side by side, NACFB below (right-aligned) */
.footer-badges {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  align-items: flex-start;
  max-width: 250px;
  margin: 0 0 0 auto;
}

.footer-badges img {
  height: 72px;
  width: auto;
}

.footer-col:has(.footer-badges) {
  padding-top: 0;
  margin-top: 0;
}

@media (max-width: 768px) {
  .footer-badges {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0;
    gap: var(--space-sm);
  }

  .footer-badges img {
    height: 60px;
  }
}

.footer-bottom-wrapper {
  background: #000000;
  margin-top: 0;
  /* Break out of any enclosing .container so the black bar spans
     the full viewport regardless of HTML nesting. */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  position: relative;
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-md) 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  box-sizing: border-box;
}

.footer-bottom p {
  font-size: var(--font-size-xs);
  color: #ffffff;
  line-height: 1.6;
  max-width: 900px;
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-md);
}

.footer-bottom-links a {
  font-size: var(--font-size-xs);
  color: #ffffff;
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--color-white);
}

/* ========================================
   TRUSTPILOT SECTION
   ======================================== */
.trustpilot-section {
  padding: var(--space-xl) 0;
  background: #F8F8F8;
  max-height: 200px;
  overflow: hidden;
}

.trustpilot-widget iframe {
  max-height: 160px;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-lg); }
.mb-3 { margin-bottom: var(--space-xl); }
.mb-4 { margin-bottom: var(--space-2xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-lg); }
.mt-3 { margin-top: var(--space-xl); }

.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }

/* ========================================
   SHAPE DIVIDERS (Elementor-style curve / curve-negative) — shared by every template
   ======================================== */
.intro-shape {
  overflow: hidden;
  position: absolute;
  left: 0;
  width: 100%;
  line-height: 0;
  direction: ltr;
  pointer-events: none;
  z-index: 0;
}
.intro-shape--top { top: -1px; }
.intro-shape--bottom { bottom: -1px; }
.intro-shape--bottom:not(.intro-shape--neg) { transform: rotate(180deg); }
.intro-shape--neg.intro-shape--top { transform: rotate(180deg); }
.intro-shape--above { z-index: 2; }
.intro-shape svg {
  display: block;
  width: calc(100% + 1.3px);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.intro-shape--flip svg { transform: translateX(-50%) rotateY(180deg); }

/* Trustpilot hidden site-wide (Nov 2026: no paid plan). Delete this rule to bring it back. */
[class*="trustpilot"], .lp-tp, .lp-reviews, a[href*="trustpilot.com"] { display: none !important; }
