/* ====================================================================
   FITNET USA - OFFICIAL AMERICAN HIGH-PERFORMANCE DESIGN SYSTEM (2026)
   Colors: Old Glory Blue (#0A3161), Old Glory Red (#CC163A), Pure White (#FFFFFF)
   Typography: Plus Jakarta Sans (Headings) & Inter (Body, Tables, Calculators)
   ==================================================================== */

:root {
  /* Official American Patriotic & Clinical Sports Science Palette */
  --navy-primary: #0A3161;       /* Old Glory Blue - Authority, Header, H1-H3, Pillar Headers */
  --navy-hover: #1A2B4C;         /* Hover / Dark Accent */
  --navy-dark: #071E3D;          /* Deep Midnight Navy for Footer & Contrast */
  --navy-deep: #05152B;          /* Deepest Navy Surface */
  --navy-light: #EFF6FF;         /* Subtle Blue Tint for tags and secondary badges */
  --navy-soft: #DBEAFE;          /* Soft Blue border/background */
  --navy-glow: rgba(10, 49, 97, 0.16);

  --red-primary: #CC163A;        /* Old Glory Red - Primary Athletic Accent & CTAs */
  --red-hover: #A8102E;          /* Darker Athletic Red on hover */
  --red-dark: #880B22;           /* Deep Crimson */
  --red-light: #FEF2F2;          /* Light Red Tint for Badges & Highlights */
  --red-soft: #FEE2E2;           /* Soft Red for callouts */
  --red-glow: rgba(204, 22, 58, 0.22);

  /* Functional Theme Tokens */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-tint: #F8FAFC;
  
  --text-primary: #0F172A;       /* Slate 900 */
  --text-secondary: #475569;     /* Slate 600 */
  --text-muted: #64748B;         /* Slate 500 */
  --text-light: #94A3B8;         /* Slate 400 */
  --text-navy: #0A3161;

  --accent-primary: #CC163A;     /* Primary Active Accent (Red) */
  --accent-hover: #A8102E;
  --accent-dark: #0A3161;        /* Secondary Authority (Navy) */
  --accent-subtle: #E11D48;
  --accent-glow: rgba(204, 22, 58, 0.18);
  --accent-light: #FEF2F2;
  --accent-soft: #FEE2E2;

  --brand-navy: #0A3161;
  --brand-navy-hover: #1A2B4C;

  --border-subtle: #E2E8F0;      /* Fine Steel Gray */
  --border-focus: #CC163A;
  --border-navy: #CBD5E1;
  --border-light: #F1F5F9;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Elevation & Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(10, 49, 97, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(10, 49, 97, 0.07), 0 2px 4px -2px rgba(10, 49, 97, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(10, 49, 97, 0.08), 0 4px 6px -4px rgba(10, 49, 97, 0.03);
  --shadow-hover: 0 14px 28px -4px rgba(10, 49, 97, 0.12), 0 6px 12px -2px rgba(204, 22, 58, 0.08);
  --shadow-red-hover: 0 12px 24px -4px rgba(204, 22, 58, 0.25);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Layout */
  --max-width: 1240px;
  --header-height: 76px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  overflow-x: hidden;
  font-family: var(--font-sans);
}

/* Reading Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--navy-primary) 0%, var(--red-primary) 100%);
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  color: var(--navy-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.25rem, 4vw, 3.25rem); margin-bottom: 1.25rem; font-weight: 800; color: var(--navy-primary); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-top: 2.5rem; margin-bottom: 1rem; color: var(--navy-primary); font-weight: 800; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-top: 1.75rem; margin-bottom: 0.75rem; color: var(--navy-primary); font-weight: 700; }
h4 { font-size: 1.15rem; color: var(--navy-primary); font-weight: 700; }

p { margin-bottom: 1.25rem; color: var(--text-secondary); font-size: 1.05rem; line-height: 1.75; font-family: var(--font-sans); }
a { color: var(--navy-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--red-primary); }
ul, ol { margin-bottom: 1.25rem; padding-left: 1.5rem; color: var(--text-secondary); }
li { margin-bottom: 0.5rem; }
img { max-width: 100%; height: auto; display: block; }

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Sticky Minimalist Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo Badge */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--navy-primary);
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo span.brand-accent {
  color: var(--red-primary);
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--red-primary);
}

