/**
 * Blog Template Styles
 * 
 * Modern, Ordio-branded styles for blog templates, components, and layouts.
 * Follows Ordio design system and UI/UX best practices.
 * 
 * @package Ordio
 * @since 2026-01-09
 */

/* ============================================
   BASE STYLES & VARIABLES
   ============================================ */

:root {
  --ordio-blue: #4D8EF3;
  --ordio-blue-dark: #3B82F6;
  --ordio-blue-light: #EFF6FF;
  --bg-page: #FBFBFB;
  --bg-card: #FFFFFF;
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border-color: #E5E7EB;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  /* Blog content width variables */
  --blog-content-width-mobile: 100%;
  --blog-content-width-tablet: 90%;
  --blog-content-width-desktop: 80rem;
  /* Matches max-w-7xl (1280px) */
  --blog-reading-width: 43.75rem;
  /* 700px - Optimal reading width (60-75 chars per line) */
  /* Blog typography variables */
  --blog-body-font-size: 1.125rem;
  /* 18px */
  --blog-body-line-height: 1.75;
  --blog-paragraph-spacing: 1.75rem;
  /* Typography scale */
  --blog-h1-size: 2.5rem;
  /* 40px */
  --blog-h2-size: 2rem;
  /* 32px */
  --blog-h3-size: 1.5rem;
  /* 24px */
  --blog-h4-size: 1.25rem;
  /* 20px */
  --blog-h5-size: 1.125rem;
  /* 18px */
  --blog-h6-size: 1rem;
  /* 16px */
  /* Spacing system */
  --blog-spacing-xs: 0.5rem;
  /* 8px */
  --blog-spacing-sm: 0.75rem;
  /* 12px */
  --blog-spacing-md: 1rem;
  /* 16px */
  --blog-spacing-lg: 1.5rem;
  /* 24px */
  --blog-spacing-xl: 2rem;
  /* 32px */
  --blog-spacing-2xl: 2.5rem;
  /* 40px */
  --blog-spacing-3xl: 3rem;
  /* 48px */
}

/* Page background */
body.blog-page {
  background-color: var(--bg-page);
}

/* Alpine.js x-cloak support */
[x-cloak] {
  display: none !important;
}

/* ============================================
   POST CARD STYLES
   ============================================ */

.post-card {
  background-color: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  /* Explicitly ensure cards are visible immediately - no opacity or transform animations */
  opacity: 1;
  transform: none;
  animation: none;
}

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

@media (prefers-reduced-motion: reduce) {
  .post-card {
    transition: none;
  }

  .post-card:hover {
    transform: none;
  }
}

.post-card-link {
  display: block;
  color: var(--text-primary);
  text-decoration: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.post-card-link:hover {
  text-decoration: none;
  color: var(--text-primary);
}

.post-card-image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #F3F4F6;
  aspect-ratio: 16 / 9;
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card-link:hover .post-card-image {
  transform: scale(1.05);
}

.post-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--ordio-blue-light);
  color: var(--ordio-blue);
  align-self: flex-start;
}

/* Category-specific colors for distinct visual identity */
.post-card-category--lexikon {
  background-color: var(--ordio-blue-light);
  color: var(--ordio-blue);
}

.post-card-category--ratgeber {
  background-color: #D1FAE5;
  /* Success green light */
  color: #059669;
  /* Success green dark */
}

.post-card-category--inside-ordio {
  background-color: #F3F4F6;
  /* Grey light */
  color: #6B7280;
  /* Grey dark */
}

.post-card-category--dienstplan,
.post-card-category--zeiterfassung {
  background-color: #FEE2E2;
  /* Light red/pink */
  color: #DC2626;
  /* Red dark */
  font-weight: 700;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  min-height: 3.5rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  flex-grow: 1;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.2rem;
  /* ~3 lines at line-height 1.6 (0.875rem * 1.6 * 3) */
}

.post-card-date {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  margin-top: auto;
  color: var(--text-muted);
}

.post-card-date-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.post-card-date-text {
  line-height: 1;
}

.post-card-dates {
  margin-top: auto;
}

.post-card-updated-date {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.post-card-updated-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.post-card-updated-text {
  line-height: 1;
  color: var(--text-secondary);
}

/* Compact variant */
.post-card--compact {
  height: auto;
}

.post-card--compact .post-card-content {
  padding: 1rem;
}

.post-card--compact .post-card-title {
  font-size: 1.125rem;
  min-height: auto;
}

.post-card--compact .post-card-excerpt {
  display: none;
}

/* ============================================
   FEATURED POST HERO
   ============================================ */

.featured-posts-hero {
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .featured-posts-hero {
    margin-bottom: 4rem;
  }
}

.featured-post-card {
  background-color: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.featured-post-image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #F3F4F6;
  aspect-ratio: 16 / 9;
}

.featured-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-post-card:hover .featured-post-image {
  transform: scale(1.08);
}

.featured-post-content {
  padding: 2rem;
}

@media (min-width: 640px) {
  .featured-post-content {
    padding: 2.5rem;
  }
}

.featured-post-category {
  display: inline-block;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--ordio-blue-light);
  color: var(--ordio-blue);
}

.featured-post-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.2;
}

@media (min-width: 640px) {
  .featured-post-title {
    font-size: 2.25rem;
  }
}

.featured-post-excerpt {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.featured-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.featured-post-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
  background-color: var(--ordio-blue);
}

.featured-post-cta:hover {
  background-color: var(--ordio-blue-dark);
}

/* ============================================
   POST HEADER STYLES
   ============================================ */

/* ============================================
   POST HEADER STYLES (Full-width Hero Section)
   ============================================ */

.post-header {
  width: 100%;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  /* Reduced from 4rem - tighter connection to content */
  /* Padding handled by parent container (max-w-7xl) */
  padding-left: 0;
  padding-right: 0;
}

@media (min-width: 640px) {
  .post-header {
    margin-top: 4rem;
    margin-bottom: 2rem;
    /* Reduced from 5rem */
  }
}

@media (min-width: 1024px) {
  .post-header {
    margin-top: 5rem;
    margin-bottom: 2rem;
    /* Reduced from 6rem - optimal spacing for readability */
  }
}

.post-header-image-wrapper {
  margin-top: 3rem;
  margin-bottom: 0;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background-color: #F3F4F6;
  border-radius: 0.75rem;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-lg);
  /* Prevent CLS: Reserve space for image */
  min-height: 0;
  /* Ensure container maintains aspect ratio */
  contain: layout;
}

@media (min-width: 1024px) {
  .post-header-image-wrapper {
    border-radius: 1rem;
    margin-top: 4rem;
  }
}

.post-header-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Prevent CLS: Ensure image fills container without layout shift */
  min-height: 0;
}

.post-header-content {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* Padding handled by parent container (max-w-7xl) */
  padding-left: 0;
  padding-right: 0;
}

