/* Blog CSS — Lexter Public Website */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Lato', sans-serif;
  color: #1E1818;
  background: #fff;
  line-height: 1.7;
}

a {
  color: #FF7548;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #e05e30;
}

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

/* ============================================================
   Header
   ============================================================ */
.blog-header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 100;
}

.blog-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-nav__logo img {
  height: 32px;
  width: auto;
}

.blog-nav__center {
  display: flex;
  align-items: center;
  gap: 32px;
}

.blog-nav__center a {
  font-family: 'Lexend', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1E1818;
  transition: color 0.2s;
}

.blog-nav__center a:hover {
  color: #FF7548;
}

.blog-nav__center a.active {
  color: #FF7548;
}

.blog-nav__right {
  display: flex;
  align-items: center;
}

.blog-nav__cta {
  display: inline-block;
  background: #FF7548;
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 8px;
  font-family: 'Lexend', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s;
  white-space: nowrap;
}

.blog-nav__cta:hover {
  background: #e05e30;
  color: #fff !important;
}

/* Mobile nav */
.blog-nav__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.blog-nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1E1818;
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .blog-nav__center,
  .blog-nav__right {
    display: none;
  }
  .blog-nav__hamburger {
    display: block;
  }
  .blog-nav.open .blog-nav__center,
  .blog-nav.open .blog-nav__right {
    display: flex;
  }
  .blog-nav.open {
    flex-wrap: wrap;
  }
  .blog-nav.open .blog-nav__center {
    order: 3;
    width: 100%;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid #eee;
    margin-top: 12px;
  }
  .blog-nav.open .blog-nav__right {
    order: 4;
    width: 100%;
    justify-content: center;
    padding-bottom: 12px;
  }
}

/* ============================================================
   Listing Hero
   ============================================================ */
.listing-hero {
  background: rgb(255, 248, 246);
  padding: 82px 0;
}

.listing-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.listing-hero__text {
  flex: 1;
  max-width: 60%;
}

.listing-hero__text h1 {
  font-family: 'Lexend', sans-serif;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
  color: #000;
}

.listing-hero__image {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listing-hero__image img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 50%;
}

@media (max-width: 768px) {
  .listing-hero {
    padding: 48px 0;
  }
  .listing-hero__inner {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }
  .listing-hero__text {
    max-width: 100%;
  }
  .listing-hero__text h1 {
    font-size: 28px;
  }
  .listing-hero__image img {
    width: 140px;
    height: 140px;
  }
}

/* ============================================================
   Tag Filters
   ============================================================ */
.tag-filters {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 8px;
}

