/* ===================================
   Fit Guide - Main Stylesheet
   Mobile-first, minimalist design
   =================================== */

/* CSS Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #10b981;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
  --error-color: #ef4444;
  --success-color: #10b981;
  --warning-color: #f59e0b;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

h1 {
  font-size: 2rem;
}
h2 {
  font-size: 1.75rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}
h5 {
  font-size: 1.125rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  margin-bottom: var(--spacing-sm);
  padding-left: var(--spacing-lg);
}

li {
  margin-bottom: var(--spacing-xs);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--text-color);
  color: white;
  padding: var(--spacing-md);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  align-items: flex-start;
}

.cookie-content p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-content a {
  color: var(--secondary-color);
  text-decoration: underline;
}

.cookie-content button {
  align-self: flex-start;
}

/* Header */
.header {
  background-color: white;
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-sm) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.logo a:hover {
  text-decoration: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
}

/* Navigation */
.nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  flex-direction: column;
  gap: var(--spacing-sm);
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-sm);
  box-shadow: var(--shadow-md);
}

.nav.active ul {
  display: flex;
}

.nav li {
  margin: 0;
}

.nav a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  display: block;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--primary-color);
  text-decoration: none;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: var(--spacing-2xl) 0;
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

.hero-subtitle {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn-primary {
  background-color: white;
  color: var(--primary-color);
}

.hero .btn-primary:hover {
  background-color: var(--bg-light);
}

/* Page Header */
.page-header {
  background-color: var(--bg-light);
  padding: var(--spacing-xl) 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  margin-bottom: var(--spacing-sm);
}

.page-header p {
  color: var(--text-light);
  font-size: 1.125rem;
  margin: 0;
}

/* Main Content */
.main-content {
  padding: var(--spacing-xl) 0;
}

/* Intro Section */
.intro-section {
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

.intro-section h2 {
  margin-bottom: var(--spacing-md);
}

.intro-section p {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
  font-size: 1.0625rem;
}

/* Feature Grid */
.features {
  margin-bottom: var(--spacing-xl);
}

.features h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.feature-card {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all 0.3s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  background-color: var(--bg-light);
}

.feature-card h3 {
  margin-bottom: var(--spacing-sm);
}

.feature-card p {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

/* Latest Articles */
.latest-articles {
  margin-bottom: var(--spacing-xl);
}

.latest-articles h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.article-preview {
  background-color: var(--bg-light);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary-color);
}

.article-preview h3 {
  margin-bottom: var(--spacing-sm);
  font-size: 1.25rem;
}

.article-preview p {
  color: var(--text-light);
  margin-bottom: var(--spacing-sm);
}

.article-preview a {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Ad Container */
.ad-container {
  margin: var(--spacing-xl) 0;
  display: flex;
  justify-content: center;
}

.ad-slot {
  min-height: 250px;
  background-color: var(--bg-light);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.875rem;
  padding: var(--spacing-md);
  width: 100%;
  max-width: 728px;
}

/* Calculator Sections */
.calculator-section {
  margin-bottom: var(--spacing-2xl);
}

.calculator-section h2 {
  margin-bottom: var(--spacing-md);
}

.calculator-section > p {
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
}

.calculator-card {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.calculator-form {
  margin-bottom: var(--spacing-lg);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.radio-group {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-weight: 400;
  cursor: pointer;
}

.radio-group input[type="radio"] {
  width: auto;
  cursor: pointer;
}

/* Calculator Results */
.calculator-result {
  background-color: var(--bg-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.calculator-result h3 {
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
}

.result-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.result-category {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

.result-description {
  color: var(--text-light);
}

.macros-breakdown {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
}

.macros-breakdown h4 {
  margin-bottom: var(--spacing-md);
}

.macro-item {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

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

.macro-label {
  font-weight: 600;
}

.macro-value {
  color: var(--primary-color);
  font-weight: 600;
}

/* Info Box */
.info-box {
  background-color: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
}

.info-box h3 {
  margin-bottom: var(--spacing-md);
}

.info-box ul {
  margin-bottom: 0;
}

.info-box em {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Tips Section */
.tips-section {
  margin-bottom: var(--spacing-xl);
}

.tips-section h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.tips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.tip-card {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.tip-card h3 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.tip-card p {
  color: var(--text-light);
  margin: 0;
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.contact-form-section,
.contact-info-section {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.contact-form-section h2,
.contact-info-section h2 {
  margin-bottom: var(--spacing-lg);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.contact-info-card {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.contact-info-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.contact-info-card h3 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
  font-size: 1.125rem;
}

.contact-info-card p {
  color: var(--text-light);
  margin-bottom: var(--spacing-xs);
}

.contact-info-card em {
  font-size: 0.9rem;
}

/* Policy Content */
.policy-content {
  max-width: 800px;
  margin: 0 auto;
}

.policy-section {
  margin-bottom: var(--spacing-xl);
}

.policy-section h2 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border-color);
}

.policy-section h3 {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  font-size: 1.125rem;
}

.policy-section ul {
  margin-bottom: var(--spacing-md);
}

/* Workout Plans */
.workout-plans {
  margin-bottom: var(--spacing-xl);
}

.workout-plan {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.workout-plan h3 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
}

.workout-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--spacing-md);
  overflow-x: auto;
  display: block;
}

.workout-table table {
  width: 100%;
  min-width: 500px;
}

.workout-table th,
.workout-table td {
  padding: var(--spacing-sm);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.workout-table th {
  background-color: var(--bg-light);
  font-weight: 600;
  color: var(--text-color);
}

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

/* Recipe Grid */
.recipe-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.recipe-card {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.recipe-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.recipe-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: var(--bg-light);
}

.recipe-content {
  padding: var(--spacing-lg);
}

.recipe-content h3 {
  margin-bottom: var(--spacing-sm);
}

.recipe-meta {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  font-size: 0.9rem;
  color: var(--text-light);
  flex-wrap: wrap;
}

.recipe-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.recipe-macros {
  background-color: var(--bg-light);
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-md);
}

.recipe-macros p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.recipe-description {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

.recipe-ingredients {
  margin-bottom: var(--spacing-md);
}

.recipe-ingredients h4 {
  font-size: 1rem;
  margin-bottom: var(--spacing-sm);
}

.recipe-ingredients ul {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Article Content */
.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-section {
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid var(--border-color);
}

.article-section:last-child {
  border-bottom: none;
}

.article-section h2 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
}

.article-section h3 {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

.article-section img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--spacing-lg) 0;
  background-color: var(--bg-light);
}

/* 404 Page */
.error-page {
  text-align: center;
  padding: var(--spacing-2xl) 0;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.error-page h1 {
  font-size: 6rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
}

.error-page h2 {
  margin-bottom: var(--spacing-md);
}

.error-page p {
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
  max-width: 500px;
}

/* Footer */
.footer {
  background-color: var(--text-color);
  color: white;
  padding: var(--spacing-xl) 0 var(--spacing-md);
  margin-top: var(--spacing-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
  color: white;
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: var(--spacing-xs);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: white;
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  margin: 0;
}

/* Responsive Design - Tablet */
@media (min-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }

  .container {
    padding: 0 var(--spacing-lg);
  }

  .mobile-menu-toggle {
    display: none;
  }

  .nav ul {
    display: flex;
    flex-direction: row;
    position: static;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: var(--spacing-lg);
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tips-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .recipe-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cookie-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cookie-content button {
    align-self: center;
  }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
  h1 {
    font-size: 3rem;
  }

  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tips-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .recipe-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .cookie-banner,
  .ad-container,
  .mobile-menu-toggle {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  a {
    text-decoration: underline;
  }

  .container {
    max-width: 100%;
  }
}

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

/* Focus Styles */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}
