/**
 * CookieShift WordPress blog — shell + content only.
 * Header/footer visuals come from shared landing assets:
 *   landing-chrome.css + PricingPage.css + cookieshift-landing-custom.css
 * Do NOT re-style #cs-site-header / #cs-site-footer chrome here.
 */

/* Landing custom CSS hides body until .cs-workspace-ready — keep blog visible. */
html.cs-wp-chrome-ready body,
body.cs-wp-has-marketing-chrome,
body.cookieshift-landing.cs-wp-has-marketing-chrome {
  visibility: visible !important;
}

/* ─── Shell layout ─── */
body.cs-wp-has-marketing-chrome {
  margin: 0;
  background: #f8fafc;
  color: #0f172a;
}

.cs-wp-site-chrome {
  display: block;
  width: 100%;
  min-height: 0;
  background: #f8fafc;
}

.cs-wp-site-main {
  width: 100%;
  min-width: 0;
  min-height: 0;
}

/* Hosts mount LandingHeader/Footer — do not inherit full-page .cslp min-height */
#cs-site-header.cslp,
#cs-site-footer.cslp {
  min-height: 0 !important;
}

#cs-site-header {
  position: relative;
  z-index: 100;
  width: 100%;
}

#cs-site-footer {
  width: 100%;
  margin-top: 0;
}

/* Hide native block-theme header/footer — CookieShift chrome replaces them */
body.cs-wp-has-marketing-chrome .wp-site-blocks > header,
body.cs-wp-has-marketing-chrome header.wp-block-template-part,
body.cs-wp-has-marketing-chrome .wp-site-blocks > footer,
body.cs-wp-has-marketing-chrome footer.wp-block-template-part {
  display: none !important;
}

/* ─── Blog content layout polish (WordPress content only) ─── */
.cs-wp-site-main .wp-site-blocks {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 32px) 56px;
  box-sizing: border-box;
}

