/**
 * Motionwell Automation - Main Stylesheet
 * Based on Hugo PBN 建站手册 Design Tokens + Gemini Format
 */

/* === Design Tokens === */
:root {
  /* Colors - Motionwell Brand */
  --primary-color: #8B0000;
  --primary-dark: #600000;
  --accent-color: #333333;
  --text-color: #555555;
  --text-light: #777777;
  --bg-light: #f4f6f9;
  --white: #ffffff;
  --border-color: rgba(0, 0, 0, 0.1);

  /* Spacing Scale (8px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Typography Scale */
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;

  /* Touch Targets */
  --touch-min: 44px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius: var(--radius-md);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);

  /* Transition */
  --transition-base: 200ms ease;
  --transition-fast: 100ms ease;

  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-color);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

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

ul {
  list-style: none;
}

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

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  color: var(--accent-color);
}

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section {
  padding: var(--space-20) 0;
}

.bg-light {
  background-color: var(--bg-light);
}

/* === Header === */
.header {
  background: var(--white);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 48px;
  width: auto;
}

.nav-menu {
  display: flex;
  gap: 30px;
}

.nav-menu a {
  font-weight: 500;
  color: var(--accent-color);
  font-size: var(--text-base);
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

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

/* CTA Button */
.btn-cta {
  background: var(--primary-color);
  color: var(--white);
  padding: 10px 25px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  border: 2px solid var(--primary-color);
}

.btn-cta:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

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

.btn-cta-white:hover {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

/* Mobile Navigation */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent-color);
  margin: 6px 0;
  transition: var(--transition-base);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--white);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 101;
  padding: var(--space-6);
  transition: right 0.3s ease;
}

.mobile-nav.active {
  right: 0;
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-backdrop.active {
  opacity: 1;
}

.close-menu {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  color: var(--text-light);
}

.mobile-nav-menu {
  margin-top: 60px;
}

.mobile-nav-menu a {
  display: block;
  padding: var(--space-4) 0;
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--accent-color);
  border-bottom: 1px solid var(--border-color);
}

/* === Hero Section === */
.hero {
  margin-top: var(--header-height);
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/images/hero/qa-lab-3d-full-view.jpg');
  background-size: cover;
  background-position: center;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
}

.hero-content {
  max-width: 800px;
  padding: var(--space-10) var(--space-5);
}

.hero h1 {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-3);
  font-weight: 700;
  color: var(--white);
}

.hero-tagline {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-desc {
  font-size: 20px;
  margin-bottom: var(--space-8);
  line-height: 1.6;
  opacity: 0.95;
}

.hero p {
  font-size: 22px;
  margin-bottom: var(--space-8);
  line-height: 1.6;
}

.btn-cta-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

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

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* === Section Header === */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header h2 {
  font-size: var(--text-3xl);
  color: var(--primary-color);
  margin-bottom: var(--space-4);
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  margin: var(--space-3) auto 0;
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--text-light);
}

/* === Milestones Grid === */
.milestones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

.milestone-item {
  background: var(--white);
  padding: var(--space-6);
  border-left: 5px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}

.milestone-item:hover {
  box-shadow: var(--shadow);
}

.milestone-item .year {
  font-size: var(--text-2xl);
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: var(--space-2);
}

.milestone-item .milestone-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
}

/* === Solutions Grid === */
.solutions-primary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.solutions-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.solution-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

a.solution-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

a.solution-card h3 {
  color: var(--text-dark);
}

a.solution-card:hover h3 {
  color: var(--primary-color);
}

.solution-card-large .card-img {
  height: 220px;
}

.solution-card-small .card-img {
  height: 160px;
}

.solution-card-small .card-body {
  padding: var(--space-4);
}

.solution-card-small .card-body h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.solution-card-small .card-body p {
  font-size: 13px;
  margin-bottom: 0;
}

.card-tags {
  margin-top: var(--space-3);
}

/* === Industry Grid (Legacy) === */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-8);
}

.industry-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.card-img {
  height: 200px;
  background: #ddd;
  position: relative;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: var(--space-6);
}

