/* ==========================================================================
   CaliMed Billing - Main Design System & Global Styles
   Production Ready - Zero External Runtime Dependencies
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Montserrat:wght@500;600;700&display=swap');

:root {
  /* Brand Palette */
  --forest-900: #122A24;
  --forest-800: #1F3D36;
  --forest-700: #2A5148;
  --teal-600: #33796B;
  --teal-500: #3E8E7E;
  --teal-100: #DCEBE6;
  --terracotta-600: #C9603F;
  --terracotta-500: #E07A5F;
  --terracotta-100: #FBE6DF;
  --sage-400: #A7C4BC;
  --sage-200: #D3E2DD;
  --linen-100: #F6F4EE;
  --linen-200: #ECE8DE;
  --white: #FFFFFF;
  --muted-600: #5B6B66;
  --muted-400: #8C9994;

  /* Status Colors */
  --success-500: #3E8E7E;
  --success-100: #DCEBE6;
  --danger-500: #D93829;
  --danger-100: #FDE8E5;

  /* Semantic Variables */
  --text-heading: var(--forest-800);
  --text-body: var(--forest-800);
  --text-muted: var(--muted-600);
  --text-link: var(--teal-500);
  --text-link-hover: var(--teal-600);
  --surface-page: var(--white);
  --surface-section: var(--linen-100);

  /* Typography */
  --font-body: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-tagline: 'Montserrat', system-ui, -apple-system, sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(31, 61, 54, 0.06), 0 1px 3px rgba(31, 61, 54, 0.08);
  --shadow-md: 0 4px 12px rgba(31, 61, 54, 0.08), 0 2px 4px rgba(31, 61, 54, 0.05);
  --shadow-lg: 0 16px 40px rgba(31, 61, 54, 0.12);
  --shadow-xl: 0 24px 64px rgba(18, 42, 36, 0.28);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-pill: 999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--forest-800);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Image Defaults */
img, svg, video {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Links */
a {
  color: var(--teal-500);
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

a:hover {
  color: var(--teal-600);
}

/* Global Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
}

/* Responsive Grid Columns with Safe Minmax */
.fluid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--forest-800);
  font-family: var(--font-body);
  margin-top: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(34px, 5.2vw, 58px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

h3 {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  line-height: 1.35;
}

/* Signature Motif Bars */
.signature-bars {
  display: flex;
  gap: 6px;
  align-items: center;
}

.signature-bars.hero-bars {
  margin: 24px 0;
}

.signature-bars.section-bars {
  margin: 20px 0 24px;
}

.signature-bars.center {
  justify-content: center;
}

.bar-terracotta {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background-color: var(--terracotta-500);
}

.bar-teal {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background-color: var(--teal-500);
}

.hero-bars .bar-terracotta {
  width: 48px;
  height: 5px;
  border-radius: 3px;
}

.hero-bars .bar-teal {
  width: 28px;
  height: 5px;
  border-radius: 3px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--terracotta-500);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(224, 122, 95, 0.28);
}

.btn-primary:hover {
  background-color: var(--terracotta-600);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(224, 122, 95, 0.36);
}

.btn-outline {
  border-color: var(--forest-800);
  color: var(--forest-800);
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--teal-100);
  color: var(--forest-800);
}

.btn-white {
  background-color: var(--white);
  color: var(--forest-800);
  box-shadow: var(--shadow-sm);
}

.btn-white:hover {
  background-color: var(--linen-100);
  color: var(--forest-900);
}

/* Cards & Hover Effects */
.card-hover {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal-500);
}

/* Specialty Cards Grid Items (Strictly Matching Design Prototype) */
.specialty-card-tile {
  background-color: var(--linen-100);
  border-radius: 16px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
}

.specialty-card-tile:hover {
  background-color: var(--teal-100);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.specialty-card-tile.is-white {
  background-color: var(--white);
  border: 1px solid var(--sage-200);
}

.specialty-card-tile.is-white:hover {
  background-color: var(--teal-100);
  border-color: var(--teal-500);
}

.specialty-card-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.specialty-card-tile.is-white .specialty-card-icon-wrap {
  background-color: var(--linen-100);
  box-shadow: none;
}

.specialty-card-icon {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
}

.specialty-card-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--forest-800);
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--sage-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.faq-item.is-open {
  border-color: var(--teal-500);
  box-shadow: var(--shadow-sm);
}

