:root {
  /* Brand Colors - Database Driven (DB column names) */
  --brand_primary_color: #669999;
  --brand_secondary_color: #b3ced1;
  --brand_tertiary_color: #e7b09e;
  --brand_quaternary_color: #fd680e;
  --brand_accent_color: #ddaa50;
  --brand_warning_color: #ffc107;
  --brand_danger_color: #dc3545;
  --brand_info_color: #17a2b8;
  --brand_success_color: #28a745;
  --brand_error_color: #dc3545;
  --brand_background_color: #ffffff;
  --brand_text_color: #333333;
  --brand_text_light: #666666;
  --brand_text_muted: #999999;
  --custom_color_1: #20b2aa;
  --custom_color_2: #ac3997;
  --custom_color_3: #ffb347;

  /* Brand Colors (RGB) - for rgba() usage */
  --brand-primary-rgb: 102, 153, 153;
  --brand-secondary-rgb: 179, 206, 209;
  --brand-tertiary-rgb: 231, 176, 158;
  --brand-quaternary-rgb: 253, 104, 14;
  --brand-accent-rgb: 221, 170, 80;
  --brand-warning-rgb: 255, 193, 7;
  --brand-danger-rgb: 220, 53, 69;
  --brand-info-rgb: 23, 162, 184;
  --brand-success-rgb: 40, 167, 69;
  --brand-error-rgb: 220, 53, 69;
  --brand-text-rgb: 51, 51, 51;
  --brand-background-rgb: 255, 255, 255;
  --accent-color-rgb: var(--brand-primary-rgb);

  /* Compatibility Aliases (kebab-case) */
  --brand-primary: var(--brand_primary_color);
  --brand-secondary: var(--brand_secondary_color);
  --brand-tertiary: var(--brand_tertiary_color);
  --brand-quaternary: var(--brand_quaternary_color);
  --brand-accent: var(--brand_accent_color);
  --brand-primary-color: var(--brand_primary_color);
  --brand-secondary-color: var(--brand_secondary_color);
  --brand-tertiary-color: var(--brand_tertiary_color);
  --brand-quaternary-color: var(--brand_quaternary_color);
  --brand-accent-color: var(--brand_accent_color);
  --brand-warning-color: var(--brand_warning_color);
  --brand-danger-color: var(--brand_danger_color);
  --brand-info-color: var(--brand_info_color);
  --brand-success-color: var(--brand_success_color);
  --brand-error-color: var(--brand_error_color);
  --brand-background-color: var(--brand_background_color);
  --brand-text-color: var(--brand_text_color);
  --brand-background: var(--brand_background_color);
  --brand-text: var(--brand_text_color);
  --brand-text-light: var(--brand_text_light);
  --brand-text-muted: var(--brand_text_muted);
  --accent-color: var(--brand_primary_color);
  --heading-color: var(--brand_secondary_color);
  --primary-color: var(--brand_primary_color);
  --secondary-color: var(--brand_secondary_color);
  --success-color: var(--brand_success_color);
  --danger-color: var(--brand_danger_color);
  --warning-color: var(--brand_warning_color);
  --info-color: var(--brand_info_color);
  --custom-color-1: var(--custom_color_1);
  --custom-color-2: var(--custom_color_2);
  --custom-color-3: var(--custom_color_3);
  --text-on-primary: #000000;
  --text-on-secondary: #000000;

  /* Brand Fonts - Database Driven (DB column names) */
  --brand_font_primary: 'Inter, system-ui, sans-serif';
  --brand_font_secondary: 'Roboto, Arial, sans-serif';
  --brand_font_heading: 'Inter, system-ui, sans-serif';
  --brand_font_body: 'Roboto, Arial, sans-serif';
  --brand_font_monospace: 'SF Mono, Monaco, Consolas, monospace';

  /* Font Compatibility Aliases */
  --brand-font-primary: var(--brand_font_primary);
  --brand-font-secondary: var(--brand_font_secondary);
  --brand-font-heading: var(--brand_font_heading);
  --brand-font-body: var(--brand_font_body);
  --font-primary: var(--brand_font_primary);
  --font-secondary: var(--brand_font_secondary);
  --font-heading: var(--brand_font_heading);
  --font-body: var(--brand_font_body);
}

/* Base Typography - Brand Fonts Applied */
body {
  font-family: var(--brand-font-body);
  color: var(--brand-text);
}

