/* ============================================
   financeb2b.co.uk - Main Stylesheet
   ============================================ */

/* ============================================
   1. CSS VARIABLES - Design System
   ============================================ */
:root {
  /* Primary Colors - Professional & Trustworthy */
  --color-primary: #1a1a2e;
  --color-secondary: #16213e;
  --color-accent: #0066cc;
  --color-accent-hover: #0052a3;

  /* Neutral Colors */
  --color-background: #ffffff;
  --color-surface: #f8f9fa;
  --color-border: #e9ecef;
  --color-text: #212529;
  --color-text-secondary: #6c757d;

  /* Success & Status Colors */
  --color-success: #10b981;
  --color-info: #3b82f6;
  --color-warning: #f59e0b;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing System */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-24: 6rem;     /* 96px */

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.4s ease;
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-background);
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-normal);
}

ul, ol {
  list-style: none;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-semibold);
  line-height: 1.2;
  margin-bottom: var(--space-4);
  color: var(--color-primary);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

a:hover {
  color: var(--color-accent);
}

/* ============================================
   4. LAYOUT COMPONENTS
   ============================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

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

.section-lg {
  padding: var(--space-24) 0;
}

/* Grid System */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(var(--space-4) * -1);
}

.col {
  flex: 1;
  padding: 0 var(--space-4);
  margin-bottom: var(--space-6);
}

.col-2 {
  flex: 0 0 50%;
  max-width: 50%;
}

.col-3 {
  flex: 0 0 33.333%;
  max-width: 33.333%;
}

.col-4 {
  flex: 0 0 25%;
  max-width: 25%;
}

/* ============================================
   5. HEADER & NAVIGATION
   ============================================ */
.site-header {
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo a {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.logo a:hover {
  opacity: 0.8;
}

.logo img {
  height: 64px;
  width: auto;
  display: block;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.main-nav a,
.main-nav .nav-label {
  color: var(--color-text);
  font-weight: var(--font-medium);
  padding: var(--space-2) var(--space-3);
  border-radius: 4px;
  transition: all var(--transition-normal);
}

.main-nav .nav-label {
  cursor: pointer;
  display: inline-block;
}

.main-nav a:hover,
.main-nav .nav-label:hover {
  color: var(--color-accent);
  background: var(--color-surface);
}

.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-4);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.has-dropdown:hover .dropdown,
.dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li {
  margin-bottom: var(--space-2);
}

.dropdown li:last-child {
  margin-bottom: 0;
}

.dropdown a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text);
  border-radius: 4px;
}

.dropdown a:hover {
  background: var(--color-surface);
  color: var(--color-accent);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: all var(--transition-normal);
}

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

/* ============================================
   6. BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  border-radius: 6px;
  font-weight: var(--font-medium);
  font-size: var(--text-base);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-normal);
  line-height: 1.5;
}

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

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-background);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: var(--color-background);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.btn-large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

/* ============================================
   7. HERO SECTION
   ============================================ */
.hero {
  padding: var(--space-24) 0;
  background: var(--color-surface);
  text-align: center;
}

