/*
  WP Page Base Styles
  
  Every client gets their own theme file that overrides these CSS variables.
  This base file is enqueued in the WordPress theme or via a plugin.
  The client theme file is enqueued after this one.
  
  Usage in WordPress:
  - Upload as a media file or place in the child theme
  - Enqueue in functions.php or via a custom CSS plugin
  - Client overrides load after this file
*/

/* ============================================
   CSS VARIABLES - Override these per client
   ============================================ */
:root {
  /* Colors */
  --color-primary: #1a1a2e;
  --color-primary-hover: #2d2d4e;
  --color-secondary: #e94560;
  --color-secondary-hover: #d63851;
  --color-accent: #0f3460;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f8fa;
  --color-bg-dark: #1a1a2e;
  --color-text: #2e2e2e;
  --color-text-light: #5a5a6e;
  --color-text-on-dark: #ffffff;
  --color-text-muted: #8a8a9a;
  --color-border: #e2e4e8;
  --color-link: #0f3460;
  --color-link-hover: #e94560;

  /* Typography */
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-size-base: 17px;
  --font-size-sm: 15px;
  --font-size-lg: 19px;
  --font-size-h1: 44px;
  --font-size-h2: 32px;
  --font-size-h3: 24px;
  --font-size-h4: 20px;
  --line-height-body: 1.7;
  --line-height-heading: 1.2;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing */
  --section-padding: 80px;
  --section-padding-mobile: 48px;
  --content-max-width: 900px;
  --page-max-width: 1200px;
  --gap-sm: 16px;
  --gap-md: 24px;
  --gap-lg: 40px;
  --gap-xl: 64px;

  /* Borders & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

  /* Buttons */
  --btn-padding: 14px 32px;
  --btn-padding-sm: 10px 24px;
  --btn-radius: var(--radius-md);
  --btn-font-size: 16px;
  --btn-font-weight: var(--font-weight-semibold);
}


/* ============================================
   RESET & BASE
   ============================================ */
.sp-page *,
.sp-page *::before,
.sp-page *::after {
  box-sizing: border-box;
}

.sp-page {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.sp-page a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.sp-page a:hover {
  color: var(--color-link-hover);
}


/* ============================================
   LAYOUT
   ============================================ */
.sp-section {
  padding: var(--section-padding) 24px;
}

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

.sp-section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

.sp-section--dark a {
  color: var(--color-text-on-dark);
}

.sp-container {
  max-width: var(--page-max-width);
  margin: 0 auto;
}

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

.sp-grid {
  display: grid;
  gap: var(--gap-md);
}

.sp-grid--2 { grid-template-columns: 1fr 1fr; }
.sp-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.sp-grid--4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.sp-grid--60-40 { grid-template-columns: 3fr 2fr; }
.sp-grid--40-60 { grid-template-columns: 2fr 3fr; }


/* ============================================
   TYPOGRAPHY
   ============================================ */
.sp-page h1, .sp-page h2, .sp-page h3, .sp-page h4 {
  font-family: var(--font-heading);
  line-height: var(--line-height-heading);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--gap-md) 0;
}

.sp-page h1 {
  font-size: var(--font-size-h1);
  letter-spacing: -0.02em;
}

.sp-page h2 {
  font-size: var(--font-size-h2);
  letter-spacing: -0.01em;
  margin-top: var(--gap-lg);
}

.sp-page h3 {
  font-size: var(--font-size-h3);
}

.sp-page h4 {
  font-size: var(--font-size-h4);
}

.sp-page p {
  margin: 0 0 var(--gap-md) 0;
}

.sp-page ul, .sp-page ol {
  margin: 0 0 var(--gap-md) 0;
  padding-left: 1.5em;
}

.sp-page li {
  margin-bottom: 8px;
}

.sp-page li strong {
  color: var(--color-primary);
}

.sp-page .sp-subtitle {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
  margin-bottom: 8px;
}


/* ============================================
   HERO SECTION
   ============================================ */
.sp-hero {
  background-color: var(--color-bg-dark);
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 100px 24px;
  text-align: center;
  color: var(--color-text-on-dark);
}

.sp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.65) 100%
  );
  z-index: 1;
}

.sp-hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.sp-hero h1 {
  color: var(--color-text-on-dark);
  margin-bottom: var(--gap-md);
}

.sp-hero p {
  font-size: var(--font-size-lg);
  color: rgba(255,255,255,0.9);
  max-width: 700px;
  margin: 0 auto var(--gap-lg) auto;
}


/* ============================================
   BUTTONS
   ============================================ */
