/* ============================================
   ROOT & RESTORE NUTRITION — Components
   ============================================ */

/* ---- Condition Cards ---- */
.condition-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 24px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.condition-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px var(--shadow-md);
}

.condition-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.condition-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.condition-card:hover .condition-card-img img {
  transform: scale(1.05);
}

.condition-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--sage);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
}

.condition-card-body {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.condition-card-body h3 {
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
}

.condition-card-body p {
  color: #666;
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1.5rem;
}

.condition-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tag {
  background: var(--linen);
  color: var(--bark);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
}

/* ---- Holistic vs Conventional Toggle ---- */
.treatment-toggle-wrapper {
  background: var(--linen);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.toggle-switch-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.toggle-label {
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: color var(--transition);
  user-select: none;
}

.toggle-label.conventional {
  color: var(--clay);
}

.toggle-label.holistic {
  color: var(--sage);
}

.toggle-label.inactive {
  opacity: 0.45;
}

.toggle-pill {
  position: relative;
  width: 64px;
  height: 32px;
  background: var(--sage);
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}

.toggle-pill.conventional-mode {
  background: var(--clay);
}

.toggle-pill-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.toggle-pill.conventional-mode .toggle-pill-knob {
  transform: translateX(32px);
}

.treatment-panels {
  position: relative;
}

.treatment-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.treatment-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.treatment-panel-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid;
}

.panel-holistic .treatment-panel-header {
  border-color: var(--sage);
}

.panel-conventional .treatment-panel-header {
  border-color: var(--clay);
}

.panel-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.panel-holistic .panel-icon {
  background: rgba(122, 158, 126, 0.2);
}

.panel-conventional .panel-icon {
  background: rgba(196, 112, 79, 0.2);
}

.treatment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 600px) {
  .treatment-grid { grid-template-columns: 1fr; }
}

.treatment-metric {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 2px 10px var(--shadow);
}

.treatment-metric .metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.5rem;
}

.treatment-metric .metric-value {
  font-weight: 600;
  color: var(--charcoal);
  font-size: 0.95rem;
  line-height: 1.4;
}

.panel-holistic .metric-value { color: var(--moss); }
.panel-conventional .metric-value { color: var(--clay); }

.treatment-list {
  margin-top: 1.5rem;
}

.treatment-list h5 {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
}

.treatment-list ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.treatment-list ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.treatment-list ul li::before {
  content: '•';
  flex-shrink: 0;
  font-weight: 700;
  margin-top: 0.05rem;
}

.panel-holistic .treatment-list ul li::before { color: var(--sage); }
.panel-conventional .treatment-list ul li::before { color: var(--clay); }

.treatment-side-effects {
  margin-top: 1.5rem;
  background: rgba(196, 112, 79, 0.08);
  border-left: 3px solid var(--clay);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
}

.panel-holistic .treatment-side-effects {
  background: rgba(122, 158, 126, 0.08);
  border-color: var(--sage);
}

/* ---- Data Tables ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
}

.data-table thead th {
  background: var(--bark);
  color: var(--white);
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--linen);
  transition: background var(--transition);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--linen);
}

.data-table tbody td {
  padding: 0.9rem 1.25rem;
  vertical-align: top;
  line-height: 1.5;
}

.data-table tbody td:first-child {
  font-weight: 600;
  color: var(--bark);
}

.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius);
}

/* ---- Root Causes Table ---- */
.causes-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
}

.causes-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 0;
  background: var(--white);
  border-bottom: 1px solid var(--linen);
  transition: background var(--transition);
}

.causes-row:last-child { border-bottom: none; }
.causes-row:hover { background: #FDF9F5; }

.causes-row.header {
  background: var(--bark);
}

.causes-cell {
  padding: 0.9rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-right: 1px solid var(--linen);
}

.causes-cell:last-child { border-right: none; }

.causes-row.header .causes-cell {
  color: var(--white);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-color: rgba(255,255,255,0.2);
}

.causes-row:not(.header) .causes-cell:first-child {
  font-weight: 600;
  color: var(--bark);
}

/* ---- Info Cards ---- */
.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 20px var(--shadow);
  border-top: 4px solid var(--sage);
}

.info-card.bark-accent { border-color: var(--bark); }
.info-card.clay-accent { border-color: var(--clay); }
.info-card.sage-accent { border-color: var(--sage); }
.info-card.moss-accent { border-color: var(--moss); }

.info-card h3 {
  margin-bottom: 1rem;
}