/* Accessible Text Helpers */
:root {
  --accessible-on-primary: #ffffff; /* Themes may override if primary is light */
  --accessible-on-secondary: #ffffff;
  --accessible-on-accent: #ffffff;
  --accessible-on-background: var(--brand_text_color);
}
/* Exclude hero sections from body text color inheritance */
.hero, section.hero, #hero {
  color: white !important;
}
/* Hero image overlay for better text readability (very subtle) */
.hero-bg, .hero img.hero-bg {
  position: relative;
}
.hero-bg::after, .hero img.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.02) 0%,
    rgba(0, 0, 0, 0.04) 50%,
    rgba(0, 0, 0, 0.02) 100%
  );
  pointer-events: none;
  z-index: 1;
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero, section.hero, #hero { position: relative; }
.hero::before, section.hero::before, #hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.02); /* VERY subtle tint */
  pointer-events: none;
  z-index: 1;
}
.hero *, section.hero *, #hero * {
  color: inherit !important;
}
.hero h1, section.hero h1, #hero h1,
.hero h2, section.hero h2, #hero h2,
.hero h3, section.hero h3, #hero h3,
.hero h4, section.hero h4, #hero h4,
.hero h5, section.hero h5, #hero h5,
.hero h6, section.hero h6, #hero h6 {
  color: white !important;
  font-weight: 800 !important;
  font-size: 72px !important;
  line-height: 84px !important;
  text-shadow: 
    -2px -2px 0 rgba(0, 0, 0, 0.8),
    2px -2px 0 rgba(0, 0, 0, 0.8),
    -2px 2px 0 rgba(0, 0, 0, 0.8),
    2px 2px 0 rgba(0, 0, 0, 0.8),
    0 4px 8px rgba(0, 0, 0, 0.6) !important;
  padding: 10px 20px !important;
  border-radius: 6px !important;
  margin: 0 auto 15px auto !important;
  display: inline-block !important;
}

/* Base Typography - Brand Fonts Applied */
body {
  font-family: var(--brand-font-body);
  color: var(--brand-text);
}
/* Exclude hero sections from body text color inheritance */
.hero, section.hero, #hero {
  color: white !important;
}
/* Hero image overlay for better text readability (very subtle) */
.hero-bg, .hero img.hero-bg {
  position: relative;
}
.hero-bg::after, .hero img.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.02) 0%,
    rgba(0, 0, 0, 0.04) 50%,
    rgba(0, 0, 0, 0.02) 100%
  );
  pointer-events: none;
  z-index: 1;
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero *, section.hero *, #hero * {
  color: inherit !important;
}
.hero h1, section.hero h1, #hero h1,
.hero h2, section.hero h2, #hero h2,
.hero h3, section.hero h3, #hero h3,
.hero h4, section.hero h4, #hero h4,
.hero h5, section.hero h5, #hero h5,
.hero h6, section.hero h6, #hero h6 {
  color: white !important;
  font-weight: 800 !important;
  font-size: 72px !important;
  line-height: 84px !important;
  text-shadow: 
    -2px -2px 0 rgba(0, 0, 0, 0.8),
    2px -2px 0 rgba(0, 0, 0, 0.8),
    -2px 2px 0 rgba(0, 0, 0, 0.8),
    2px 2px 0 rgba(0, 0, 0, 0.8),
    0 4px 8px rgba(0, 0, 0, 0.6) !important;
  padding: 10px 20px !important;
  border-radius: 6px !important;
  margin: 0 auto 15px auto !important;
  display: inline-block !important;
}
.hero .col-xl-7 p, .hero .col-lg-9 p, section.hero .col-xl-7 p, section.hero .col-lg-9 p, #hero .col-xl-7 p, #hero .col-lg-9 p {
  color: rgba(255, 255, 255, 0.98) !important;
  font-size: 20px !important;
  line-height: 28px !important;
  font-weight: 500 !important;
  text-shadow: 
    -1px -1px 0 rgba(0, 0, 0, 0.7),
    1px -1px 0 rgba(0, 0, 0, 0.7),
    -1px 1px 0 rgba(0, 0, 0, 0.7),
    1px 1px 0 rgba(0, 0, 0, 0.7),
    0 2px 4px rgba(0, 0, 0, 0.5) !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  margin: 0 auto !important;
  display: inline-block !important;
  max-width: 800px !important;
}
/* Fix hero form font sizes and layout */
.hero-inline-form, .hero-form-header h3, .hero-form-subtitle p {
  font-size: inherit !important;
}
.hero-form-header h3 {
  font-size: 0.9rem !important;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-weight: 600 !important;
}
.hero-form-subtitle p {
  font-size: 0.85rem !important;
}
/* Make form horizontal and compact */
.hero-inline-form {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  max-width: 100% !important;
  padding: 0.8rem 1.2rem !important;
}
.hero-inline-form form {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.75rem !important;
  width: 100% !important;
}
.hero-form-inputs {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  flex: 1 !important;
  justify-content: center !important;
}
/* Responsive hero text sizing */
@media (max-width: 1200px) {
  .hero h1, section.hero h1, #hero h1 {
    font-size: 64px !important;
    line-height: 72px !important;
    padding: 12px 20px !important;
  }
  .hero .col-xl-7 p, .hero .col-lg-9 p, section.hero .col-xl-7 p, section.hero .col-lg-9 p, #hero .col-xl-7 p, #hero .col-lg-9 p {
    font-size: 24px !important;
    line-height: 32px !important;
  }
}
@media (max-width: 992px) {
  .hero h1, section.hero h1, #hero h1 {
    font-size: 48px !important;
    line-height: 56px !important;
    padding: 10px 18px !important;
  }
  .hero .col-xl-7 p, .hero .col-lg-9 p, section.hero .col-xl-7 p, section.hero .col-lg-9 p, #hero .col-xl-7 p, #hero .col-lg-9 p {
    font-size: 22px !important;
    line-height: 30px !important;
    padding: 10px 16px !important;
  }
}
@media (max-width: 768px) {
  .hero h1, section.hero h1, #hero h1 {
    font-size: 38px !important;
    line-height: 44px !important;
    padding: 8px 15px !important;
  }
  .hero .col-xl-7 p, .hero .col-lg-9 p, section.hero .col-xl-7 p, section.hero .col-lg-9 p, #hero .col-xl-7 p, #hero .col-lg-9 p {
    font-size: 20px !important;
    line-height: 28px !important;
    padding: 8px 14px !important;
  }
}
@media (max-width: 576px) {
  .hero h1, section.hero h1, #hero h1 {
    font-size: 32px !important;
    line-height: 38px !important;
    padding: 6px 12px !important;
  }
  .hero .col-xl-7 p, .hero .col-lg-9 p, section.hero .col-xl-7 p, section.hero .col-lg-9 p, #hero .col-xl-7 p, #hero .col-lg-9 p {
    font-size: 18px !important;
    line-height: 26px !important;
    padding: 6px 12px !important;
  }
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--brand-font-heading);
}
.font-primary {
  font-family: var(--brand-font-primary);
}
.font-secondary {
  font-family: var(--brand-font-secondary);
}
.font-monospace {
  font-family: var(--brand-font-monospace);
}

