/* ==========================================================================
   Wired Up Solutions — Blog styles
   Loaded only on blog.html and blog-*.html, after css/style.css.
   Uses the variables defined in style.css (:root).
   ========================================================================== */

/* ---------- Shared bits ---------- */
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-light);
}

.blog-meta i {
  margin-right: 6px;
  color: var(--accent-red);
}

.blog-cat {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-red);
}

.blog-read-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--heading-color);
  transition: color var(--transition-fast), gap var(--transition-fast);
}

.blog-read-link i {
  font-size: 0.85em;
  color: var(--accent-red);
}

/* ---------- Blog index: featured post ---------- */
.blog-index-section {
  padding: 80px 0;
}

.blog-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--bg-white);
  border: 1px solid #eef2f7;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(10, 28, 50, 0.05);
  margin-bottom: 64px;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.blog-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(10, 28, 50, 0.09);
}

.blog-featured-media {
  position: relative;
  min-height: 360px;
  background: var(--accent-blue-light);
}

.blog-featured-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-featured-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 50px;
}

.blog-featured-body {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.blog-featured-body h2 {
  font-size: 30px;
  line-height: 1.25;
  margin: 0;
}

.blog-featured-body p {
  color: var(--text-muted);
  margin: 0 0 8px;
}

.blog-featured:hover .blog-read-link,
.blog-card:hover .blog-read-link {
  color: var(--accent-red);
  gap: 12px;
}

/* ---------- Blog index: filters ---------- */
.blog-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 32px;
}

.blog-list-head .section-title {
  margin: 0;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-filter {
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--heading-color);
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.blog-filter:hover {
  border-color: var(--heading-color);
}

.blog-filter.is-active {
  background: var(--heading-color);
  border-color: var(--heading-color);
  color: #fff;
}

.blog-empty {
  display: none;
  text-align: center;
  color: var(--text-muted);
  padding: 30px 0;
}

/* ---------- Blog card ---------- */
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-white);
  border: 1px solid #eef2f7;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(10, 28, 50, 0.04);
  transition: all var(--transition-normal);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(10, 28, 50, 0.09);
  border-color: #cbdbee;
}

.blog-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--accent-blue-light);
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.blog-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 26px 26px 28px;
}

.blog-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}

.blog-card h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  transition: color var(--transition-fast);
}

.blog-card:hover h3 {
  color: var(--accent-red);
}

.blog-card p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .blog-read-link {
  margin-top: auto;
  padding-top: 8px;
}

.blog-card-col.is-hidden {
  display: none;
}

/* ---------- Post page ---------- */
.post-hero .blog-meta {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
}

.post-hero .blog-meta i {
  color: #ea2b39;
}

.post-section {
  padding: 72px 0 80px;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 64px;
  align-items: start;
}

/* Article typography */
.post-body {
  max-width: 900px;
  color: var(--text-muted);
}

.post-body>*:first-child {
  margin-top: 0;
}

.post-body p {
  font-size: 17px;
  line-height: 1.8;
  margin: 0 0 22px;
}

.post-body .post-lead {
  font-size: 19px;
  font-weight: 500;
  color: var(--heading-color);
  line-height: 1.7;
}

.post-body h2 {
  font-size: 30px;
  line-height: 1.3;
  margin: 46px 0 16px;
}

.post-body h3 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  margin: 34px 0 12px;
}

.post-body h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 26px 0 10px;
}

