/* ——— CossyVita Blog ——— */

.blog-hero {
  padding: 3.5rem 0 1.25rem;
  max-width: 46rem;
}

.blog-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3.3rem);
  font-weight: 520;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.blog-hero p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.blog-notfound {
  padding-bottom: 5rem;
}

/* Category chips */
.blog-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 0 1.5rem;
  scrollbar-width: none;
}

.blog-chips::-webkit-scrollbar {
  display: none;
}

.blog-chip {
  flex: 0 0 auto;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.blog-chip:hover {
  border-color: var(--lavender);
  color: var(--accent);
}

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

/* Badges */
.post-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

/* Featured */
.blog-list {
  padding-bottom: 1rem;
}

.blog-featured {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 0;
  margin-bottom: 2rem;
  border-radius: 28px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -36px rgba(48, 42, 56, 0.35);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.blog-featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 70px -36px rgba(48, 42, 56, 0.45);
  color: var(--ink);
}

.blog-featured-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--canvas-2);
}

.blog-featured-media img,
.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

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

.blog-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
  padding: 2.4rem 2.2rem;
}

.blog-featured-body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  font-weight: 520;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

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

.blog-readmore {
  font-weight: 600;
  color: var(--accent);
}

/* Grid + cards */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 50px -34px rgba(48, 42, 56, 0.45);
  color: var(--ink);
}

.blog-card-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--canvas-2);
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem 1.3rem 1.4rem;
  flex: 1;
}

.blog-card-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 520;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.blog-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--faint);
}

.blog-empty {
  padding: 3rem 2rem;
  border-radius: 24px;
  border: 1px dashed var(--line-strong);
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
}

.blog-empty h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 520;
}

.blog-empty p {
  margin: 0 auto 1.2rem;
  max-width: 32rem;
  color: var(--muted);
}

/* Pager */
.blog-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 2.5rem 0 0;
  font-weight: 600;
}

.blog-pager a,
.blog-pager span.is-disabled {
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  background: var(--white);
}

.blog-pager span.is-disabled {
  color: var(--faint);
  opacity: 0.6;
}

.blog-pager-info {
  color: var(--muted);
  font-weight: 500;
}

/* ——— Article ——— */
.post {
  padding-top: 1.5rem;
}

.post-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--faint);
}

.post-crumbs a {
  color: var(--muted);
  text-decoration: none;
}

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

.post-head {
  max-width: 50rem;
  padding: 1.75rem 0 1.5rem;
}

.post-head h1 {
  margin: 0.9rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 520;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.post-lead {
  margin: 1rem 0 0;
  font-size: 1.15rem;
  color: var(--muted);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.1rem;
  margin-top: 1.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.post-meta > * + *::before {
  content: "·";
  margin-right: 1.1rem;
  color: var(--faint);
}

.post-author {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--ink);
}

.post-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  object-fit: contain;
}

.post-cover {
  margin: 0 0 2.5rem;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 16 / 8;
  background: var(--canvas-2);
  box-shadow: 0 30px 70px -45px rgba(48, 42, 56, 0.5);
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.post-main {
  max-width: 46rem;
}

.post-takeaways {
  margin: 0 0 2rem;
  padding: 1.4rem 1.6rem;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent-soft), #fff7e6);
  border: 1px solid #ece2f7;
}

.post-takeaways h2 {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.post-takeaways ul {
  margin: 0;
  padding-left: 1.2rem;
}

.post-takeaways li + li {
  margin-top: 0.35rem;
}

/* Prose */
.prose {
  font-size: 1.075rem;
  line-height: 1.8;
  color: #3a3342;
}

.prose h2 {
  margin: 2.6rem 0 0.8rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 1.8rem);
  font-weight: 520;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

.prose h3 {
  margin: 1.9rem 0 0.5rem;
  font-size: 1.18rem;
  font-weight: 650;
  color: var(--ink);
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

.prose p {
  margin: 0 0 1.15rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose li::marker {
  color: var(--lavender);
}

.prose strong {
  color: var(--ink);
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.3rem;
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 14px 14px 0;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--canvas-2);
  font-weight: 650;
  color: var(--ink);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

/* FAQ */
.post-faq {
  margin-top: 2.8rem;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

.post-faq h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 520;
}

.post-faq details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  padding: 0 1.2rem;
}

.post-faq details + details {
  margin-top: 0.7rem;
}

.post-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2rem 1rem 0;
  font-weight: 600;
  position: relative;
}

.post-faq summary::-webkit-details-marker {
  display: none;
}

.post-faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--accent);
  transition: transform 0.25s var(--ease);
}

.post-faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.post-faq details p {
  margin: 0 0 1.1rem;
  color: var(--muted);
}

/* CTA */
.post-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 2.8rem 0 0;
  padding: 1.6rem 1.8rem;
  border-radius: 24px;
  background: linear-gradient(125deg, var(--accent-deep) 0%, var(--accent) 55%, #6b4f88 100%);
  color: #f7f4f1;
}

.post-cta strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 520;
}

.post-cta p {
  margin: 0.4rem 0 0;
  color: rgba(247, 244, 241, 0.82);
  font-size: 0.95rem;
}

.post-cta .btn {
  flex: 0 0 auto;
}

.post-disclaimer {
  margin: 2rem 0 0;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: var(--canvas-2);
  font-size: 0.85rem;
  color: var(--muted);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.post-tags li {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.post-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.post-share span {
  font-weight: 600;
  margin-right: 0.3rem;
}

.post-share a {
  --brand: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--brand);
  background: var(--white);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.post-share a.share-whatsapp { --brand: #25d366; }
.post-share a.share-x { --brand: #000000; }
.post-share a.share-facebook { --brand: #0866ff; }
.post-share a.share-linkedin { --brand: #0a66c2; }

.post-share a:hover,
.post-share a:focus-visible {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
  transform: translateY(-1px);
}

.post-share a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Aside */
.post-aside {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-toc {
  padding: 1.3rem 1.3rem 1.1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
}

.post-toc strong {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.post-toc ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}

.post-toc li + li {
  margin-top: 0.45rem;
}

.post-toc a {
  color: var(--muted);
  text-decoration: none;
}

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

.post-aside-cta {
  padding: 1.4rem;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -32px rgba(48, 42, 56, 0.45);
}

.post-aside-cta img {
  width: 44px;
  height: 44px;
  margin-bottom: 0.7rem;
}

.post-aside-cta strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 520;
}

.post-aside-cta p {
  margin: 0.45rem 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.post-aside-cta .btn {
  width: 100%;
}

/* Related */
.blog-related {
  padding: 4rem 0 1rem;
}

.blog-related h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  font-weight: 520;
  letter-spacing: -0.02em;
}

/* Responsive */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .post-aside {
    position: static;
    order: -1;
  }

  .post-aside-cta {
    display: none;
  }
}

@media (max-width: 760px) {
  .blog-hero {
    padding-top: 2.25rem;
  }

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

  .blog-featured-body {
    padding: 1.5rem 1.4rem 1.7rem;
  }

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

  .post-cover {
    border-radius: 20px;
    aspect-ratio: 3 / 2;
    margin-bottom: 1.75rem;
  }

  .post-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .prose {
    font-size: 1.02rem;
  }
}
