/* =========================
   Base / Reset
========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  background: #ffffff;
  line-height: 1.6;
}

/* =========================
   Colour system
========================= */

:root {
  --blue-dark: #2f4253;
  --blue-mid: #3b556b;
  --green: #5cb85c;
  --green-dark: #4aa74a;
  --bg-light: #f6f8fa;
  --bg-mid: #d5d5d5;
  --text-dark: #1f2933;
  --text-mid: #5b6773;
  --border: #e3e7eb;
}

/* =========================
   Layout
========================= */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 20px;
}

section {
  margin-bottom: 60px;
}

/* =========================
   Hero
========================= */

/********** FLAT HERO COLOUR BLOCK **********/

/* .hero {
  background: linear-gradient(
    135deg,
    var(--blue-dark),
    var(--blue-mid)
  );
  color: #fff;
  padding: 90px 20px;
} 

/********** GRADIENT HERO COLOUR BLOCK **********/

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 90px 20px;
  background: linear-gradient(135deg, #1e2a38 0%, #2f4458 100%);
}

/* Lines / vector-style overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://clientarea.webfrog.co.uk/bccf/assets/imgs/hero-section-bg-lines-only.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.25;
  /* tweak 0.15–0.35 to taste */
  pointer-events: none;
  z-index: 1;
}

/* Soft light depth overlay */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.04), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.03), transparent 50%);
  pointer-events: none;
  z-index: 2;
}

/* Content always above overlays */
.hero .container {
  position: relative;
  z-index: 3;
  padding: 0;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.hero p {
  font-size: 1.15rem;
  color: #dbe4ec;
  max-width: 720px;
}

/* =========================
   Buttons
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #fff;
  padding: 14px 26px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.btn.full {
  width: 100%;
  margin-top: 10px;
}

/* =========================
   Form
========================= */

.form-section {
  margin-top: 25px;
  background: var(--bg-mid);
  padding: 50px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.form-section h2 {
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid textarea {
  grid-column: 1 / -1;
  grid-row: auto;
}

input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  padding: 14px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-family: inherit; /* ← THIS is the fix for textarea font */
  background: #fff;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(92, 184, 92, 0.15);
}

textarea {
  min-height: 140px;
  resize: vertical;
  /* user-friendly, not layout-breaking */
  line-height: 1.5;
}

textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(92, 184, 92, 0.15);
}

/* =========================
   Consent checkbox layout
========================= */

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-mid);
  cursor: pointer;
}

.consent input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.consent span {
  line-height: 1.5;
}

.consent input[type="checkbox"] {
  accent-color: var(--green);
}

/* =========================
   Content sections
========================= */

h2 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

p {
  color: var(--text-mid);
}

ul,
ol {
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
}

/* =========================
   Footer
========================= */

.footer {
  background: #f1f4f7;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.footer p {
  color: var(--text-mid);
}

.footer a {
  color: var(--blue-mid);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* =========================
   Responsive polish
========================= */

@media (max-width: 768px) {
  .hero {
    padding: 70px 20px;
  }

  .form-section {
    padding: 30px 20px;
  }
}

/* =========================
   Footer enhancements
========================= */

.footer h3 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 15px;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e3e7eb;
  color: #3b556b;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-socials a:hover {
  background: #5cb85c;
  color: #ffffff;
}

.footer-legal {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid #e3e7eb;
  font-size: 0.8rem;
  color: #5b6773;
}

/* =========================
   Footer background overlay
========================= */

.footer {
  position: relative;
  overflow: hidden;
}

/* Lines / vector overlay */
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://clientarea.webfrog.co.uk/bccf/assets/imgs/hero-section-bg-lines-only.webp");
  background-repeat: no-repeat;
  background-position: center bottom;
  /* anchor visually to bottom */
  background-size: cover;
  opacity: 0.18;
  /* slightly lighter than hero */
  pointer-events: none;
  z-index: 1;
}

/* Optional soft fade to keep legal text ultra-readable */
.footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(255, 255, 255, 0.15) 0%,
      rgba(255, 255, 255, 0.05) 35%,
      rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 2;
}

/* Ensure footer content sits above overlays */
.footer>* {
  position: relative;
  z-index: 3;
}

/* =========================
   Site header & navigation
   (STABLE – no layout reflow)
========================= */

/* Header wrapper */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

/* Inner layout
   IMPORTANT: padding NEVER changes */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 24px 0;
  transition: box-shadow 0.25s ease;
}

/* Logo – only element that visually shrinks */
.site-header .logo img {
  height: 52px;
  width: auto;
  display: block;
  transition: height 0.25s ease;
}

/* =========================
   Sticky state (full-width)
========================= */

/* Full-width shadow */
.site-header.is-sticky {
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.32),
    0 1px 0 rgba(0, 0, 0, 0.05);
}

/* Inner stays visually stable */
.site-header.is-sticky .header-inner {
  box-shadow: none;
}

/* Logo shrink only */
.site-header.is-sticky .logo img {
  height: 42px;
}

/* Nav base */
.main-nav>ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 26px;
  align-items: center;
}

.main-nav li {
  position: relative;
}

/* Nav links */
.main-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-dark);
  padding: 8px 0;
}

