/* /assets/css/blog-post.css
   Reusable Toolsyte single-post template system. */

main.blog-post-layout {
  width: min(1180px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(280px, 340px);
  gap: clamp(24px, 4vw, 40px);
  align-items: start;
  margin: 0 auto;
  padding: clamp(34px, 5vw, 64px) 0 clamp(50px, 7vw, 86px);
  color: var(--text, #0f172a);
}

main.blog-post-layout > article.blog-article,
main.blog-post-layout > aside.blog-sidebar {
  min-width: 0;
}

.blog-article {
  font-size: 1.04rem;
  line-height: 1.82;
}

.blog-hero {
  margin-bottom: 32px;
}

.blog-kicker-row,
.blog-meta,
.update-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.blog-chip,
.blog-read-time,
.blog-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 850;
}

.blog-chip {
  background: #eef5ff;
  color: var(--accent, #2563eb);
}

.blog-read-time,
.blog-meta span {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid rgba(15, 23, 42, 0.07);
}

.blog-hero h1,
.blog-article h1 {
  max-width: 820px;
  margin: 16px 0 14px;
  color: var(--text, #0f172a);
  font-size: clamp(2.15rem, 4.4vw, 3.55rem);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: 0;
}

.blog-meta {
  margin: 0 0 20px;
}

.blog-image {
  overflow: hidden;
  margin: 26px 0 0;
  padding: 6px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.1), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.blog-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.blog-article h2 {
  margin: 50px 0 16px;
  color: var(--text, #0f172a);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.18;
  font-weight: 900;
}

.blog-article h3 {
  margin: 28px 0 10px;
  color: var(--text, #0f172a);
  font-size: 1.18rem;
  line-height: 1.28;
  font-weight: 850;
}

.blog-article p {
  margin: 0 0 1.28em;
  color: #334155;
}

.blog-article strong {
  color: #0f172a;
}

.blog-article a {
  color: var(--accent, #2563eb);
  font-weight: 750;
  text-decoration: none;
}

.blog-article a:hover {
  text-decoration: underline;
}

.blog-article .btn,
.blog-article .btn:hover,
.blog-article .blog-related-card,
.blog-article .blog-related-card:hover {
  text-decoration: none;
}

.blog-article .btn-primary {
  color: #ffffff;
}

.blog-article .btn-secondary {
  color: #0f172a;
}

.blog-article ul,
.blog-article ol {
  display: grid;
  gap: 8px;
  margin: 0 0 1.45em;
  padding-left: 1.35em;
  color: #334155;
}

.blog-article li::marker {
  color: var(--accent, #2563eb);
  font-weight: 900;
}

.blog-summary-box,
.blog-callout,
.blog-cta,
.blog-related,
.blog-faq {
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.blog-summary-box {
  position: relative;
  overflow: hidden;
  margin: 32px 0 36px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.055), rgba(255, 255, 255, 0) 48%),
    #ffffff;
}

.blog-summary-box::before,
.blog-cta::before,
.blog-related::before,
.blog-faq::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent, #2563eb);
  opacity: 0.68;
}

.blog-summary-box h2,
.blog-related h2,
.blog-faq h2,
.blog-cta h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 1.16rem;
  line-height: 1.25;
  font-weight: 900;
}

.blog-summary-box ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-bottom: 0;
  padding-left: 1.2em;
}

.blog-callout {
  position: relative;
  margin: 34px 0;
  padding: 19px 20px 19px 58px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(255, 255, 255, 0) 46%),
    #ffffff;
}

.blog-callout::before {
  position: absolute;
  top: 18px;
  left: 18px;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #eef5ff;
  color: var(--accent, #2563eb);
  font-size: 0.86rem;
  font-weight: 900;
}

.blog-callout.tip::before { content: "i"; }
.blog-callout.privacy::before { content: "P"; background: #ecfdf5; color: #047857; }
.blog-callout.important::before { content: "!"; background: #fff7ed; color: #b45309; }

.blog-callout h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 900;
}

.blog-callout p {
  margin: 0;
  color: #475569;
}

.blog-sidebar {
  position: sticky;
  top: calc(var(--nav-height, 64px) + 22px);
  display: grid;
  gap: 18px;
}

.sidebar-card,
.featured-tool-card {
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
  padding: 20px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.sidebar-card:hover,
.featured-tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.085);
}

.featured-tool-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.045), rgba(255, 255, 255, 0) 48%),
    #ffffff;
}

