/* ============================================================
   KitchUp — Blog Styles
   ============================================================ */

/* ----- Blog Page Layout ----- */

.blog-page {
  min-height: 100vh;
}

/* ----- Blog Header ----- */

.blog-header {
  text-align: center;
  padding: 2rem 0 3rem;
  max-width: 40rem;
  margin: 0 auto;
}

.blog-header h1 {
  margin-bottom: 0.75rem;
  font-size: 1.875rem;
  font-weight: 600;
}

.blog-header p {
  font-size: 1.0625rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* ----- Blog Hero ----- */

.blog-hero {
  position: relative;
  text-align: center;
  padding: 3.5rem 0 6rem;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #f7f8fc 0%, #eef1f8 100%);
  overflow: hidden;
}

.blog-hero .container {
  max-width: 48rem;
  position: relative;
  z-index: 1;
}

.blog-hero-title {
  display: inline-block;
  width: fit-content;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  background-image: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.blog-hero-subtitle {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  max-width: 36rem;
  margin: 0 auto;
}

.blog-hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 60px;
  display: block;
  fill: var(--background, #ffffff);
}

@media (min-width: 768px) {
  .blog-hero {
    padding: 5rem 0 7rem;
  }
  .blog-hero-subtitle {
    font-size: 1.0625rem;
  }
}

@media (max-width: 767px) {
  .blog-hero {
    padding: 2.25rem 0 3.5rem;
    margin-bottom: 0.5rem;
  }
  .blog-hero-wave {
    height: 36px;
  }
  .blog-hero-subtitle {
    font-size: 0.9375rem;
    padding: 0 0.5rem;
  }
  .blog-section {
    padding: 1.25rem 0;
  }
  .blog-section-header {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  .blog-page .blog-grid {
    gap: 1.5rem;
  }
}

/* ----- Blog Section ----- */

.blog-section {
  padding: 2rem 0;
}

.blog-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.blog-section-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.blog-section-header a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.blog-section-header a:hover {
  gap: 0.5rem;
}

/* ----- Blog Grid ----- */

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

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

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

/* ----- Blog Card enhancements (blog page specifics) ----- */

.blog-page .blog-card {
  height: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
  transition: transform 0.25s ease;
}

.blog-page .blog-card:hover {
  box-shadow: none;
  transform: translateY(-2px);
}

.blog-page .blog-card-image {
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: var(--muted);
}

.blog-page .blog-card-body {
  padding: 1rem 0 0;
}

.blog-page .blog-card-meta {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.blog-page .blog-card-meta .category-badge {
  display: none;
}

.blog-page .blog-card-meta time {
  display: inline;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  font-weight: 400;
}

.blog-page .blog-card-body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.blog-page .blog-card-body p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted-foreground);
  margin-bottom: 0;
}

.blog-page .blog-card .read-more {
  display: none;
}

@media (min-width: 1024px) {
  .blog-page .blog-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================================
   Article Page
   ============================================================ */

.article-page {
  padding-top: 2rem;
  min-height: 100vh;
}

/* ----- Article Header ----- */

.article-header {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 0;
  text-align: center;
}

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

.article-header h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

@media (min-width: 768px) {
  .article-header h1 {
    font-size: 2.5rem;
  }
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.article-meta .meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--border);
}

/* ----- Article Featured Image ----- */

.article-featured-image {
  max-width: 48rem;
  margin: 0 auto 2rem;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--muted);
}

.article-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----- Article Content ----- */

.article-content {
  max-width: 48rem;
  margin: 0 auto;
  padding-bottom: 3rem;
}

/* ----- Article Tags ----- */

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  max-width: 48rem;
  margin: 0 auto;
}

.article-tags .tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background-color: var(--muted);
  border-radius: 9999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.article-tags .tag:hover {
  color: var(--primary);
  background-color: rgba(212, 54, 27, 0.08);
}

/* ----- Related Posts ----- */

.related-posts {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--border);
}

.related-posts h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