@media (min-width: 1024px) {
  .post-header-content {
    /* Match featured image width (full container width) */
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

.post-header-category {
  margin-bottom: 1rem;
}

.post-header-category-link {
  /* Base styles - will be overridden by category-specific classes */
  background-color: #F3F4F6;
  color: #374151;
}

.post-header-category-link:hover {
  background-color: #E5E7EB;
}

/* Category-specific colors for post header */
.post-header-category-link.post-header-category--lexikon {
  background-color: var(--ordio-blue-light);
  color: var(--ordio-blue);
}

.post-header-category-link.post-header-category--lexikon:hover {
  background-color: #DBEAFE;
}

.post-header-category-link.post-header-category--ratgeber {
  background-color: #D1FAE5;
  /* Success green light */
  color: #059669;
  /* Success green dark */
}

.post-header-category-link.post-header-category--ratgeber:hover {
  background-color: #A7F3D0;
}

.post-header-category-link.post-header-category--inside-ordio {
  background-color: #F3F4F6;
  /* Grey light */
  color: #6B7280;
  /* Grey dark */
}

.post-header-category-link.post-header-category--inside-ordio:hover {
  background-color: #E5E7EB;
  /* Grey hover */
}

/* Pillar page category tags - "Kompletter Guide" */
.post-header-category-link.post-header-category--dienstplan,
.post-header-category-link.post-header-category--zeiterfassung {
  background-color: #FEE2E2;
  /* Light red/pink */
  color: #DC2626;
  /* Red dark */
  font-weight: 700;
}

.post-header-category-link.post-header-category--dienstplan:hover,
.post-header-category-link.post-header-category--zeiterfassung:hover {
  background-color: #FECACA;
  /* Lighter red hover */
}

.post-header-title {
  font-weight: 700;
  font-family: 'Gilroy Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: var(--text-primary);
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (min-width: 640px) {
  .post-header-title {
    font-size: 3.5rem;
  }
}

@media (min-width: 1024px) {
  .post-header-title {
    font-size: 4rem;
  }
}

.post-header-title .title-keyword {
  color: var(--ordio-blue);
  font-weight: inherit;
}

.post-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  /* Increased gap for better spacing with icons */
  font-size: 0.9375rem;
  /* 15px */
  color: var(--text-secondary);
}

.post-header-date {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-header-date svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.post-header-updated-date {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-header-updated-date svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.post-header-author {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-header-author a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.post-header-author a:hover {
  color: var(--ordio-blue);
}

.post-header-reading-time {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-header-reading-time svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================
   POST CONTENT STYLES
   ============================================ */

/* ============================================
   POST CONTENT STYLES (Optimal Reading Width)
   ============================================ */

/* Content wrapper - centers content with optimal reading width (700px) */
/* No visual container - just width constraint for readability */
/* Based on UI/UX research: 60-75 characters per line for optimal readability */
.blog-post-content-wrapper {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  /* Padding handled by parent container (max-w-7xl) */
  padding-left: 0;
  padding-right: 0;
  /* No border, background, or visual container styling */
  border: none;
  background: none;
  box-shadow: none;
}

@media (min-width: 1024px) {
  .blog-post-content-wrapper {
    max-width: var(--blog-reading-width);
    /* 700px - Optimal reading width */
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    /* Allow overflow for embeds and tables that break out */
    overflow-x: visible;
  }
}

.post-content {
  margin-top: 1.5rem;
  /* Reduced from 2rem - tighter connection to featured image */
  margin-bottom: 2rem;
  /* No container styling - content flows naturally */
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
  /* Allow overflow for embeds that break out */
  overflow-x: visible;
}

@media (min-width: 640px) {
  .post-content {
    margin-top: 2rem;
    /* Reduced from 3rem - optimal spacing for flow */
    margin-bottom: 3rem;
  }
}

.post-content-inner {
  max-width: 100%;
  width: 100%;
  font-size: var(--blog-body-font-size);
  line-height: var(--blog-body-line-height);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Ensure proper text rendering */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* No container styling */
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  /* Allow overflow for embeds that break out - but only on desktop */
  overflow-x: hidden;
  /* Prevent horizontal scroll on mobile */
}

@media (min-width: 1024px) {
  .post-content-inner {
    overflow-x: visible;
    /* Allow embeds to break out on desktop */
  }
}

/* ============================================
   HEADING STYLES (Complete Typography Hierarchy)
   ============================================ */

.post-content-inner h1,
.post-content-inner h2,
.post-content-inner h3,
.post-content-inner h4,
.post-content-inner h5,
.post-content-inner h6 {
  font-weight: 700;
  font-family: 'Gilroy Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 0;
  /* Prevent orphaned headings */
  page-break-after: avoid;
  /* Allow long German compound words to break properly */
  word-break: break-word;
  overflow-wrap: break-word;
}

/* H1 - Main section headings (rarely used in content, but supported) */
.post-content-inner h1 {
  font-size: var(--blog-h1-size);
  /* 40px */
  margin-top: var(--blog-spacing-3xl);
  /* 48px */
  margin-bottom: var(--blog-spacing-lg);
  /* 24px */
  line-height: 1.2;
}

@media (min-width: 640px) {
  .post-content-inner h1 {
    font-size: 2.75rem;
    /* 44px */
    margin-top: 3.5rem;
    margin-bottom: 1.75rem;
  }
}

/* H2 - Major section headings */
.post-content-inner h2 {
  font-size: var(--blog-h2-size);
  /* 32px */
  margin-top: var(--blog-spacing-3xl);
  /* 48px */
  margin-bottom: var(--blog-spacing-lg);
  /* 24px */
  line-height: 1.25;
}

@media (min-width: 640px) {
  .post-content-inner h2 {
    font-size: 2.25rem;
    /* 36px */
    margin-top: 3.5rem;
    margin-bottom: 1.75rem;
  }
}

/* H3 - Subsection headings */
.post-content-inner h3 {
  font-size: var(--blog-h3-size);
  /* 24px */
  margin-top: var(--blog-spacing-2xl);
  /* 40px */
  margin-bottom: var(--blog-spacing-md);
  /* 16px */
  line-height: 1.3;
}

@media (min-width: 640px) {
  .post-content-inner h3 {
    font-size: 1.75rem;
    /* 28px */
    margin-top: 2.75rem;
    margin-bottom: 1.25rem;
  }
}

/* H4 - Minor subsection headings */
.post-content-inner h4 {
  font-size: var(--blog-h4-size);
  /* 20px */
  margin-top: var(--blog-spacing-xl);
  /* 32px */
  margin-bottom: var(--blog-spacing-md);
  /* 16px */
  line-height: 1.35;
  font-weight: 600;
  /* Slightly lighter than h1-h3 */
}

@media (min-width: 640px) {
  .post-content-inner h4 {
    font-size: 1.375rem;
    /* 22px */
    margin-top: 2.5rem;
    margin-bottom: 1rem;
  }
}

/* H5 - Small subsection headings */
.post-content-inner h5 {
  font-size: var(--blog-h5-size);
  /* 18px */
  margin-top: var(--blog-spacing-xl);
  /* 32px */
  margin-bottom: var(--blog-spacing-sm);
  /* 12px */
  line-height: 1.4;
  font-weight: 600;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .post-content-inner h5 {
    font-size: 1.25rem;
    /* 20px */
    margin-top: 2rem;
    margin-bottom: 0.875rem;
  }
}

/* H6 - Smallest headings */
.post-content-inner h6 {
  font-size: var(--blog-h6-size);
  /* 16px */
  margin-top: var(--blog-spacing-lg);
  /* 24px */
  margin-bottom: var(--blog-spacing-sm);
  /* 12px */
  line-height: 1.45;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 640px) {
  .post-content-inner h6 {
    font-size: 1.125rem;
    /* 18px */
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
  }
}

/* First heading in content - reduce top margin */
.post-content-inner>h1:first-child,
.post-content-inner>h2:first-child,
.post-content-inner>h3:first-child,
.post-content-inner>h4:first-child,
.post-content-inner>h5:first-child,
.post-content-inner>h6:first-child {
  margin-top: 0;
}

/* Heading links (if headings are links) */
.post-content-inner h1 a,
.post-content-inner h2 a,
.post-content-inner h3 a,
.post-content-inner h4 a,
.post-content-inner h5 a,
.post-content-inner h6 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.post-content-inner h1 a:hover,
.post-content-inner h2 a:hover,
.post-content-inner h3 a:hover,
.post-content-inner h4 a:hover,
.post-content-inner h5 a:hover,
.post-content-inner h6 a:hover {
  color: var(--ordio-blue);
}

/* Focus states for accessibility */
.post-content-inner h1 a:focus,
.post-content-inner h2 a:focus,
.post-content-inner h3 a:focus,
.post-content-inner h4 a:focus,
.post-content-inner h5 a:focus,
.post-content-inner h6 a:focus {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* ============================================
   PARAGRAPH STYLES
   ============================================ */

.post-content-inner p {
  margin-bottom: var(--blog-paragraph-spacing);
  /* 28px */
  color: var(--text-primary);
  line-height: var(--blog-body-line-height);
  /* 1.75 */
}

/* First paragraph after heading - reduce top margin */
.post-content-inner h1+p,
.post-content-inner h2+p,
.post-content-inner h3+p,
.post-content-inner h4+p,
.post-content-inner h5+p,
.post-content-inner h6+p {
  margin-top: 0;
}

/* Last paragraph - reduce bottom margin */
.post-content-inner p:last-child {
  margin-bottom: 0;
}

/* Paragraphs within list items */
.post-content-inner li>p {
  margin-bottom: var(--blog-spacing-sm);
  /* 12px */
}

.post-content-inner li>p:last-child {
  margin-bottom: 0;
}

/* ============================================
   LIST STYLES (Enhanced)
   ============================================ */

.post-content-inner ul,
.post-content-inner ol {
  margin-top: var(--blog-spacing-lg);
  /* 24px */
  margin-bottom: var(--blog-paragraph-spacing);
  /* 28px */
  margin-left: 0;
  padding-left: 1.75rem;
  line-height: var(--blog-body-line-height);
}

/* Lists after headings - reduce top margin */
.post-content-inner h1+ul,
.post-content-inner h1+ol,
.post-content-inner h2+ul,
.post-content-inner h2+ol,
.post-content-inner h3+ul,
.post-content-inner h3+ol,
.post-content-inner h4+ul,
.post-content-inner h4+ol {
  margin-top: var(--blog-spacing-md);
  /* 16px */
}

/* List items */
.post-content-inner li {
  margin-bottom: var(--blog-spacing-md);
  /* 16px */
  line-height: var(--blog-body-line-height);
  color: var(--text-primary);
  padding-left: 0.5rem;
}

.post-content-inner li:last-child {
  margin-bottom: 0;
}

/* Nested lists - proper indentation and spacing */
.post-content-inner ul ul,
.post-content-inner ol ol,
.post-content-inner ul ol,
.post-content-inner ol ul {
  margin-top: var(--blog-spacing-sm);
  /* 12px */
  margin-bottom: var(--blog-spacing-sm);
  /* 12px */
  margin-left: 1.5rem;
  padding-left: 1rem;
}

/* Unordered list markers - Ordio Blue bullets */
.post-content-inner ul {
  list-style-type: disc;
  list-style-position: outside;
  /* Fallback for older browsers */
  list-style-color: var(--ordio-blue);
}

/* Modern browsers - use ::marker for better control */
.post-content-inner ul li::marker {
  color: var(--ordio-blue);
  font-weight: 700;
}

.post-content-inner ul ul {
  list-style-type: circle;
  list-style-color: var(--ordio-blue);
}

.post-content-inner ul ul li::marker {
  color: var(--ordio-blue);
  font-weight: 600;
}

.post-content-inner ul ul ul {
  list-style-type: square;
  list-style-color: var(--ordio-blue);
}

.post-content-inner ul ul ul li::marker {
  color: var(--ordio-blue);
  font-weight: 500;
}

/* Ordered list markers - Ordio Blue numbers */
.post-content-inner ol {
  list-style-type: decimal;
  list-style-position: outside;
  /* Fallback for older browsers */
  list-style-color: var(--ordio-blue);
}

/* Modern browsers - use ::marker for better control */
.post-content-inner ol li::marker {
  color: var(--ordio-blue);
  font-weight: 700;
}

.post-content-inner ol ol {
  list-style-type: lower-alpha;
  list-style-color: var(--ordio-blue);
}

.post-content-inner ol ol li::marker {
  color: var(--ordio-blue);
  font-weight: 600;
}

.post-content-inner ol ol ol {
  list-style-type: lower-roman;
  list-style-color: var(--ordio-blue);
}

.post-content-inner ol ol ol li::marker {
  color: var(--ordio-blue);
  font-weight: 600;
}

/* List items with complex content */
.post-content-inner li>p:first-child {
  margin-top: 0;
}

.post-content-inner li>p:last-child {
  margin-bottom: 0;
}

/* Lists within list items */
.post-content-inner li>ul,
.post-content-inner li>ol {
  margin-top: var(--blog-spacing-sm);
  /* 12px */
  margin-bottom: var(--blog-spacing-sm);
  /* 12px */
}

/* List items with headings */
.post-content-inner li>h1,
.post-content-inner li>h2,
.post-content-inner li>h3,
.post-content-inner li>h4,
.post-content-inner li>h5,
.post-content-inner li>h6 {
  margin-top: var(--blog-spacing-md);
  /* 16px */
  margin-bottom: var(--blog-spacing-sm);
  /* 12px */
}

.post-content-inner li>h1:first-child,
.post-content-inner li>h2:first-child,
.post-content-inner li>h3:first-child,
.post-content-inner li>h4:first-child,
.post-content-inner li>h5:first-child,
.post-content-inner li>h6:first-child {
  margin-top: 0;
}

/* ============================================
   LINK STYLES
   ============================================ */

.post-content-inner a {
  color: var(--ordio-blue);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
  text-decoration-color: rgba(77, 142, 243, 0.3);
}

/* Exclude button-styled links from default link styling */
.post-content-inner a.bg-ordio-blue {
  color: white !important;
  text-decoration: none !important;
  text-decoration-thickness: 0 !important;
  text-underline-offset: 0 !important;
  text-decoration-color: transparent !important;
}

.post-content-inner a:hover {
  color: var(--ordio-blue-dark);
  text-decoration-color: var(--ordio-blue-dark);
}

/* Ensure button-styled links maintain white text and no underline on hover */
.post-content-inner a.bg-ordio-blue:hover {
  color: white !important;
  text-decoration: none !important;
  text-decoration-color: transparent !important;
}

.post-content-inner a:focus {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
  border-radius: 0.25rem;
  text-decoration: none;
}

.post-content-inner a:focus:hover {
  text-decoration: underline;
}

/* Links within headings */
.post-content-inner h1 a,
.post-content-inner h2 a,
.post-content-inner h3 a,
.post-content-inner h4 a,
.post-content-inner h5 a,
.post-content-inner h6 a {
  text-decoration: none;
}

.post-content-inner h1 a:hover,
.post-content-inner h2 a:hover,
.post-content-inner h3 a:hover,
.post-content-inner h4 a:hover,
.post-content-inner h5 a:hover,
.post-content-inner h6 a:hover {
  text-decoration: underline;
}

/* ============================================
   IMAGE STYLES (Content Images)
   ============================================ */

.post-content-inner img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin-top: var(--blog-spacing-2xl);
  /* 40px */
  margin-bottom: var(--blog-spacing-2xl);
  /* 40px */
  margin-left: auto;
  margin-right: auto;
  /* Clean flat design - no container styling */
  /* Prevent CLS: Maintain aspect ratio */
  object-fit: contain;
}

/* Prevent CLS: Images with width/height attributes maintain aspect ratio */
/* Modern browsers automatically reserve space based on width/height attributes */
.post-content-inner img[width][height] {
  /* Browser uses width/height attributes to calculate aspect ratio */
  /* This prevents layout shift when image loads */
  height: auto;
  max-height: 100vh;
  /* Ensure proper aspect ratio maintenance */
  object-fit: contain;
}

/* Images after headings - reduce top margin */
.post-content-inner h1+img,
.post-content-inner h2+img,
.post-content-inner h3+img,
.post-content-inner h4+img {
  margin-top: var(--blog-spacing-lg);
  /* 24px */
}

/* Images within paragraphs */
.post-content-inner p img {
  margin-top: var(--blog-spacing-md);
  /* 16px */
  margin-bottom: var(--blog-spacing-md);
  /* 16px */
}

/* Figure elements containing images */
.post-content-inner figure {
  margin-top: var(--blog-spacing-2xl);
  /* 40px */
  margin-bottom: var(--blog-spacing-2xl);
  /* 40px */
  margin-left: 0;
  margin-right: 0;
}

.post-content-inner figure img {
  margin: 0;
  width: 100%;
  height: auto;
  /* Prevent CLS: Maintain aspect ratio */
  object-fit: contain;
}

/* Prevent CLS: Figure images with dimensions */
.post-content-inner figure img[width][height] {
  height: auto;
  max-height: 100vh;
}

/* Prevent CLS: Video elements in figures */
.post-content-inner figure.wp-block-video,
.post-content-inner figure video {
  width: 100%;
  /* Reserve space for video - default 16:9 aspect ratio */
  aspect-ratio: 16 / 9;
  /* Prevent layout shift */
  contain: layout;
  min-height: 200px;
}

.post-content-inner figure.wp-block-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Prevent CLS: HubSpot CTA embeds */
.post-content-inner .hs-cta-embed,
.post-content-inner [class*="hs-cta-embed"] {
  /* Reserve space for HubSpot CTA */
  min-height: 42px;
  /* Prevent layout shift during load */
  contain: layout;
  /* Use inline style dimensions if available */
  width: 100%;
  max-width: 100%;
}

/* Figure captions */
.post-content-inner figcaption {
  margin-top: var(--blog-spacing-sm);
  /* 12px */
  font-size: 0.9375rem;
  /* 15px */
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
  line-height: 1.6;
}

/* Responsive images */
.post-content-inner img[srcset] {
  width: 100%;
  height: auto;
  /* Prevent CLS: Maintain aspect ratio for responsive images */
  object-fit: contain;
}

/* Prevent CLS: Responsive images with dimensions */
.post-content-inner img[srcset][width][height] {
  height: auto;
  max-height: 100vh;
}

/* Images in lists */
.post-content-inner li img {
  margin-top: var(--blog-spacing-sm);
  /* 12px */
  margin-bottom: var(--blog-spacing-sm);
  /* 12px */
}

/* ============================================
   ALPINE.JS CALCULATOR CONTAINERS (CLS Prevention)
   ============================================ */

/* Prevent CLS: Calculator containers should reserve space */
.post-content-inner section[x-data*="Calculator"],
.post-content-inner section[x-data*="calculator"],
.post-content-inner div[x-data*="Calculator"],
.post-content-inner div[x-data*="calculator"] {
  /* Reserve minimum height to prevent layout shift when Alpine.js initializes */
  min-height: 200px;
  /* Ensure container maintains layout stability */
  contain: layout;
}

/* Prevent CLS: Calculator forms and inputs */
.post-content-inner [x-data*="Calculator"] form,
.post-content-inner [x-data*="calculator"] form {
  /* Reserve space for form elements */
  min-height: 150px;
}

/* Prevent CLS: Calculator result containers */
.post-content-inner [x-data*="Calculator"] ul,
.post-content-inner [x-data*="calculator"] ul,
.post-content-inner [x-data*="Calculator"] .result,
.post-content-inner [x-data*="calculator"] .result {
  /* Reserve space for results to prevent layout shift */
  min-height: 50px;
}

/* ============================================
   IMAGE LIGHTBOX TRIGGER
   ============================================ */

.blog-image-lightbox-trigger {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-block;
  width: 100%;
  max-width: 100%;
  /* Prevent CLS: Reserve space for image */
  min-height: 0;
  /* Ensure container maintains aspect ratio when image has dimensions */
  contain: layout;
}

.blog-image-lightbox-trigger:hover {
  opacity: 0.95;
}

.blog-image-lightbox-trigger:focus {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 4px;
  border-radius: 0;
}

.blog-image-lightbox-trigger img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  transition: transform 0.2s ease;
  margin: 0;
  /* Clean flat design - no container styling */
  border-radius: 0;
  box-shadow: none;
  /* Prevent CLS: Maintain aspect ratio */
  object-fit: contain;
}

/* Prevent CLS: Images with width/height attributes should maintain aspect ratio */
.blog-image-lightbox-trigger img[width][height] {
  /* Ensure height is calculated from width to maintain aspect ratio */
  height: auto;
  /* Prevent layout shift by ensuring proper sizing */
  max-height: 100vh;
}

.blog-image-lightbox-trigger:hover img {
  transform: scale(1.01);
}

.blog-image-lightbox-trigger:active img {
  transform: scale(0.99);
}

/* ============================================
   IMAGE LIGHTBOX MODAL
   ============================================ */

.blog-image-lightbox-modal {
  z-index: 9999;
}

.blog-image-lightbox-modal[x-cloak] {
  display: none !important;
}

/* Close Button */
.blog-image-lightbox-close {
  z-index: 10000;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.blog-image-lightbox-close:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.blog-image-lightbox-close:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Image Container */
.blog-image-lightbox-container {
  z-index: 9998;
  /* Prevent CLS: Reserve space for image */
  min-height: 0;
  /* Ensure container maintains aspect ratio */
  contain: layout;
}

.blog-image-lightbox-image {
  object-fit: contain;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  /* Clean flat design - no container styling */
  border-radius: 0;
  box-shadow: none;
  /* Prevent CLS: Maintain aspect ratio when dimensions are available */
  object-position: center;
}

/* Prevent CLS: Lightbox images with width/height attributes */
.blog-image-lightbox-image[width][height] {
  height: auto;
  /* Ensure proper aspect ratio maintenance */
  aspect-ratio: attr(width) / attr(height);
}

/* Mobile adjustments */
@media (max-width: 639px) {
  .blog-image-lightbox-close {
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
  }

  .blog-image-lightbox-close svg {
    width: 1.5rem;
    height: 1.5rem;
  }

  .blog-image-lightbox-container {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .blog-image-lightbox-image {
    max-height: 85vh;
  }
}

/* Tablet adjustments */
@media (min-width: 640px) and (max-width: 1023px) {
  .blog-image-lightbox-container {
    margin-left: 2rem;
    margin-right: 2rem;
  }
}

/* Mobile image adjustments */
@media (max-width: 639px) {
  .post-content-inner img {
    margin-top: var(--blog-spacing-xl);
    /* 32px */
    margin-bottom: var(--blog-spacing-xl);
    /* 32px */
    /* Clean flat design - no container styling */
  }

  .post-content-inner figure {
    margin-top: var(--blog-spacing-xl);
    /* 32px */
    margin-bottom: var(--blog-spacing-xl);
    /* 32px */
  }

  .post-content-inner figcaption {
    font-size: 0.875rem;
    /* 14px */
    padding: 0 1rem;
  }
}

/* ============================================
   TEXT FORMATTING & EMPHASIS
   ============================================ */

/* Strong/Bold text */
.post-content-inner strong,
.post-content-inner b {
  font-weight: 700;
  color: var(--text-primary);
}

/* Emphasis/Italic text */
.post-content-inner em,
.post-content-inner i {
  font-style: italic;
  color: var(--text-primary);
}

/* Strong + Emphasis combination */
.post-content-inner strong em,
.post-content-inner em strong,
.post-content-inner b i,
.post-content-inner i b {
  font-weight: 700;
  font-style: italic;
}

/* Mark/highlight text - Ordio Blue Light */
.post-content-inner mark {
  background-color: var(--ordio-blue-light);
  /* Ordio Blue Light */
  color: var(--text-primary);
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
}

/* Small text */
.post-content-inner small {
  font-size: 0.875rem;
  /* 14px */
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Subscript and superscript */
.post-content-inner sub,
.post-content-inner sup {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

.post-content-inner sup {
  top: -0.5em;
}

.post-content-inner sub {
  bottom: -0.25em;
}

/* Images removed from content - featured image shown in header only */

/* ============================================
   EMBED STYLES (YouTube, Podigee, Videos, etc.)
   ============================================ */

/* Responsive embed container - maintains aspect ratio */
.post-content-inner .wp-block-embed,
.post-content-inner figure.wp-block-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  overflow: hidden;
  /* Ensure proper aspect ratio container */
  display: block;
}

/* WordPress embed wrapper - must maintain aspect ratio */
.post-content-inner .wp-block-embed__wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: block;
  /* Don't set min-height here - let aspect ratio handle it */
}

/* Responsive iframe embeds - base styles */
.post-content-inner iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  /* Prevent overflow */
  overflow: hidden;
}

/* Ensure iframes inside embed containers fill properly */
.post-content-inner .wp-block-embed iframe,
.post-content-inner figure.wp-block-embed iframe,
.post-content-inner .wp-block-embed__wrapper iframe {
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
}

/* Embed containers with inline styles (responsive embeds with padding-bottom) - ensure proper sizing */
/* Base styles - will be overridden on desktop for break-out */
/* EXCLUDE embed-breakout-wrapper - it handles its own styling */
.post-content-inner div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div) {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  /* Keep hidden for mobile, will be overridden on desktop */
  /* Ensure proper aspect ratio container */
  /* Note: padding-bottom creates height, so height: 0 is correct */
  height: 0;
  /* Don't use min-height here - it conflicts with padding-bottom aspect ratio */
}

/* Desktop: Break out of content width for better visibility (similar to tables) */
/* CRITICAL: Use highest specificity and !important to override inline styles and parent container constraints */
@media (min-width: 1024px) {

  /* Target embed divs at any nesting level within post content */
  /* EXCLUDE embed-breakout-wrapper - it handles its own breakout */
  .blog-post-content-wrapper .post-content .post-content-inner div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div),
  .post-content-inner div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div),
  .post-content-inner #ordioTextContent div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div),
  .post-content-inner [id*="ordioTextContent"] div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div),
  .post-content-inner [class*="px-6"] div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div),
  .post-content-inner [class*="px-10"] div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div),
  .post-content-inner [class*="xl:p-12"] div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div) {
    /* Break out of 700px reading width AND any parent container padding */
    /* Calculation: (1216px available - 700px reading) / 2 = 258px per side */
    /* Additional margin needed to break out of parent padding: px-6 (24px), px-10 (40px), xl:p-12 (48px) */
    /* Use maximum padding (48px) for safety, so total break-out = 258px + 48px = 306px per side */
    width: calc(100% + 612px) !important;
    /* 1216px - 700px + 96px (48px * 2) = 612px additional width */
    max-width: 1216px !important;
    /* Don't exceed container width minus padding */
    margin-left: -306px !important;
    /* Break out of reading width + parent padding */
    margin-right: -306px !important;
    /* Break out of reading width + parent padding */
    /* Keep height: 0 - padding-bottom will create the height based on width */
    /* Wider width = taller height automatically via padding-bottom calculation */
    /* At 1216px width: padding-bottom calc(56.597% + 41px) = ~729px height */
    height: 0 !important;
    /* Ensure position relative is maintained for absolute iframe positioning */
    position: relative !important;
    /* Ensure overflow is visible to allow break-out */
    overflow: visible !important;
  }

  /* Ensure iframe fills properly */
  /* EXCLUDE embed-breakout-wrapper - it has its own iframe styles */
  .blog-post-content-wrapper .post-content .post-content-inner div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div) iframe,
  .post-content-inner div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div) iframe,
  .post-content-inner #ordioTextContent div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div) iframe,
  .post-content-inner [id*="ordioTextContent"] div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div) iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  /* Ensure parent containers with padding don't clip the embed */
  .post-content-inner #ordioTextContent,
  .post-content-inner [id*="ordioTextContent"],
  .post-content-inner [class*="px-6"],
  .post-content-inner [class*="px-10"],
  .post-content-inner [class*="xl:p-12"] {
    overflow-x: visible !important;
    /* Remove horizontal padding on desktop to allow embed break-out */
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* EXCLUDE embed-breakout-wrapper - it has its own iframe styles */
.post-content-inner div[style*="padding-bottom"]:not(.embed-breakout-wrapper):not(.embed-breakout-wrapper > div) iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* YouTube and video embeds - maintain 16:9 aspect ratio */
.post-content-inner .wp-block-embed.is-provider-youtube,
.post-content-inner .wp-block-embed.wp-embed-aspect-16-9,
.post-content-inner figure.wp-block-embed.is-provider-youtube,
.post-content-inner figure.wp-block-embed.wp-embed-aspect-16-9 {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  width: 100%;
  display: block;
}

/* WordPress embed wrapper for 16:9 embeds */
.post-content-inner .wp-block-embed.is-provider-youtube .wp-block-embed__wrapper,
.post-content-inner .wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper,
.post-content-inner figure.wp-block-embed.is-provider-youtube .wp-block-embed__wrapper,
.post-content-inner figure.wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

.post-content-inner .wp-block-embed.is-provider-youtube iframe,
.post-content-inner .wp-block-embed.wp-embed-aspect-16-9 iframe,
.post-content-inner figure.wp-block-embed.is-provider-youtube iframe,
.post-content-inner figure.wp-block-embed.wp-embed-aspect-16-9 iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  /* Override any fixed width/height attributes */
  max-width: 100%;
  max-height: 100%;
}