.hero h1 {
  margin-bottom: var(--space-6);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subheading {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto var(--space-8);
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero with Split Layout (Image variant) */
.hero-with-image {
  padding: var(--space-24) 0;
  background: var(--color-surface);
}

.hero-with-image .container {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.hero-content {
  flex: 1;
  max-width: 550px;
}

.hero-content h1 {
  text-align: left;
  margin-bottom: var(--space-6);
}

.hero-content .hero-subheading {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.hero-content .hero-buttons {
  justify-content: flex-start;
}

.hero-image {
  flex: 1;
  max-width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  width: auto;
  height: auto;
  max-width: 500px;
  max-height: 500px;
  object-fit: contain;
  border-radius: 16px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
}

/* Feature sections with images */
.feature-section {
  padding: var(--space-16) 0;
}

.feature-section-content {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin-bottom: var(--space-16);
}

.feature-section-content.reverse {
  flex-direction: row-reverse;
}

.feature-section-text {
  flex: 1;
}

.feature-section-image {
  flex: 1;
  max-width: 600px;
}

.feature-section-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ============================================
   8. TRUST BAR
   ============================================ */
.trust-bar {
  padding: var(--space-8) 0;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}

.trust-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.trust-item {
  text-align: center;
  flex: 1;
  min-width: 200px;
}

.trust-item-icon {
  font-size: var(--text-3xl);
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.trust-item-text {
  font-weight: var(--font-semibold);
  color: var(--color-primary);
}

/* ============================================
   9. FEATURE CARDS
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
}

.feature-card {
  padding: var(--space-8);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: all var(--transition-normal);
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--color-accent);
}

.feature-icon {
  font-size: var(--text-4xl);
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.feature-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}

.feature-description {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

.feature-link {
  color: var(--color-accent);
  font-weight: var(--font-medium);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.feature-link:hover {
  text-decoration: underline;
}

/* ============================================
   10. CTA BLOCKS
   ============================================ */
.cta-block {
  padding: var(--space-24) 0;
  background: var(--color-primary);
  color: var(--color-background);
  text-align: center;
}

.cta-block h2 {
  color: var(--color-background);
  margin-bottom: var(--space-6);
}

.cta-block p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto var(--space-8);
}

.cta-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   11. FOOTER
   ============================================ */
.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer-column h3 {
  color: var(--color-background);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.footer-column ul li {
  margin-bottom: var(--space-2);
}

.footer-column a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-normal);
}

.footer-column a:hover {
  color: var(--color-background);
}

.footer-subheading {
  margin-top: var(--space-6);
  font-size: var(--text-base);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-info p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.footer-badges {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.badge {
  height: 40px;
  width: auto;
}

/* ============================================
   12. UTILITY CLASSES
   ============================================ */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-8 { padding-top: var(--space-8); }
.pb-8 { padding-bottom: var(--space-8); }

/* ============================================
   13. RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  :root {
    --text-5xl: 2.25rem;  /* Reduce hero heading size */
    --text-4xl: 1.875rem;
    --text-3xl: 1.5rem;
  }

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

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

  .section-lg {
    padding: var(--space-16) 0;
  }

  .hero {
    padding: var(--space-16) 0;
  }

  .hero-with-image {
    padding: var(--space-16) 0;
  }

  .hero-with-image .container {
    flex-direction: column-reverse;
    gap: var(--space-8);
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-content h1,
  .hero-content .hero-subheading {
    text-align: center;
  }

  .hero-content .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    max-width: 100%;
    width: 100%;
  }

  .feature-section-content,
  .feature-section-content.reverse {
    flex-direction: column;
    gap: var(--space-8);
  }

  .feature-section-image {
    max-width: 100%;
  }

  .main-nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    padding: var(--space-4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 999;
  }

  .main-nav.mobile-active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav > ul > li {
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav > ul > li:last-child {
    border-bottom: none;
  }

  .main-nav a,
  .main-nav .nav-label {
    display: block;
    padding: var(--space-4);
    width: 100%;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--color-surface);
    padding: 0;
    display: none;
  }

  .dropdown.show {
    display: block;
  }

  .dropdown a {
    padding: var(--space-3) var(--space-6);
    border-bottom: 1px solid var(--color-border);
  }

  .dropdown a:last-child {
    border-bottom: none;
  }

  .header-cta {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
  }

  .col-2, .col-3, .col-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  :root {
    --text-5xl: 1.875rem;
    --text-4xl: 1.5rem;
  }

  .trust-items {
    flex-direction: column;
    gap: var(--space-4);
  }

  .trust-item {
    min-width: 100%;
  }
}

/* ============================================
   SITEMAP PAGE STYLES
   ============================================ */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.sitemap-section {
  background: var(--color-surface);
  padding: var(--space-6);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.sitemap-section h2 {
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-accent);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sitemap-section h2 i {
  color: var(--color-accent);
  font-size: var(--text-lg);
}

.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap-list li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}

.sitemap-list li:last-child {
  border-bottom: none;
}

.sitemap-list a {
  color: var(--color-text);
  font-size: var(--text-base);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  display: block;
}

.sitemap-list a:hover {
  color: var(--color-accent);
  padding-left: var(--space-2);
}

.sitemap-stats {
  text-align: center;
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.sitemap-stats p {
  color: var(--color-text-secondary);
  margin: var(--space-2) 0;
}

/* Sitemap Responsive */
@media (max-width: 768px) {
  .sitemap-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}