/* Hero Form Accessibility and Positioning */
.hero-inline-form {
  position: relative !important;
  height: auto !important;
  min-height: 80px !important;
  max-height: 120px !important;
}
.hero-inline-form form {
  min-height: 60px !important;
  max-height: 80px !important;
}
.hero-form-header {
  flex: 0 0 140px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.hero-form-button-container {
  flex: 0 0 160px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.hero-form-inputs {
  flex: 1 !important;
  max-width: calc(100% - 320px) !important;
  min-width: 320px !important;
}
.hero-get-started {
  font-size: clamp(1rem, 2vw, 1.2rem) !important;
  font-weight: 700 !important;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8), -1px -1px 2px rgba(0,0,0,0.6), 1px -1px 2px rgba(0,0,0,0.6), -1px 1px 2px rgba(0,0,0,0.6) !important;
}
.hero-form-button {
  background: #FFD700 !important;
  border: 2px solid #000000 !important;
  color: #2c3e50 !important;
  text-shadow: 1px 1px 0px rgba(0,0,0,0.8), -1px -1px 0px rgba(0,0,0,0.8), 1px -1px 0px rgba(0,0,0,0.8), -1px 1px 0px rgba(0,0,0,0.8), 0px 1px 0px rgba(0,0,0,0.8), 0px -1px 0px rgba(0,0,0,0.8), 1px 0px 0px rgba(0,0,0,0.8), -1px 0px 0px rgba(0,0,0,0.8) !important;
}
.hero-form-button:hover {
  background: #FFA500 !important;
  border: 2px solid #000000 !important;
}
.hero-form-input {
  background: white !important;
  color: #2c3e50 !important;
}

/* Section Text Accessibility Rules */
/* Always use readable text colors regardless of brand colors */
/* Main Content Text - Use brand text color for readability */
section:not(.hero) h1, section:not(.hero) h2, section:not(.hero) h3,
section:not(.hero) h4, section:not(.hero) h5, section:not(.hero) h6,
.section-heading, .content-heading {
  color: var(--brand-text) !important;
}
section:not(.hero) p, section:not(.hero) .text-content,
.section-text, .content-text, main p, article p {
  color: var(--brand-text) !important;
}
section:not(.hero) .text-muted, .secondary-text {
  color: var(--brand-text-muted) !important;
}
/* Footer links styling removed - handled by public-branding-default.css */
/* Navigation text should be readable */
.navbar .nav-link, .navbar .navbar-brand {
  color: var(--brand-text) !important;
}
/* Brand colors should only be used for accents, buttons, and highlights */
.brand-accent, .accent-text { color: var(--brand-primary) !important; }
.brand-link, .highlight-link { color: var(--brand-primary) !important; }
.brand-link:hover, .highlight-link:hover { color: var(--brand-secondary) !important; }
.brand-bg, .accent-bg { background-color: var(--brand-primary) !important; }
.brand-border, .accent-border { border-color: var(--brand-primary) !important; }

/* Clean Professional Services Section - Footer-Inspired */
.services .service-item {
  background: white;
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
  height: 100%;
}
.services .service-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  border-color: var(--brand-primary);
}
.services .service-item .icon {
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
}
.services .service-item .icon i {
  font-size: 3.5rem;
  color: var(--brand-primary);
  transition: all 0.3s ease;
  opacity: 1;
  visibility: visible;
}
.services .service-item:hover .icon i {
  color: var(--brand-secondary);
  transform: scale(1.1);
  opacity: 1;
  visibility: visible;
}
.services .service-item h3 {
  color: #2c3e50;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.services .service-item:hover h3 {
  color: var(--brand-primary);
}
.services .service-item p {
  color: #666666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
  margin-top: auto;
}
/* Hide old blob SVG completely and fix icon visibility */
.services .service-item svg {
  display: none !important;
}
/* Force icon visibility and override any hidden styles */
.services .service-item .icon i,
.services .service-item:hover .icon i {
  display: inline-block !important;
  opacity: 1 !important;
  visibility: visible !important;
}
/* Clean override for all color variants */
.services .service-item.item-cyan,
.services .service-item.item-orange,
.services .service-item.item-teal,
.services .service-item.item-red,
.services .service-item.item-indigo,
.services .service-item.item-pink {
  /* All use same clean professional styling */
}
/* Override any existing color-specific icon rules */
.services .service-item.item-cyan i,
.services .service-item.item-orange i,
.services .service-item.item-teal i,
.services .service-item.item-red i,
.services .service-item.item-indigo i,
.services .service-item.item-pink i {
  color: var(--brand-primary) !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.services .service-item.item-cyan:hover i,
.services .service-item.item-orange:hover i,
.services .service-item.item-teal:hover i,
.services .service-item.item-red:hover i,
.services .service-item.item-indigo:hover i,
.services .service-item.item-pink:hover i {
  color: var(--brand-secondary) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Service CTA Button Hover Effect */
#service-cta .btn:hover {
  background-color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--accent-color-rgb), 0.3);
}

