/* =============================================
   BLOG — Shared Styles (listing + posts)
   Franchising Factory
   ============================================= */

/* ---------- Blog Hero ---------- */
.blog-hero {
  background: var(--dark);
  padding: 80px 0 60px;
  text-align: center;
  border-bottom: 3px solid var(--gold);
}
.blog-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 16px;
}
.blog-hero .subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  max-width: 600px;
  margin: 0 auto;
}
.blog-hero .gold-accent {
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 24px auto 0;
  border-radius: 2px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: var(--light-gray);
  padding: 12px 0;
  font-size: .85rem;
  color: var(--gray);
}
.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--gold);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--gray); }

/* ---------- Blog Grid ---------- */
.blog-section {
  padding: 48px 0 64px;
  background: #fafafa;
}
.blog-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ---------- Blog Card ---------- */
.blog-card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
}
.blog-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* Image container — fixed height, cropped */
.blog-card-image {
  position: relative;
  overflow: hidden;
  height: 150px;
  flex-shrink: 0;
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.blog-card:hover .blog-card-image img {
  transform: scale(1.04);
}

/* Category badge — overlaid bottom-left of image */
.blog-card-category {
  position: absolute;
  bottom: 8px;
  left: 10px;
  background: var(--gold);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 9px;
  border-radius: 20px;
}

/* Card body */
.blog-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-date {
  font-size: .72rem;
  color: #999;
  margin-bottom: 6px;
}
.blog-card-title {
  font-family: 'Playfair Display', serif;
  font-size: .95rem;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.blog-card:hover .blog-card-title { color: var(--gold); }
.blog-card-excerpt {
  display: none; /* hidden to keep cards compact */
}
.blog-card-cta {
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: 8px;
}

/* Legacy class compat */
.blog-card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.blog-card-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 8px;
  align-self: flex-start;
}

/* ---------- Post Hero (split layout) ---------- */
.post-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 360px;
}
.post-hero-content {
  background: var(--dark);
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-hero-img-wrap {
  position: relative;
  overflow: hidden;
  height: 100%;
}
.post-hero-img-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  padding: 32px 20px 16px;
  font-family: 'Playfair Display', serif;
  font-size: .95rem;
  color: #fff;
  line-height: 1.4;
  font-weight: 600;
}
.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.post-tag {
  background: var(--gold);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 12px;
  border-radius: 20px;
}
.post-meta-date,
.post-meta-read {
  font-size: .85rem;
  color: rgba(255,255,255,.55);
}
.post-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 24px;
}
.post-hero-intro {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  line-height: 1.8;
}
.post-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Post Body ---------- */
.post-body {
  max-width: 740px;
  margin: 0 auto;
  padding: 60px 24px 40px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
}
.post-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--dark);
  margin: 48px 0 16px;
  padding-left: 16px;
  border-left: 4px solid var(--gold);
  line-height: 1.3;
}
.post-body p {
  margin-bottom: 22px;
}
.post-body strong { color: var(--dark); }
.post-body ul, .post-body ol {
  padding-left: 24px;
  margin-bottom: 22px;
}
.post-body li { margin-bottom: 8px; }

/* ---------- Post CTA ---------- */
.post-cta {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 64px 24px;
  margin-top: 0;
}
.post-cta h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--white);
}
.post-cta p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.btn-outline-white {
  border: 2px solid var(--white);
  color: var(--white);
  background: transparent;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s;
  display: inline-block;
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--dark);
}
.btn-lg {
  padding: 14px 36px;
  font-size: 1.05rem;
}

/* ---------- Back Link ---------- */
.post-back {
  max-width: 740px;
  margin: 0 auto;
  padding: 32px 24px 0;
}
.post-back a {
  color: var(--gold);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .2s;
}
.post-back a:hover { gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 700px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}
@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .post-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto 280px;
  }
  .post-hero-content {
    padding: 40px 24px;
    order: 1;
  }
  .post-hero img {
    order: 0;
  }
  .blog-hero { padding: 60px 24px 40px; }
  .post-cta { padding: 48px 24px; }
  .post-cta h2 { font-size: 1.4rem; }
  .btn-outline-white, .btn-lg { display: block; margin: 10px auto 0 !important; width: fit-content; }
}

/* Related Posts Section */
.post-related {
  background: #f5f5f5;
  padding: 48px 0;
  margin-bottom: 0;
}

.post-related h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #1a1a1a;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid #c9a84c;
}

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

.post-related-card {
  display: block;
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  text-decoration: none;
  color: #1a1a1a;
  border: 1px solid #e5e5e5;
  transition: box-shadow 0.2s;
}

.post-related-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-related-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #c9a84c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}

.post-related-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .post-related-grid {
    grid-template-columns: 1fr;
  }
  
  .post-related {
    padding: 32px 0;
  }
}