.featured-tool-card .icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eef5ff;
  color: var(--accent, #2563eb);
  font-size: 0.84rem;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.08);
}

.featured-tool-card .meta,
.sidebar-eyebrow {
  margin: 0 0 6px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.featured-tool-card h4,
.sidebar-card h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 1.04rem;
  line-height: 1.25;
  font-weight: 900;
}

.featured-tool-card p,
.sidebar-card p,
.sidebar-list {
  margin: 0;
  color: #475569;
  font-size: 0.94rem;
  line-height: 1.62;
}

.ft-actions,
.sidebar-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.ft-actions .btn,
.sidebar-actions .btn {
  width: 100%;
}

.sidebar-list {
  display: grid;
  gap: 9px;
  padding: 0;
  list-style: none;
}

.sidebar-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sidebar-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, var(--accent, #2563eb), #1d4ed8);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.blog-cta {
  position: relative;
  overflow: hidden;
  margin: 50px 0 34px;
  padding: clamp(22px, 4vw, 30px);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.065), rgba(15, 159, 110, 0.045)),
    #ffffff;
}

.blog-cta p {
  max-width: 620px;
}

.blog-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.blog-cta-actions .btn {
  width: auto;
  min-height: 40px;
  padding: 10px 15px;
}

.blog-related,
.blog-faq {
  position: relative;
  overflow: hidden;
  margin: 34px 0;
  padding: clamp(20px, 3vw, 26px);
}

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

.blog-related-card {
  min-height: 144px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.035), rgba(255, 255, 255, 0) 50%),
    #f8fafc;
  transition: transform 170ms ease, border-color 170ms ease, background-color 170ms ease, box-shadow 170ms ease;
}

.blog-related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.24);
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.075);
}

.blog-related-card span {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
}

.blog-related-card strong {
  display: block;
  color: #0f172a;
  line-height: 1.25;
  font-size: 1.02rem;
}

.blog-related-card em {
  margin-top: auto;
  color: var(--accent, #2563eb);
  font-style: normal;
  font-size: 0.88rem;
  font-weight: 850;
}

.blog-faq details {
  border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.blog-faq details:first-of-type {
  border-top: 0;
}

.blog-faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 0;
  color: #0f172a;
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

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

.blog-faq summary::after {
  content: "+";
  color: var(--accent, #2563eb);
  font-weight: 900;
  transition: transform 180ms ease;
}

.blog-faq details[open] summary::after {
  content: "-";
  transform: rotate(180deg);
}

.blog-faq details > div {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 200ms ease, opacity 180ms ease, padding 200ms ease;
  padding: 0;
}

.blog-faq details[open] > div {
  grid-template-rows: 1fr;
  opacity: 1;
  padding: 0 0 18px;
}

.blog-faq details > div > * {
  overflow: hidden;
}

.blog-faq details > div p {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  main.blog-post-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  main.blog-post-layout {
    width: min(100% - 32px, 1180px);
    padding-top: 30px;
  }

  .blog-summary-box ul,
  .blog-related-grid,
  .blog-sidebar {
    grid-template-columns: 1fr;
  }

  .blog-article {
    font-size: 1rem;
  }

  .blog-kicker-row,
  .blog-meta {
    align-items: flex-start;
  }

  .blog-callout {
    padding-left: 18px;
  }

  .blog-callout::before {
    position: static;
    margin-bottom: 10px;
  }

  .blog-cta-actions {
    flex-direction: column;
  }
}