.tag-filters__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.tag-filters__pill {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 3px;
  border: 1px solid #ddd;
  color: rgb(30, 24, 24);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.tag-filters__pill:hover {
  background: rgb(30, 24, 24);
  color: #fff;
  border-color: rgb(30, 24, 24);
}

.tag-filters__pill--active {
  background: rgb(30, 24, 24);
  color: #fff;
  border-color: rgb(30, 24, 24);
}

.tag-filters__pill--active:hover {
  background: rgb(30, 24, 24);
  color: #fff;
  border-color: rgb(30, 24, 24);
}

/* ============================================================
   Listing page
   ============================================================ */
.listing-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

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

/* ============================================================
   Listing Cards (matches original HubSpot blog-index structure)
   ============================================================ */
.blog-index__post-wrapper {
  display: flex;
  flex-direction: column;
}

.blog-index__post {
  display: flex;
  flex-direction: column;
  border-radius: 9px;
  overflow: hidden;
  background: transparent;
  border: 1px solid rgba(253, 220, 201, 0.2);
  transition: box-shadow 0.25s, transform 0.25s;
}

.blog-index__post:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.blog-index__post-image {
  display: block;
  height: 0;
  padding-bottom: 58%;
  background-size: cover;
  background-position: center;
  background-color: #f0f0f0;
}

.blog-index__post-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.blog-index__post-preheader {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: rgb(30, 24, 24);
  margin-bottom: 10px;
}

.blog-index__post-content h3 {
  font-family: 'Lexend', sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 10px;
  color: #000;
}

.blog-index__post-content h3 a {
  color: #000;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-index__post-content h3 a:hover {
  color: #FF7548;
}

.blog-index__post-content p {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-index__post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Lato', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  color: rgb(198, 198, 198);
}

.blog-index__post-author {
  color: rgb(198, 198, 198);
}

.blog-index__post-date {
  color: rgb(198, 198, 198);
}

/* ============================================================
   Post page
   ============================================================ */
.post-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.post-hero {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 400px;
  background-size: cover;
  background-position: center;
  margin-bottom: 40px;
}

@media (max-width: 600px) {
  .post-hero { height: 220px; }
}

.post-article {
  margin-bottom: 48px;
}

.post-category {
  display: inline-block;
  font-family: 'Lexend', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #FF7548;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.post-title {
  font-family: 'Lexend', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  color: #1E1818;
}

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

.post-summary {
  font-size: 1.15rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 24px;
}

.post-meta__author {
  font-weight: 700;
  color: #1E1818;
}

.post-divider {
  border: none;
  border-top: 1px solid #eee;
  margin-bottom: 32px;
}

/* ---- Post body typography ---- */
.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-body h2 {
  font-family: 'Lexend', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin: 40px 0 16px;
  color: #1E1818;
}

.post-body h3 {
  font-family: 'Lexend', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 32px 0 12px;
  color: #1E1818;
}

.post-body h4 {
  font-family: 'Lexend', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: #1E1818;
}

.post-body p {
  margin-bottom: 16px;
}

.post-body img {
  margin: 24px 0;
  border-radius: 8px;
}

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

.post-body li {
  margin-bottom: 8px;
}

.post-body blockquote {
  border-left: 4px solid #FF7548;
  margin: 24px 0;
  padding: 16px 24px;
  background: #FFF8F5;
  border-radius: 0 8px 8px 0;
  color: #333;
}

.post-body blockquote p {
  margin-bottom: 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.post-body th,
.post-body td {
  border: 1px solid #ddd;
  padding: 10px 14px;
  text-align: left;
}

.post-body th {
  background: #f5f5f5;
  font-weight: 700;
}

.post-body a {
  color: #FF7548;
  text-decoration: underline;
}

.post-body a:hover {
  color: #e05e30;
}

.table-responsive {
  overflow-x: auto;
  max-width: 100%;
}

/* ---- Tags ---- */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.post-tag {
  font-family: 'Lexend', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 14px;
  border-radius: 20px;
  background: #f5f5f5;
  color: #555;
}

.post-tag:hover {
  background: #FF7548;
  color: #fff;
}

/* ---- Related posts ---- */
.related-posts {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #eee;
}

.related-posts h3 {
  font-family: 'Lexend', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.related-card {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  color: #1E1818;
  transition: box-shadow 0.2s;
}

.related-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

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

.related-card h4 {
  font-family: 'Lexend', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 14px 4px;
  line-height: 1.35;
}

.related-card__date {
  display: block;
  padding: 0 14px 12px;
  font-size: 0.8rem;
  color: #888;
}

/* ============================================================
   Footer
   ============================================================ */
.blog-footer {
  background: #1E1818;
  color: #ccc;
  padding: 56px 24px 32px;
}

.blog-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.blog-footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #333;
}

.blog-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-footer__brand img {
  height: auto;
  width: 180px;
  filter: brightness(0) invert(1);
}

.blog-footer__social {
  display: flex;
  gap: 16px;
}

.blog-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #555;
  color: #ccc;
  transition: border-color 0.2s, color 0.2s;
}

.blog-footer__social a:hover {
  border-color: #FF7548;
  color: #FF7548;
}

.blog-footer__social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.blog-footer__column h4 {
  font-family: 'Lexend', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-footer__column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-footer__column ul li a {
  color: #aaa;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.blog-footer__column ul li a:hover {
  color: #FF7548;
}

.blog-footer__support-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #aaa;
  font-size: 0.875rem;
}

.blog-footer__support-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: #aaa;
}

.blog-footer__bottom {
  padding-top: 24px;
  text-align: center;
}

.blog-footer__bottom p {
  font-size: 0.8rem;
  color: #777;
}

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

@media (max-width: 500px) {
  .blog-footer__top {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }
  .blog-footer__brand {
    align-items: center;
  }
  .blog-footer__social {
    justify-content: center;
  }
  .blog-footer__column ul {
    align-items: center;
  }
  .blog-footer__support-item {
    justify-content: center;
  }
}
