/* =========================================================
   1. RESET & BASE
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: #ffffff;
  color: #181d27;
  line-height: 1.5;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  border: none;
  outline: none;
  cursor: pointer;
}

a {
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

/* =========================================================
   2. ROOT VARIABLES
========================================================= */

:root {
  --color-text-primary: #181d27;
  --color-text-secondary: #414651;
  --color-text-tertiary: #535862;
  --color-text-quaternary: #717680;
  --color-text-white: #ffffff;

  --color-primary: #750ef7;
  --color-primary-hover: #5c0bc4;

  --color-border-primary: #d5d7da;
  --color-border-secondary: #e9eaeb;

  --color-bg-primary: #ffffff;
  --color-bg-secondary: #fafafa;

  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --transition-fast: 150ms ease;
}

/* =========================================================
   3. WORDPRESS RESET
========================================================= */

.cs-entry__wrap,
.cs-entry__container,
.cs-entry__content-wrap,
.entry-content,
.cs-content-area {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.blog-article *,
.article-body * {
  box-sizing: border-box;
}

/* =========================================================
   4. MAIN LAYOUT
========================================================= */

.blog-section {
  width: 100%;
  padding: 28px 0;
}

.blog-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.blog-content {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 64px;
}

.blog-article {
  width: 100%;
  max-width: 720px;
}

/* =========================================================
   5. HEADER
========================================================= */

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

/* Breadcrumbs */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.breadcrumb-link {
  font-size: 13px;
  font-weight: 600;
  color: #717680 !important;
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: #750ef7 !important;
}

.breadcrumb-current {
  color: #750ef7 !important;
}

/* Title */

.blog-title {
  font-size: 42px;
  line-height: 1.2;
  font-weight: 700;
  color: #181d27;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  text-align: center;
}

/* Hero Image */

.blog-hero {
  width: 100%;
}

.blog-hero-image {
  width: 100%;
  border-radius: 16px;
}

/* =========================================================
   6. TOOLBAR
========================================================= */

.post-toolbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 0;
  /* border-top: 1px solid #e9eaeb; */
  /* border-bottom: 1px solid #e9eaeb; */
  margin-bottom: 32px;
}
/* Like / Dislike split button group */
.btn-group {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-bg-primary);
  box-shadow: 0 1px 2px rgba(10, 12, 18, 0.05);
}
.btn-group-item {
  min-height: 36px;
  padding: var(--space-8) var(--space-16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: transparent;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
}
.btn-group-item + .btn-group-item {
  border-left: 1px solid var(--color-border-primary);
}
.btn-group-item:hover {
  background-color: var(--color-bg-hover);
  color: var(--color-text-primary);
}
.btn-group-item.like-button:hover,
.btn-group-item.dislike-button.btn-group-item:hover {
  color: var(--color-primary);
}
.btn-group-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-fg-quaternary);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}
.btn-group-item:hover svg {
  color: var(--color-text-secondary);
}
.btn-group-item.like-button:hover svg,
.btn-group-item.dislike-button:hover svg {
  color: var(--color-primary);
}
.btn-group-item.is-active {
  color: var(--color-primary);
}
.btn-group-item.is-active svg {
  color: var(--color-primary);
}

.post-toolbar-socials,
.post-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
/* ============== 5. DOWNLOAD BUTTON (in-section image downloads) ============== */
.download-btn-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: var(--space-8) 0;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-24);
  background-color: var(--color-primary);
  color: var(--color-text-white);
  font-family: var(--font-family-base);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  margin: 5px 0;
}
.download-btn:hover:not(:disabled) {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.download-btn:active:not(:disabled) {
  transform: translateY(0);
}
.download-btn:disabled {
  cursor: wait;
  opacity: 0.9;
}

/* Default state: show the download icon before the label */
.download-btn .btn-primary-label::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: var(--space-8);
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M16.6667 12.5V14.1667C16.6667 15.0871 15.9205 15.8333 15 15.8333H5C4.07953 15.8333 3.33334 15.0871 3.33334 14.1667V12.5M6.66667 8.33333L10 11.6667M10 11.6667L13.3333 8.33333M10 11.6667V4.16667' stroke='white' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
/* Loading state: hide label/icon, show spinner */
.btn-free-download.is-loading .btn-primary-label,
.download-btn.is-loading .btn-primary-label {
  display: none;
}
.btn-primary.is-loading .btn-spinner,
.download-btn.is-loading .btn-spinner {
  display: block;
}
.download-btn.is-loading::after {
  content: "Preparing…";
  color: var(--color-text-white);
  font-size: 15px;
  font-weight: 600;
}
/* Spinner inside button */
.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  flex-shrink: 0;
  display: none;
}
.btn-primary.is-loading .btn-spinner {
  display: block;
}
.btn-primary.is-loading .btn-text-padding {
  display: none;
}
/* Spinner animation */
@keyframes btn-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.social-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid #d5d7da;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #a4a7ae !important;
}