/* 4:3 aspect ratio embeds */
.post-content-inner .wp-block-embed.wp-embed-aspect-4-3,
.post-content-inner figure.wp-block-embed.wp-embed-aspect-4-3 {
  position: relative;
  padding-bottom: 75%;
  /* 4:3 aspect ratio */
  height: 0;
  overflow: hidden;
  width: 100%;
  display: block;
}

.post-content-inner .wp-block-embed.wp-embed-aspect-4-3 .wp-block-embed__wrapper,
.post-content-inner figure.wp-block-embed.wp-embed-aspect-4-3 .wp-block-embed__wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

.post-content-inner .wp-block-embed.wp-embed-aspect-4-3 iframe,
.post-content-inner figure.wp-block-embed.wp-embed-aspect-4-3 iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  max-width: 100%;
  max-height: 100%;
}

/* Podigee podcast player - responsive container */
.post-content-inner script.podigee-podcast-player {
  display: block;
  width: 100%;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

/* Video tags - responsive */
.post-content-inner video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
}

/* Standalone iframes (not in WordPress embed blocks) */
.post-content-inner>iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
}

/* Ensure embeds don't overflow on mobile */
@media (max-width: 639px) {

  .post-content-inner .wp-block-embed,
  .post-content-inner figure.wp-block-embed,
  .post-content-inner .wp-block-embed__wrapper,
  .post-content-inner iframe,
  .post-content-inner video {
    margin-top: 2rem;
    margin-bottom: 2rem;
  }

  /* Full width on mobile */
  .post-content-inner .wp-block-embed,
  .post-content-inner iframe,
  .post-content-inner video {
    width: 100%;
    max-width: 100%;
  }

  /* Mobile: Keep embed containers with padding-bottom within content width */
  .post-content-inner div[style*="padding-bottom"] {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    min-height: 300px;
    /* Smaller minimum height on mobile */
  }
}