.card-body h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  color: var(--accent-color);
}

.card-body p {
  font-size: 14px;
  color: #666;
  margin-bottom: var(--space-4);
}

.tag {
  display: inline-block;
  background: #eee;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-right: var(--space-2);
  margin-bottom: var(--space-2);
  color: var(--text-color);
}

/* === Product Section === */
.product-item {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin-bottom: var(--space-20);
}

.product-item:nth-child(even) {
  flex-direction: row-reverse;
}

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

.product-img-box {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.product-img-box img {
  width: 100%;
  height: auto;
}

.product-info {
  flex: 1;
}

.product-info h3 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-5);
  color: var(--primary-color);
}

.product-info > p {
  font-size: var(--text-base);
  margin-bottom: var(--space-5);
  line-height: 1.8;
  color: var(--text-color);
}

.feature-list {
  padding-left: 0;
}

.feature-list li {
  margin-bottom: var(--space-3);
  padding-left: var(--space-6);
  position: relative;
  color: var(--text-color);
}

.feature-list li::before {
  content: '\2713';
  color: var(--primary-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* === Partners Section === */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-6);
  max-width: 1000px;
  margin: 0 auto;
}

.logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: var(--white);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  min-height: 80px;
}

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

.logo-box img {
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }

  .logo-box {
    padding: var(--space-3);
    min-height: 60px;
  }

  .logo-box img {
    max-height: 40px;
  }
}

@media (max-width: 480px) {
  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* === Footer === */
.footer {
  background: #1a1a1a;
  color: #bbb;
  padding: var(--space-12) 0 var(--space-5);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}

.footer-brand {
  color: var(--white);
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-5);
}

.footer-desc {
  color: #bbb;
  line-height: 1.7;
}

.footer h3 {
  color: var(--white);
  margin-bottom: var(--space-5);
  font-size: var(--text-lg);
}

.footer-contact li {
  margin-bottom: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.footer-links a {
  display: block;
  margin-bottom: var(--space-3);
  color: #bbb;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  text-align: center;
  padding-top: var(--space-5);
  border-top: 1px solid #333;
  font-size: 14px;
  color: #888;
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-nav,
  .nav-backdrop {
    display: block;
  }

  .hero {
    min-height: 500px;
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .hero p {
    font-size: var(--text-lg);
  }

  .section {
    padding: var(--space-12) 0;
  }

  .section-header {
    margin-bottom: var(--space-8);
  }

  .section-header h2 {
    font-size: var(--text-2xl);
  }

  .product-item {
    flex-direction: column !important;
    gap: var(--space-6);
    margin-bottom: var(--space-12);
  }

  .product-info h3 {
    font-size: var(--text-2xl);
  }

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

  .solutions-primary {
    grid-template-columns: 1fr;
  }

  .solutions-secondary {
    grid-template-columns: 1fr;
  }

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

  .btn-cta.header-cta {
    display: none;
  }

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

/* === Page Content (Inner Pages) === */

/* Page Hero Section */
.page-hero {
  margin-top: var(--header-height);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  background-size: cover;
  background-position: center;
  min-height: 350px;
  display: flex;
  align-items: center;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--white), transparent);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.page-hero .pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.page-hero h1 {
  font-size: var(--text-4xl);
  color: var(--white);
  margin-bottom: var(--space-4);
  font-weight: 700;
  line-height: 1.2;
}

.page-hero .hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  max-width: 600px;
}

/* Page Content Section */
.page-content {
  padding: var(--space-16) 0;
  background: var(--white);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-12);
}

.content-main {
  min-width: 0;
}

/* Sidebar Styles */
.content-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  height: fit-content;
}

.sidebar-box {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.sidebar-box h4 {
  font-size: var(--text-lg);
  color: var(--accent-color);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--primary-color);
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-label {
  font-weight: 600;
  color: var(--text-color);
  font-size: 14px;
}

.sidebar-value {
  color: var(--text-light);
  font-size: 14px;
}

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

.sidebar-contact h4 {
  color: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

.sidebar-contact p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin-bottom: var(--space-4);
}

.btn-sidebar {
  display: block;
  background: var(--white);
  color: var(--primary-color);
  text-align: center;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-sidebar:hover {
  background: var(--bg-light);
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Content Typography */
.content-main h2 {
  font-size: var(--text-2xl);
  color: var(--primary-color);
  margin: var(--space-10) 0 var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--bg-light);
  position: relative;
}

.content-main h2:first-child {
  margin-top: 0;
}

.content-main h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary-color);
}

