/*
Theme Name: Robot Companion
Theme URI: https://robotcompanion.online
Description: A lightweight, SEO-optimized WordPress theme designed for robot companion AI blogs. Features responsive design, full block editor support, and advanced performance optimization.
Author: William
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: robot-companion
Tags: blog, one-column, two-columns, responsive-layout, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, full-site-editing, rtl-language-support, sticky-post, threaded-comments, translation-ready, block-patterns, wide-blocks
*/

/* Reset and Base Styles */
:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #3b82f6;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --background-light: #f9fafb;
  --background-white: #ffffff;
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  --container-max: 1200px;
  --content-max: 800px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --background-light: #111827;
    --background-white: #1f2937;
    --border-color: #374151;
    --border-light: #4b5563;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-white);
  -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: 0.75em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.875rem); }
h4 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h5 { font-size: clamp(1rem, 1.5vw, 1.25rem); }
h6 { font-size: clamp(0.875rem, 1vw, 1.125rem); }

p {
  margin-bottom: 1.25em;
  color: var(--text-secondary);
}

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

a:hover,
a:focus {
  color: var(--secondary-color);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Layout */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.content-wrapper {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* Header */
.site-header {
  background: var(--background-white);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

.site-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.site-description {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

/* Navigation */
.main-navigation {
  margin-top: 1rem;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.main-navigation a {
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item a {
  border-bottom-color: var(--primary-color);
  text-decoration: none;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin: 1rem;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
  }
  
  .main-navigation.toggled {
    display: block;
  }
  
  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }
  
  .main-navigation a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
  }
}

/* Main Content */
.site-main {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

.entry-header {
  margin-bottom: 2rem;
  text-align: center;
}

.entry-title {
  margin-bottom: 1rem;
}

.entry-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.entry-meta a {
  color: var(--text-muted);
}

.entry-content {
  margin-bottom: 2rem;
}

/* Article styles */
.article-image {
  margin: 2rem 0;
  text-align: center;
}

.article-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.article-image figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Highlight boxes */
.highlight-box {
  background: var(--background-light);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: var(--radius-md);
}

.highlight-box p:last-child {
  margin-bottom: 0;
}

/* Table of Contents */
.toc {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
}

.toc h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.toc ul {
  list-style: none;
}

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

.toc a {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.toc a:hover {
  border-bottom-color: var(--primary-color);
  text-decoration: none;
  padding-left: 0.5rem;
}

/* Lists */
ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Tables */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--background-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

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

.comparison-table tr:hover {
  background: var(--background-light);
}

/* Responsive table */
@media (max-width: 768px) {
  .comparison-table {
    font-size: 0.875rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 3rem 0;
}

.cta-box h3 {
  color: white;
  margin-bottom: 1rem;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--primary-color);
  padding: 0.75rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

/* Publication date */
.publication-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Photo credits */
.photo-credit {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Footer */
.site-footer {
  background: var(--background-light);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 3rem;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Block editor styles */
.wp-block-group {
  margin-bottom: 2rem;
}

.wp-block-columns {
  margin-bottom: 2rem;
}

.wp-block-column {
  margin-bottom: 1rem;
}

.wp-block-image {
  margin-bottom: 1.5rem;
}

.wp-block-quote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
}

.wp-block-code {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: var(--font-mono);
  overflow-x: auto;
}

/* Accessibility */
.screen-reader-text {
  position: absolute !important;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1rem;
  text-decoration: none;
  z-index: 999999;
}

.skip-link:focus {
  left: 0;
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .main-navigation,
  .menu-toggle {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    break-after: avoid;
  }
  
  img {
    max-width: 100% !important;
  }
}

/* Performance optimizations */
img {
  max-width: 100%;
  height: auto;
}

/* Hero Section */
.hero-section {
  margin-bottom: 3rem;
}

.hero-section .entry-header {
  margin-bottom: 2rem;
}

.hero-section .entry-title {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

/* Responsive layout improvements */
@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding: 0 2rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .site-header {
    padding: 0.75rem 0;
  }
  
  .site-branding {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .site-title {
    font-size: 1.25rem;
  }
  
  .entry-header {
    text-align: left;
  }
  
  .hero-section .entry-title {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }
  
  h2 {
    font-size: clamp(1.25rem, 4vw, 1.875rem);
  }
  
  h3 {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
  }
  
  .toc {
    padding: 1rem;
  }
  
  .highlight-box {
    padding: 1rem;
    margin: 1.5rem 0;
  }
  
  .cta-box {
    padding: 1.5rem;
    margin: 2rem 0;
  }
  
  .article-image {
    margin: 1.5rem 0;
  }
  
  .comparison-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .comparison-table th,
  .comparison-table td {
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .site-main {
    padding: 1.5rem 0;
  }
  
  .hero-section .entry-title {
    font-size: clamp(1.25rem, 6vw, 2rem);
  }
  
  .toc ul {
    padding-left: 1rem;
  }
  
  .toc li {
    margin-bottom: 0.75rem;
  }
  
  .cta-box h3 {
    font-size: 1.25rem;
  }
  
  .cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
}

/* Improved readability */
@media (max-width: 768px) {
  body {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  p {
    margin-bottom: 1.5rem;
  }
  
  li {
    margin-bottom: 0.75rem;
  }
}

/* Footer responsive */
@media (max-width: 768px) {
  .footer-widgets {
    display: block;
  }
  
  .footer-widget-area {
    margin-bottom: 2rem;
  }
}

/* Improved focus states for accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Better spacing for mobile */
@media (max-width: 768px) {
  section {
    margin-bottom: 2.5rem;
  }
  
  .entry-content > *:last-child {
    margin-bottom: 0;
  }
}

/* Optimized table display for very small screens */
@media (max-width: 480px) {
  .comparison-table {
    font-size: 0.75rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 0.5rem 0.25rem;
    min-width: 80px;
  }
}

/* Enhanced mobile menu */
@media (max-width: 768px) {
  .main-navigation.toggled {
    animation: slideDown 0.3s ease;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sticky header on scroll */
@media (min-width: 769px) {
  .site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
  }
}

/* Search Form */
.search-form {
  display: flex;
  align-items: center;
  max-width: 400px;
  margin: 1rem 0;
  position: relative;
}

.search-field {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--background-white);
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-field:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-submit {
  position: absolute;
  right: 0.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-submit:hover {
  background: var(--secondary-color);
}

.search-submit svg {
  width: 16px;
  height: 16px;
}

/* Footer Widgets */
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-widget h2.widget-title {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

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

.footer-widget li {
  margin-bottom: 0.5rem;
}

.footer-widget a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Site Info */
.site-info {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.site-info p {
  margin-bottom: 0.5rem;
}

/* Comments */
.comment-list {
  list-style: none;
  padding: 0;
}

.comment {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--background-light);
  border-radius: var(--radius-md);
}

.comment-author {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.comment-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

/* Post Navigation */
.post-navigation {
  margin: 3rem 0;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.post-navigation a {
  flex: 1;
  padding: 1.5rem;
  background: var(--background-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.post-navigation a:hover {
  background: var(--background-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.nav-subtitle {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.nav-title {
  font-weight: 600;
  color: var(--text-primary);
}

/* Posts Navigation */
.posts-navigation {
  margin: 3rem 0;
  text-align: center;
}

.posts-navigation a {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  margin: 0 0.5rem;
  transition: all 0.2s ease;
}

.posts-navigation a:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

/* Entry Meta */
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.reading-time {
  background: var(--background-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Widget Styles */
.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.widget ul {
  list-style: none;
  padding: 0;
}

.widget li {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

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

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

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

/* Tag Cloud */
.tagcloud a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  margin: 0.25rem;
  background: var(--background-light);
  border-radius: var(--radius-sm);
  font-size: 0.875rem !important;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tagcloud a:hover {
  background: var(--primary-color);
  color: white;
}

/* Archive and 404 Pages */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  background: var(--background-light);
  border-radius: var(--radius-lg);
}

.page-title {
  margin-bottom: 1rem;
}

.archive-description {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Error 404 */
.error-404 .page-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.error-404 .widget {
  text-align: left;
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--background-light);
  border-radius: var(--radius-md);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0000ee;
    --secondary-color: #000080;
    --text-primary: #000000;
    --text-secondary: #000000;
    --border-color: #000000;
  }
}

/* Homepage specific styles - Full width layout */
.home #content .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.home .site-main.full-width {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2rem 0;
}

.home .content-area {
  width: 100%;
  float: none;
}

.home .widget-area,
.home .secondary,
.home #secondary {
  display: none !important;
}

/* Hide any sidebar widgets on homepage */
.home .widget,
.home .widget_recent_entries,
.home .widget_recent_comments,
.home .widget_archive,
.home .widget_categories {
  display: none !important;
}

/* Full width layout for homepage */
.no-sidebar .site-content,
.full-width-layout .site-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.no-sidebar .content-area,
.full-width-layout .content-area {
  width: 100%;
  float: none;
}

.no-sidebar #secondary,
.full-width-layout #secondary {
  display: none;
}

.home .entry-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border-radius: var(--radius-lg);
}

.home .entry-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.publication-date {
  font-style: italic;
  opacity: 0.9;
  font-size: 0.9rem;
}

.highlight-box {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary-color);
  margin: 2rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.toc {
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
  border: 1px solid var(--border-color);
}

.toc h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.toc ul {
  columns: 2;
  column-gap: 2rem;
  margin: 0;
  padding-left: 1.5rem;
}

.toc li {
  margin-bottom: 0.5rem;
  break-inside: avoid;
}

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

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

@media (max-width: 768px) {
  .toc ul {
    columns: 1;
  }
}

.article-image {
  margin: 2rem 0;
  text-align: center;
}

.article-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-image img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Lazy loading placeholder */
.article-image img[loading="lazy"] {
  background: var(--background-light);
  min-height: 200px;
}

.article-image figcaption {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  padding: 0 1rem;
}

.photo-credit {
  font-size: 0.8rem;
  opacity: 0.7;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
  overflow-x: auto;
}

.comparison-table caption {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.comparison-table th,
.comparison-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
}

.comparison-table tbody tr:nth-child(even) {
  background-color: var(--background-light);
}

.comparison-table tbody tr:hover {
  background-color: rgba(37, 99, 235, 0.1);
}

@media (max-width: 768px) {
  .comparison-table {
    font-size: 0.8rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 0.5rem 0.25rem;
  }
}

.cta-box {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 3rem 0;
}

.cta-box h3 {
  margin-top: 0;
  font-size: 1.5rem;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--primary-color);
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: bold;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Section styling */
.entry-content section {
  margin: 3rem 0;
}

.entry-content section:first-child {
  margin-top: 0;
}

.entry-content h2 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

.entry-content h3 {
  color: var(--secondary-color);
  margin-top: 1.5rem;
}

.entry-content h4 {
  color: var(--text-primary);
  margin-top: 1rem;
}

/* Enhanced list styling */
.entry-content ul li,
.entry-content ol li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.entry-content ul li strong,
.entry-content ol li strong {
  color: var(--primary-color);
}

/* References section */
.references {
  background: var(--background-light);
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-top: 3rem;
}

.references h2 {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.references ol {
  padding-left: 1.5rem;
}

.references li {
  margin-bottom: 1rem;
  line-height: 1.5;
}

.references a {
  color: var(--primary-color);
  word-break: break-word;
}

/* About page specific styles */
.about-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0;
}

.about-intro {
  margin-bottom: 3rem;
}

.about-story {
  margin-bottom: 3rem;
}

.about-story p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.valugrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0 3rem 0;
}

.value-card {
  background: var(--background-light);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.value-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.value-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.approach-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin: 2rem 0 3rem 0;
}

.approach-text h3 {
  color: var(--primary-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.approach-text h3:first-child {
  margin-top: 0;
}

.approach-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-box {
  background: var(--primary-color);
  color: white;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  display: block;
  margin-bottom: 0.5rem;
  color: white;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  color: white;
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0 3rem 0;
}

.coverage-category {
  background: var(--background-light);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.coverage-category h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.coverage-category ul {
  list-style: none;
  padding: 0;
}

.coverage-category li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.coverage-category li:last-child {
  border-bottom: none;
}

.coverage-category li:before {
  content: "✓ ";
  color: var(--primary-color);
  font-weight: bold;
}

.standards-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0 3rem 0;
}

.standard-item {
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.standard-item h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.disclaimer-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #f59e0b;
  padding: 2rem;
  border-radius: var(--radius-md);
  margin: 2rem 0 3rem 0;
}

.disclaimer-box p {
  margin-bottom: 1rem;
}

.disclaimer-box p:last-child {
  margin-bottom: 0;
}

.involvement-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.involvement-card {
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
}

.involvement-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-cta {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-lg);
}

.contact-cta a {
  color: white;
  text-decoration: underline;
  font-weight: 600;
}

.contact-cta a:hover {
  text-decoration: none;
}

@media (max-width: 768px) {
  .approach-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .approach-stats {
    flex-direction: row;
    justify-content: space-around;
  }
  
  .stat-box {
    flex: 1;
    margin: 0 0.5rem;
  }
  
  .valugrid,
  .coverage-grid,
  .standards-content,
  .involvement-options {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .about-page {
    padding: 1rem;
  }
}

/* General page styles for converted pages */
.page .entry-content {
  max-width: 1000px;
  margin: 0 auto;
}

/* Benefits grid and cards */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.benefit-card {
  background: var(--background-light);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.benefit-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Content sections */
.content-section {
  margin: 3rem 0;
}

.content-section h2 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

/* Feature grids */
.feature-grid,
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-item,
.comparison-item {
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.feature-item h3,
.comparison-item h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Page subtitles */
.page-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  text-align: center;
}

/* Info boxes */
.info-box,
.warning-box {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin: 2rem 0;
  border-left: 4px solid;
}

.info-box {
  background: #e8f4f8;
  border-left-color: #2563eb;
  color: #1e40af;
}

.warning-box {
  background: #fef3c7;
  border-left-color: #f59e0b;
  color: #92400e;
}

/* Responsive adjustments for all pages */
@media (max-width: 768px) {
  .benefits-grid,
  .feature-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .benefit-card,
  .feature-item,
  .comparison-item {
    padding: 1.5rem;
  }
  
  .page-subtitle {
    font-size: 1.1rem;
  }
}