/* Ensure embeds respect content width constraints */
@media (min-width: 1024px) {

  .post-content-inner .wp-block-embed,
  .post-content-inner iframe,
  .post-content-inner video {
    max-width: 100%;
  }
}

/* ============================================
   FLEX CONTAINERS & GRID LAYOUTS (Prevent Overflow)
   ============================================ */

/* Flex containers within post content - prevent overflow */
.post-content-inner .flex,
.post-content-inner [class*="flex"] {
  max-width: 100%;
  overflow-x: auto;
  /* Allow horizontal scroll on mobile if needed */
  -webkit-overflow-scrolling: touch;
}

/* Images within flex containers */
.post-content-inner .flex img,
.post-content-inner [class*="flex"] img {
  max-width: 100%;
  width: auto;
  height: auto;
  flex-shrink: 1;
  /* Prevent images from overflowing flex container */
  min-width: 0;
}

/* Grid containers within post content */
.post-content-inner .grid,
.post-content-inner [class*="grid"] {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Images within grid containers */
.post-content-inner .grid img,
.post-content-inner [class*="grid"] img {
  max-width: 100%;
  width: auto;
  height: auto;
}

/* Side-by-side image layouts - stack on mobile */
@media (max-width: 1023px) {
  .post-content-inner .flex {
    flex-direction: column;
    gap: var(--blog-spacing-lg);
  }

  .post-content-inner .flex img {
    width: 100%;
    max-width: 100%;
  }
}

/* Ensure all direct children respect container width */
/* Exclude tables, embed wrappers, and embed divs that break out on desktop */
.post-content-inner>*:not(table):not(.embed-breakout-wrapper):not(div[style*="padding-bottom"]) {
  max-width: 100%;
  overflow-x: auto;
}

/* Prevent any element from exceeding container width */
/* Exclude tables, embed wrappers, and embed divs that break out on desktop */
.post-content-inner *:not(table):not(.embed-breakout-wrapper):not(div[style*="padding-bottom"]) {
  max-width: 100%;
  box-sizing: border-box;
}

/* ============================================
   BLOCKQUOTE STYLES (Enhanced)
   ============================================ */

.post-content-inner blockquote {
  border-left: 4px solid var(--ordio-blue);
  padding-left: 1.75rem;
  padding-right: 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  font-style: italic;
  margin-top: var(--blog-spacing-2xl);
  /* 40px */
  margin-bottom: var(--blog-spacing-2xl);
  /* 40px */
  margin-left: 0;
  margin-right: 0;
  color: var(--text-secondary);
  font-size: 1.25rem;
  line-height: 1.7;
  background-color: var(--ordio-blue-light);
  border-radius: 0 0.5rem 0.5rem 0;
  position: relative;
}

/* Blockquote after heading */
.post-content-inner h1+blockquote,
.post-content-inner h2+blockquote,
.post-content-inner h3+blockquote {
  margin-top: var(--blog-spacing-lg);
  /* 24px */
}

/* Blockquote paragraphs */
.post-content-inner blockquote p {
  margin-bottom: var(--blog-spacing-md);
  /* 16px */
  color: inherit;
}

.post-content-inner blockquote p:last-child {
  margin-bottom: 0;
}

/* Blockquote citations */
.post-content-inner blockquote cite,
.post-content-inner blockquote footer {
  display: block;
  margin-top: var(--blog-spacing-md);
  /* 16px */
  font-size: 0.9375rem;
  /* 15px */
  font-style: normal;
  color: var(--text-muted);
}

.post-content-inner blockquote cite::before,
.post-content-inner blockquote footer::before {
  content: "— ";
}

/* Nested blockquotes */
.post-content-inner blockquote blockquote {
  margin-left: 1rem;
  margin-right: 1rem;
  border-left-color: var(--ordio-blue-dark);
  background-color: rgba(239, 246, 255, 0.5);
}

/* ============================================
   CODE STYLES (Enhanced)
   ============================================ */

/* Inline code */
.post-content-inner code {
  background-color: var(--ordio-blue-light);
  /* Ordio Blue Light background */
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  /* 15px - 83% of body size */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: var(--text-primary);
  border: 1px solid var(--ordio-blue);
  /* Ordio Blue border */
  font-weight: 500;
  line-height: 1.5;
}

/* Code blocks */
.post-content-inner pre {
  background-color: #1F2937;
  color: #F9FAFB;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: var(--blog-spacing-2xl);
  /* 40px */
  margin-bottom: var(--blog-spacing-2xl);
  /* 40px */
  box-shadow: var(--shadow-md);
  border: 2px solid var(--ordio-blue);
  /* Ordio Blue border accent */
  line-height: 1.6;
  /* Smooth scrolling for long code */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--ordio-blue) #1F2937;
  /* Ordio Blue scrollbar */
}

.post-content-inner pre::-webkit-scrollbar {
  height: 8px;
}

.post-content-inner pre::-webkit-scrollbar-track {
  background: #1F2937;
  border-radius: 0.5rem;
}

.post-content-inner pre::-webkit-scrollbar-thumb {
  background: var(--ordio-blue);
  /* Ordio Blue scrollbar */
  border-radius: 0.5rem;
}

.post-content-inner pre::-webkit-scrollbar-thumb:hover {
  background: var(--ordio-blue-dark);
  /* Ordio Blue Dark on hover */
}

/* Code within pre blocks */
.post-content-inner pre code {
  background-color: transparent;
  padding: 0;
  border: none;
  color: #F9FAFB;
  font-size: 0.9375rem;
  /* 15px */
  font-weight: 400;
  display: block;
  white-space: pre;
  overflow-wrap: normal;
  word-wrap: normal;
}

/* Code blocks after headings */
.post-content-inner h1+pre,
.post-content-inner h2+pre,
.post-content-inner h3+pre {
  margin-top: var(--blog-spacing-lg);
  /* 24px */
}

/* Inline code within headings */
.post-content-inner h1 code,
.post-content-inner h2 code,
.post-content-inner h3 code,
.post-content-inner h4 code,
.post-content-inner h5 code,
.post-content-inner h6 code {
  font-size: 0.85em;
  background-color: rgba(243, 244, 246, 0.5);
  border-color: rgba(229, 231, 235, 0.5);
}

/* ============================================
   TABLE STYLES
   ============================================ */

/* Base table styles - exclude tables inside breakout wrapper */
.post-content-inner table:not(.table-breakout-wrapper table),
.table-breakout-wrapper table {
  width: fit-content;
  /* Dynamic width based on content, not forced to 100% */
  max-width: 100%;
  /* Ensure table doesn't exceed wrapper width */
  border-collapse: separate;
  /* Changed from collapse to allow rounded corners */
  border-spacing: 0;
  /* Remove spacing between cells */
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
  border-radius: 0.75rem;
  /* Increased from 0.5rem to match branding */
  overflow: hidden;
}

.post-content-inner thead,
.table-breakout-wrapper thead {
  background-color: var(--ordio-blue);
}

.post-content-inner th,
.table-breakout-wrapper th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #FFFFFF;
  border: 1px solid var(--ordio-blue);
}

/* Round top corners of first row */
.post-content-inner thead tr:first-child th:first-child,
.table-breakout-wrapper thead tr:first-child th:first-child {
  border-top-left-radius: 0.75rem;
}

.post-content-inner thead tr:first-child th:last-child,
.table-breakout-wrapper thead tr:first-child th:last-child {
  border-top-right-radius: 0.75rem;
}

.post-content-inner td,
.table-breakout-wrapper td {
  padding: 0.875rem 1rem;
  border: 1px solid var(--ordio-blue);
  color: var(--text-primary);
}

.post-content-inner tbody tr:hover,
.table-breakout-wrapper tbody tr:hover {
  background-color: #F9FAFB;
}

/* Round bottom corners of last row */
.post-content-inner tbody tr:last-child td:first-child,
.table-breakout-wrapper tbody tr:last-child td:first-child {
  border-bottom-left-radius: 0.75rem;
}