.main-nav a:hover {
  color: var(--green);
}

/* ================= NAV LIST RESET ================= */
.main-nav .dropdown,
.main-nav .dropdown li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav .dropdown li a {
  display: block;
  padding: 12px 16px;
}

/* Dropdown */
.has-dropdown>a::after {
  font-size: 0.65rem;
  margin-left: 6px;
}

.main-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;

  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 240px;
  padding: 8px 0;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  z-index: 1000;

  flex-direction: column;
}

.dropdown li {
  padding: 0;
}

.dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.dropdown a:hover {
  background: var(--bg-light);
  color: var(--green);
}

/* Show dropdown on hover */
.main-nav .has-dropdown:hover>.dropdown {
  display: flex;
}

/* Apply button in header */
.site-header .btn {
  padding: 12px 22px;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* =========================
   Nav active states
========================= */

/* Base nav link */
.main-nav a {
  position: relative;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
}

/* Active link (desktop + mobile) */
.main-nav a.active {
  color: var(--green-dark);
  font-weight: 600;
}

/* Underline indicator (desktop only) */
@media (min-width: 901px) {
  .main-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: var(--green-dark);
    border-radius: 2px;
  }
}

/* Dropdown active item */
.main-nav .dropdown a.active {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
}

/* Parent item active when child page is active */
.main-nav .has-dropdown.active>.nav-parent {
  color: var(--green-dark);
}

/* Mobile: active item highlight */
@media (max-width: 900px) {
  .main-nav a.active {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
  }
}

/* =========================
   Header + hero spacing fix
========================= */

.hero {
  margin-top: 0;
}

/* =========================
   Mobile navigation
========================= */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* ---------- Mobile styles ---------- */
@media (max-width: 900px) {

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid var(--border);
    display: none;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav>ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav a {
    display: block;
    padding: 14px 20px;
  }

  /* Dropdowns become inline sections */
  .main-nav .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .main-nav .has-dropdown.open>.dropdown {
    display: block;
  }

  /* Hide Apply button inside header if needed */
  .site-header .btn.apply-trigger {
    display: none;
  }
}

/* ================= Mobile dropdown toggle ================= */

.has-dropdown {
  position: relative;
}

/* ================= MOBILE NAV DROPDOWNS FIX ================= */

/* Remove stray bullets / dots */
/* .main-nav li::before,
.main-nav a::before {
    content: none !important;
} */

/* Parent nav link layout */
.main-nav .nav-parent {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Chevron icon */
.main-nav .nav-chevron {
  width: 10px;
  height: 10px;
  margin-left: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}

/* Open state rotation */
.main-nav li.open>.nav-parent .nav-chevron {
  transform: rotate(-135deg);
}

.main-nav li.open>.dropdown {
  display: block;
}

/* =========================
   Apply slide-out panel
========================= */

.apply-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 2000;
}

.apply-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100%;
  height: 100%;
  background: #ffffff;
  padding: 30px;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 2001;
  overflow-y: auto;
}

.apply-panel h2 {
  margin-top: 10px;
}

.apply-panel p {
  margin-bottom: 20px;
}

/* Close button */
.apply-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

/* Active state */
.apply-panel.open {
  transform: translateX(0);
}

.apply-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Mobile tweak */
@media (max-width: 600px) {
  .apply-panel {
    width: 100%;
  }
}

/* =========================
   Bad Credit Solutions page
========================= */

.intro {
  max-width: 820px;
  margin-bottom: 40px;
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.solution-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.25s ease;
  position: relative;
}

.solution-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 5px;
  width: 100%;
  background: var(--green);
  border-radius: 10px 10px 0 0;
}

.solution-card h3 {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.solution-card p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.5;
}

.card-cta {
  margin-top: 20px;
  font-weight: 600;
  color: var(--green);
}

.solution-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.solution-card:hover .card-cta {
  text-decoration: underline;
}

/* CTA block */
.cta-block {
  margin-top: 60px;
  padding: 40px;
  background: var(--bg-light);
  border-radius: 12px;
}

/* =========================
   Blog index
========================= */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin: 40px 0;
}

.blog-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.25s ease;
}

.blog-card a {
  display: block;
  padding: 24px;
  height: 100%;
  text-decoration: none;
  color: var(--text-dark);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.blog-meta {
  margin-bottom: 10px;
}

.blog-tag {
  display: inline-block;
  background: var(--bg-light);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.blog-card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.blog-card p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.5;
}

.blog-read {
  display: inline-block;
  margin-top: 16px;
  font-weight: 600;
  color: var(--green);
}

/* =========================
   Breadcrumbs
========================= */

.breadcrumbs {
  background: #f5f7f9;
  /* soft, neutral */
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.85rem;
}

.breadcrumbs .container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 20px;
  color: #6b7280;
  /* muted grey */
}

.breadcrumbs a {
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  color: #9ca3af;
}

.breadcrumbs span:last-child {
  color: #374151;
  font-weight: 600;
}

/* Mobile tidy-up */
@media (max-width: 640px) {
  .breadcrumbs {
    font-size: 0.8rem;
  }

  .breadcrumbs .container {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }
}