.content-main h3 {
  font-size: var(--text-xl);
  color: var(--accent-color);
  margin: var(--space-8) 0 var(--space-4);
}

.content-main h4 {
  font-size: var(--text-lg);
  color: var(--accent-color);
  margin: var(--space-6) 0 var(--space-3);
}

.content-main p {
  margin-bottom: var(--space-4);
  line-height: 1.8;
  color: var(--text-color);
}

.content-main ul,
.content-main ol {
  margin-bottom: var(--space-5);
  padding-left: var(--space-6);
}

.content-main li {
  margin-bottom: var(--space-2);
  line-height: 1.7;
  color: var(--text-color);
}

.content-main ul li {
  list-style: none;
  position: relative;
  padding-left: var(--space-5);
}

.content-main ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--primary-color);
  border-radius: 50%;
}

.content-main ol li {
  list-style: decimal;
  padding-left: var(--space-2);
}

/* Content Images */
.content-main img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  margin: var(--space-6) 0;
}

/* Content Tables */
.content-main table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.content-main thead {
  background: var(--primary-color);
  color: var(--white);
}

.content-main th {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.content-main td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-color);
  font-size: 15px;
  color: var(--text-color);
}

.content-main tbody tr:last-child td {
  border-bottom: none;
}

.content-main tbody tr:hover {
  background: var(--bg-light);
}

/* Content Code Blocks */
.content-main pre,
.content-main code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.content-main code {
  background: var(--bg-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--primary-color);
}

.content-main pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: var(--space-5);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-6) 0;
}

.content-main pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 14px;
  line-height: 1.6;
}

/* Content Blockquote */
.content-main blockquote {
  border-left: 4px solid var(--primary-color);
  background: var(--bg-light);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-6) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.content-main blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--text-color);
}

/* Content Strong/Bold */
.content-main strong {
  color: var(--accent-color);
  font-weight: 600;
}

/* Page CTA Section */
.page-cta {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: var(--space-16) 0;
}

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

.cta-content h2 {
  color: var(--white);
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.cta-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
  line-height: 1.6;
}

.page-cta .btn-cta {
  background: var(--white);
  color: var(--primary-color);
  padding: 14px 40px;
  font-size: var(--text-lg);
}

.page-cta .btn-cta:hover {
  background: var(--bg-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Responsive Inner Pages */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .content-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-10);
  }

  .sidebar-box {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  .page-hero {
    min-height: 280px;
  }

  .page-hero h1 {
    font-size: var(--text-2xl);
  }

  .page-content {
    padding: var(--space-10) 0;
  }

  .content-sidebar {
    grid-template-columns: 1fr;
  }

  .content-main h2 {
    font-size: var(--text-xl);
  }

  .content-main table {
    display: block;
    overflow-x: auto;
  }

  .page-cta {
    padding: var(--space-12) 0;
  }

  .cta-content h2 {
    font-size: var(--text-2xl);
  }
}

/* Legacy Support */
.page-header {
  margin-top: var(--header-height);
  padding: var(--space-12) 0 var(--space-8);
  background: var(--bg-light);
}

.page-header h1 {
  font-size: var(--text-4xl);
  color: var(--primary-color);
  margin-bottom: var(--space-3);
}

.page-header .lead {
  font-size: var(--text-lg);
  color: var(--text-light);
  max-width: 700px;
}

.content-wrapper {
  padding: var(--space-12) 0;
}

.content h2 {
  font-size: var(--text-2xl);
  color: var(--accent-color);
  margin: var(--space-8) 0 var(--space-4);
}

.content h3 {
  font-size: var(--text-xl);
  margin: var(--space-6) 0 var(--space-3);
}

