/**
 * Late overrides: kill legacy dental blue, fix inner-page layout (Features / Pricing).
 * Load after aima-renewable-chrome.css and page inline styles where possible.
 */

/* Logo header — stop Playfair “AIMA” text styles from dominating */
.aima-site-header .navbar-brand {
  font-size: 0 !important;
  color: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.aima-site-header .aima-logo img {
  height: 42px;
  width: auto;
  max-width: min(220px, 55vw);
}

/* Inner page heroes — no duplicate giant wordmark */
.aima-page-hero .aima-brand-mark {
  display: none !important;
}

.aima-page-hero {
  padding: 3.5rem 0 3rem !important;
  text-align: center;
}

.aima-page-hero h1 {
  font-family: Inter, system-ui, sans-serif !important;
  font-size: clamp(1.65rem, 3vw, 2.25rem) !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.25 !important;
}

.aima-page-hero h1 span {
  color: #0d9488 !important;
}

.aima-page-hero .aima-brand-sub {
  color: #0d9488 !important;
  font-size: 0.78rem !important;
  margin-bottom: 0.75rem !important;
}

.aima-page-hero .lead {
  color: #475569 !important;
}

/* Features hero with photo (overrides generic inner-page hero colours) */
.aima-page-hero--photo {
  text-align: center !important;
}

.aima-page-hero--photo h1,
.aima-page-hero--photo h1 span {
  color: #ffffff !important;
}

.aima-page-hero--photo h1 span {
  color: #7dd3fc !important;
}

.aima-page-hero--photo .aima-brand-sub {
  color: #7dd3fc !important;
}

.aima-page-hero--photo .lead {
  color: rgba(255, 255, 255, 0.94) !important;
}

/* Features FAQ — override legacy dark blue theme block */
#features-faq.aima-section--soft {
  background: linear-gradient(180deg, #f4f7fb 0%, #eef3f8 100%) !important;
}

#features-faq .site-title,
#features-faq .site-title-tagline {
  color: #0f172a !important;
}

#features-faq .site-title span {
  color: #0d9488 !important;
}

#features-faq .aima-faq .accordion-button:not(.collapsed) {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.main #vad .aima-flow {
  max-width: 54rem;
  margin-left: auto;
  margin-right: auto;
}

/* Section rhythm — prevent collapsed / clipped blocks */
.main .aima-section {
  padding: 4.5rem 0 !important;
  overflow: visible !important;
}

.main .aima-section > .container {
  position: relative;
  z-index: 1;
}

.aima-panel,
.aima-dark-panel,
.aima-flow-step,
.aima-pillar,
.aima-price-card,
.aima-feature-item,
.aima-overage-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.5rem !important;
}

.aima-dark-panel h3,
.aima-panel h3,
.aima-feature-item h3 {
  color: #0f172a !important;
}

.aima-dark-panel ul li,
.aima-panel p,
.aima-body-copy,
.aima-check-grid li {
  color: #475569 !important;
}

.aima-check-grid li::before {
  color: #0d9488 !important;
}

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

.aima-check-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.65rem;
  color: #475569;
  line-height: 1.55;
}

/* CTA outline buttons: theme ripple can hide label on hover */
#final-cta .theme-btn,
#final-cta .theme-btn2,
#pricing-cta .theme-btn2,
#about-cta .theme-btn2,
#features-cta .theme-btn2 {
  position: relative;
  z-index: 0;
  overflow: visible;
}

#final-cta .theme-btn2::before,
#pricing-cta .theme-btn2::before,
#about-cta .theme-btn2::before,
#features-cta .theme-btn2::before {
  display: none !important;
  content: none !important;
}

#final-cta .theme-btn2:hover,
#final-cta .theme-btn2:focus,
#pricing-cta .theme-btn2:hover,
#about-cta .theme-btn2:hover,
#features-cta .theme-btn2:hover {
  color: #ffffff !important;
}

/* Home hero — enforce readable copy on photo backgrounds */
.aima-hero .hero-content .aima-hero-lead,
.aima-hero .hero-content p.aima-hero-lead {
  color: rgba(255, 255, 255, 0.96) !important;
}

.aima-hero .hero-content .aima-brand-mark {
  color: #ffffff !important;
}

.aima-check-list li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0.15rem;
  color: #0d9488;
  font-size: 0.85rem;
}

