/**
 * Ergonomic Guide Page Styles
 * Enterprise-grade design matching landing page
 */

/* ===================================
   Hero Section
   =================================== */

.advice-hero {
  background: linear-gradient(
    135deg,
    var(--gray-50) 0%,
    #eef2ff 50%,
    var(--gray-50) 100%
  );
  padding: calc(var(--header-height, 64px) + 2rem) 1.5rem 4rem;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.advice-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(99, 102, 241, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(168, 85, 247, 0.06) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.hero-container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-content-centered {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 2rem;
}

.breadcrumb ol {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--gray-400);
}

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

.breadcrumb a:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--gray-700);
  font-weight: 500;
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-700);
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.hero-badge svg {
  width: 1rem;
  height: 1rem;
}

/* Hero Title */
.advice-hero .hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--gray-900);
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .advice-hero .hero-title {
    font-size: 3.25rem;
  }
}

@media (min-width: 1024px) {
  .advice-hero .hero-title {
    font-size: 3.75rem;
  }
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-600) 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero Subtitle */
.advice-hero .hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--gray-600);
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* Hero CTA Group */
.hero-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero-specific button overrides */
.advice-hero .btn-primary-large,
.advice-hero .btn-secondary-large {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: 0.75rem;
}

.advice-hero .btn-primary-large {
  background: linear-gradient(
    135deg,
    var(--primary-600) 0%,
    var(--primary-700) 100%
  );
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.advice-hero .btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.advice-hero .btn-primary-large svg,
.advice-hero .btn-secondary-large svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.advice-hero .btn-primary-large:hover svg {
  transform: translateX(4px);
}

.advice-hero .btn-secondary-large {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.advice-hero .btn-secondary-large:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

/* ===================================
   Stats Bar
   =================================== */

.stats-bar {
  background: var(--gray-900);
  padding: 2rem 1.5rem;
}

.stats-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: var(--primary-400);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-400);
  max-width: 180px;
}

/* ===================================
   Table of Contents
   =================================== */

.toc-section {
  padding: 4rem 1.5rem;
  background: white;
  scroll-margin-top: var(--header-height, 64px);
}

.toc-section .section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 2.5rem;
}

.toc-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .toc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

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

.toc-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-height: 180px;
  justify-content: center;
}

.toc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-200);
}

.toc-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toc-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

/* Icon Colors */
.icon-posture {
  background: rgba(239, 68, 68, 0.1);
}

.icon-posture svg {
  stroke: #ef4444;
}

.icon-chair {
  background: rgba(245, 158, 11, 0.1);
}

.icon-chair svg {
  stroke: #f59e0b;
}

.icon-desk {
  background: rgba(34, 197, 94, 0.1);
}

.icon-desk svg {
  stroke: #22c55e;
}

.icon-equipment {
  background: rgba(59, 130, 246, 0.1);
}

.icon-equipment svg {
  stroke: #3b82f6;
}

.icon-environment {
  background: rgba(168, 85, 247, 0.1);
}

.icon-environment svg {
  stroke: #a855f7;
}

.icon-routine {
  background: rgba(236, 72, 153, 0.1);
}

.icon-routine svg {
  stroke: #ec4899;
}

.toc-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

.toc-card p {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin: 0;
}

.toc-badge {
  background: white;
  border: 1px solid var(--gray-200);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-600);
}

/* ===================================
   Guide Sections
   =================================== */

.guide-section {
  padding: 4rem 1.5rem;
  background: white;
  scroll-margin-top: var(--header-height, 64px);
}

.guide-section.section-alt {
  background: var(--gray-50);
}

/* Section Header */
.section-header-guide {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto 3rem;
}

.section-header-guide .section-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-header-guide .section-icon svg {
  width: 2rem;
  height: 2rem;
}

.section-text {
  flex: 1;
}

.section-number {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-600);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.section-text h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.5rem;
}

.section-text p {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin: 0;
}

/* Tips Grid */
.tips-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.tip-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.section-alt .tip-card {
  background: white;
}

.tip-card:hover {
  border-color: var(--primary-200);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1);
}

.tip-card-wide {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .tip-card-wide {
    grid-column: span 1;
  }

  .toc-section {
    padding: 4rem 0.75rem;
  }
}

.tip-card-featured {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.03) 0%,
    rgba(168, 85, 247, 0.03) 100%
  );
  border-color: var(--primary-100);
}

.tip-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gray-300);
}

.tip-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 0.75rem;
  padding-right: 2rem;
}

.tip-card p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--gray-600);
  margin: 0 0 1rem;
}

/* Tip Action */
.tip-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-100);
}

.tip-icon {
  font-size: 0.875rem;
  font-weight: 700;
}

.tip-icon.good {
  color: #10b981;
}

.tip-icon.bad {
  color: #ef4444;
}

.tip-action span:last-child {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

/* Tip Visual */
.tip-visual {
  margin-top: 1rem;
}

.height-guide {
  background: var(--gray-100);
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.height-guide .measure {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.height-guide .note {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* Break Schedule */
.break-schedule {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
}

.schedule-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.schedule-item .time {
  flex-shrink: 0;
  width: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-600);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  text-align: center;
}

.schedule-item .activity {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Highlight Box */
.highlight-box {
  max-width: 1100px;
  margin: 3rem auto 0;
  background: linear-gradient(135deg, var(--primary-600) 0%, #7c3aed 100%);
  border-radius: 1rem;
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  color: white;
}

.highlight-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.highlight-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: white;
}

.highlight-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.highlight-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  opacity: 0.9;
}

.highlight-content strong {
  color: white;
}

@media (max-width: 600px) {
  .highlight-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* ===================================
   CTA Section
   =================================== */

.guide-cta {
  background: linear-gradient(135deg, var(--gray-50) 0%, #eef2ff 100%);
  padding: 5rem 1.5rem;
  text-align: center;
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 1rem;
}

.cta-content > p {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin: 0 0 2rem;
}

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

.cta-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.cta-note svg {
  width: 1rem;
  height: 1rem;
  stroke: #10b981;
}

/* ===================================
   Responsive Adjustments
   =================================== */

@media (max-width: 768px) {
  .advice-hero {
    padding: 5rem 1rem 3rem;
  }

  .advice-hero .hero-title {
    font-size: 2rem;
  }

  .advice-hero .hero-subtitle {
    font-size: 1rem;
  }

  .stats-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

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

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

  .section-header-guide {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .section-text h2 {
    font-size: 1.5rem;
  }

  .cta-content h2 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .advice-hero .btn-primary-large,
  .advice-hero .btn-secondary-large {
    width: 100%;
    justify-content: center;
  }

  .hero-cta-group {
    flex-direction: column;
    margin: 0 !important;
  }
}

/* ===================================
   Smooth Scroll
   =================================== */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
  .advice-hero,
  .stats-bar,
  .toc-section,
  .guide-cta,
  .navbar,
  .site-footer {
    display: none;
  }

  .guide-section {
    padding: 1rem 0;
    break-inside: avoid;
  }

  .tips-grid {
    display: block;
  }

  .tip-card {
    break-inside: avoid;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
  }
}
