/* ==========================================================================
   SYNOVIAFLEX (SYF) - COMPONENTS STYLESHEET
   Cards, Lightbox, Modals, Forms, Tabs, Sliders, Badges
   ========================================================================== */

/* ==========================================================================
   CLINICAL STATS COUNTER GRID
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.stat-card {
  background: #ffffff;
  padding: 24px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .stat-num {
    font-size: 2rem;
  }
}

/* ==========================================================================
   ACADEMIC CERTIFICATES GRID & LIGHTBOX
   ========================================================================== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.cert-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.cert-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.cert-preview-wrapper {
  position: relative;
  background: #f1f5f9;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-light);
}

.cert-preview-img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

.cert-card:hover .cert-preview-img {
  transform: scale(1.02);
}

.cert-zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 118, 110, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.cert-card:hover .cert-zoom-overlay {
  opacity: 1;
}

.cert-zoom-btn {
  background: #ffffff;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.875rem;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cert-card-body {
  padding: 20px;
  flex: 1;
}

.cert-badge-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
  background: var(--bg-tertiary);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
}

.cert-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.cert-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-dialog {
  position: relative;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
}

.lightbox-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background var(--transition-fast);
}

.lightbox-close-btn:hover {
  background: #0f172a;
}

.lightbox-content-scroll {
  padding: 20px;
  overflow-y: auto;
  text-align: center;
}

.lightbox-img-full {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 0 auto;
}

@media (max-width: 768px) {
  .certs-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==========================================================================
   INTERACTIVE TABS SYSTEM
   ========================================================================== */
.tabs-nav {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 6px;
  gap: 6px;
  margin-bottom: 32px;
}

.tab-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  touch-action: manipulation;
}

.tab-btn:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.6);
}

.tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

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

@media (max-width: 768px) {
  .tabs-nav {
    flex-direction: column;
  }
  .tab-btn {
    padding: 12px;
  }
}

/* ==========================================================================
   TAB 1: HYDRATION CALCULATOR
   ========================================================================== */
.calculator-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
}

.calc-group {
  margin-bottom: 24px;
}

.calc-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.calc-val-bubble {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--bg-tertiary);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

/* Custom Range Slider */
.calc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--border-light);
  outline: none;
  transition: background 0.2s;
}

.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}

.calc-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.calc-pill-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-opt-btn {
  flex: 1;
  min-width: 120px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.pill-opt-btn:hover {
  border-color: var(--primary-light);
}

.pill-opt-btn.active {
  background: var(--bg-tertiary);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

/* Calculator Output Panel */
.calc-output-box {
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
  border: 1px solid #ccfbf1;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-result-number {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -1.5px;
}

.calc-result-sub {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 6px;
  margin-bottom: 20px;
}

.hourly-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.hourly-card {
  background: #ffffff;
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid rgba(15, 118, 110, 0.15);
}

.hourly-time {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hourly-liters {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin: 4px 0;
}

.hourly-note {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .calculator-card {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 28px;
  }
}

/* ==========================================================================
   TAB 2: WOMAC STIFFNESS TEST
   ========================================================================== */
.womac-box {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.womac-progress-bar-wrap {
  width: 100%;
  height: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}

.womac-progress-bar {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  transition: width 0.3s ease;
}

.womac-q-card {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
}

.womac-q-card:last-child {
  border-bottom: none;
}

.womac-q-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.womac-q-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 800;
  flex-shrink: 0;
}

.womac-options-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.womac-opt-btn {
  padding: 12px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.womac-opt-btn:hover {
  border-color: var(--primary);
}

.womac-opt-btn.selected {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.womac-result-card {
  display: none;
  background: var(--bg-tertiary);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 32px;
  animation: fadeIn 0.3s ease;
}

.womac-result-card.active {
  display: block;
}

@media (max-width: 768px) {
  .womac-options-grid {
    grid-template-columns: 1fr;
  }
  .womac-opt-btn {
    text-align: left;
    padding: 12px 14px;
  }
}

/* ==========================================================================
   TAB 3: NUTRIENT DEFICIT CHECKLIST
   ========================================================================== */
.symptom-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.symptom-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.symptom-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.symptom-card.expanded {
  border-color: var(--primary);
  background: #fafdfd;
}

.symptom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.symptom-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.symptom-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.symptom-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.symptom-solution-box {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-medium);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.symptom-card.expanded .symptom-solution-box {
  display: block;
}

.symptom-ingredient-tag {
  display: inline-block;
  background: var(--bg-tertiary);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  margin-bottom: 6px;
}

@media (max-width: 640px) {
  .symptom-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PACKAGE CARDS (FORMULA PAGE - NO PRICES ALLOWED HERE)
   ========================================================================== */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.package-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.package-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.package-card.highlighted {
  border: 2.5px solid var(--primary);
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
  box-shadow: var(--shadow-teal);
}

.package-badge-top {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
  white-space: nowrap;
}

.package-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  text-align: center;
}

.package-subtitle {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
}

.package-visual {
  text-align: center;
  margin-bottom: 20px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.package-visual img {
  max-height: 100%;
  width: auto;
}

.package-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.package-feature-item {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.package-feature-item svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.package-footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
}

@media (max-width: 900px) {
  .packages-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 40px auto 0;
  }
}