.social-icon-btn:hover {
  border-color: #750ef7 !important;
  color: #5c0bc4 !important;
  background: rgba(117, 14, 247, 0.05) !important;
}

.btn-primary {
  height: 36px;
  padding: 0 18px;
  border-radius: 12px;
  background: #750ef7;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn-free-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn-primary:hover {
  background: #5c0bc4;
}
.liked-post,
.disliked-post {
  color: #750ef7;
}

/* =========================================================
   7. ARTICLE BODY
========================================================= */

.article-body {
  width: 100%;
}

/* Reset Gutenberg spacing */

.article-body > * {
  margin-top: 0;
}

/* Paragraph */

.article-body p {
  font-size: 16px;
  line-height: 1.8;
  color: #535862;
  margin-bottom: 18px;
}

/* Strong */

.article-body strong {
  color: #181d27;
  font-weight: 600;
}

/* Links */

.article-body a {
  color: #750ef7;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.article-body a:hover {
  color: #5c0bc4;
}
a.btn.btn-md.download-btn,
a.btn.btn-md.download-btn,
a.btn.btn-md.download-btn:hover,
a.download-btn,
a.download-btn:hover {
  color: #ffffff;
  text-decoration: none;
}

/* =========================================================
   8. HEADINGS
========================================================= */

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6,
.article-body .wp-block-heading {
  color: #181d27;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.article-body h2,
.article-body .wp-block-heading {
  font-size: 30px;
  margin-top: 38px;
  margin-bottom: 14px;
}

.article-body h3 {
  font-size: 24px;
  margin-top: 30px;
  margin-bottom: 12px;
}

.article-body h4 {
  font-size: 20px;
  margin-top: 24px;
  margin-bottom: 10px;
}

/* =========================================================
   9. LISTS
========================================================= */

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li {
  font-size: 16px;
  line-height: 1.75;
  color: #535862;
  margin-bottom: 6px;
}

.article-body li ul,
.article-body li ol {
  margin-top: 6px;
  margin-bottom: 0;
}

/* =========================================================
   10. IMAGES
========================================================= */

.article-body figure,
.article-body .wp-block-image {
  margin: 24px 0;
}

.article-body img,
.article-body .wp-block-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow:
    0 0 10px #ccc5c51f,
    0 0 20px #ccc5c528;
}

.article-body figcaption {
  font-size: 13px;
  color: #717680;
  text-align: center;
  margin-top: 8px;
}

/* =========================================================
   11. TABLES
========================================================= */

.article-body .wp-block-table {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 16px;
  border: 1px solid #e9eaeb;
}

.article-body table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #ffffff;
}

.article-body table thead th {
  background: #750ef7;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 16px;
  text-align: left;
}

.article-body table td {
  padding: 14px 16px;
  border-top: 1px solid #e9eaeb;
  font-size: 15px;
  line-height: 1.7;
  color: #414651;
}

.article-body table tr:nth-child(even) {
  background: #fafafa;
}

/* =========================================================
   12. FAQ
========================================================= */

.article-body .schema-faq {
  margin-top: 32px;
}

.article-body .schema-faq-section {
  border: 1px solid #e9eaeb;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}

.article-body .schema-faq-question {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: #181d27;
  margin-bottom: 8px;
}

.article-body .schema-faq-answer {
  font-size: 15px;
  line-height: 1.7;
  color: #535862;
}

/* =========================================================
   13. BLOCKQUOTE
========================================================= */

.article-body blockquote {
  border-left: 4px solid #750ef7;
  background: #fafafa;
  padding: 20px;
  border-radius: 16px;
  margin: 24px 0;
}

.article-body blockquote p {
  margin-bottom: 0;
}

/* =========================================================
   14. CODE
========================================================= */

.article-body pre {
  background: #181d27;
  color: #ffffff;
  padding: 20px;
  border-radius: 16px;
  overflow-x: auto;
  margin: 24px 0;
}

.article-body code {
  font-size: 14px;
}

/* =========================================================
   15. SHARE SECTION
========================================================= */

.share-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e9eaeb;
}

/* =========================================================
   16. HR
========================================================= */

.article-body hr {
  border: none;
  height: 1px;
  background: #e9eaeb;
  margin: 32px 0;
}

/* ---------- Card ---------- */
.blog-subscribe-card {
  width: 100%;
  max-width: 350px;
  min-width: 300px;
  height: fit-content;
  padding: 32px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-secondary);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(10, 12.67, 18, 0.05);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  position: sticky;
  top: 60px;
}

/* ---------- Text + email capture wrapper ---------- */
.text-and-email-capture {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}

