/**
 * Blog Archive / Category / Single Post & Blog Block Styles
 *
 * Loaded on the blog index, category/tag/date archives, single posts, and
 * any page using the mediaspot/blog block (see inc/enqueue.php).
 *
 * @package Mediaspot
 */

/* ==========================================================================
   1. Ambient Light Stripes (same drifting-stripe system as the homepage hero)
   ========================================================================== */
.blog-page .stripe {
  position: absolute;
  left: 0;
  width: 1400px;
  border-radius: 999px;
  transform-origin: left center;
  will-change: transform;
  animation: blog-stripe-drift 28s linear infinite;
  pointer-events: none;
}
@keyframes blog-stripe-drift {
  from { transform: translateX(-1200px) rotate(-22deg); }
  to   { transform: translateX(2600px) rotate(-22deg); }
}
.blog-page .s1 { top: 12%; height: 28px; filter: blur(20px); opacity: .25; animation-delay: -2s;  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, var(--brand-yellow) 40%, var(--brand-yellow) 60%, rgba(255,255,255,0) 100%); }
.blog-page .s2 { top: 34%; height: 6px;  filter: blur(4px);  opacity: .38; animation-delay: -11s; background: linear-gradient(90deg, rgba(255,255,255,0) 0%, var(--brand-teal) 40%, var(--brand-teal) 60%, rgba(255,255,255,0) 100%); }
.blog-page .s3 { top: 64%; height: 32px; filter: blur(22px); opacity: .2;  animation-delay: -17s; background: linear-gradient(90deg, rgba(255,255,255,0) 0%, var(--brand-blue) 40%, var(--brand-blue) 60%, rgba(255,255,255,0) 100%); }
.blog-page .s4 { top: 84%; height: 8px;  filter: blur(5px);  opacity: .3;  animation-delay: -6s;  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, var(--brand-red) 40%, var(--brand-red) 60%, rgba(255,255,255,0) 100%); }

@media (prefers-reduced-motion: reduce) {
  .blog-page .stripe { animation: none; }
}

/* ==========================================================================
   2. Blog Hero (archive header)
   ========================================================================== */
.blog-hero {
  position: relative;
  overflow: hidden;
}
.blog-hero__glow-a {
  position: absolute; top: -10rem; right: 20%; height: 24rem; width: 24rem;
  border-radius: 9999px; background: color-mix(in srgb, var(--brand-teal) 10%, transparent);
  filter: blur(64px); pointer-events: none;
}
.blog-hero__glow-b {
  position: absolute; top: 30%; left: -5rem; height: 20rem; width: 20rem;
  border-radius: 9999px; background: color-mix(in srgb, var(--brand-yellow) 10%, transparent);
  filter: blur(64px); pointer-events: none;
}

/* ==========================================================================
   3. Blog Card (shared by grid + carousel)
   ========================================================================== */
.blog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}
.blog-card:hover,
.blog-card:focus-within {
  box-shadow: 0 22px 40px -16px rgba(15, 23, 42, 0.18);
  transform: translateY(-4px);
  border-color: #cbd5e1;
}
.blog-card__frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(27,191,166,0.12), rgba(245,178,26,0.12));
}
.blog-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.blog-card:hover .blog-card__img,
.blog-card:focus-within .blog-card__img {
  transform: scale(1.06);
}
.blog-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.blog-card__badge {
  position: absolute;
  top: 0.875rem;
  left: 0.875rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.375rem 1.5rem;
}
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.blog-card__title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}
.blog-card__title a {
  text-decoration: none;
  color: inherit;
  background-image: linear-gradient(var(--brand-teal), var(--brand-teal));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease, color 0.3s ease;
  padding-bottom: 2px;
}
.blog-card__title a:hover {
  background-size: 100% 2px;
}
.blog-card__excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #334155;
}
.blog-card__avatar { border-radius: 9999px; }
.blog-card__readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: auto;
  padding-top: 0.9375rem;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #115e59;
  text-decoration: none;
}
.blog-card__readmore svg { width: 0.875rem; height: 0.875rem; transition: transform 0.25s ease; }
.blog-card:hover .blog-card__readmore svg,
.blog-card:focus-within .blog-card__readmore svg { transform: translateX(3px); }

/* ==========================================================================
   4. Blog Carousel (pure CSS scroll-snap — swipes/scrolls with zero JS;
      the two arrow buttons in assets/js/blog.js are a tiny progressive
      enhancement on top, not a requirement for the carousel to function)
   ========================================================================== */