.faq-question-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
}

.faq-question-btn:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: -2px;
}

.faq-title {
  margin: 0;
  font-size: clamp(16.5px, 2vw, 18px);
  font-weight: 700;
  color: var(--forest-800);
  line-height: 1.35;
}

.faq-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--linen-100);
  color: var(--teal-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.faq-item.is-open .faq-icon {
  background-color: var(--teal-100);
  color: var(--teal-600);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 300ms ease, opacity 250ms ease, padding 200ms ease;
  padding: 0 24px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted-600);
}

.faq-item.is-open .faq-answer {
  max-height: 600px;
  opacity: 1;
  padding: 0 24px 24px;
}

/* Logo Marquee */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  user-select: none;
}

.marquee-container:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee-scroll 35s linear infinite;
}

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

/* Accessibility / Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Semantic SEO & SILO Navigation Styles
   Breadcrumb Trails, Lateral Sibling Modules, and Entity Cross-Silo Bridges
   ========================================================================== */

/* 1. Accessible Visual Breadcrumbs */
.breadcrumb-nav {
  padding: 14px 0 10px;
  margin-bottom: 4px;
  font-size: 13.5px;
  font-family: var(--font-body);
}

.breadcrumb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-600);
}

.breadcrumb-link {
  color: var(--forest-800);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
  color: var(--teal-600);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--sage-400);
  font-size: 11px;
  user-select: none;
}

.breadcrumb-current {
  color: var(--terracotta-500);
  font-weight: 600;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .breadcrumb-nav {
    font-size: 12.5px;
  }
  .breadcrumb-current {
    max-width: 180px;
  }
}

/* 2. Semantic SILO Sibling & Cross-Linking Modules */
.silo-module {
  margin: 48px 0 24px;
  padding: 36px clamp(20px, 4vw, 36px);
  background: var(--linen-100);
  border: 1px solid var(--sage-200);
  border-radius: var(--radius-xl);
}

.silo-module-header {
  margin-bottom: 24px;
  text-align: left;
}

.silo-module-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  color: var(--forest-800);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.silo-module-subtitle {
  font-size: 14.5px;
  color: var(--muted-600);
  margin: 0;
  line-height: 1.55;
}

.silo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.silo-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--sage-200);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  text-decoration: none;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.silo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-500);
}

.silo-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-600);
  margin-bottom: 10px;
}

.silo-card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--forest-800);
  margin: 0 0 8px;
  line-height: 1.35;
}

.silo-card-desc {
  font-size: 13.5px;
  color: var(--muted-600);
  line-height: 1.55;
  margin: 0 0 16px;
  flex-grow: 1;
}

.silo-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--terracotta-500);
  margin-top: auto;
}

.silo-card:hover .silo-card-arrow {
  color: var(--terracotta-600);
}

/* Cross-Silo Regional & Anchor Bridge Pill Bars */
.silo-bridge-bar {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--sage-200);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.silo-bridge-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--forest-800);
  white-space: nowrap;
}

.silo-bridge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.silo-bridge-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--sage-300);
  color: var(--forest-800);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.silo-bridge-tag:hover {
  background: var(--teal-100);
  border-color: var(--teal-500);
  color: var(--teal-600);
}

/* 3. In-Content Contextual Text Link Styling */
.semantic-link {
  color: var(--teal-600);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2.5px;
  font-weight: 500;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.semantic-link:hover {
  color: var(--terracotta-500);
  text-decoration-color: var(--terracotta-500);
}

/* ==========================================================================
   Pricing Cards Responsive Layout & Overflow Prevention
   ========================================================================== */
.pricing-card-box {
  padding: 32px clamp(18px, 2vw, 24px) !important;
  overflow: hidden !important;
  word-break: break-word !important;
}

.pricing-card-figure {
  font-size: clamp(20px, 2.2vw, 25px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.25 !important;
  margin: 16px 0 0 !important;
  padding-bottom: 20px !important;
  border-bottom: 1px solid var(--sage-200) !important;
  color: var(--forest-800) !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

.pricing-card-unit {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--muted-600) !important;
  display: inline-block !important;
  letter-spacing: normal !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   Interactive Card & Link Hover Styles
   ========================================================================== */
a[style-hover] {
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease !important;
}

a[style-hover]:hover {
  box-shadow: var(--shadow-lg) !important;
  border-color: var(--teal-500) !important;
}