/* Soften globally bold elements inside blog pages (main.css defaults
   h1/h2 to 800/700 — too heavy for the blog). */
.blog-page h1,
.blog-page h2,
.blog-page h3,
.blog-page h4,
.blog-page h5,
.blog-page h6 {
  font-weight: 600;
}

.blog-page strong,
.blog-page b {
  font-weight: 600;
}

.blog-page .blog-card-body h3,
.blog-page .read-more,
.blog-page .category-badge,
.blog-page .view-all-link {
  font-weight: 500;
}

/* ----- Blog Post Page Layout (matches photo) ----- */

.blog-post-page {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.blog-post {
  max-width: 720px;
  margin: 0 auto;
}

.blog-post-header {
  text-align: center;
  padding: 1.5rem 0 1.75rem;
}

.blog-post-header h1 {
  font-size: clamp(1.625rem, 3.6vw, 2.125rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  color: var(--foreground);
}

.blog-post-header .blog-post-excerpt {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  max-width: 36rem;
  margin: 0 auto;
  font-weight: 400;
}

.blog-post-featured {
  margin: 0 0 1.75rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: var(--muted);
  aspect-ratio: 16 / 10;
}

.blog-post-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
}

@media (max-width: 767px) {
  .blog-post-featured {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
    aspect-ratio: 16 / 11;
  }
}

.blog-post-content {
  padding-top: 0.5rem;
}

.blog-post-content video {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 1.5rem auto;
  border-radius: 0.75rem;
  background-color: #000;
  overflow: hidden;
}

@media (max-width: 767px) {
  .blog-post-content video {
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
  }

  .blog-post-content video::-webkit-media-controls,
  .blog-post-content video::-webkit-media-controls-enclosure,
  .blog-post-content video::-webkit-media-controls-panel,
  .blog-post-content video::-webkit-media-controls-play-button,
  .blog-post-content video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
  }
}

@media (max-width: 639px) {
  .blog-post-content video {
    width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
    margin-left: calc(50% - 50vw + 1rem);
    margin-right: calc(50% - 50vw + 1rem);
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  .blog-post-content video {
    width: calc(100vw - 3rem) !important;
    max-width: calc(100vw - 3rem) !important;
    margin-left: calc(50% - 50vw + 1.5rem);
    margin-right: calc(50% - 50vw + 1.5rem);
  }
}

.blog-post-content.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}

.blog-post-content.prose h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.625rem;
}

.blog-post-content.prose p,
.blog-post-content.prose li {
  font-size: 0.9375rem;
  line-height: 1.7;
}

.blog-post-content.prose ul,
.blog-post-content.prose ol {
  padding-left: 1.25rem;
}

.blog-post-content.prose a {
  color: var(--primary);
  text-decoration: none;
}

.blog-post-content.prose a:hover {
  text-decoration: underline;
}

/* Tags footer kept compact */
.blog-post .blog-post-tags {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ----- Legacy header rules (kept harmless for other pages) ----- */

.blog-post .blog-post-header h1 {
  font-weight: 700;
}

.blog-post .blog-post-excerpt {
  font-weight: 400;
}

.blog-post .prose,
.blog-post .prose p,
.blog-post .prose li {
  font-weight: 400;
}

.blog-post .prose h1,
.blog-post .prose h2 {
  font-weight: 600;
}

.blog-post .prose h3,
.blog-post .prose h4,
.blog-post .prose h5,
.blog-post .prose h6 {
  font-weight: 600;
}

.blog-post .prose strong,
.blog-post .prose b {
  font-weight: 600;
}

.blog-post .prose th {
  font-weight: 600;
}

.related-posts .blog-grid {
  grid-template-columns: 1fr;
}

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

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

/* ----- Blog Empty State ----- */

.blog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  min-height: 40vh;
}

.blog-empty .empty-icon {
  width: 4rem;
  height: 4rem;
  color: var(--muted-foreground);
  margin-bottom: 1.25rem;
  opacity: 0.5;
}

.blog-empty h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.blog-empty p {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  max-width: 24rem;
}