.heading-and-supporting-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* ---------- Heading ---------- */
.heading {
  margin: 0;
  align-self: stretch;
  font-size: 20px;
  line-height: 30px;
  font-weight: 600;
  word-wrap: break-word;
}

.heading-text {
  color: var(--color-text-primary);
}

.heading-highlight {
  color: var(--color-primary);
}

/* ---------- Supporting text ---------- */
.supporting-text {
  margin: 0;
  align-self: stretch;
  color: var(--color-text-tertiary);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  word-wrap: break-word;
}

/* ---------- Email capture / button area ---------- */
.email-capture {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
/* ---------- Button ---------- */
.email-capture .btn-primary {
  align-self: stretch;
  width: 100%;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--color-text-white);
  background: var(--color-primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  outline: 2px solid #ffffff;
  outline-offset: -2px;
  box-shadow:
    0 1px 2px rgba(10, 12.67, 18, 0.05),
    0 -2px 0 rgba(10, 12.67, 18, 0.05) inset,
    0 0 0 1px rgba(10, 12.67, 18, 0.18) inset;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition:
    filter 0.15s ease,
    transform 0.05s ease;
}

.email-capture .btn-primary:hover {
  filter: brightness(1.05);
}

.email-capture .btn-primary:active {
  transform: translateY(1px);
}

.email-capture .btn-primary:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -2px;
  box-shadow:
    0 0 0 4px rgba(117, 14, 247, 0.35),
    0 1px 2px rgba(10, 12.67, 18, 0.05),
    0 -2px 0 rgba(10, 12.67, 18, 0.05) inset,
    0 0 0 1px rgba(10, 12.67, 18, 0.18) inset;
}

.email-capture .btn-text-padding {
  padding: 0 2px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* =========================================================
   17. RESPONSIVE
========================================================= */

@media (max-width: 1024px) {
  .blog-title {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .blog-section {
    padding: 32px 0;
  }

  .blog-container {
    padding: 0 16px;
  }

  .blog-title {
    font-size: 30px;
  }

  .article-body h2,
  .article-body .wp-block-heading {
    font-size: 26px;
  }

  .article-body h3 {
    font-size: 21px;
  }

  .article-body p,
  .article-body li {
    font-size: 15px;
  }

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

  .article-body table {
    min-width: 560px;
  }
  .btn-group-item {
    padding: var(--space-8) var(--space-12);
    font-size: 13px;
  }
  .btn-primary {
    padding: var(--space-8) var(--space-12);
    font-size: 13px;
  }
  .breadcrumb-link,
  .breadcrumb-current {
    display: inline-block;
    max-width: 25ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
  }
}

@media (max-width: 480px) {
  .blog-title {
    font-size: 26px;
  }
  .breadcrumbs,
  .blog-title {
    text-align: left;
    justify-content: flex-start;
  }

  .article-body h2,
  .article-body .wp-block-heading {
    font-size: 22px;
  }

  .article-body h3 {
    font-size: 19px;
  }

  .article-body table {
    min-width: 520px;
  }
}

/* =========================================================
   18. ACCESSIBILITY
========================================================= */

a:focus-visible,
button:focus-visible {
  outline: 2px solid #750ef7;
  outline-offset: 2px;
}

/* =========================================================
   19. PRINT
========================================================= */

@media print {
  .post-toolbar,
  .share-section,
  .breadcrumbs {
    display: none;
  }

  .blog-section {
    padding: 0;
  }

  .article-body p,
  .article-body li,
  .article-body h2,
  .article-body h3 {
    color: #000000;
  }
}
.editor-desktop button.mobile-card-close {
  display: none;
}

/* ---------- Mobile Sticky Bottom Card ---------- */
@media (max-width: 1024px) {
  .mobile-sticky-card {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0 !important;
    top: auto !important;

    width: 100%;
    max-width: 100%;
    min-width: 100%;

    height: 180px;

    margin: 0;
    z-index: 99999;

    padding: 16px;

    border-radius: 16px 16px 0 0;

    background: var(--color-bg-secondary);

    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  }

  .mobile-sticky-card .text-and-email-capture {
    gap: 12px;
    height: 100%;
  }

  .mobile-sticky-card .heading {
    font-size: 16px;
    line-height: 22px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
  }

  .mobile-sticky-card .supporting-text {
    font-size: 13px;
    line-height: 18px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
  }

  .mobile-sticky-card .email-capture {
    margin-top: auto;
  }

  .mobile-sticky-card .btn-primary {
    padding: 10px 16px;
    font-size: 14px;
    line-height: 20px;
  }

  /* ---------- Close Button ---------- */
  .mobile-card-close {
    position: absolute;
    top: 6px;
    right: 6px;

    width: 28px;
    height: 28px;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.08);

    font-size: 20px;
    cursor: pointer;
  }
}