.sp-btn {
  display: inline-block;
  padding: var(--btn-padding);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  font-family: var(--font-body);
  text-decoration: none;
  border-radius: var(--btn-radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.sp-btn--primary {
  background-color: var(--color-secondary);
  color: #ffffff;
  border-color: var(--color-secondary);
}

.sp-btn--primary:hover {
  background-color: var(--color-secondary-hover);
  border-color: var(--color-secondary-hover);
  color: #ffffff;
}

.sp-btn--outline {
  background-color: transparent;
  color: var(--color-text-on-dark);
  border-color: rgba(255,255,255,0.5);
}

.sp-btn--outline:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.8);
  color: var(--color-text-on-dark);
}

.sp-btn--on-light {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.sp-btn--on-light:hover {
  background-color: var(--color-primary);
  color: var(--color-text-on-dark);
}

.sp-btn-group {
  display: flex;
  gap: var(--gap-sm);
  flex-wrap: wrap;
  justify-content: center;
}


/* ============================================
   CARDS
   ============================================ */
.sp-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sp-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.sp-card h3 {
  margin-top: 0;
}

.sp-card p:last-child {
  margin-bottom: 0;
}

.sp-card__link {
  display: inline-block;
  margin-top: var(--gap-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-secondary);
}


/* ============================================
   TESTIMONIALS
   ============================================ */
.sp-testimonial {
  background: var(--color-bg);
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--radius-md);
  padding: var(--gap-lg);
  margin-bottom: var(--gap-md);
}

.sp-testimonial__quote {
  font-size: var(--font-size-lg);
  font-style: italic;
  color: var(--color-text);
  margin-bottom: var(--gap-sm);
  line-height: 1.6;
}

.sp-testimonial__author {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
}


/* ============================================
   FAQ ACCORDION
   ============================================ */
.sp-faq-item {
  border-bottom: 1px solid var(--color-border);
}

.sp-faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.sp-faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: var(--gap-md) 0;
  font-family: var(--font-heading);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap-sm);
}

.sp-faq-q::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.sp-faq-item.active .sp-faq-q::after {
  content: '\2212';
}

.sp-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.sp-faq-item.active .sp-faq-a {
  max-height: 500px;
  padding-bottom: var(--gap-md);
}

.sp-faq-a p {
  color: var(--color-text-light);
}


/* ============================================
   LOCATIONS
   ============================================ */
.sp-location {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  border: 1px solid var(--color-border);
}

.sp-location h3 {
  margin-top: 0;
  color: var(--color-primary);
}

.sp-location__address {
  font-weight: var(--font-weight-semibold);
  margin-bottom: 4px;
}

.sp-location__detail {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  margin-bottom: var(--gap-sm);
}


/* ============================================
   COMPARISON TABLE
   ============================================ */
.sp-table-wrap {
  overflow-x: auto;
  margin-bottom: var(--gap-md);
}

.sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.sp-table th {
  background: var(--color-primary);
  color: var(--color-text-on-dark);
  padding: 12px 16px;
  text-align: left;
  font-weight: var(--font-weight-semibold);
}

.sp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.sp-table tr:nth-child(even) td {
  background: var(--color-bg-alt);
}


/* ============================================
   TEAM MEMBERS
   ============================================ */
.sp-team-member {
  margin-bottom: var(--gap-lg);
}

.sp-team-member h3 {
  margin-bottom: 4px;
}

.sp-team-member__role {
  color: var(--color-secondary);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  margin-bottom: var(--gap-sm);
}


/* ============================================
   SERVICES GRID
   ============================================ */
.sp-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap-md);
}

.sp-service-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s ease;
}

.sp-service-card:hover {
  box-shadow: var(--shadow-md);
}

.sp-service-card h4 {
  margin-top: 0;
  color: var(--color-primary);
}

.sp-service-card p {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
}


/* ============================================
   CTA BANNER
   ============================================ */
.sp-cta-banner {
  background-color: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  text-align: center;
  padding: var(--section-padding) 24px;
}

.sp-cta-banner h2 {
  color: var(--color-text-on-dark);
  margin-top: 0;
}

.sp-cta-banner p {
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto var(--gap-lg) auto;
}


/* ============================================
   HERO VARIANTS
   ============================================ */

/* Hero with background image + two columns (text left, image right) */
.sp-hero--split {
  text-align: left;
  padding: 0;
  overflow: hidden;
}

.sp-hero--split .sp-hero__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: var(--page-max-width);
  align-items: center;
}

.sp-hero--split .sp-hero__text {
  padding: 80px 50px 80px 50px;
}

.sp-hero--split .sp-hero__image {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 500px;
}