.content p {
  margin-bottom: var(--space-4);
  line-height: 1.8;
}

.content ul,
.content ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.content li {
  margin-bottom: var(--space-2);
  list-style: disc;
}

/* === Utility Classes === */
.text-center {
  text-align: center;
}

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

/* === Enhanced Solution Page Typography === */

/* Lead paragraph - first paragraph after h2 */
.content-main > p:first-of-type,
.content-main h2 + p {
  font-size: var(--text-lg);
  color: var(--text-color);
  line-height: 1.9;
}

/* Feature highlight boxes */
.content-main > p > strong:only-child,
.content-main > p:has(> strong:first-child:last-child) {
  display: block;
  background: linear-gradient(135deg, var(--bg-light) 0%, rgba(200, 16, 46, 0.05) 100%);
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--space-5) 0;
}

/* Nested lists styling */
.content-main ul ul,
.content-main ol ul {
  margin-top: var(--space-2);
  margin-bottom: var(--space-2);
  padding-left: var(--space-5);
}

.content-main ul ul li::before {
  width: 4px;
  height: 4px;
  background: var(--text-light);
  top: 12px;
}

/* Definition-style list items with em dash */
.content-main li strong {
  color: var(--primary-color);
}

/* Image captions */
.content-main img + em,
.content-main p:has(img) + p > em:only-child {
  display: block;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  margin-top: calc(-1 * var(--space-4));
  margin-bottom: var(--space-6);
}

/* Better spacing for image sections */
.content-main h3 + p:has(img),
.content-main h2 + p:has(img) {
  margin-top: var(--space-4);
}

/* FAQ styling */
.content-main h3:has(+ p) {
  margin-bottom: var(--space-3);
}

/* Horizontal rule styling */
.content-main hr {
  border: none;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), transparent);
  margin: var(--space-10) 0;
}

/* Enhanced blockquote for callouts */
.content-main blockquote {
  position: relative;
  border-left: 4px solid var(--primary-color);
  background: linear-gradient(135deg, var(--bg-light) 0%, rgba(200, 16, 46, 0.03) 100%);
  padding: var(--space-6);
  margin: var(--space-8) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.content-main blockquote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 60px;
  color: var(--primary-color);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
}

.content-main blockquote p {
  font-size: var(--text-lg);
  font-style: normal;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* Table enhancements */
.content-main table {
  font-size: 15px;
}

.content-main table caption {
  caption-side: bottom;
  padding: var(--space-3);
  font-size: 13px;
  color: var(--text-light);
  text-align: left;
}

/* First column emphasis in tables */
.content-main td:first-child {
  font-weight: 500;
  color: var(--accent-color);
}

/* Alternating row colors for better readability */
.content-main tbody tr:nth-child(even) {
  background: var(--bg-light);
}

.content-main tbody tr:nth-child(even):hover {
  background: rgba(200, 16, 46, 0.05);
}

.content-main tbody tr:nth-child(odd):hover {
  background: var(--bg-light);
}

/* === Blog Styles === */

/* Blog listing page */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-8);
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

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

.blog-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  font-size: 13px;
  color: var(--text-light);
}

.blog-card-meta .category {
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-card h3 {
  font-size: var(--text-xl);
  color: var(--accent-color);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.blog-card h3 a {
  color: inherit;
  transition: color var(--transition-fast);
}

.blog-card h3 a:hover {
  color: var(--primary-color);
}

.blog-card p {
  color: var(--text-color);
  line-height: 1.7;
  flex: 1;
  margin-bottom: var(--space-4);
}

.blog-card .read-more {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast);
}

.blog-card .read-more:hover {
  gap: 10px;
}

/* Blog single post */
.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-light);
}

.blog-post-meta .author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.blog-post-meta .category {
  background: rgba(200, 16, 46, 0.1);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

/* Featured post on blog listing */
.blog-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0;
}

.blog-featured .blog-card-img {
  aspect-ratio: auto;
  min-height: 300px;
}

.blog-featured .blog-card-body {
  padding: var(--space-8);
  justify-content: center;
}

.blog-featured h3 {
  font-size: var(--text-2xl);
}