.post-body a {
  color: var(--accent-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body a:hover {
  color: var(--accent-red-hover);
}

.post-body strong {
  color: var(--text-dark);
  font-weight: 600;
}

.post-body ul,
.post-body ol {
  margin: 0 0 24px;
  padding: 0;
}

.post-body ul li,
.post-body ol li {
  position: relative;
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 10px;
  padding-left: 32px;
}

.post-body ul li::before {
  content: "\f058";
  /* FontAwesome check-circle */
  font-family: 'FontAwesome';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--accent-red);
}

.post-body ol {
  list-style: none;
  counter-reset: post-ol;
}

.post-body ol li {
  counter-increment: post-ol;
}

.post-body ol li::before {
  content: counter(post-ol);
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--heading-color);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.post-body li ul,
.post-body li ol {
  margin: 10px 0 0;
}

.post-body blockquote {
  background: #f3f7fb;
  border-left: 4px solid var(--accent-red);
  border-radius: 0 12px 12px 0;
  padding: 22px 28px;
  margin: 30px 0;
}

.post-body blockquote p {
  font-size: 18px;
  font-weight: 500;
  color: var(--heading-color);
  margin: 0;
}

.post-body blockquote p+p {
  margin-top: 12px;
}

.post-body img {
  border-radius: 16px;
  margin: 10px 0;
}

.post-body figure {
  margin: 32px 0;
}

.post-body figcaption {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 10px;
  text-align: center;
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--border-light);
  margin: 40px 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 28px;
  font-size: 15px;
}

.post-body th,
.post-body td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
}

.post-body th {
  background: var(--accent-blue-light);
  color: var(--heading-color);
  font-weight: 600;
}

.post-table-wrap {
  overflow-x: auto;
}

.post-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--border-light);
  max-width: 780px;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--heading-color);
}

.post-back:hover {
  color: var(--accent-red);
}

.post-share {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading-color);
}

.post-share a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-blue-light);
  color: var(--heading-color);
  transition: all var(--transition-fast);
}

.post-share a:hover {
  background: var(--heading-color);
  color: #fff;
}

/* Sidebar */
.post-sidebar {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  background: var(--bg-white);
  border: 1px solid #eef2f7;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 18px rgba(10, 28, 50, 0.04);
}

.sidebar-card h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
}

.sidebar-cta {
  background: var(--primary-navy);
  border-color: var(--primary-navy);
  color: #fff;
}

.sidebar-cta .section-tag {
  color: #ea2b39;
  margin-bottom: 8px;
}

.sidebar-cta h4 {
  color: #fff;
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.sidebar-cta p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 20px;
}

.sidebar-cta .btn {
  width: 100%;
  margin-bottom: 10px;
  padding: 11px 18px;
  font-size: 15px;
}

.sidebar-cta .btn:last-child {
  margin-bottom: 0;
}

.sidebar-links li {
  border-bottom: 1px solid var(--border-light);
}

.sidebar-links li:last-child {
  border-bottom: 0;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
}

.sidebar-links a i {
  font-size: 0.8rem;
  color: var(--accent-red);
}

.sidebar-links a:hover {
  color: var(--accent-red);
}

.sidebar-recent li+li {
  margin-top: 16px;
}

.sidebar-recent a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}

.sidebar-recent img {
  width: 72px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
}

.sidebar-recent span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--heading-color);
  transition: color var(--transition-fast);
}

.sidebar-recent small {
  display: block;
  font-size: 12.5px;
  color: var(--text-light);
  margin-top: 3px;
}

.sidebar-recent a:hover span {
  color: var(--accent-red);
}

/* Related posts */
.related-posts .section-header-center {
  margin-bottom: 40px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .post-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 44px;
  }
}

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

  .blog-featured-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .blog-featured-body {
    padding: 32px 28px 36px;
  }

  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    position: static;
  }

  .post-body,
  .post-footer {
    max-width: none;
  }
}

@media (max-width: 767px) {

  .blog-index-section,
  .post-section {
    padding: 56px 0;
  }

  .blog-featured {
    margin-bottom: 48px;
  }

  .blog-featured-body h2 {
    font-size: 24px;
  }

  .post-body p,
  .post-body ul li,
  .post-body ol li {
    font-size: 16px;
  }

  .post-body h2 {
    font-size: 25px;
    margin-top: 38px;
  }

  .post-body h3 {
    font-size: 20px;
  }

  .blog-list-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Long post titles: give the hero text more room on desktop */
.post-hero .page-hero-title {
  font-size: 2.35rem;
  line-height: 1.2;
}

.post-hero .post-subtitle {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 18px;
}

@media (min-width: 992px) {
  .post-hero .page-hero-content {
    max-width: 72%;
  }
}

@media (max-width: 767px) {
  .post-hero .page-hero-title {
    font-size: 1.6rem;
  }
}