/*
Theme Name: Flowio Blog
Theme URI: https://www.flowio.co.uk
Author: Flowio
Author URI: https://www.flowio.co.uk
Description: Blog theme aligned with the 2026 flowio site redesign.
Version: 2.1.0
Text Domain: flowio-blog
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, flowio, responsive, accessibility-ready
*/

/* ===== LAYOUT: Blog listing + sidebar ===== */
.blog-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  margin-top: 2rem;
}
.blog-layout .solutions-grid {
  flex: 2.5;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.blog-layout .sidebar {
  flex: 1;
  min-width: 260px;
  position: sticky;
  top: 7rem;
}
@media (max-width: 1024px) {
  .blog-layout { flex-direction: column; }
  .blog-layout .sidebar { position: static; width: 100%; }
}
@media (max-width: 640px) {
  .blog-layout .solutions-grid { grid-template-columns: 1fr; }
}

/* ===== NAVBAR OFFSET ===== */
.blog-hero-offset { margin-top: 7.5rem; }
@media (max-width: 480px) { .blog-hero-offset { margin-top: 6.5rem; } }

/* ===== POST CARDS ===== */
.solution-card {
  background: hsl(0 0% 100%);
  border: 1px solid hsla(220, 30%, 20%, 0.08);
  border-radius: 1rem;
  padding: 1.75rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.solution-card:hover {
  transform: translateY(-4px);
  border-color: hsla(16, 100%, 50%, 0.25);
  box-shadow: 0 20px 60px -15px hsla(16, 100%, 50%, 0.12);
}
.solution-card .post-thumb {
  display: block;
  margin: -1.75rem -1.75rem 1.5rem;
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
}
.solution-card .post-thumb img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.solution-card:hover .post-thumb img { transform: scale(1.03); }

.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--primary-color, #1a1a1a);
}
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--flamingo, #f95730); }

/* #8 Fix excerpt overflow — fill remaining card space, clamp to 4 lines */
.post-excerpt {
  font-size: 0.9375rem;
  color: hsl(220 10% 35%);
  line-height: 1.7;
  flex: 1 1 auto;
  min-height: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

/* ===== BADGES ===== */
.usp-badges,
.blog-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.blog_badge_author,
.blog_badge_category,
.blog_badge_tags,
.blog_badge_reading {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.blog_badge_author {
  background: hsla(220, 20%, 96%, 1);
  color: hsl(220 10% 40%);
}
.blog_badge_category {
  background: hsla(16, 100%, 50%, 0.08);
  color: var(--flamingo, #f95730);
}
.blog_badge_category a { color: inherit; }
.blog_badge_category:hover { background: hsla(16, 100%, 50%, 0.15); }
.blog_badge_tags {
  background: hsla(262, 83%, 58%, 0.08);
  color: var(--accent-color, #9b51e0);
}
.blog_badge_tags a { color: inherit; }
.blog_badge_tags:hover { background: hsla(262, 83%, 58%, 0.15); }
.blog_badge_reading {
  background: hsla(142, 76%, 36%, 0.08);
  color: hsl(142, 76%, 36%);
}
/* SVG inside badges */
.usp-badges svg,
.blog-badges svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ===== SIDEBAR ===== */
.sidebar .solution-card {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar .solution-card:hover { transform: none; box-shadow: none; }
.sidebar .solution-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid hsla(16, 100%, 50%, 0.2);
  color: var(--primary-color, #1a1a1a);
}
.sidebar .solution-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar .solution-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid hsla(220, 30%, 20%, 0.06);
  color: hsl(220 10% 35%);
}
.sidebar .solution-features li:last-child { border-bottom: none; }
.sidebar .solution-features li svg {
  width: 14px;
  height: 14px;
  color: var(--flamingo, #f95730);
  flex-shrink: 0;
}
.sidebar .solution-features a { color: inherit; }
.sidebar .solution-features a:hover { color: var(--flamingo, #f95730); }

/* ===== #2 BREADCRUMBS — styled for visibility ===== */
.blog-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: hsl(220 10% 45%);
  margin-bottom: 2rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  background: hsla(220, 20%, 96%, 0.8);
  border: 1px solid hsla(220, 30%, 20%, 0.06);
  border-radius: 0.75rem;
}
.blog-breadcrumb a {
  color: hsl(220 10% 40%);
  font-weight: 500;
  transition: color 0.2s;
}
.blog-breadcrumb a:hover { color: var(--flamingo, #f95730); }
.blog-breadcrumb .separator {
  color: hsla(220, 10%, 45%, 0.4);
  font-size: 0.75rem;
}
.blog-breadcrumb .current {
  color: hsl(220 25% 18%);
  font-weight: 600;
}
.blog-breadcrumb svg {
  width: 14px;
  height: 14px;
  color: var(--flamingo, #f95730);
  flex-shrink: 0;
}

/* ===== #1 SINGLE POST — enhanced readability ===== */
.text-content {
  max-width: 780px;
  margin: 0 auto;
}
.text-content .glow-box {
  margin: 0 -1rem 2.5rem;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 60px -15px hsla(220, 30%, 20%, 0.15);
}
.text-content .glow-box img {
  width: 100%;
  height: auto;
  display: block;
}
.text-content .hero_title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: hsl(220 25% 12%);
  margin-bottom: 1.5rem;
}

/* Post body — optimised for readability */
.post-content {
  font-size: 1.125rem;
  line-height: 1.85;
  color: hsl(220 15% 25%);
  letter-spacing: -0.005em;
}
.post-content h2 {
  font-size: 1.625rem;
  font-weight: 700;
  margin: 3rem 0 1.25rem;
  color: hsl(220 25% 12%);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.post-content h3 {
  font-size: 1.3125rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: hsl(220 25% 15%);
  line-height: 1.35;
}
.post-content h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: hsl(220 25% 18%);
}
.post-content p {
  margin-bottom: 1.5rem;
}
.post-content > p:first-child {
  font-size: 1.1875rem;
  color: hsl(220 15% 30%);
}
.post-content a {
  color: var(--flamingo, #f95730);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: hsla(16, 100%, 50%, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.post-content a:hover { text-decoration-color: var(--flamingo, #f95730); }
.post-content img {
  border-radius: 0.75rem;
  margin: 2rem 0;
}
.post-content blockquote {
  margin: 2.5rem 0;
  padding: 1.75rem 2rem;
  background: linear-gradient(135deg, hsla(16, 100%, 50%, 0.04), hsla(220, 60%, 50%, 0.03));
  border-left: 4px solid var(--flamingo, #f95730);
  border-radius: 0 1rem 1rem 0;
  font-style: italic;
  color: hsl(220 25% 18%);
  font-size: 1.0625rem;
  line-height: 1.8;
}
.post-content blockquote p:last-child { margin-bottom: 0; }
/* ===== LIST STYLES ===== */
.post-content ul,
.post-content ol {
  margin: 1.25rem 0 1.75rem 1.75rem;
  line-height: 1.8;
  padding-left: 0.25rem;
}
.post-content ul {
  list-style-type: disc;
}
.post-content ol {
  list-style-type: decimal;
}
.post-content li {
  margin-bottom: 0.625rem;
  padding-left: 0.35rem;
  color: hsl(220 15% 25%);
}
.post-content li::marker {
  color: var(--flamingo, #f95730);
  font-weight: 600;
}
/* Nested lists */
.post-content ul ul {
  list-style-type: circle;
  margin: 0.5rem 0 0.5rem 1.25rem;
}
.post-content ul ul ul {
  list-style-type: square;
}
.post-content ol ol {
  list-style-type: lower-alpha;
  margin: 0.5rem 0 0.5rem 1.25rem;
}
.post-content ol ol ol {
  list-style-type: lower-roman;
}
/* Last list item — remove bottom margin */
.post-content li:last-child {
  margin-bottom: 0;
}
/* ===== CODE STYLES ===== */
.post-content pre,
.post-content code {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, monospace;
}

/* -- Inline <code> within paragraphs -- */
.post-content code {
  background: hsla(220, 20%, 96%, 1);
  padding: 0.2em 0.45em;
  border-radius: 0.3rem;
  font-size: 0.85em;
  color: hsl(220, 25%, 25%);
  border: 1px solid hsla(220, 30%, 20%, 0.08);
}

/* -- .code-ref class for parameters/variables in prose -- */
.code-ref {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, monospace;
  background: hsla(16, 100%, 50%, 0.06);
  color: hsl(16, 80%, 42%);
  padding: 0.15em 0.45em;
  border-radius: 0.3rem;
  font-size: 0.85em;
  font-weight: 500;
  border: 1px solid hsla(16, 100%, 50%, 0.12);
  white-space: nowrap;
}

/* -- Code blocks: targets WP Gutenberg .wp-block-code and plain <pre> -- */
.post-content pre,
.post-content .wp-block-code {
  background: hsl(220 20% 11%);
  color: hsl(220 15% 78%);
  padding: 1.5rem 1.25rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 2rem 0;
  line-height: 1.7;
  font-size: 0.875rem;
  border: 1px solid hsla(220, 30%, 20%, 0.15);
  box-shadow: 0 4px 20px -4px hsla(220, 30%, 10%, 0.2);
  tab-size: 2;
}
.post-content pre code,
.post-content .wp-block-code code {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
  font-size: inherit;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
}
.post-content th,
.post-content td {
  padding: 0.875rem 1rem;
  border: 1px solid hsla(220, 30%, 20%, 0.1);
  text-align: left;
}
.post-content th {
  background: hsla(220, 20%, 96%, 1);
  font-weight: 700;
}
.post-content hr {
  border: none;
  border-top: 1px solid hsla(220, 30%, 20%, 0.1);
  margin: 3rem 0;
}

/* ===== POST NAVIGATION ===== */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 1px solid hsla(220, 30%, 20%, 0.1);
  border-bottom: 1px solid hsla(220, 30%, 20%, 0.1);
}
.post-navigation a {
  color: hsl(220 10% 40%);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.2s;
}
.post-navigation a:hover { color: var(--flamingo, #f95730); }
.nav-previous, .nav-next { max-width: 45%; }
.nav-next { text-align: right; margin-left: auto; }

/* ===== #3 AUTHOR BIO — circular avatar ===== */
.blog-header {
  margin-top: 3rem;
  padding: 2rem 0;
}
.team__grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.team-member {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 2rem;
  background: hsl(0 0% 98%);
  border: 1px solid hsla(220, 30%, 20%, 0.08);
  border-radius: 1rem;
}
.member__image {
  flex-shrink: 0;
}
.authorbio_img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid hsla(16, 100%, 50%, 0.15);
}
.member__name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: hsl(220 25% 12%);
}
.member__name a { color: var(--flamingo, #f95730); }
.member__bio {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: hsl(220 10% 35%);
}
.member__social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.member__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: hsla(220, 20%, 96%, 1);
  color: hsl(220 10% 40%);
  font-size: 1.125rem;
  transition: all 0.2s ease;
}
.member__social a:hover {
  background: hsla(16, 100%, 50%, 0.1);
  color: var(--flamingo, #f95730);
}
.member__social svg {
  width: 20px;
  height: 20px;
}
@media (max-width: 640px) {
  .team-member { flex-direction: column; align-items: center; text-align: center; }
  .member__social { justify-content: center; }
}

/* ===== CTA SECTION ===== */
.section-consultancy {
  font-size: 1.125rem;
  line-height: 1.7;
  color: hsl(220 10% 35%);
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

/* ===== #10 BLOG CTA SECTION ===== */
.blog-cta-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, hsl(220 25% 8%) 0%, hsl(220 20% 12%) 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
  margin-top: 4rem;
}
.blog-cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 200%;
  background: radial-gradient(ellipse, hsla(16, 100%, 50%, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.blog-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}
.blog-cta-section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: hsl(0 0% 100%);
  margin-bottom: 1rem;
  line-height: 1.2;
}
.blog-cta-section p {
  font-size: 1.125rem;
  color: hsla(0, 0%, 100%, 0.7);
  line-height: 1.7;
  margin-bottom: 2rem;
}
.blog-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== PAGINATION ===== */
.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}
.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.nav-links a {
  background: hsl(0 0% 100%);
  border: 1px solid hsla(220, 30%, 20%, 0.1);
  color: hsl(220 10% 40%);
}
.nav-links a:hover {
  border-color: var(--flamingo, #f95730);
  color: var(--flamingo, #f95730);
  background: hsla(16, 100%, 50%, 0.05);
}
.nav-links .current {
  background: linear-gradient(135deg, var(--flamingo, #f95730), var(--crusta, #fa8928));
  color: #fff;
  border: none;
}

/* ===== READ MORE ===== */
.learnmore {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--flamingo, #f95730);
}
.learnmore:hover { gap: 0.6rem; }
p.more {
  text-align: right;
  margin-top: auto;
  padding-top: 0.75rem;
}

/* ===== UTILITIES ===== */
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