.nav-link.active {
  color: var(--navy-primary);
  font-weight: 700;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--red-primary);
  border-radius: 2px;
}

/* Header Action */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 12px rgba(204, 22, 58, 0.18);
  white-space: nowrap;
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 0.25rem;
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-primary {
  background-color: var(--red-primary);
  background-image: linear-gradient(135deg, #CC163A 0%, #B01030 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(204, 22, 58, 0.18);
  white-space: nowrap;
  border-radius: 8px;
}

.btn-primary:hover {
  background-color: var(--red-hover);
  background-image: linear-gradient(135deg, #B01030 0%, #880B22 100%);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(204, 22, 58, 0.28);
}

.btn-navy {
  background-color: var(--navy-primary);
  background-image: linear-gradient(135deg, #0A3161 0%, #071E3D 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(10, 49, 97, 0.2);
}

.btn-navy:hover {
  background-color: var(--navy-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(10, 49, 97, 0.3);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--navy-primary);
  border-color: var(--border-subtle);
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: #E2E8F0;
  color: var(--navy-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--navy-primary);
  border: 2px solid var(--navy-primary);
  box-shadow: none;
}

.btn-outline:hover {
  background-color: var(--navy-primary);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-card {
  margin-top: auto !important;
  align-self: flex-start;
  white-space: nowrap;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-sm {
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
  border-radius: 8px;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--navy-primary);
}

/* Pill Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  background-color: var(--red-light);
  color: var(--red-primary);
  border: 1px solid rgba(204, 22, 58, 0.25);
  margin-bottom: 1.25rem;
}

.badge-pill svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.badge-navy {
  background-color: var(--navy-light);
  color: var(--navy-primary);
  border: 1px solid rgba(10, 49, 97, 0.25);
}

/* Hero Section (Issue 2 Fix: Container height & button truncation prevention) */
.hero, .hero-section {
  position: relative;
  height: auto !important;
  min-height: auto !important;
  padding: 5rem 0 4rem;
  padding-bottom: 4rem !important;
  overflow: visible !important;
  background: radial-gradient(circle at top right, rgba(10, 49, 97, 0.05), transparent 50%),
              radial-gradient(circle at bottom left, rgba(204, 22, 58, 0.04), transparent 40%),
              linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content h1 {
  margin-bottom: 1.25rem;
  color: var(--navy-primary);
  font-family: var(--font-heading);
}

.hero-content p.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-cta-group, .hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 3;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item .stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--navy-primary);
  font-family: var(--font-heading);
  line-height: 1.2;
}

.stat-item .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hero-visual {
  position: relative;
}

.hero-card-preview {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-card-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy-primary) 0%, var(--red-primary) 100%);
}

/* Pillars Section */
.section-padding {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--navy-primary);
}

.section-header p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

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

.pillar-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--navy-primary);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(10, 49, 97, 0.3);
  border-top-color: var(--red-primary);
}

.pillar-icon-box {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background-color: var(--navy-light);
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border: 1px solid var(--navy-soft);
  transition: var(--transition);
}

.pillar-card:hover .pillar-icon-box {
  background-color: var(--red-light);
  color: var(--red-primary);
  border-color: rgba(204, 22, 58, 0.25);
}

.pillar-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
  color: var(--navy-primary);
}

.pillar-card p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.pillar-link {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.pillar-link:hover {
  color: var(--red-primary);
  transform: translateX(4px);
}

/* Key Takeaways Box (GEO 2026 Core Component) */
.key-takeaways {
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--navy-primary);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0 2.5rem;
  box-shadow: var(--shadow-sm);
}

.key-takeaways-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy-primary);
  margin-bottom: 0.85rem;
}

.key-takeaways-title svg {
  width: 18px;
  height: 18px;
  fill: var(--red-primary);
}

.key-takeaways ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.key-takeaways li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.65rem;
  font-size: 1.02rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.6;
}

.key-takeaways li:last-child {
  margin-bottom: 0;
}

.key-takeaways li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--red-primary);
  font-weight: 800;
}