.post-content-inner tbody tr:last-child td:last-child,
.table-breakout-wrapper tbody tr:last-child td:last-child {
  border-bottom-right-radius: 0.75rem;
}

.post-content-inner tbody tr:last-child td,
.table-breakout-wrapper tbody tr:last-child td {
  border-bottom: 1px solid var(--ordio-blue);
  /* Keep border but allow rounding */
}

/* Table breakout: Make tables wider than reading width on desktop */
/* Break out of content wrapper (700px) to use more of container width (1216px) */
/* Also break out of nested containers with padding (e.g., ordioTextContent) */
/* Uses wrapper-based approach for reliable breakout and centering */
/* Dynamic width: Tables adapt to content size, expanding up to container width */
@media (min-width: 1024px) {

  /* Table breakout wrapper - breaks out of content containers */
  /* Break out of blog-post-content-wrapper (700px) to match max-w-7xl container width */
  /* Featured image achieves this by being directly in max-w-7xl, so we need to break out */
  /* Using simpler "bust out" technique - JavaScript will override with precise positioning */
  .table-breakout-wrapper {
    /* Break out of nested containers to match max-w-7xl container width */
    /* Strategy: Break out using viewport width, then constrain and center */
    /* JavaScript will calculate dynamic width based on table content */
    width: 100vw;
    position: relative;
    /* Center wrapper on viewport using transform (fallback, JavaScript overrides) */
    left: 50%;
    transform: translateX(-50%);
    /* Constrain to max-w-7xl container width minus padding (matches featured image exactly) */
    max-width: calc(1280px - 64px) !important;
    /* Container max-width (1280px) minus padding (32px each side at lg breakpoint) */
    /* Ensure wrapper displays as block */
    display: block;
    /* Ensure bottom is not cut off - allow overflow for rounded corners */
    overflow: visible;
    /* JavaScript will override with precise positioning relative to container */
    /* JavaScript calculates width dynamically: min(table-content-width, container-width) */
  }

  /* Embed breakout wrapper - breaks out of content containers to match featured image width */
  /* Same approach as table breakout but for embeds (iframes, videos, etc.) */
  .embed-breakout-wrapper {
    /* Break out of nested containers to match max-w-7xl container width */
    width: 100vw;
    position: relative;
    /* Center wrapper on viewport using transform */
    left: 50%;
    transform: translateX(-50%);
    /* Constrain to max-w-7xl container width minus padding (matches featured image exactly) */
    /* Container: max-w-7xl (1280px) with px-8 padding (32px each side) = 1216px available */
    max-width: calc(1280px - 64px) !important;
    /* Container max-width (1280px) minus padding (32px each side at lg breakpoint) */
    /* Ensure wrapper displays as block */
    display: block;
    /* Allow overflow for proper display */
    overflow: visible;
    /* Margin for spacing - match featured image spacing */
    margin-top: var(--blog-spacing-2xl) !important;
    /* 40px */
    margin-bottom: var(--blog-spacing-2xl) !important;
    /* 40px */
  }

  /* Embed content inside wrapper - fills wrapper width */
  .embed-breakout-wrapper>div {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    /* Preserve aspect ratio container */
    position: relative !important;
    /* Don't override padding-bottom - let inline style handle it */
    height: 0 !important;
    /* Required for padding-bottom aspect ratio */
    overflow: hidden !important;
    /* Hide overflow for iframe */
  }

  /* Iframe inside embed wrapper */
  .embed-breakout-wrapper iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
  }

  /* Override any existing embed styles that might conflict */
  .embed-breakout-wrapper>div[style*="padding-bottom"] {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    /* Don't break out again - wrapper handles breakout */
  }

  /* Table inside wrapper - fills wrapper width, wrapper controls dynamic sizing */
  .table-breakout-wrapper table {
    width: 100% !important;
    /* Fill wrapper width - wrapper controls dynamic sizing */
    max-width: 100% !important;
    /* Don't exceed wrapper width */
    margin-left: 0 !important;
    margin-right: 0 !important;
    /* Ensure table has proper spacing and isn't cut off */
    margin-bottom: 2.5rem !important;
  }

  /* Ensure all parent containers allow overflow */
  /* Use !important to override Tailwind utilities */
  .post-content-inner,
  .post-content-inner>div,
  .post-content-inner>div>div,
  .post-content-inner #ordioTextContent,
  .post-content,
  .blog-post-content-wrapper {
    overflow-x: visible !important;
    overflow-y: visible !important;
    /* Allow vertical overflow for rounded corners */
  }

  /* Container-specific overrides to ensure tables can break out */
  #ordioTextContent {
    overflow-x: visible !important;
    overflow-y: visible !important;
    /* Allow vertical overflow for rounded corners */
  }

  /* Ensure max-w-7xl container allows breakout */
  /* Target the specific container wrapper used in blog posts */
  .max-w-7xl.mx-auto,
  main>div.max-w-7xl,
  div.max-w-7xl.mx-auto.px-4,
  div.max-w-7xl.mx-auto.px-6,
  div.max-w-7xl.mx-auto.px-8 {
    overflow-x: visible !important;
  }

  /* Ensure main element and body allow breakout */
  main,
  body {
    overflow-x: visible;
  }
}

/* Responsive tables - Mobile and Tablet */
/* On smaller screens, tables stay within content width and scroll horizontally */
@media (max-width: 1023px) {

  /* Reset wrapper on mobile - tables stay within content */
  .table-breakout-wrapper {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }

  /* Reset embed breakout wrapper on mobile - embeds stay within content */
  .embed-breakout-wrapper {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    left: 0 !important;
    transform: none !important;
    margin-top: var(--blog-spacing-xl) !important;
    /* 32px */
    margin-bottom: var(--blog-spacing-xl) !important;
    /* 32px */
  }

  .table-breakout-wrapper table,
  .post-content-inner table,
  .post-content-inner * table {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
  }

  /* Keep table structure intact - restore table display for internal elements */
  .post-content-inner table thead {
    display: table-header-group;
  }

  .post-content-inner table tbody {
    display: table-row-group;
  }

  .post-content-inner table tr {
    display: table-row;
  }

  .post-content-inner table th,
  .post-content-inner table td {
    display: table-cell;
  }
}

/* Mobile-specific table adjustments */
@media (max-width: 639px) {
  .post-content-inner table {
    font-size: 0.875rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
  }

  .post-content-inner th,
  .post-content-inner td {
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
    /* Prevent text wrapping in cells on mobile for better scrolling */
  }
}

/* ============================================
   RESPONSIVE TYPOGRAPHY (Mobile Optimization)
   ============================================ */

@media (max-width: 639px) {

  /* Reduce heading sizes on mobile */
  .post-content-inner h1 {
    font-size: 2rem;
    /* 32px */
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
  }

  .post-content-inner h2 {
    font-size: 1.75rem;
    /* 28px */
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
  }

  .post-content-inner h3 {
    font-size: 1.375rem;
    /* 22px */
    margin-top: 2rem;
    margin-bottom: 1rem;
  }

  .post-content-inner h4 {
    font-size: 1.125rem;
    /* 18px */
    margin-top: 1.75rem;
    margin-bottom: 0.875rem;
  }

  .post-content-inner h5 {
    font-size: 1rem;
    /* 16px */
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .post-content-inner h6 {
    font-size: 0.9375rem;
    /* 15px */
    margin-top: 1.25rem;
    margin-bottom: 0.625rem;
  }

  /* Reduce paragraph spacing on mobile */
  .post-content-inner p {
    margin-bottom: 1.5rem;
  }

  /* Reduce list spacing on mobile */
  .post-content-inner ul,
  .post-content-inner ol {
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
  }

  .post-content-inner li {
    margin-bottom: 0.875rem;
    padding-left: 0.375rem;
  }

  /* Reduce blockquote spacing on mobile */
  .post-content-inner blockquote {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding-left: 1.25rem;
    padding-right: 1rem;
    font-size: 1.125rem;
  }

  /* Reduce code block spacing on mobile */
  .post-content-inner pre {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 1.25rem;
    font-size: 0.875rem;
  }

  .post-content-inner pre code {
    font-size: 0.875rem;
  }

  /* Reduce inline code size on mobile */
  .post-content-inner code {
    font-size: 0.875rem;
    padding: 0.15rem 0.375rem;
  }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .post-content-inner a {
    transition: none;
  }

  .post-content-inner h1 a,
  .post-content-inner h2 a,
  .post-content-inner h3 a,
  .post-content-inner h4 a,
  .post-content-inner h5 a,
  .post-content-inner h6 a {
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .post-content-inner a {
    text-decoration-thickness: 2px;
  }

  .post-content-inner code {
    border-width: 2px;
  }

  .post-content-inner blockquote {
    border-left-width: 6px;
  }
}

/* Print styles */
@media print {
  .post-content-inner {
    font-size: 12pt;
    line-height: 1.6;
  }

  .post-content-inner h1,
  .post-content-inner h2,
  .post-content-inner h3,
  .post-content-inner h4,
  .post-content-inner h5,
  .post-content-inner h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  .post-content-inner blockquote,
  .post-content-inner pre {
    page-break-inside: avoid;
  }

  .post-content-inner a {
    color: #000;
    text-decoration: underline;
  }

  .post-content-inner a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.9em;
    color: #666;
  }
}

/* ============================================
   CATEGORY NAVIGATION STYLES
   ============================================ */

.category-nav {
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .category-nav {
    margin-bottom: 3rem;
  }
}

.category-nav--tabs {
  border-bottom: 1px solid var(--border-color);
}

.category-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

@media (min-width: 640px) {
  .category-nav-tabs {
    gap: 1rem;
  }
}

.category-nav-tabs::-webkit-scrollbar {
  display: none;
}

.category-nav-link {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
}

.category-nav-link:hover {
  color: var(--text-primary);
  border-color: var(--border-color);
}

.category-nav-link[aria-current="page"] {
  color: var(--ordio-blue);
  border-color: var(--ordio-blue);
  font-weight: 600;
}

.post-count {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.75;
}

/* Links variant */
.category-nav--links .category-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.category-nav--links .category-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
  border: none;
  background-color: #F3F4F6;
  color: var(--text-primary);
}

.category-nav--links .category-nav-link:hover {
  background-color: #E5E7EB;
}

.category-nav--links .category-nav-link[aria-current="page"] {
  background-color: var(--ordio-blue);
  color: white;
}

.category-nav--links .category-nav-link[aria-current="page"]:hover {
  background-color: var(--ordio-blue-dark);
}

/* ============================================
   PAGINATION STYLES
   ============================================ */

/* Screen reader only text */
.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;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .pagination {
    gap: 0.75rem;
    margin-top: 4rem;
  }
}

.pagination-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s;
  min-height: 40px;
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background-color: white;
  border: 1px solid var(--border-color);
  text-decoration: none;
}

.pagination-link:hover:not([aria-disabled="true"]) {
  background-color: var(--ordio-blue-light);
  color: var(--ordio-blue);
  border-color: var(--ordio-blue);
  transform: translateY(-1px);
}

.pagination-link[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
  color: var(--text-muted);
  background-color: #F9FAFB;
  border-color: var(--border-color);
}

.pagination-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pagination-current {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  min-height: 40px;
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background-color: var(--ordio-blue);
  border: 1px solid var(--ordio-blue);
}

.pagination-ellipsis {
  padding: 0 0.5rem;
  color: #9CA3AF;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.pagination-text-desktop {
  display: none;
}