.blog-carousel-wrap {
  position: relative;
}
.blog-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 1px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}
.blog-carousel::-webkit-scrollbar { display: none; }
.blog-carousel > .blog-card {
  scroll-snap-align: start;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .blog-carousel > .blog-card {
    flex: 0 0 55%;
    width: auto;
    max-width: none;
  }
}
@media (min-width: 1024px) {
  .blog-carousel > .blog-card {
    flex: 0 0 31.5%;
  }
}
.blog-carousel__nav {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  z-index: 2;
}
.blog-carousel__nav svg { width: 1.125rem; height: 1.125rem; }
.blog-carousel__nav:hover { transform: translateY(-50%) scale(1.08); box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18); }
.blog-carousel__nav:disabled { opacity: 0.35; pointer-events: none; }
.blog-carousel__nav--prev { left: -0.25rem; }
.blog-carousel__nav--next { right: -0.25rem; }
@media (min-width: 1024px) {
  .blog-carousel__nav--prev { left: -1.375rem; }
  .blog-carousel__nav--next { right: -1.375rem; }
}

/* ==========================================================================
   5. Single Post Layout
   ========================================================================== */
.blog-single__header {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}
.blog-single__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
  margin-top: 1rem;
}
.blog-single__meta-sep { opacity: 0.5; }
.blog-single__author {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.blog-single__avatar { border-radius: 9999px; }
.blog-single__thumb {
  max-width: 64rem;
  margin: 2.5rem auto;
  border-radius: 1.75rem;
  overflow: hidden;
  box-shadow: 0 20px 45px -15px rgba(15, 23, 42, 0.25);
}
.blog-single__thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* Prose typography for the_content() — headings, links, lists, blockquotes */
.entry__content h2 { font-size: 1.5rem; font-weight: 800; color: #0f172a; margin: 2rem 0 0.75rem; line-height: 1.3; }
.entry__content h3 { font-size: 1.25rem; font-weight: 800; color: #0f172a; margin: 1.75rem 0 0.6rem; line-height: 1.35; }
.entry__content h4 { font-size: 1.0625rem; font-weight: 700; color: #0f172a; margin: 1.5rem 0 0.5rem; }
.entry__content p { margin: 0 0 1.25rem; }
.entry__content a { color: var(--brand-teal-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.entry__content a:hover { color: var(--brand-teal); }
.entry__content ul, .entry__content ol { margin: 0 0 1.25rem; padding-left: 1.375rem; }
.entry__content ul { list-style: disc; }
.entry__content ol { list-style: decimal; }
.entry__content li { margin-bottom: 0.4rem; }
.entry__content blockquote {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--brand-teal);
  background: rgba(27, 191, 166, 0.06);
  border-radius: 0 1rem 1rem 0;
  font-style: italic;
  color: #1e293b;
}
.entry__content img { max-width: 100%; height: auto; border-radius: 1rem; margin: 1.5rem 0; }
.entry__content figcaption { font-size: 0.8125rem; color: #64748b; text-align: center; margin-top: -1rem; margin-bottom: 1.5rem; }
.entry__content hr { border: none; border-top: 1px solid #e2e8f0; margin: 2rem 0; }
.entry__content code { background: #f1f5f9; color: #0f172a; padding: 0.15rem 0.4rem; border-radius: 0.375rem; font-size: 0.875em; }
.entry__content pre { background: #0f172a; color: #e2e8f0; padding: 1.25rem; border-radius: 1rem; overflow-x: auto; margin: 1.5rem 0; }
.entry__content pre code { background: none; padding: 0; color: inherit; }
.entry__content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9375rem; }
.entry__content th, .entry__content td { border: 1px solid #e2e8f0; padding: 0.6rem 0.75rem; text-align: left; }
.entry__content th { background: #f8fafc; font-weight: 700; }

.blog-single__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}
.blog-single__tag {
  padding: 0.35rem 0.875rem;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.blog-single__tag:hover { background: var(--brand-teal); color: #fff; }

.blog-single__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
}
.blog-single__nav-link {
  display: block;
  padding: 1.25rem 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.blog-single__nav-link:hover { border-color: var(--brand-teal); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); transform: translateY(-2px); }
.blog-single__nav-link--next { text-align: right; }
.blog-single__nav-eyebrow { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.06em; color: #64748b; margin-bottom: 0.3rem; }
.blog-single__nav-title { font-size: 0.9375rem; font-weight: 700; color: #0f172a; line-height: 1.4; }

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

/* ==========================================================================
   6. Archive Pagination (the_posts_pagination() default WordPress markup —
      not nested under .blog-page since it renders inside the grid section,
      a sibling of the stripes hero, not a descendant of it)
   ========================================================================== */
.pagination.navigation {
  margin-top: 3.5rem;
}
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.pagination .page-numbers:hover {
  border-color: #115e59;
  color: #115e59;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}
.pagination .page-numbers.current {
  background: #115e59;
  border-color: #115e59;
  color: #fff;
}
.pagination .page-numbers.dots {
  border: none;
  background: none;
  box-shadow: none;
}
.pagination .page-numbers.prev,
.pagination .page-numbers.next {
  padding: 0 1.25rem;
}