/* Data Tables */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  background-color: #FFFFFF;
}

.data-table th {
  background-color: var(--navy-primary);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--navy-dark);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.data-table td {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
}

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

.data-table tr:hover td {
  background-color: #F8FAFC;
}

.data-table .highlight {
  font-weight: 700;
  color: var(--red-primary);
}

/* FAQ Accordion (<details><summary>) */
.faq-section {
  margin: 3.5rem 0 2.5rem;
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--navy-primary);
}

.faq-list,
.sm-faq {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item,
.sm-faq details {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: #FFFFFF;
  transition: var(--transition);
  overflow: hidden;
}

.faq-item:hover,
.sm-faq details:hover {
  border-color: rgba(10, 49, 97, 0.4);
}

.faq-item[open],
.sm-faq details[open] {
  box-shadow: var(--shadow-sm);
  border-color: var(--navy-primary);
}

.faq-item summary,
.sm-faq details summary {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: var(--transition);
}

.faq-item summary:hover,
.sm-faq details summary:hover {
  color: var(--red-primary);
}

.faq-item summary::-webkit-details-marker,
.sm-faq details summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after,
.sm-faq details summary::after {
  content: '+';
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--red-primary);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after,
.sm-faq details[open] summary::after {
  content: '−';
}

.faq-answer,
.sm-faq details p,
.sm-faq details div {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* Interactive Calculators Styles */
.calculator-container {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--navy-primary);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  margin: 2.5rem 0;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.unit-switch-group {
  display: inline-flex;
  background-color: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.unit-btn {
  border: none;
  background: transparent;
  padding: 0.45rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

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

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

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

.input-with-addon {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.input-with-addon:focus-within {
  border-color: var(--navy-primary);
  box-shadow: 0 0 0 3px var(--navy-glow);
}

.input-with-addon input, .input-with-addon select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
}

.input-addon {
  padding: 0.75rem 1rem;
  background-color: var(--bg-tertiary);
  color: var(--navy-primary);
  font-weight: 700;
  font-size: 0.85rem;
  border-left: 1px solid var(--border-subtle);
}

.calc-results-card {
  background: linear-gradient(145deg, var(--bg-tint) 0%, #FFFFFF 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.calc-primary-metric {
  text-align: center;
  padding: 1.5rem;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--red-primary);
  margin-bottom: 1.5rem;
}

.calc-primary-metric .metric-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 0.25rem;
}

.calc-primary-metric .metric-value {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--red-primary);
  line-height: 1.1;
}

.calc-primary-metric .metric-unit {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.macro-split-bars {
  display: flex;
  height: 12px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 1.5rem 0 1rem;
}

.bar-protein { background-color: #CC163A; } /* Red */
.bar-carbs   { background-color: #0A3161; } /* Navy */
.bar-fat     { background-color: #D97706; } /* Gold/Yellow */

.macro-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.legend-item {
  padding: 0.75rem 0.5rem;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.legend-name {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.legend-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-primary);
}

/* Zone Display */
.zone-pill-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.zone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
}

.zone-row.zone-2 {
  border-color: var(--red-primary);
  background-color: var(--red-light);
}

.zone-name { font-weight: 700; font-size: 0.95rem; color: var(--navy-primary); }
.zone-range { font-weight: 800; font-family: var(--font-mono); color: var(--red-primary); }

/* Article & Content Layouts */
.article-header {
  margin-bottom: 2.5rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.author-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--navy-primary);
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--navy-light);
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid var(--navy-soft);
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 1.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-subtle);
  color: var(--navy-primary);
}

.article-content h3 {
  font-size: 1.4rem;
  color: var(--navy-primary);
}

/* Table of Contents */
.toc-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--navy-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.toc-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-title svg {
  fill: var(--red-primary);
}

.toc-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.toc-list li {
  margin-bottom: 0.5rem;
}

.toc-list a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.toc-list a:hover {
  color: var(--red-primary);
  padding-left: 4px;
}

/* Callout Note */
.callout {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.75rem 0;
  border-left: 4px solid var(--navy-primary);
  background-color: var(--navy-light);
  font-size: 1rem;
}

.callout strong {
  color: var(--navy-primary);
  display: block;
  margin-bottom: 0.25rem;
}

/* Scientific References Box */
.references-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin: 3.5rem 0 2rem;
  font-size: 0.88rem;
}

.references-box h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  color: var(--navy-primary);
}