@media (min-width: 640px) {
  .pagination-text-desktop {
    display: inline;
  }

  .pagination-text-mobile {
    display: none;
  }
}

.pagination-text-mobile {
  display: inline;
}

@media (min-width: 640px) {
  .pagination-text-mobile {
    display: none;
  }
}

/* Mobile pagination - show fewer numbers and larger touch targets */
@media (max-width: 640px) {
  .pagination {
    gap: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
  }

  .pagination-numbers {
    gap: 0.25rem;
    /* Limit visible page numbers on mobile - handled by JavaScript or CSS */
    max-width: 100%;
    overflow: hidden;
  }

  .pagination-link,
  .pagination-current {
    min-width: 44px;
    /* Minimum touch target size (WCAG 2.1) */
    min-height: 44px;
    padding: 0.625rem;
    font-size: 0.875rem;
    /* Ensure adequate spacing for touch */
    margin: 0 0.125rem;
  }

  .pagination-ellipsis {
    min-height: 44px;
    padding: 0 0.5rem;
    display: inline-flex;
    align-items: center;
  }

  /* Very small screens - ensure pagination fits */
  @media (max-width: 375px) {
    .pagination {
      flex-wrap: wrap;
    }

    .pagination-numbers {
      flex-wrap: wrap;
      justify-content: center;
    }
  }
}

/* ============================================
   BREADCRUMBS STYLES
   ============================================ */

.breadcrumbs {
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .breadcrumbs {
    margin-bottom: 2.5rem;
  }
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumbs-item {
  display: flex;
  align-items: center;
}

/* Separator is added via PHP component, not CSS ::after */

.breadcrumbs-link {
  color: var(--text-secondary);
  transition: color 0.2s;
  text-decoration: none;
}

.breadcrumbs-link:hover {
  color: var(--ordio-blue);
}

.breadcrumbs-link[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

/* Screen reader only - visually hidden but accessible to assistive tech and search engines */
.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;
}

/* ============================================
   RELATED POSTS STYLES
   ============================================ */

.related-posts {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-top: 4rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .related-posts {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .related-posts {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 640px) {
  .related-posts {
    margin-top: 5rem;
  }
}

.related-posts-title {
  font-weight: 700;
  font-size: 1.875rem;
  margin-bottom: 2.5rem;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .related-posts-title {
    font-size: 2.25rem;
  }
}

.related-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .related-posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* ============================================
   TOPIC HUB HERO STYLES
   ============================================ */

.topic-hub-hero {
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .topic-hub-hero {
    margin-bottom: 4rem;
  }
}

.topic-hub-hero-title {
  font-weight: 700;
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .topic-hub-hero-title {
    font-size: 3rem;
  }
}

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

.topic-hub-hero-description {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  max-width: 48rem;
  color: var(--text-secondary);
}

@media (min-width: 640px) {
  .topic-hub-hero-description {
    font-size: 1.25rem;
  }
}

.topic-hub-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.topic-hub-hero-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================
   BLOG POSTS GRID
   ============================================ */

.blog-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
  /* Ensure grid and cards are visible immediately */
  opacity: 1;
}

.blog-posts-grid .post-card {
  /* Override any potential animation or hidden states */
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  visibility: visible !important;
}

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

@media (min-width: 1024px) {
  .blog-posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Mobile optimizations */
@media (max-width: 767px) {
  .blog-posts-grid {
    gap: 1.25rem;
  }

  .post-card {
    min-height: auto;
  }

  .pillar-hero-card {
    min-height: 350px;
  }

  .pillar-hero-content {
    padding: 1.5rem;
  }

  .category-featured-content {
    padding: 1.5rem;
  }

}

/* Cards are visible immediately - no animation delays or JavaScript dependencies */

/* Featured posts grid (for hero section) */
.featured-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 1024px) {
  .featured-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* ============================================
   PILLAR HERO SECTION
   ============================================ */

.pillar-hero-section {
  margin-bottom: 4rem;
}

.pillar-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .pillar-hero-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

.pillar-hero-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  min-height: 400px;
}

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

.pillar-hero-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.pillar-hero-link:focus-visible {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
  border-radius: 1rem;
}

.pillar-hero-image-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ordio-blue-light) 0%, #E0E7FF 100%);
  min-height: 250px;
}

@media (min-width: 768px) {
  .pillar-hero-image-wrapper {
    height: 300px;
    min-height: 300px;
  }
}

.pillar-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pillar-hero-card:hover .pillar-hero-image {
  transform: scale(1.05);
}

.pillar-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
  pointer-events: none;
}

.pillar-hero-content {
  position: relative;
  padding: 2rem;
  z-index: 1;
}

@media (min-width: 768px) {
  .pillar-hero-content {
    padding: 2.5rem;
  }
}

.pillar-hero-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ordio-blue);
  background-color: var(--ordio-blue-light);
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.pillar-hero-title {
  font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

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

.pillar-hero-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.pillar-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--ordio-blue);
  transition: gap 0.3s ease;
}

.pillar-hero-card:hover .pillar-hero-cta {
  gap: 0.75rem;
}

.pillar-hero-cta-text {
  font-size: 1rem;
}

.pillar-hero-cta-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.pillar-hero-card:hover .pillar-hero-cta-icon {
  transform: translateX(4px);
}

/* ============================================
   PILLAR HERO SIDE-BY-SIDE LAYOUT
   ============================================ */

.pillar-hero-side-by-side-section {
  margin-bottom: 4rem;
}

.pillar-hero-side-by-side-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .pillar-hero-side-by-side-grid {
    grid-template-columns: repeat(1, 1fr);
    /* Each card takes full width */
    gap: 2rem;
  }
}

.pillar-hero-sidebyside {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pillar-hero-sidebyside:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.pillar-hero-sidebyside-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
  outline: none;
  min-height: 0;
}

.pillar-hero-sidebyside-link:focus-visible {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
  border-radius: 1rem;
}

.pillar-hero-sidebyside-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  flex: 1;
  min-height: 0;
}

@media (min-width: 768px) {
  .pillar-hero-sidebyside-content {
    flex-direction: row;
    align-items: stretch;
    /* Stretch to match heights */
    gap: 0;
    /* Remove gap - visual will fill edge to edge */
    padding: 0;
    /* Remove padding - add to text content instead */
    height: 100%;
  }
}

/* Text Content */
.pillar-hero-sidebyside-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Prevents flex item from overflowing */
  padding: 2rem;
}

@media (min-width: 768px) {
  .pillar-hero-sidebyside-text {
    padding: 3rem;
  }
}

.pillar-hero-sidebyside-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  width: fit-content;
  transition: background-color 0.2s ease;
}

/* Apply pillar page styling to category tags */
.pillar-hero-sidebyside-category.post-header-category--dienstplan,
.pillar-hero-sidebyside-category.post-header-category--zeiterfassung {
  background-color: #FEE2E2;
  /* Light red/pink */
  color: #DC2626;
  /* Red dark */
  font-weight: 700;
}

.pillar-hero-sidebyside-category.post-header-category--dienstplan:hover,
.pillar-hero-sidebyside-category.post-header-category--zeiterfassung:hover {
  background-color: #FECACA;
  /* Lighter red hover */
}

.pillar-hero-sidebyside-title {
  font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .pillar-hero-sidebyside-title {
    font-size: 2rem;
  }
}

@media (min-width: 1024px) {
  .pillar-hero-sidebyside-title {
    font-size: 2.25rem;
  }
}

.pillar-hero-sidebyside-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

@media (min-width: 768px) {
  .pillar-hero-sidebyside-description {
    font-size: 1.125rem;
  }
}

.pillar-hero-sidebyside-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--ordio-blue);
  transition: gap 0.3s ease;
  margin-top: auto;
}

.pillar-hero-sidebyside:hover .pillar-hero-sidebyside-cta {
  gap: 0.75rem;
}

.pillar-hero-sidebyside-cta-text {
  font-size: 1rem;
}

.pillar-hero-sidebyside-cta-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.pillar-hero-sidebyside:hover .pillar-hero-sidebyside-cta-icon {
  transform: translateX(4px);
}

/* Visual Content */
.pillar-hero-sidebyside-visual {
  flex: 0 0 auto;
  /* Don't grow/shrink, use fixed size */
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  height: 250px;
  /* Fixed height on mobile */
  overflow: hidden;
  background: linear-gradient(135deg, var(--ordio-blue-light) 0%, #E0E7FF 100%);
  border-radius: 0;
  position: relative;
  margin: 0;
  padding: 0;
  align-self: stretch;
  /* Stretch to fill available height */
}

@media (min-width: 768px) {
  .pillar-hero-sidebyside-visual {
    height: 100%;
    /* Fill entire height of card */
    width: 100%;
    max-width: 400px;
    /* Constrain width on desktop */
    flex-shrink: 0;
    /* Prevent shrinking */
    min-height: 300px;
    /* Ensure minimum height */
  }
}

/* Layout Variants */
.pillar-hero-sidebyside--left .pillar-hero-sidebyside-text {
  order: 1;
}

.pillar-hero-sidebyside--left .pillar-hero-sidebyside-visual {
  order: 2;
  border-top-right-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

.pillar-hero-sidebyside--right .pillar-hero-sidebyside-text {
  order: 2;
}

.pillar-hero-sidebyside--right .pillar-hero-sidebyside-visual {
  order: 1;
  border-top-left-radius: 1rem;
  border-bottom-left-radius: 1rem;
}

/* Visual Component Styles - Constrained to container */
.pillar-visual-dienstplan {
  width: 100%;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.85);
  /* Scale down to fit container */
  transform-origin: center;
}

@media (min-width: 768px) {
  .pillar-visual-dienstplan {
    transform: scale(0.9);
  }
}

.pillar-visual-dienstplan>div {
  width: 100%;
  max-width: 100%;
  max-height: 280px;
  /* Constrain height to prevent empty space */
  overflow: hidden;
}

@media (min-width: 768px) {
  .pillar-visual-dienstplan>div {
    max-height: 320px;
    /* Slightly taller on desktop */
  }
}

/* ============================================
   ZEITERFASSUNG VISUAL COMPONENT
   ============================================
   Clean card-based widget design matching Dienstplan visual style.
   Uses simplified digital time display instead of complex mobile mockup.
   ============================================ */

.pillar-visual-zeiterfassung {
  width: 100%;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.85);
  /* Match Dienstplan scale - scale down to fit container */
  transform-origin: center;
}

@media (min-width: 768px) {
  .pillar-visual-zeiterfassung {
    transform: scale(0.9);
    /* Match Dienstplan desktop scale */
  }
}

.pillar-visual-zeiterfassung>div {
  width: 100%;
  max-width: 100%;
}

/* Time Display Styles */
.pillar-visual-time-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.pillar-visual-time-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  color: var(--ordio-blue);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .pillar-visual-time-text {
    font-size: 3.5rem;
  }
}

.pillar-visual-time-label {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .pillar-visual-time-label {
    font-size: 1rem;
  }
}

/* Status Indicator */
.pillar-visual-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #EBF2FF;
  border-radius: 9999px;
}

.pillar-visual-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--ordio-blue);
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.pillar-visual-status-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ordio-blue);
}

/* Old mobile phone CSS removed - using card-based widget design instead */

/* Responsive adjustments for visuals */
@media (max-width: 767px) {
  .pillar-hero-sidebyside-content {
    padding: 1.5rem;
  }

  .pillar-hero-sidebyside-text {
    padding: 1.5rem;
  }

  .pillar-hero-sidebyside-visual {
    max-width: 100%;
    border-radius: 0.5rem;
    /* Add border-radius on mobile only */
  }
}

