/* ==========================================================================
   FitCalc Pro - Modern Health & Fitness Calculator Theme
   Mobile-First, High-Performance, European Standards Compliant
   ========================================================================== */

:root {
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Primary & Accent Palette */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  
  --emerald: #10b981;
  --emerald-light: #ecfdf5;
  
  --orange: #f59e0b;
  --orange-light: #fffbeb;
  
  --rose: #ef4444;
  --rose-light: #fef2f2;
  
  --purple: #8b5cf6;
  --purple-light: #f5f3ff;
  
  /* Neutrals */
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --border-focus: #4f46e5;
  
  /* Layout Shadows & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 30px -10px rgba(15, 23, 42, 0.12);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
}

.logo-icon {
  background: var(--primary-light);
  color: var(--primary);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--emerald-light);
  color: #047857;
  padding: 3px 8px;
  border-radius: 20px;
  margin-left: 6px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-intro {
  text-align: center;
  padding: 36px 0 24px;
  max-width: 780px;
  margin: 0 auto;
}

.hero-intro h1 {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero-intro .subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  color: #334155;
  font-weight: 600;
}

/* ==========================================================================
   Ad Slots Styling
   ========================================================================== */
.ad-wrapper {
  margin: 20px auto;
  text-align: center;
}

.ad-placeholder {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: inline-block;
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  box-sizing: border-box;
}

.ad-tag {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 6px;
}

.ad-slot-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ==========================================================================
   Calculator 2-Column Grid
   ========================================================================== */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  align-items: start;
}

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

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.card-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Unit Switcher */
.unit-toggle {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
}

.unit-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.unit-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Form Controls */
.form-group {
  margin-bottom: 18px;
}

.label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #fcfcfd;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  background: #ffffff;
}

.dual-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.d-none {
  display: none !important;
}

/* Gender Radio Cards */
.radio-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.radio-card {
  position: relative;
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  opacity: 0;
}

.radio-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.radio-card input:checked + .radio-content {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* Primary Button */
.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, transform 0.1s;
  margin-top: 10px;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:active {
  transform: translateY(1px);
}

.error-msg {
  color: var(--rose);
  font-size: 0.78rem;
  margin-top: 4px;
  display: block;
}

/* ==========================================================================
   Results Presentation Section
   ========================================================================== */
.results-card {
  border-top: 4px solid var(--primary);
}

.status-indicator {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: #f1f5f9;
  color: var(--text-muted);
}

.status-indicator.live {
  background: var(--emerald-light);
  color: #065f46;
}

/* BMI Summary & Meter */
.bmi-summary {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 22px;
}

.bmi-score-box {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.bmi-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.bmi-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-dark);
}

.bmi-badge {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 30px;
}

.bmi-badge.normal { background: var(--emerald-light); color: #047857; }
.bmi-badge.under { background: var(--orange-light); color: #b45309; }
.bmi-badge.over { background: var(--orange-light); color: #c2410c; }
.bmi-badge.obese { background: var(--rose-light); color: #b91c1c; }

/* Custom BMI Meter Gauge */
.bmi-meter-wrapper {
  position: relative;
}

.bmi-meter-bar {
  display: flex;
  height: 12px;
  border-radius: 8px;
  overflow: visible;
  position: relative;
}

.meter-segment {
  height: 100%;
}

.seg-under { width: 25%; background: #fbbf24; border-radius: 6px 0 0 6px; }
.seg-normal { width: 35%; background: #10b981; }
.seg-over { width: 25%; background: #f97316; }
.seg-obese { width: 15%; background: #ef4444; border-radius: 0 6px 6px 0; }

.meter-pointer {
  position: absolute;
  top: -6px;
  width: 4px;
  height: 24px;
  background: #0f172a;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.meter-pointer::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 12px;
  height: 8px;
  background: #0f172a;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 8px;
  padding: 0 5%;
}

/* Quick Stats Row */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

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

.stat-pill {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-icon {
  font-size: 1.4rem;
}

.stat-caption {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-pill strong {
  font-size: 0.95rem;
  color: var(--text-dark);
}

/* Calorie Targets Box */
.box-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.calorie-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

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

.cal-card {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cal-card.active-cal {
  border-color: var(--primary);
  background: #fafafa;
}

.cal-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 4px;
}

.cal-badge.blue { background: var(--primary-light); color: var(--primary); }
.cal-badge.green { background: var(--emerald-light); color: #047857; }
.cal-badge.orange { background: var(--orange-light); color: #c2410c; }
.cal-badge.purple { background: var(--purple-light); color: #6d28d9; }

.cal-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cal-number {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
}

.cal-number span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Macronutrient Bars */
.macros-breakdown {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.macro-bar-item {
  margin-bottom: 10px;
}

.macro-bar-item:last-child {
  margin-bottom: 0;
}

.macro-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}

.fill-protein { background: #3b82f6; }
.fill-carbs { background: #10b981; }
.fill-fats { background: #f59e0b; }

.btn-outline {
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--border-light);
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: #f1f5f9;
  color: var(--text-dark);
}

/* ==========================================================================
   SEO Educational Content & FAQ
   ========================================================================== */
.info-section {
  padding: 50px 20px 20px;
}

.content-block {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.content-block h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.content-block p {
  color: #475569;
  margin-bottom: 16px;
  font-size: 1rem;
}

.formula-box {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 18px 0;
  font-family: monospace;
  font-size: 0.95rem;
  color: #1e293b;
}

/* Styled Table for BMI Chart */
.table-responsive {
  overflow-x: auto;
  margin: 20px 0;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.styled-table th, .styled-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.92rem;
}

.styled-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
}

.table-row-highlight {
  background: var(--emerald-light);
}

.table-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.badge-under { background: #fef3c7; color: #92400e; }
.badge-normal { background: #d1fae5; color: #065f46; }
.badge-over { background: #ffedd5; color: #9a3412; }
.badge-obese { background: #fee2e2; color: #991b1b; }

/* FAQ Items */
.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 18px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.faq-a {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Medical Disclaimer */
.medical-disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.85rem;
  color: #92400e;
  margin: 24px 0;
}

/* Footer */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 30px 0;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-left: 18px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ==========================================================================
   GDPR European Cookie Consent Banner
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 820px;
  background: #0f172a;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
}

@media (max-width: 650px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

.cookie-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-btn {
  border: none;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

.btn-accept {
  background: var(--emerald);
  color: #ffffff;
}

.btn-decline {
  background: #334155;
  color: #cbd5e1;
}

.d-none-banner {
  display: none !important;
}