.references-box ol {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.references-box li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

/* E-E-A-T Author Card */
.author-card {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 3rem 0;
}

.author-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-dark) 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 3px solid var(--red-primary);
}

.author-card-info h4 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  color: var(--navy-primary);
}

.author-credentials {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.author-card-info p {
  font-size: 0.92rem;
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* Cards Grid for Hub Pages */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2.5rem 0;
}

.hub-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--navy-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* Bottom CTA Button Uniform Alignment across all Hub Cards */
.hub-card .btn-primary,
.hub-card .btn-card,
.hub-card .card-cta,
.hub-card > a.btn {
  margin-top: auto !important;
  align-self: flex-start;
  white-space: nowrap;
  border-radius: 8px;
  padding: 12px 20px;
}

.hub-card .card-footer,
.hub-card > div[style*="border-top"] {
  margin-top: auto !important;
  width: 100%;
}

/* Card Featured Photo & SVG Miniature Thumbnail */
.card-thumb-wrapper {
  margin: -2rem -2rem 1.5rem -2rem;
  width: calc(100% + 4rem);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background-color: #F8FAFC;
  display: block;
  flex-shrink: 0;
  position: relative;
}

.card-thumb-wrapper img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-thumb-wrapper svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-card:hover .card-thumb-wrapper img,
.hub-card:hover .card-thumb-wrapper svg {
  transform: scale(1.05);
}

.card-thumb-svg {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F8FAFC;
}

.card-thumb-svg img,
.card-thumb-svg svg {
  object-fit: contain;
  max-height: 100%;
  width: 100%;
}

.hub-card:hover {
  transform: translateY(-4px);
  border-color: rgba(10, 49, 97, 0.4);
  border-top-color: var(--red-primary);
  box-shadow: var(--shadow-hover);
}

.hub-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
  color: var(--navy-primary);
}

.hub-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  flex-grow: 1;
  margin-bottom: 1.25rem;
}

/* Tool & Hub Custom Icon Boxes */
.tool-icon-box, .hub-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background-color: #F1F5F9;
  border: 1px solid #E2E8F0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: var(--transition);
  color: var(--navy-primary);
  flex-shrink: 0;
}

.hub-card:hover .tool-icon-box,
.hub-card:hover .hub-icon-box,
.pillar-card:hover .tool-icon-box,
.pillar-card:hover .hub-icon-box {
  background-color: #FEF2F2;
  border-color: #FECACA;
  color: var(--red-primary);
  transform: scale(1.06);
}

.tool-icon-box svg, .hub-icon-box svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Editorial HD Figures & Captions */
.article-hero-figure, .article-body-figure, .hub-hero-figure {
  margin: 2.25rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(10, 49, 97, 0.08);
  background-color: #F8FAFC;
}

.article-hero-figure img, .article-body-figure img, .hub-hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.article-hero-figure figcaption, .article-body-figure figcaption, .hub-hero-figure figcaption {
  padding: 0.85rem 1.25rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
  background: #FFFFFF;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-style: italic;
}

.article-hero-figure figcaption::before, .article-body-figure figcaption::before, .hub-hero-figure figcaption::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--red-primary);
  flex-shrink: 0;
}

/* Breadcrumbs */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb-nav a {
  color: var(--text-muted);
}

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

.breadcrumb-separator {
  color: var(--border-subtle);
}