/* ============================================
   PILLAR CARD CAROUSEL (For Related Content Carousel)
   ============================================ */

.pillar-card-carousel {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.pillar-card-carousel-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.pillar-card-carousel-link:focus-visible {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
  border-radius: 0.75rem;
}

.pillar-card-carousel-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

/* Visual Content (Top) */
.pillar-card-carousel-visual {
  flex: 0 0 auto;
  width: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #fbfbfb;
}

.pillar-card-carousel-visual .pillar-visual-dienstplan,
.pillar-card-carousel-visual .pillar-visual-zeiterfassung {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar-card-carousel-visual .pillar-visual-dienstplan>div,
.pillar-card-carousel-visual .pillar-visual-zeiterfassung>div {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 200px;
}

/* Text Content (Bottom) */
.pillar-card-carousel-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  min-width: 0;
}

.pillar-card-carousel-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  align-self: flex-start;
}

.pillar-card-carousel-category.post-header-category--dienstplan,
.pillar-card-carousel-category.post-header-category--zeiterfassung {
  background-color: #FEE2E2;
  /* Light red/pink */
  color: #DC2626;
  /* Red dark */
  font-weight: 700;
}

.pillar-card-carousel-title {
  font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pillar-card-carousel-description {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pillar-card-carousel-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--ordio-blue);
  margin-top: auto;
  transition: gap 0.3s ease;
}

.pillar-card-carousel:hover .pillar-card-carousel-cta {
  gap: 0.75rem;
}

.pillar-card-carousel-cta-text {
  font-size: 0.875rem;
}

.pillar-card-carousel-cta-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s ease;
}

.pillar-card-carousel:hover .pillar-card-carousel-cta-icon {
  transform: translateX(4px);
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .pillar-card-carousel-text {
    padding: 1.25rem;
  }

  .pillar-card-carousel-visual {
    min-height: 180px;
  }

  .pillar-card-carousel-title {
    font-size: 1.125rem;
  }

  .pillar-card-carousel-description {
    font-size: 0.8125rem;
  }
}

/* ============================================
   CATEGORY FEATURED POST
   ============================================ */

.category-featured-post {
  margin-bottom: 4rem;
}

.category-featured-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.category-featured-link {
  display: block;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.category-featured-link:focus-visible {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
  border-radius: 1rem;
}

.category-featured-image-wrapper {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  background-color: #F3F4F6;
  min-height: 300px;
}

@media (min-width: 768px) {
  .category-featured-image-wrapper {
    height: 400px;
    min-height: 400px;
  }
}

.category-featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-featured-card:hover .category-featured-image {
  transform: scale(1.05);
}

.category-featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
  pointer-events: none;
}

.category-featured-content {
  position: relative;
  padding: 2rem;
  z-index: 1;
}

@media (min-width: 768px) {
  .category-featured-content {
    padding: 2.5rem;
  }
}

.category-featured-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ordio-blue);
  background-color: var(--ordio-blue-light);
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.category-featured-title {
  font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .category-featured-title {
    font-size: 2rem;
  }
}

.category-featured-excerpt {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

/* ============================================
   SKELETON LOADING STATES
   ============================================ */

.skeleton-card {
  background-color: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.skeleton-card-image {
  width: 100%;
  height: 200px;
  background-color: #E5E7EB;
  position: relative;
  overflow: hidden;
}

.skeleton-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skeleton-card-badge {
  width: 80px;
  height: 24px;
  background-color: #E5E7EB;
  border-radius: 0.375rem;
  position: relative;
  overflow: hidden;
}

.skeleton-card-title {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-card-title .skeleton-shimmer {
  height: 24px;
}

.skeleton-card-title .skeleton-shimmer:first-child {
  width: 90%;
}

.skeleton-card-title .skeleton-shimmer:last-child {
  width: 70%;
}

.skeleton-card-excerpt {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-card-excerpt .skeleton-shimmer {
  height: 16px;
  width: 100%;
}

.skeleton-card-excerpt .skeleton-shimmer-short {
  width: 60%;
}

.skeleton-card-meta {
  margin-top: auto;
}

.skeleton-card-meta .skeleton-shimmer {
  width: 100px;
  height: 14px;
}

.skeleton-shimmer {
  background: linear-gradient(90deg,
      #E5E7EB 0%,
      #F3F4F6 50%,
      #E5E7EB 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 0.25rem;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* Skeleton loading removed - cards are server-rendered and visible immediately */

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes staggerFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

  .pillar-hero-section,
  .category-featured-post,
  .blog-posts-grid {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .skeleton-shimmer {
    animation: none;
  }
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
  text-align: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 640px) {
  .empty-state {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

.empty-state-icon {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
  color: #D1D5DB;
  font-size: 4rem;
}

.empty-state-title {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .empty-state-title {
    font-size: 1.875rem;
  }
}

.empty-state-description {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-secondary);
}

.empty-state-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
  background-color: var(--ordio-blue);
  text-decoration: none;
}

.empty-state-link:hover {
  background-color: var(--ordio-blue-dark);
}

/* ============================================
   LOADING STATES
   ============================================ */

.post-card.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .5;
  }
}

.post-card.loading .post-card-image-wrapper {
  background-color: #E5E7EB;
}

.post-card.loading .post-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-card.loading .post-card-title {
  height: 1.5rem;
  background-color: #E5E7EB;
  border-radius: 0.25rem;
  min-height: 1.5rem;
}

.post-card.loading .post-card-excerpt {
  height: 1rem;
  background-color: #E5E7EB;
  border-radius: 0.25rem;
}

.post-card.loading .post-card-category {
  background-color: #E5E7EB;
  width: 80px;
  height: 24px;
}

/* ============================================
   SMOOTH SCROLLING & ANIMATIONS
   ============================================ */

html {
  scroll-behavior: smooth;
}

/* Cards are visible immediately - no animations on page load */

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Mobile-specific adjustments for post header */
@media (max-width: 639px) {
  .post-header {
    margin-top: 2rem;
    margin-bottom: 3rem;
    /* Padding handled by parent container (max-w-7xl) */
    padding-left: 0;
    padding-right: 0;
  }

  .post-header-image-wrapper {
    margin-top: 2rem;
    border-radius: 0.5rem;
  }

  .post-header-title {
    font-size: 2rem;
    /* 32px on mobile */
  }

  .post-header-meta {
    font-size: 0.875rem;
    /* 14px on mobile */
  }

  .post-content-inner {
    font-size: 1rem;
    /* 16px on mobile */
  }

  .post-content-inner h2 {
    font-size: 1.75rem;
    /* 28px on mobile */
  }

  .post-content-inner h3 {
    font-size: 1.375rem;
    /* 22px on mobile */
  }

  .blog-post-content-wrapper {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .featured-post-title {
    font-size: 1.5rem;
  }

  .featured-post-content {
    padding: 1.5rem;
  }

  .category-nav-link {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    min-height: 40px;
  }

  .blog-posts-grid {
    gap: 1rem;
  }
}

/* Tablet-specific adjustments */
@media (min-width: 640px) and (max-width: 1023px) {
  .post-header-image-wrapper {
    margin-bottom: 3rem;
  }

  .post-content-inner {
    font-size: 1.0625rem;
    /* 17px on tablet */
  }

  .post-header-image-wrapper {
    margin-top: 3rem;
  }
}

/* Desktop-specific enhancements */
@media (min-width: 1024px) {
  .post-header-image-wrapper {
    max-width: 100%;
  }

  .post-content-inner {
    font-size: 1.125rem;
    /* 18px on desktop */
  }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

.post-card-link:focus,
.category-nav-link:focus,
.pagination-link:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--ordio-blue);
  border-radius: 0.25rem;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

  .post-card,
  .post-card-image,
  .pagination-link,
  .category-nav-link {
    transition: none;
  }

  .post-card:hover {
    transform: none;
  }

  .post-card-link:hover .post-card-image {
    transform: none;
  }

  .post-card {
    transition: none;
  }

  .post-card:hover {
    transform: none;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {

  .category-nav,
  .pagination,
  .related-posts {
    display: none;
  }

  .post-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--border-color);
  }
}

/* Resource Card Badge Styles */
.post-card-category.bg-ordio-blue {
  background-color: rgba(77, 142, 243, 0.1) !important;
  color: #4D8EF3 !important;
}

.post-card-category.bg-green-100 {
  background-color: #D1FAE5 !important;
  color: #065F46 !important;
}

.post-card-category.bg-purple-100 {
  background-color: #E9D5FF !important;
  color: #6B21A8 !important;
}

.post-card-category.bg-blue-100 {
  background-color: #DBEAFE !important;
  color: #1E40AF !important;
}

/* Tool icon wrapper styling */
.post-card-image-wrapper.bg-ordio-blue {
  background-color: rgba(77, 142, 243, 0.1);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Excel Visual Mini in Blog Cards - Match Blog Post Image Dimensions */
.post-card-image-wrapper .excel-visual-mini-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  position: relative;
  /* Match wrapper aspect ratio - visual will scale to fit */
  min-height: 100%;
}

/* Excel visual toolbar and formula bar - fixed height at top */
.post-card-image-wrapper .excel-visual-mini-container>div:first-child {
  flex-shrink: 0;
}

/* Excel visual grid wrapper - fills remaining space */
.post-card-image-wrapper .excel-mini-grid-wrapper {
  flex: 1;
  overflow: hidden;
  min-height: 0;
  /* Allow flex shrinking */
}

/* Excel visual table - fill grid wrapper */
.post-card-image-wrapper .excel-mini-table {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

/* Match border radius with card top corners */
.post-card-image-wrapper .excel-visual-mini-container {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

/* Ensure visual scales proportionally within wrapper */
.post-card-image-wrapper .excel-visual-mini-container {
  transform-origin: top center;
}

/* Ensure consistent card heights for mixed resource types */
#blog-related-carousel-section .post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#blog-related-carousel-section .post-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#blog-related-carousel-section .post-card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Standardize image wrapper heights - all content types use 16:9 aspect ratio */
#blog-related-carousel-section .post-card-image-wrapper {
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  overflow: hidden;
}

/* Standardize icon wrapper heights to match image aspect ratio */
#blog-related-carousel-section .post-card-image-wrapper.bg-ordio-blue {
  aspect-ratio: 16 / 9;
  min-height: auto;
  /* Override min-height: 200px */
}

/* Ensure Excel visuals respect aspect ratio in carousel */
#blog-related-carousel-section .post-card-image-wrapper .excel-visual-mini-container {
  aspect-ratio: 16 / 9;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Ensure toolbar buttons display horizontally (not stacked) */
#blog-related-carousel-section .excel-visual-mini-container>div:first-child {
  display: block !important;
  /* Override any flex that might break toolbar */
  flex-shrink: 0;
}

/* Ensure toolbar flex container displays buttons horizontally */
#blog-related-carousel-section .excel-visual-mini-container .flex.items-center {
  display: flex !important;
  flex-direction: row !important;
  /* Force horizontal layout */
  align-items: center !important;
}

/* Standardize content padding - consistent across all card types */
#blog-related-carousel-section .post-card-content {
  padding: 1rem !important;
  /* Override any other padding values */
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  /* Consistent spacing between badge, title, etc. */
  justify-content: flex-start;
  /* Align content to top */
  min-height: 0;
  /* Allow flex shrinking */
}

/* Standardize badge spacing - consistent margin-bottom, remove any extra margins */
#blog-related-carousel-section .post-card-category {
  margin-bottom: 0 !important;
  /* Remove default margin, use gap instead */
  margin-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  align-self: flex-start;
  flex-shrink: 0;
  /* Prevent badge from shrinking */
  order: 1;
  /* Ensure badge always comes first */
  height: auto;
  /* Let content determine height */
  line-height: 1.5;
  /* Consistent line height */
}