/* Override scroll-to-top button with brand colors */
.scroll-top {
  background-color: var(--brand-primary) !important;
  background-color: #669999 !important;
}
.scroll-top:hover {
  background-color: var(--brand-secondary) !important;
  background-color: #b3ced1 !important;
}

/* Override footer links with brand colors */
.footer a {
  color: var(--brand-primary) !important;
  color: #669999 !important;
}
.footer a:hover {
  color: var(--brand-secondary) !important;
  color: #b3ced1 !important;
}

/* Main Call-to-Action Section Styling */
section.call-to-action.section.accent-background,
#call-to-action.call-to-action.section.accent-background {
  background-color: var(--brand-primary) !important;
  background-color: #669999 !important;
  color: white !important;
}
section.call-to-action.section.accent-background,
#call-to-action.call-to-action.section.accent-background {
  background-color: #669999 !important;
  background: #669999 !important;
}
.call-to-action.section.accent-background h3 {
  color: white !important;
  font-size: 2.5rem !important;
  font-weight: 600 !important;
  margin-bottom: 1.5rem !important;
  line-height: 1.2 !important;
}
.call-to-action.section.accent-background p {
  color: white !important;
  font-size: 1.125rem !important;
  line-height: 1.6 !important;
  margin-bottom: 2rem !important;
  opacity: 0.95 !important;
}
.call-to-action.section.accent-background .cta-btn {
  background-color: white !important;
  color: var(--brand-primary) !important;
  color: #669999 !important;
  border: 2px solid white !important;
  padding: 14px 32px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  display: inline-block !important;
  transition: all 0.3s ease !important;
}
.call-to-action.section.accent-background .cta-btn:hover {
  background-color: var(--brand-secondary) !important;
  background-color: #b3ced1 !important;
  color: white !important;
  border-color: var(--brand-secondary) !important;
  border-color: #b3ced1 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2) !important;
}

/* Footer Copyright Section Styling */
.footer .copyright {
  font-size: 1.25rem !important;
  line-height: 1.6 !important;
}
.footer .copyright a {
  color: white !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  font-size: 1.25rem !important;
}
.footer .copyright a:hover {
  color: white !important;
  font-weight: bold !important;
  text-decoration: none !important;
}

/* Override any default link colors with brand colors */
a, .link {
  color: var(--brand-primary) !important;
  color: #669999 !important;
}
a:hover, .link:hover {
  color: var(--brand-secondary) !important;
  color: #b3ced1 !important;
}