.aima-pillar-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 1.25rem !important;
}

.aima-mission-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 1.25rem !important;
  text-align: left;
  margin-top: 1.5rem;
}

.aima-why-grid,
.aima-channel-grid,
.aima-next-steps {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 1.25rem !important;
}

/* Pricing grid */
.aima-pricing-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 1.25rem !important;
  align-items: stretch !important;
}

.aima-price-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  padding: 1.5rem !important;
}

.aima-price-card .theme-btn {
  margin-top: auto !important;
}

/* Legacy blue purge (inline styles on Features/Pricing/About/Contact) */
[style*="#2C4A6B"],
[style*="#2c4a6b"] {
  /* no-op; use attribute selectors below */
}

.navbar-brand:hover {
  color: inherit !important;
}

.aima-billing-toggle button.active,
.aima-billing-toggle button:hover {
  background: #0d9488 !important;
  color: #fff !important;
}

.aima-calc-output {
  background: linear-gradient(135deg, #0f766e, #0d9488) !important;
}

.aima-calc-out-value {
  color: #ccfbf1 !important;
}

.aima-compare th {
  background: #0f766e !important;
  color: #fff !important;
}

.aima-compare td {
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}

.aima-flow-num {
  background: linear-gradient(135deg, #0f766e, #0d9488) !important;
}

.aima-pillar {
  border-top-color: #0d9488 !important;
}

.aima-feature-item {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05) !important;
  padding: 1.5rem !important;
}

.aima-feature-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 1.25rem !important;
}

.aima-feature-grid .aima-feature-item h3 {
  font-size: 1.1rem !important;
  margin-bottom: 0.5rem !important;
  color: #0f172a !important;
}

.aima-feature-grid .aima-feature-item p {
  margin: 0 !important;
  line-height: 1.6 !important;
}

.aima-section--light,
.aima-section--soft {
  background: #f8fafc !important;
}

.aima-section--dark:not(#about-cta):not(#final-cta):not(#why-welltime):not(#safety):not(#company) {
  background: #f8fafc !important;
}

#company.aima-section--dark {
  background: #f1f5f9 !important;
  padding-bottom: 3.5rem !important;
}

#company .aima-company-box h3 {
  color: #0f172a !important;
}

#company .aima-company-box p {
  color: #475569 !important;
}

#why-welltime.aima-section--dark,
#safety.aima-section--dark {
  background: linear-gradient(135deg, #0f172a 0%, #0f766e 48%, #134e4a 100%) !important;
}

#why-welltime .site-title,
#why-welltime .site-title-tagline,
#safety .site-title,
#safety .site-title-tagline {
  color: #ffffff !important;
}

#why-welltime .site-title span,
#safety .site-title span {
  color: #ffffff !important;
}

#why-welltime .site-title-tagline,
#safety .site-title-tagline {
  color: rgba(255, 255, 255, 0.88) !important;
}

.aima-page-hero--photo .aima-brand-sub,
.aima-page-hero--photo h1 span {
  color: #ffffff !important;
}

#safety .aima-fact strong {
  color: rgba(255, 255, 255, 0.9) !important;
}

#safety > .container > .row p {
  color: rgba(255, 255, 255, 0.9) !important;
}

#about-cta.aima-section--dark,
#final-cta.aima-section--dark {
  background: linear-gradient(135deg, #0f172a 0%, #0f766e 48%, #134e4a 100%) !important;
}

#about-cta .site-title,
#final-cta .site-title {
  color: #ffffff !important;
}

#about-cta .site-title span,
#final-cta .site-title span {
  color: #ffffff !important;
}

#about-cta .theme-btn2,
#final-cta .theme-btn2 {
  border: 2px solid rgba(255, 255, 255, 0.55) !important;
  color: #ffffff !important;
  background: transparent !important;
}

#about-cta .theme-btn2:hover,
#about-cta .theme-btn2:focus,
#final-cta .theme-btn2:hover,
#final-cta .theme-btn2:focus {
  background: #0d9488 !important;
  border-color: #0d9488 !important;
  color: #ffffff !important;
}

#pricing-cta .site-title,
#features-cta .site-title {
  color: #0f172a !important;
}

#pricing-cta .site-title span,
#features-cta .site-title span {
  color: #0d9488 !important;
}