.info-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-card ul li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.info-card ul li::before {
  content: '→';
  color: var(--sage);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---- Philosophy Strip ---- */
.philosophy-strip {
  background: linear-gradient(135deg, var(--moss) 0%, var(--bark) 100%);
  padding: 4rem 0;
  color: var(--white);
}

.philosophy-steps {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr;
  align-items: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.philosophy-step {
  text-align: center;
  padding: 1.5rem;
}

.philosophy-step .step-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.philosophy-step h4 {
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.philosophy-step p {
  font-size: 0.875rem;
  opacity: 0.85;
  margin: 0;
}

.philosophy-arrow {
  text-align: center;
  font-size: 1.5rem;
  color: rgba(255,255,255,0.4);
}

@media (max-width: 768px) {
  .philosophy-steps {
    grid-template-columns: 1fr;
  }
  .philosophy-arrow { display: none; }
}

/* ---- CTA Strip ---- */
.cta-strip {
  background: var(--linen);
  padding: 5rem 0;
  text-align: center;
}

.cta-strip h2 {
  margin-bottom: 1rem;
}

.cta-strip p {
  color: #666;
  margin-bottom: 2rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Contact Form ---- */
.contact-form {
  max-width: 680px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--bark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--linen);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--sage);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238B5E3C' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---- Biofilm / Info Highlight Box ---- */
.highlight-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 20px var(--shadow);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.highlight-box .hb-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.highlight-box h4 {
  margin-bottom: 0.5rem;
}

.highlight-box p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

/* ---- Warning / Note callout ---- */
.callout {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.callout-info {
  background: rgba(122, 158, 126, 0.12);
  border-left: 4px solid var(--sage);
  color: var(--moss);
}

.callout-warn {
  background: rgba(196, 112, 79, 0.1);
  border-left: 4px solid var(--clay);
  color: #8B3A1C;
}

.callout-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ---- Mini Stat cards ---- */
.mini-stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 16px var(--shadow);
  text-align: center;
  border-top: 3px solid var(--sage);
}

.mini-stat .mstat-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--bark);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.mini-stat .mstat-label {
  font-size: 0.82rem;
  color: #777;
  line-height: 1.4;
}

/* ---- Checklist ---- */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.925rem;
  line-height: 1.5;
}

.checklist li .check-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
  font-size: 1rem;
}

/* ---- Section hero image ---- */
.section-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px var(--shadow-md);
}

.section-img img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

/* ---- Nav breadcrumb ---- */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: rgba(255,255,255,0.8);
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb-sep {
  opacity: 0.5;
}

/* ---- Healing timeline comparison ---- */
.healing-timeline-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 600px) {
  .healing-timeline-comparison { grid-template-columns: 1fr; }
}

.htc-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
}

.htc-header {
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.htc-header.holistic { background: var(--sage); color: var(--white); }
.htc-header.conventional { background: var(--clay); color: var(--white); }

.htc-body {
  padding: 1.5rem;
}

.htc-phase {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.htc-phase:last-child { margin-bottom: 0; }

.htc-phase-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.holistic .htc-phase-dot { background: var(--sage); }
.conventional .htc-phase-dot { background: var(--clay); }

.htc-phase-info .phase-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin-bottom: 0.2rem;
}

.htc-phase-info p {
  font-size: 0.875rem;
  color: var(--charcoal);
  margin: 0;
}

/* ---- Connection diagram (Leaky Gut) ---- */
.connection-diagram {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 4px 20px var(--shadow);
  text-align: center;
}

.connection-center {
  display: inline-block;
  background: linear-gradient(135deg, var(--bark), var(--clay));
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.connection-arrows {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.connection-node {
  background: var(--linen);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.connection-node .cn-icon { font-size: 1.75rem; }
.connection-node p { font-size: 0.82rem; font-weight: 600; color: var(--bark); margin: 0; }

@media (max-width: 600px) {
  .connection-arrows { grid-template-columns: repeat(2, 1fr); }
}

/* ---- IBS Mind-Gut diagram ---- */
.mind-gut-diagram {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 4px 20px var(--shadow);
}

.mgd-title {
  text-align: center;
  font-family: var(--font-heading);
  color: var(--bark);
  margin-bottom: 2rem;
}

.mgd-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mgd-node {
  background: var(--linen);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
  min-width: 130px;
}

.mgd-node .mgd-icon { font-size: 1.75rem; margin-bottom: 0.4rem; }
.mgd-node strong { display: block; font-size: 0.85rem; color: var(--bark); }
.mgd-node span { font-size: 0.75rem; color: #777; }

.mgd-arrow {
  font-size: 1.5rem;
  color: var(--sage);
  font-weight: 700;
}

/* ---- Plate diagram ---- */
.plate-diagram {
  display: flex;
  gap: 2rem;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 4px 20px var(--shadow);
}

.plate-visual {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: conic-gradient(
    var(--sage) 0deg 144deg,
    var(--bark) 144deg 216deg,
    #D4A853 216deg 360deg
  );
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

@media (max-width: 600px) {
  .plate-diagram { flex-direction: column; }
  .plate-visual { width: 160px; height: 160px; }
}

.plate-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.plate-legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.plate-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- Herxheimer / Die-off box ---- */
.herx-box {
  background: linear-gradient(135deg, rgba(196, 112, 79, 0.08), rgba(139, 94, 60, 0.05));
  border: 1px solid rgba(196, 112, 79, 0.25);
  border-radius: var(--radius);
  padding: 2rem;
}

.herx-box h4 {
  color: var(--clay);
  margin-bottom: 1rem;
}

/* ---- Testimonial-style quote ---- */
.research-quote {
  background: var(--linen);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
}

.research-quote::before {
  content: '"';
  font-family: var(--font-accent);
  font-size: 6rem;
  color: var(--sage);
  opacity: 0.3;
  position: absolute;
  top: -1rem;
  left: 1rem;
  line-height: 1;
}

.research-quote p {
  font-family: var(--font-accent);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
  position: relative;
}

.research-quote cite {
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 600;
  color: var(--bark);
}