/* Standardize title positioning - consistent min-height and margin */
#blog-related-carousel-section .post-card-title {
  margin-bottom: 0 !important;
  /* Remove default margin, use gap instead */
  margin-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  min-height: 2.75rem;
  /* Consistent height for 2-line titles */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
  /* Prevent title from shrinking */
  line-height: 1.4;
  order: 2;
  /* Ensure title always comes after badge */
  font-size: 1.125rem !important;
  /* Consistent font size */
  font-weight: 700 !important;
  /* Consistent font weight */
}

/* Remove extra margins from icon wrappers in carousel - mb-4 classes cause misalignment */
#blog-related-carousel-section .post-card-image-wrapper.bg-ordio-blue,
#blog-related-carousel-section .post-card-image-wrapper.bg-green-100 {
  margin-bottom: 0 !important;
  /* Remove mb-4 from icon wrappers */
  padding: 0 !important;
  /* Remove p-6 padding, let aspect-ratio handle height */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Ensure icon wrappers use flexbox for centering without padding */
#blog-related-carousel-section .post-card-image-wrapper.bg-ordio-blue>svg,
#blog-related-carousel-section .post-card-image-wrapper.bg-green-100>svg {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
}

/* Ensure all image wrappers have consistent spacing - no margin between image and content */
#blog-related-carousel-section .post-card-image-wrapper {
  margin-bottom: 0 !important;
}

/* Override compact variant padding to ensure consistency */
#blog-related-carousel-section .post-card--compact .post-card-content {
  padding: 1rem !important;
}

/* FAQ Section Heading - Prevent truncation of long German compound words */
/* Single compound words should stay intact - no breaking or hyphenation */
#faq h2 {
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  max-width: 100%;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
}

#faq h2 .text-ordio-blue {
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  display: inline;
  white-space: normal !important;
  overflow: visible !important;
}

/* Ensure FAQ container allows word breaking */
#faq .max-w-5xl {
  overflow: visible !important;
}

/* Ensure badges always appear first and at consistent position */
#blog-related-carousel-section .post-card-content>.post-card-category:first-child {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Ensure titles always appear after badges at consistent position */
#blog-related-carousel-section .post-card-content>.post-card-title:first-of-type,
#blog-related-carousel-section .post-card-content>.post-card-title {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Remove date margin-top auto to prevent spacing issues */
#blog-related-carousel-section .post-card-date {
  display: none;
  /* Dates already hidden in compact variant, but ensure CSS hides them too */
}

/* Ensure cards maintain equal heights in carousel row */
#blog-related-carousel-section .flex>div {
  display: flex;
  flex-direction: column;
}

/* Ensure card link fills available height */
#blog-related-carousel-section .post-card-link {
  flex: 1;
  min-height: 0;
  /* Allow flex shrinking if needed */
}

/* ============================================
   BLOG INDEX HERO SECTION
   ============================================ */

/* Background gradient pattern matching product pages */
.blog-page-body-gradient {
  background-image: radial-gradient(#e6e6e6 1px, transparent 0) !important;
  background-size: 20px 20px !important;
  background-position: -19px -19px !important;
}

/* ============================================
   CATEGORY CARDS SECTION
   ============================================ */

.category-cards-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 1024px) {
  .category-cards-section {
    margin-top: 4rem;
    margin-bottom: 4rem;
  }
}

/* Three-column grid layout */
.category-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 80rem;
  /* max-w-7xl */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .category-cards-grid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    gap: 2rem;
  }
}

@media (min-width: 768px) {
  .category-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .category-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Category card styling */
.category-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ordio-blue), var(--ordio-blue-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--ordio-blue);
}

.category-card:hover::before {
  transform: scaleX(1);
}

.category-card:focus {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
}

/* Category icon */
.category-card-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.category-card:hover .category-card-icon {
  transform: scale(1.1);
}

/* Category card content */
.category-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-card-title {
  font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
}

.category-card-count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.category-card-description {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category card arrow */
.category-card-arrow {
  margin-top: 1rem;
  color: var(--ordio-blue);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  align-self: flex-start;
}

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

/* Category-specific hover effects */
.category-card[data-category="lexikon"]:hover {
  border-color: #4D8EF3;
}

.category-card[data-category="lexikon"]:hover .category-card-icon {
  background-color: #DBEAFE !important;
}

.category-card[data-category="ratgeber"]:hover {
  border-color: #059669;
}

.category-card[data-category="ratgeber"]:hover .category-card-icon {
  background-color: #A7F3D0 !important;
}

.category-card[data-category="inside-ordio"]:hover {
  border-color: #6B7280;
}

.category-card[data-category="inside-ordio"]:hover .category-card-icon {
  background-color: #E5E7EB !important;
}

/* ============================================
   BLOG FILTER BUTTONS
   ============================================ */

.blog-filter-buttons-wrapper {
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.blog-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

@media (min-width: 640px) {
  .blog-filter-buttons {
    gap: 1rem;
  }
}

.blog-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
}

.blog-filter-button:hover {
  background-color: var(--ordio-blue-light);
  border-color: var(--ordio-blue);
  color: var(--ordio-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.blog-filter-button.active {
  background-color: var(--ordio-blue);
  border-color: var(--ordio-blue);
  color: white;
  box-shadow: var(--shadow-md);
}

.blog-filter-button:focus {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
}

.blog-filter-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.blog-filter-label {
  display: inline-block;
}

.blog-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 9999px;
  background-color: rgba(0, 0, 0, 0.08);
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-filter-button:hover .blog-filter-badge {
  background-color: rgba(77, 142, 243, 0.15);
  color: var(--ordio-blue);
}

.blog-filter-button.active .blog-filter-badge {
  background-color: rgba(255, 255, 255, 0.25);
  color: white;
}

/* ============================================
   BLOG POSTS SECTION
   ============================================ */

.blog-posts-section {
  margin-top: 3rem;
}

@media (min-width: 1024px) {
  .blog-posts-section {
    margin-top: 4rem;
  }
}

.blog-post-card-wrapper {
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   STANDARD BUTTONS
   ============================================ */

/* Primary Ordio Button */
.btn-ordio {
  background: #4D8EF3;
  color: white;
  border: none;
  border-radius: 0.75rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  min-height: 44px;
}

.btn-ordio:hover {
  background: #3b7dd8;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: white;
}

.btn-ordio:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-ordio:focus {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
}

/* ============================================
   BLOG PAGINATION
   ============================================ */

.blog-pagination-wrapper {
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.blog-pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-pagination-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-pagination-button:hover:not(.disabled) {
  background-color: var(--ordio-blue-light);
  border-color: var(--ordio-blue);
  color: var(--ordio-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.blog-pagination-button.active {
  background-color: var(--ordio-blue);
  border-color: var(--ordio-blue);
  color: white;
  box-shadow: var(--shadow-md);
}

.blog-pagination-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.blog-pagination-button:focus {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
}

/* ============================================
   BLOG TABLE OF CONTENTS (TOC) STYLES
   ============================================ */

.blog-toc {
  /* Fixed positioning handled by Tailwind classes */
  /* hidden lg:block fixed left-6 top-1/2 -translate-y-1/2 z-40 */
  /* CRITICAL: Prevent container expansion */
  /* Ensure fixed positioning doesn't affect width calculation */
  width: auto;
  max-width: none;
  /* Prevent flex expansion if parent is flex container */
  flex-shrink: 0;
}

.blog-toc-nav {
  /* Navigation container styles */
  /* CRITICAL: Fixed width constraint - must match Tailwind w-[240px] class */
  /* Width includes padding (p-3 = 0.75rem = 12px) and border (1px each side) */
  /* Total: 240px = content width + padding (24px) + border (2px) */
  width: 240px !important;
  max-width: 240px !important;
  min-width: 240px !important;
  box-sizing: border-box;
  /* Ensure padding and border are included in width calculation */
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* Webkit scrollbar styling */
.blog-toc-nav::-webkit-scrollbar {
  width: 6px;
}

.blog-toc-nav::-webkit-scrollbar-track {
  background: transparent;
}

.blog-toc-nav::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

.blog-toc-nav::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

.blog-toc-item {
  /* Base TOC item styles */
  text-decoration: none;
  outline: none;
  position: relative;
  /* Reserve space for border to prevent layout shift */
  min-height: 2.75rem;
  /* 44px - optimal touch target size per WCAG guidelines */
  display: flex;
  align-items: center;
  /* CRITICAL: Text wrapping - ensure text wraps within TOC width */
  /* Prevent text from forcing container to expand beyond 240px */
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  /* Ensure flex items can shrink below content size */
  min-width: 0;
  flex-shrink: 1;
  /* Optimal line height for readability (1.5x font size) */
  line-height: 1.5;
}

.blog-toc-item:focus {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
  border-radius: 0.375rem;
}

.blog-toc-item--active {
  /* Active TOC item styles */
  position: relative;
  /* Ensure font-weight change doesn't affect width */
  font-weight: 500;
}

.blog-toc-item--h2 {
  /* H2 level item (no extra indentation) */
  font-weight: 400;
  /* Changed from 500 to match inactive state base */
}

.blog-toc-item--h3 {
  /* H3 level item (indented) */
  font-size: 0.875rem;
  font-weight: 400;
}

.blog-toc-item--h4 {
  /* H4 level item (more indented) */
  font-size: 0.8125rem;
  font-weight: 400;
}

/* ============================================
   COLLAPSIBLE GROUPED TOC STYLES
   ============================================ */

.blog-toc-group {
  /* Container for H2 with its H3 children */
  margin-bottom: 0.25rem;
}

.blog-toc-toggle {
  /* Expand/collapse button for H2 sections */
  min-width: 1.5rem;
  min-height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.blog-toc-toggle:hover {
  background-color: rgba(77, 142, 243, 0.1);
}

.blog-toc-toggle:focus {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
}

.blog-toc-chevron {
  /* Chevron icon for expand/collapse */
  transition: transform 0.2s ease;
  transform-origin: center;
}

.blog-toc-chevron.rotate-90 {
  transform: rotate(90deg);
}

.blog-toc-children {
  /* Container for H3 items under H2 */
  /* Indentation handled by ml-4 class in HTML */
  border-left: 1px solid #e5e7eb;
  margin-left: 0.75rem;
  padding-left: 0.5rem;
}

.blog-toc-item--h3 {
  /* H3 items in grouped TOC */
  font-size: 0.875rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
  /* Ensure text wraps within 240px width */
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

/* Expand/Collapse All button */
.blog-toc-nav>div:first-child button {
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 1.25rem;
  min-height: 1.25rem;
  line-height: 1;
}

/* Accessibility: Ensure focus states are visible */
.blog-toc-item:focus-visible,
.blog-toc-toggle:focus-visible {
  outline: 2px solid var(--ordio-blue);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

  .blog-post-card-wrapper,
  .blog-filter-button,
  .blog-pagination-button,
  .blog-toc {
    transition: none;
  }

  .blog-post-card-wrapper {
    transform: none !important;
  }

  .blog-toc-item,
  .blog-toc-toggle,
  .blog-toc-chevron,
  .blog-toc-children {
    transition: none !important;
  }

  .blog-toc-chevron.rotate-90 {
    transform: rotate(90deg) !important;
  }
}