/* Site Footer */
.site-footer {
  background-color: var(--navy-deep);
  color: #94A3B8;
  padding: 5rem 0 2rem;
  margin-top: auto;
  border-top: 4px solid var(--red-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand .brand-logo {
  color: #FFFFFF;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: #94A3B8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #94A3B8;
  font-size: 0.95rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #FFFFFF;
  padding-left: 3px;
}

.footer-disclaimer {
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #64748B;
  line-height: 1.6;
  text-align: center;
}

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #64748B;
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a {
  color: #64748B;
}

.footer-legal-links a:hover {
  color: #94A3B8;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .pillars-grid, .cards-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .calc-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-nav, .header-actions {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .pillars-grid, .cards-grid-3 {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.25rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .calculator-container {
    padding: 1.5rem;
  }
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: #FFFFFF;
  z-index: 99;
  padding: 2rem;
  flex-direction: column;
  gap: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  display: flex;
}

.mobile-nav-drawer .nav-link {
  font-size: 1.25rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

/* ====================================================================
   EXTENDED SUITE STYLES: EXERCISES, ADVANCED CALCULATORS, & VISUALS
   ==================================================================== */

/* Page Header & Exercise Filters (Issue 1 Fix: Overlap & Spacing) */
.page-header, .hub-header {
  margin-bottom: 2rem;
  position: relative;
  clear: both;
}

.hero-sub, .hub-sub {
  margin-bottom: 2rem;
  display: block;
  clear: both;
}

/* Filter Pills Group & Filter Bar */
.filter-pills, .filter-bar, .exercise-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
  clear: both;
}

.filter-btn {
  border: 1px solid var(--border-subtle);
  background-color: #FFFFFF;
  color: var(--text-secondary);
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
}

.filter-btn.active {
  background-color: var(--navy-primary);
  border-color: var(--navy-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

/* Category Badge Tags */
.muscle-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background-color: var(--red-light);
  color: var(--red-primary);
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

.pattern-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background-color: var(--navy-light);
  color: var(--navy-primary);
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

/* Biomechanical Diagram Box */
.exercise-diagram-box {
  background: linear-gradient(145deg, #F8FAFC 0%, #FFFFFF 100%);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--navy-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.exercise-diagram-box svg {
  max-width: 100%;
  height: auto;
}

.diagram-caption {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
}

/* Visual Barbell Plate Loader */
.barbell-visual-container {
  background: var(--navy-deep);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
}

.barbell-shaft-display {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 160px;
  position: relative;
  min-width: 380px;
}

.barbell-bar-center {
  width: 90px;
  height: 24px;
  background: linear-gradient(180deg, #94A3B8 0%, #64748B 50%, #475569 100%);
  border-radius: 4px 0 0 4px;
  border: 1px solid #334155;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.barbell-collar {
  width: 22px;
  height: 64px;
  background: linear-gradient(180deg, #CBD5E1 0%, #94A3B8 50%, #64748B 100%);
  border: 1px solid #334155;
  border-radius: 4px;
  z-index: 2;
}

.barbell-sleeve {
  height: 32px;
  flex-grow: 1;
  max-width: 280px;
  background: linear-gradient(180deg, #CBD5E1 0%, #94A3B8 50%, #64748B 100%);
  border: 1px solid #334155;
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 2px;
}

.loaded-plate {
  border-radius: 4px;
  border: 2px solid rgba(0,0,0,0.3);
  box-shadow: 2px 0 6px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.75rem;
  user-select: none;
  margin-right: 2px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

/* Standard Bumper & Iron Colors */
.plate-45, .plate-20kg { height: 140px; width: 28px; background-color: #CC163A; } /* Old Glory Red */
.plate-35, .plate-15kg { height: 120px; width: 24px; background-color: #0A3161; } /* Old Glory Blue */
.plate-25, .plate-10kg { height: 104px; width: 20px; background-color: #D97706; } /* Yellow */
.plate-10, .plate-5kg  { height: 86px;  width: 16px; background-color: #059669; } /* Green */
.plate-5,  .plate-2_5kg{ height: 68px;  width: 14px; background-color: #E2E8F0; color: #1E293B; } /* White */
.plate-2_5,.plate-1_25kg{height: 52px;  width: 12px; background-color: #475569; } /* Dark */

/* Workout Split Generator Styles */
.split-results-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.split-day-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--navy-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.split-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--bg-tint);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.split-day-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-primary);
  font-family: var(--font-heading);
}

.split-day-focus {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red-primary);
  text-transform: uppercase;
}

/* Category Section Titles on Hubs */
.category-section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy-primary);
  margin: 3.5rem 0 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--navy-primary);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.category-section-title .cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--red-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(204, 22, 58, 0.08);
}

.category-section-title .cat-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--red-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