/* Blog sidebar */
.blog-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.blog-sidebar-box {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.blog-sidebar-box h4 {
  font-size: var(--text-lg);
  color: var(--accent-color);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--primary-color);
}

.blog-categories {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-categories li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-color);
}

.blog-categories li:last-child {
  border-bottom: none;
}

.blog-categories a {
  color: var(--text-color);
  display: flex;
  justify-content: space-between;
  transition: color var(--transition-fast);
}

.blog-categories a:hover {
  color: var(--primary-color);
}

.blog-categories .count {
  color: var(--text-light);
  font-size: 13px;
}

/* Recent posts widget */
.recent-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-posts li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-color);
}

.recent-posts li:last-child {
  border-bottom: none;
}

.recent-posts a {
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.5;
  display: block;
  transition: color var(--transition-fast);
}

.recent-posts a:hover {
  color: var(--primary-color);
}

.recent-posts .date {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* === List Page Styles === */

.list-hero {
  margin-top: var(--header-height);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: var(--space-16) 0;
  text-align: center;
}

.list-hero h1 {
  color: var(--white);
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}

.list-hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto;
}

.list-content {
  padding: var(--space-16) 0;
  background: var(--bg-light);
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-8);
}

.list-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition-normal);
  display: block;
}

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

.list-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-light);
}

.list-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.list-card:hover .list-card-img img {
  transform: scale(1.05);
}

.list-card-body {
  padding: var(--space-6);
}

.list-card .pill {
  display: inline-block;
  background: rgba(200, 16, 46, 0.1);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.list-card h3 {
  font-size: var(--text-xl);
  color: var(--accent-color);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.list-card p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.list-card .learn-more {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.list-card:hover .learn-more {
  gap: 10px;
}

/* Contact page specific */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
}

.contact-info h3 {
  font-size: var(--text-xl);
  color: var(--accent-color);
  margin-bottom: var(--space-4);
}

.contact-item {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  background: var(--bg-light);
  border-radius: var(--radius-md);
}

.contact-item-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--white);
}

.contact-item-content h4 {
  font-size: var(--text-lg);
  color: var(--accent-color);
  margin-bottom: var(--space-2);
}

.contact-item-content p {
  color: var(--text-color);
  margin: 0;
  line-height: 1.6;
}

.contact-item-content a {
  color: var(--primary-color);
  font-weight: 500;
}

/* Contact form */
.contact-form {
  background: var(--white);
  padding: var(--space-8);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.contact-form h3 {
  font-size: var(--text-xl);
  color: var(--accent-color);
  margin-bottom: var(--space-6);
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: var(--space-2);
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.btn-submit {
  background: var(--primary-color);
  color: var(--white);
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}

.btn-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .blog-featured {
    grid-template-columns: 1fr;
  }

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

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

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

  .list-hero h1 {
    font-size: var(--text-2xl);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   List Card Placeholder Styles
   ======================================== */

.list-card-placeholder {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.placeholder-pattern {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
}

.placeholder-letter {
  font-size: 72px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.15);
  text-transform: uppercase;
  z-index: 2;
  line-height: 1;
}

.placeholder-decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.placeholder-decoration::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.placeholder-decoration::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

/* Geometric pattern overlay */
.list-card-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.03) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.03) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.placeholder-icon {
  width: 64px;
  height: 64px;
  fill: rgba(255, 255, 255, 0.3);
  z-index: 2;
}

/* Hover effect for placeholder cards */
.list-card:hover .list-card-placeholder {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #4a0000 100%);
}

.list-card:hover .placeholder-letter {
  color: rgba(255, 255, 255, 0.25);
}

/* Blog card placeholder */
.blog-card-placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.blog-card-placeholder .placeholder-letter {
  font-size: 64px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.15);
  text-transform: uppercase;
  z-index: 2;
}

.blog-card-placeholder .placeholder-decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.blog-card:hover .blog-card-placeholder {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #4a0000 100%);
}

.blog-card:hover .blog-card-placeholder .placeholder-letter {
  color: rgba(255, 255, 255, 0.25);
}