.sp-hero--split .sp-hero__image img {
  max-height: 100%;
  object-fit: contain;
}

.sp-hero--split .sp-btn-group {
  justify-content: flex-start;
}

/* Trust bar (above hero H1) */
.sp-trust-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--gap-md);
}

/* Scrolling credential ticker */
.sp-ticker {
  background: var(--color-secondary);
  color: #ffffff;
  padding: 12px 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.sp-ticker__inner {
  display: inline-flex;
  gap: var(--gap-lg);
  animation: sp-ticker-scroll 20s linear infinite;
}

@keyframes sp-ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ============================================
   TWO-COLUMN IMAGE + TEXT SECTIONS
   ============================================ */
.sp-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-xl);
  align-items: center;
}

.sp-split--reverse {
  direction: rtl;
}

.sp-split--reverse > * {
  direction: ltr;
}

.sp-split__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.sp-split__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.sp-split__text {
  padding: var(--gap-md) 0;
}


/* ============================================
   SECTION LABELS (small uppercase text above H2)
   ============================================ */
.sp-label {
  display: inline-block;
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.sp-section--dark .sp-label {
  color: var(--color-secondary);
}

/* Accent word within heading */
.sp-accent {
  color: var(--color-secondary);
}


/* ============================================
   ICON CARDS (2x2 or 3-column grid)
   ============================================ */
.sp-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--gap-lg);
}

.sp-icon-card {
  text-align: left;
}

.sp-icon-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--gap-sm);
  color: var(--color-secondary);
}

.sp-icon-card__icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.sp-icon-card h3 {
  font-size: var(--font-size-h3);
  margin-bottom: 8px;
}

.sp-icon-card p {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  margin-bottom: 0;
}


/* ============================================
   CREDENTIAL / TRUST LIST (checkmark bullets)
   ============================================ */
.sp-check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--gap-md) 0;
}

.sp-check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-weight: var(--font-weight-medium);
}

.sp-check-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-weight: var(--font-weight-bold);
}

.sp-section--dark .sp-check-list li::before {
  color: var(--color-secondary);
}

.sp-section--dark .sp-check-list li {
  color: var(--color-text-on-dark);
}


/* ============================================
   TESTIMONIAL CARDS (with photo + stars)
   ============================================ */
.sp-testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap-md);
}

.sp-testimonial-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.sp-testimonial-card__stars {
  color: #f5a623;
  font-size: 18px;
  margin-bottom: var(--gap-sm);
  letter-spacing: 2px;
}

.sp-testimonial-card__text {
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: var(--gap-md);
  font-style: italic;
}

.sp-testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sp-testimonial-card__photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.sp-testimonial-card__name {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
}


/* ============================================
   DARK FEATURE SECTION (case study, proof)
   ============================================ */
.sp-section--dark .sp-split__image img {
  border-radius: var(--radius-lg);
}

.sp-section--dark h2 {
  color: var(--color-text-on-dark);
}

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


/* ============================================
   CTA BANNER WITH BACKGROUND IMAGE
   ============================================ */
.sp-cta-banner--image {
  background-size: cover;
  background-position: center;
  position: relative;
}

.sp-cta-banner--image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(24, 41, 63, 0.9) 0%,
    rgba(14, 27, 46, 0.95) 100%
  );
  z-index: 1;
}

.sp-cta-banner--image > * {
  position: relative;
  z-index: 2;
}


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .sp-section {
    padding: var(--section-padding-mobile) 20px;
  }

  .sp-hero {
    padding: 64px 20px;
  }

  .sp-page h1 {
    font-size: 30px;
  }

  .sp-page h2 {
    font-size: 24px;
  }

  .sp-page h3 {
    font-size: 20px;
  }

  .sp-grid--2,
  .sp-grid--3,
  .sp-grid--4,
  .sp-grid--60-40,
  .sp-grid--40-60 {
    grid-template-columns: 1fr;
  }

  .sp-hero--split .sp-hero__content {
    grid-template-columns: 1fr;
  }

  .sp-hero--split .sp-hero__image {
    min-height: 300px;
    order: -1;
  }

  .sp-hero--split .sp-hero__text {
    padding: 40px 20px;
  }

  .sp-split {
    grid-template-columns: 1fr;
  }

  .sp-split--reverse {
    direction: ltr;
  }

  .sp-icon-grid {
    grid-template-columns: 1fr;
  }

  .sp-testimonial-grid {
    grid-template-columns: 1fr;
  }

  .sp-btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .sp-btn {
    width: 100%;
  }

  .sp-cta-banner {
    padding: var(--section-padding-mobile) 20px;
  }
}
