/* Casa Mobile App Builder — blog. Loaded after styles.css on /blog pages. */

.site-header.is-solid { background: var(--dark-bg); border-bottom-color: var(--dark-line); }
.blog-page { padding-bottom: 0; }

/* ---------- Blog index ---------- */
.blog-hero { padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.blog-hero::before { content: ""; position: absolute; inset: -40% -10% auto 40%; height: 120%; background: radial-gradient(closest-side, rgb(0 255 133 / .16), transparent 70%); pointer-events: none; }
.blog-hero .container { position: relative; }
.blog-hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 800; max-width: 820px; }
.blog-section { scroll-margin-top: 68px; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { position: relative; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c9d3ce; }
.post-card .post-card-cat { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green-deep); }
.post-card h3 { margin: 12px 0 10px; font-size: 1.22rem; line-height: 1.2; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post-card p { color: var(--ink-2); font-size: .96rem; }
.post-card .post-card-meta { margin-top: auto; padding-top: 18px; font-size: .85rem; color: var(--ink-3); }

/* ---------- Post ---------- */
.post-narrow { max-width: 760px; }
.post-head { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 40px); background: var(--tint); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--ink-3); }
.crumbs a { text-decoration: none; color: var(--green-deep); }
.crumbs a:hover { text-decoration: underline; }
.post-head h1 { margin-top: 16px; font-size: clamp(2.1rem, 4.6vw, 3.2rem); font-weight: 800; }
.post-lede { margin-top: 18px; font-size: 1.15rem; color: var(--ink-2); text-wrap: pretty; }
.post-meta { margin-top: 18px; font-size: .9rem; color: var(--ink-3); }

.prose { padding-top: clamp(32px, 5vw, 48px); padding-bottom: clamp(56px, 8vw, 96px); font-size: 1.06rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.55rem, 3vw, 2rem); font-weight: 800; scroll-margin-top: 84px; }
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; scroll-margin-top: 84px; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose a { color: var(--green-deep); text-underline-offset: 2px; }
.prose a:hover { color: var(--ink); }
.prose a.btn { color: var(--black); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--green-deep); font-weight: 700; }
.prose strong { font-weight: 650; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--green); color: var(--ink-2); }

.prose .toc { padding: 20px 24px; border-radius: var(--radius); background: var(--tint); font-size: .96rem; }
.prose .toc p { font-weight: 700; }
.prose .toc ol { margin: 8px 0 0; }

.prose .callout { padding: 18px 22px; border-radius: var(--radius); background: #e6fff1; color: var(--green-ink); font-size: .98rem; }
.prose .callout.note { background: var(--tint); color: var(--ink-2); }

.prose figure { margin: 2em 0; }
.prose figure img { margin-inline: auto; border-radius: 14px; border: 1px solid var(--line); }
.prose figcaption { margin-top: 10px; text-align: center; font-size: .88rem; color: var(--ink-3); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .93rem; line-height: 1.5; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose thead th { background: var(--tint); font-weight: 700; white-space: nowrap; }
.prose tbody th { font-weight: 600; }
.prose tbody tr:last-child > * { border-bottom: 0; }
.prose td.yes::before { content: "✓ "; color: var(--green-deep); font-weight: 700; }
.prose .col-casa { background: rgb(0 255 133 / .07); }

.prose .verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.prose .verdict > div { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.prose .verdict h3 { margin-top: 0; font-size: 1.08rem; }
.prose .verdict ul { margin: .6em 0 0; font-size: .97rem; }

.prose .faq-list h3 { font-size: 1.12rem; }

.post-cta { display: grid; grid-template-columns: auto 1fr; gap: 18px 20px; align-items: center; margin-top: 3em !important; padding: 28px; border-radius: var(--radius-lg); background: var(--dark-bg); color: var(--dark-text); }
.post-cta img { border-radius: 14px; }
.post-cta h2 { margin: 0; font-size: 1.4rem; }
.post-cta p { margin-top: 6px; color: var(--dark-muted); font-size: .98rem; line-height: 1.6; }
.post-cta .btn { grid-column: 1 / -1; justify-self: start; }

.related h2 { margin-bottom: 32px; font-size: clamp(1.7rem, 3.4vw, 2.3rem); }

@media (max-width: 900px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-card { padding: 24px; }
  .prose { font-size: 1rem; }
  .prose .verdict { grid-template-columns: 1fr; }
  .post-cta { grid-template-columns: 1fr; padding: 24px; }
  .post-cta .btn { width: 100%; }
}