body.cs-wp-blog-cards .cs-wp-site-main .wp-site-blocks > .wp-block-group,
body.cs-wp-blog-cards .cs-wp-site-main main.wp-block-group {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.cs-wp-blog-cards .cs-wp-site-main .wp-block-query {
  margin: 0;
}

body.cs-wp-blog-cards .cs-wp-site-main .wp-block-post-template > .wp-block-post > .wp-block-group,
body.cs-wp-blog-cards .cs-wp-site-main .wp-block-post-template > li > .wp-block-group {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: none !important;
  width: 100%;
}

.cs-wp-site-main .entry-content,
.cs-wp-site-main .wp-block-post-content,
.cs-wp-site-main .wp-block-post-excerpt,
.cs-wp-site-main .wp-block-post-title,
.cs-wp-site-main .wp-block-post-date,
.cs-wp-site-main .wp-block-post-author-name {
  max-width: 72ch;
}

.cs-wp-site-main .wp-block-post-title,
.cs-wp-site-main .wp-block-post-title a {
  color: #0f172a;
  text-decoration: none;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.cs-wp-site-main .wp-block-post-title a:hover {
  color: #2562ff;
}

.cs-wp-site-main .wp-block-post-date,
.cs-wp-site-main .wp-block-post-author-name,
.cs-wp-site-main .wp-block-post-terms {
  color: #64748b;
  font-size: 0.925rem;
}

/* ─── Archive heading ─── */
body.cs-wp-blog-cards .cs-wp-site-main .wp-block-heading {
  color: #0f172a;
  font-family: "Plus Jakarta Sans", "DM Sans", system-ui, sans-serif;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 8px;
}

body.cs-wp-blog-cards .cs-wp-site-main .cs-blog-archive-subtitle {
  margin: 0 0 28px;
  max-width: 40rem;
  color: #64748b;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

/* ─── Archive / home post cards (premium SaaS) ─── */
.cs-wp-site-main .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px !important;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: stretch;
}

.cs-wp-site-main .wp-block-post-template > .wp-block-post,
.cs-wp-site-main .wp-block-post-template > li {
  position: relative;
  background: #ffffff;
  border: 1px solid #e8edf5;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
  margin: 0 !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.cs-wp-site-main .wp-block-post-template > .wp-block-post:hover,
.cs-wp-site-main .wp-block-post-template > li:hover {
  transform: translateY(-4px);
  border-color: #d7e0ef;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08), 0 4px 10px rgba(37, 98, 255, 0.06);
}

.cs-wp-site-main .wp-block-post-template .cs-blog-card-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 16px;
  text-decoration: none;
  color: transparent;
}

.cs-wp-site-main .wp-block-post-template .cs-blog-card-hit .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cs-wp-site-main .wp-block-post-template .wp-block-post-title,
.cs-wp-site-main .wp-block-post-template .wp-block-post-excerpt,
.cs-wp-site-main .wp-block-post-template .cs-blog-card-excerpt,
.cs-wp-site-main .wp-block-post-template .wp-block-post-date {
  max-width: none;
}

.cs-wp-site-main .wp-block-post-template .wp-block-post-featured-image, .cs-wp-site-main .wp-block-post-template .cs-blog-card-media {
    position: relative;
    z-index: 0;
    margin: 0 !important;
    width: auto;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden;
    background: linear-gradient(135deg, #e8eef8 0%, #f1f5f9 100%);
    border-radius: 0;
}

.cs-wp-site-main .wp-block-post-template .wp-block-post-featured-image a,
.cs-wp-site-main .wp-block-post-template .cs-blog-card-media a {
  display: block;
  height: 100%;
}

.cs-wp-site-main .wp-block-post-featured-image img,
.cs-wp-site-main .cs-blog-card-media img,
.cs-wp-site-main .cs-blog-placeholder {
  border-radius: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.cs-wp-site-main .wp-block-post-template > .wp-block-post:hover img,
.cs-wp-site-main .wp-block-post-template > li:hover img {
  transform: scale(1.03);
}

.cs-wp-site-main .wp-block-post-template .wp-block-post-title {
  position: relative;
  z-index: 1;
  font-family: "Plus Jakarta Sans", "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.125rem, 1.5vw, 1.25rem) !important;
  font-weight: 600 !important;
  line-height: 30px !important;
  letter-spacing: -0.02em;
  color: #0f172a !important;
  margin: 0 !important;
  padding: 22px 22px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cs-wp-site-main .wp-block-post-template .cs-blog-card-excerpt {
  position: relative;
  z-index: 1;
  color: #64748b;
  line-height: 1.65;
  margin: 0;
  padding: 12px 22px 22px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.cs-wp-site-main .wp-block-post-template .cs-blog-card-excerpt p {
  margin: 0;
  color: #64748b;
  font-size: 0.975rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cs-wp-site-main .wp-block-post-template .cs-blog-card-more {
  margin-top: auto;
  align-self: flex-start;
  color: #2562ff;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

body.cs-wp-blog-cards .cs-wp-site-main .wp-block-query > .wp-block-group:not(.alignwide) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.cs-wp-blog-cards .cs-wp-site-main .wp-block-query-no-results:empty,
body.cs-wp-blog-cards .cs-wp-site-main .wp-block-group:has(> .wp-block-query-no-results:empty) {
  display: none;
}

body.single .cs-wp-site-main .wp-site-blocks,
body.single-post .cs-wp-site-main .wp-site-blocks {
  max-width: 760px;
  padding-top: 48px;
  padding-bottom: 72px;
}

body.single .cs-wp-site-main .wp-block-post-title,
body.single-post .cs-wp-site-main .wp-block-post-title {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  margin-bottom: 12px;
  max-width: none;
}

body.single .cs-wp-site-main .wp-block-post-content,
body.single-post .cs-wp-site-main .wp-block-post-content {
  max-width: none;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #334155;
}

body.single .cs-wp-site-main .wp-block-post-content > * + *,
body.single-post .cs-wp-site-main .wp-block-post-content > * + * {
  margin-top: 1.1em;
}

.cs-wp-site-main .wp-block-query-pagination {
  margin-top: 36px;
  margin-bottom: 0;
  gap: 12px;
}

.cs-wp-site-main .wp-block-query-pagination a {
  color: #2562ff;
}

@media (max-width: 960px) {
  .cs-wp-site-main .wp-block-post-template {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px !important;
  }

  .cs-wp-site-main .wp-block-post-template .wp-block-post-title {
    padding: 18px 18px 0;
  }

  .cs-wp-site-main .wp-block-post-template .cs-blog-card-excerpt {
    padding: 10px 18px 18px;
  }
}

@media (max-width: 700px) {
  .cs-wp-site-main .wp-site-blocks {
    padding: 20px 16px 40px;
  }

  body.cs-wp-blog-cards .cs-wp-site-main .cs-blog-archive-subtitle {
    margin-bottom: 22px;
  }

  .cs-wp-site-main .wp-block-post-template {
    grid-template-columns: 1fr;
    gap: 20px !important;
  }

  .cs-wp-site-main .wp-block-post-template > .wp-block-post:hover,
  .cs-wp-site-main .wp-block-post-template > li:hover {
    transform: translateY(-2px);
  }
}

/* WordPress constrained layout — keep content max-width, do not force auto side margins */
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: var(--wp--style--global--content-size);
  /* margin-left: auto !important; */
  /* margin-right: auto !important; */
  margin-left: 0 !important;
  margin-right: 0 !important;
}
