/* MedSnip blog: archive, search results, single post. Uses tokens from medsnip.css. */

/* Banner extras */
.ms-banner__eyebrow { font: 600 13px/1.4 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--ms-soft); }
.ms-banner__search { flex: 0 1 380px; min-width: 260px; }
@media (max-width: 767px) { .ms-banner__search { flex-basis: 100%; min-width: 0; } }
.ms-search-form { display: flex; align-items: center; background: #fff; border-radius: 12px; padding: 4px 4px 4px 16px; gap: 8px; }
.ms-search-form input[type=search] {
	flex: 1; min-width: 0; height: 44px; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important;
	font: 400 15px Inter, sans-serif; color: #0F172A; padding: 0 !important;
}
.ms-search-form button {
	width: 44px; height: 44px; border-radius: 10px !important; border: 0 !important; background: var(--ms-accent) !important; color: #fff !important;
	display: inline-flex; align-items: center; justify-content: center; padding: 0 !important; cursor: pointer; flex: none;
}
.ms-search-form button:hover { background: var(--ms-accent-hover) !important; }
.ms-search-form:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ms-soft) 60%, transparent); }

/* Archive body */
.ms-blog { padding-top: 48px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 32px; }
.ms-blog__cats { margin-bottom: 4px; }
@media (max-width: 767px) { .ms-blog { padding-top: 24px; padding-bottom: 48px; gap: 20px; } }

.ms-bgrid { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) { .ms-bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .ms-bgrid { grid-template-columns: 1fr; gap: 16px; } }

/* Post card */
.ms-bcard { border: 1px solid var(--ms-border); border-radius: 16px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.ms-bcard__media { display: block; aspect-ratio: 16 / 10; background: #E6ECF4; position: relative; }
.ms-bcard__media img, .ms-bcard__noimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-bcard__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ms-bcard__tag { align-self: flex-start; font: 700 12px/1.4 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--ms-accent) !important; }
.ms-blog-page .ms-bcard__title { margin: 0 !important; font: 700 19px/1.35 "Plus Jakarta Sans", sans-serif !important; letter-spacing: 0 !important; }
.ms-bcard__title a { color: #0F172A !important; }
.ms-bcard__title a:hover { color: var(--ms-accent) !important; }
.ms-bcard__excerpt { margin: 0; font-size: 15px; color: #475569; }
.ms-bcard__foot { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; }
.ms-bcard__meta { font-size: 13px; color: #64748B; }
.ms-bcard__more { font: 600 14px/1.4 Inter, sans-serif; color: var(--ms-accent) !important; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.ms-bcard:hover .ms-bcard__more svg { transform: translateX(4px); }
.ms-bcard--plain .ms-bcard__body { padding: 24px; }

/* Featured (first post on page 1) */
.ms-bcard--featured { flex-direction: row; }
.ms-bcard--featured .ms-bcard__media { flex: 1 1 54%; aspect-ratio: auto; min-height: 360px; }
.ms-bcard--featured .ms-bcard__body { flex: 1 1 46%; padding: 40px; justify-content: center; gap: 14px; }
.ms-blog-page .ms-bcard--featured .ms-bcard__title { font-size: 30px !important; line-height: 1.2 !important; letter-spacing: -.01em !important; }
.ms-bcard--featured .ms-bcard__excerpt { font-size: 16px; }
.ms-bcard--featured .ms-bcard__foot { margin-top: 8px; }
@media (max-width: 1024px) {
	.ms-bcard--featured .ms-bcard__body { padding: 28px; }
	.ms-blog-page .ms-bcard--featured .ms-bcard__title { font-size: 24px !important; }
}
@media (max-width: 767px) {
	.ms-bcard--featured { flex-direction: column; }
	.ms-bcard--featured .ms-bcard__media { min-height: 0; aspect-ratio: 16 / 10; flex: none; }
	.ms-bcard--featured .ms-bcard__body { padding: 20px; }
	.ms-blog-page .ms-bcard--featured .ms-bcard__title { font-size: 21px !important; }
	.ms-bcard__body { padding: 18px; }
}

/* Newsletter band */
.ms-blog-news { padding-bottom: 96px; }
.ms-blog-news__box { background: var(--ms-navy); border-radius: 24px; padding: 40px 48px; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.ms-blog-news__text { flex: 1 1 380px; }
.ms-blog-news__text h2 { margin: 0 0 6px !important; font: 700 26px/1.25 "Plus Jakarta Sans", sans-serif !important; color: #fff !important; letter-spacing: -.01em; }
.ms-blog-news__text p { margin: 0; color: #CBD5E1; }
.ms-blog-news__form { flex: 1 1 360px; max-width: 460px; }
@media (max-width: 767px) { .ms-blog-news { padding-bottom: 48px; } .ms-blog-news__box { padding: 26px 22px; border-radius: 18px; } .ms-blog-news__text h2 { font-size: 22px !important; } .ms-blog-news__form { max-width: none; } }

/* ---------- Single post: navy banner header (same as other pages) ---------- */
.ms-post__banner .ms-banner__inner { padding-top: 48px; padding-bottom: 56px; }
.ms-post__head-text { max-width: 860px; gap: 14px; }
.ms-post__cat { align-self: flex-start; color: var(--ms-soft) !important; }
.ms-post__cat:hover { color: #fff !important; }
.ms-post { margin: 0; padding: 0; }
.ms-blog-page .ms-post__banner .ms-post__title { color: #fff !important; font-size: 44px !important; line-height: 1.15 !important; }
.ms-post__banner .ms-post__lead { color: #CBD5E1; font-size: 18px; max-width: 760px; }
.ms-post__banner .ms-post__meta { color: #94A3B8; padding-top: 4px; }
.ms-post__banner .ms-post__author { color: #fff; }
.ms-post__banner + .ms-post__hero { margin-top: 48px; }
.ms-post__banner + .ms-wrap:not(.ms-post__hero) { padding-top: 48px; }
@media (max-width: 1024px) { .ms-blog-page .ms-post__banner .ms-post__title { font-size: 36px !important; } }
@media (max-width: 767px) {
	.ms-post__banner .ms-banner__inner { padding-top: 32px; padding-bottom: 36px; }
	.ms-blog-page .ms-post__banner .ms-post__title { font-size: 28px !important; }
	.ms-post__banner .ms-post__lead { font-size: 16px; }
	.ms-post__banner + .ms-post__hero { margin-top: 24px; }
	.ms-post__banner + .ms-wrap:not(.ms-post__hero) { padding-top: 28px; }
}

/* ---------- Single post ---------- */
.ms-post__narrow { max-width: 720px; margin: 0 auto; }
.ms-post__head { padding-top: 56px; padding-bottom: 32px; }
.ms-post__head .ms-post__narrow { display: flex; flex-direction: column; gap: 14px; }
.ms-blog-page .ms-post__title { margin: 0 !important; font: 700 42px/1.15 "Plus Jakarta Sans", sans-serif !important; letter-spacing: -.02em !important; color: #0F172A !important; }
.ms-post__lead { margin: 0; font-size: 19px; line-height: 1.6; color: #475569; }
.ms-post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: #64748B; padding-top: 6px; }
.ms-post__author { display: inline-flex; align-items: center; gap: 10px; color: #0F172A; font-weight: 500; }
.ms-post__avatar { border-radius: 50%; width: 36px; height: 36px; }
.ms-post__avatar--logo { object-fit: contain; background: #fff; border: 1px solid var(--ms-border); padding: 4px; box-sizing: border-box; }
.ms-post__hero { margin: 0 auto 48px; }
.ms-post__hero img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; display: block; }
.ms-post__hero figcaption { font-size: 13px; color: #64748B; text-align: center; padding-top: 10px; }
@media (max-width: 1024px) { .ms-blog-page .ms-post__title { font-size: 34px !important; } }
@media (max-width: 767px) {
	.ms-post__head { padding-top: 28px; padding-bottom: 22px; }
	.ms-blog-page .ms-post__title { font-size: 28px !important; }
	.ms-post__lead { font-size: 17px; }
	.ms-post__hero { margin-bottom: 28px; }
	.ms-post__hero img { border-radius: 14px; }
}

/* Readable article typography */
.ms-prose { font-size: 18px; line-height: 1.75; color: #334155; }
.ms-prose > * + * { margin-top: 1.1em; }
.ms-prose p { margin: 0; }
.ms-prose p + p { margin-top: 1.1em; }
.ms-prose h2, .ms-prose h3, .ms-prose h4 { color: #0F172A !important; font-family: "Plus Jakarta Sans", sans-serif !important; letter-spacing: -.01em !important; margin: 1.8em 0 .5em !important; }
.ms-prose h2 { font-size: 28px !important; line-height: 1.25 !important; }
.ms-prose h3 { font-size: 22px !important; line-height: 1.3 !important; }
.ms-prose h4 { font-size: 18px !important; }
.ms-prose a { color: var(--ms-accent); text-decoration: underline; text-underline-offset: 3px; }
.ms-prose a:hover { color: var(--ms-accent-hover); }
.ms-prose ul, .ms-prose ol { padding-left: 1.3em; margin-left: 0; }
.ms-prose li + li { margin-top: .4em; }
.ms-prose li::marker { color: var(--ms-accent); }
.ms-prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--ms-accent); font-size: 20px; color: #0F172A; font-style: normal; }
.ms-prose img, .ms-prose figure img { border-radius: 14px; height: auto; max-width: 100%; }
.ms-prose figure { margin: 1.8em 0; }
.ms-prose figcaption { font-size: 14px; color: #64748B; text-align: center; margin-top: 8px; }
.ms-prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.ms-prose th, .ms-prose td { border-bottom: 1px solid var(--ms-border); padding: 10px 12px; text-align: left; }
.ms-prose .wp-block-table { overflow-x: auto; }
@media (max-width: 767px) { .ms-prose { font-size: 17px; } .ms-prose h2 { font-size: 24px !important; } .ms-prose h3 { font-size: 20px !important; } }

/* Layout with "On this page" navigation (desktop ≥1200px) */
.ms-post__layout.has-toc { display: block; }
.ms-toc--side { display: none; }
@media (min-width: 1200px) {
	.ms-post__layout.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr); column-gap: 48px; align-items: start; }
	.ms-post__layout.has-toc .ms-post__narrow { grid-column: 2; margin: 0; max-width: none; }
	.ms-toc--side { display: block; grid-column: 1; grid-row: 1; justify-self: end; width: 100%; max-width: 230px; height: 100%; }
	.ms-toc--inline { display: none; }
}
.ms-toc__sticky { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.ms-toc__title { margin: 0; font: 600 12px/1.4 Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #64748B; }
.ms-toc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-left: 2px solid var(--ms-border); }
.ms-toc__item a {
	display: block; padding: 7px 0 7px 14px; margin-left: -2px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.4; color: #475569;
	transition: color .2s, border-color .2s;
}
.ms-toc__item--h3 a { padding-left: 26px; font-size: 13px; }
.ms-toc__item a:hover { color: #0F172A; }
.ms-toc__item a.is-active { color: var(--ms-accent); border-left-color: var(--ms-accent); font-weight: 600; }
.ms-toc__cta { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font: 600 14px Inter, sans-serif; color: var(--ms-accent) !important; }
.ms-toc__cta svg { transition: transform .25s; }
.ms-toc__cta:hover svg { transform: translateX(4px); }

.ms-toc--inline { border: 1px solid var(--ms-border); border-radius: 14px; background: #F5F7FA; margin-bottom: 32px; }
.ms-toc--inline summary {
	list-style: none; cursor: pointer; padding: 14px 18px; min-height: 48px; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: 12px;
	font: 600 15px Inter, sans-serif; color: #0F172A;
}
.ms-toc--inline summary::-webkit-details-marker { display: none; }
.ms-toc--inline summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid #64748B; border-bottom: 2px solid #64748B; transform: rotate(45deg) translateY(-3px); transition: transform .2s; flex: none; }
.ms-toc--inline[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.ms-toc__count { margin-left: auto; font-weight: 400; font-size: 13px; color: #64748B; }
.ms-toc--inline .ms-toc__list { margin: 0 18px 16px; }

/* Reading progress */
.ms-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 100000; pointer-events: none; }
.admin-bar .ms-progress { top: 32px; }
.ms-progress span { display: block; height: 100%; width: 100%; background: var(--ms-accent); transform-origin: 0 50%; transform: scaleX(0); }

/* Article components (usable in any post via the HTML editor) */
.ms-prose .ms-callout { background: var(--ms-tint); border: 1px solid var(--ms-tint-border); border-radius: 16px; padding: 22px 24px; margin: 1.6em 0; }
.ms-prose .ms-callout__title { margin: 0 0 8px !important; font: 700 15px/1.4 Inter, sans-serif !important; letter-spacing: .06em; text-transform: uppercase; color: var(--ms-accent-hover) !important; }
.ms-prose .ms-callout ul { margin: 0; }
.ms-prose .ms-callout li { font-size: 16px; }
.ms-prose .ms-note { background: #FFF8EB; border: 1px solid #F5DDB0; border-radius: 14px; padding: 16px 20px; font-size: 16px; color: #5B3A12; margin: 1.6em 0; }
.ms-prose .ms-note strong { color: #A4531D; }
.ms-prose .ms-step-title { display: flex; align-items: center; gap: 12px; }
.ms-prose .ms-step-title .ms-num {
	flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--ms-navy); color: #fff; font: 700 15px/34px "Plus Jakarta Sans", sans-serif; text-align: center;
}
.ms-prose .ms-dodont { width: 100%; border: 1px solid var(--ms-border); border-radius: 14px; overflow: hidden; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.ms-prose .ms-dodont th { background: #F5F7FA; font: 700 14px Inter, sans-serif; color: #0F172A; padding: 12px 16px; border-bottom: 1px solid var(--ms-border); }
.ms-prose .ms-dodont td { padding: 12px 16px; vertical-align: top; border-bottom: 1px solid #EEF2F6; width: 50%; }
.ms-prose .ms-dodont tr:last-child td { border-bottom: 0; }
.ms-prose .ms-dodont td:first-child { border-right: 1px solid #EEF2F6; }
.ms-prose .ms-dodont .ms-yes::before { content: "✓ "; color: #067647; font-weight: 700; }
.ms-prose .ms-dodont .ms-no::before { content: "✕ "; color: #B42318; font-weight: 700; }
.ms-prose h2[id], .ms-prose h3[id] { scroll-margin-top: 110px; }
@media (max-width: 767px) {
	.ms-prose .ms-callout { padding: 18px; }
	.ms-prose .ms-dodont, .ms-prose .ms-dodont tbody, .ms-prose .ms-dodont tr, .ms-prose .ms-dodont td { display: block; width: auto; }
	.ms-prose .ms-dodont thead { display: none; }
	.ms-prose .ms-dodont td:first-child { border-right: 0; }
}

.ms-post__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }

/* Share */
.ms-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--ms-border); }
.ms-share__label { font: 600 14px Inter, sans-serif; color: #0F172A; margin-right: 6px; }
.ms-share__btn {
	width: 44px; height: 44px; border-radius: 50% !important; border: 1px solid #CBD5E1 !important; background: #fff !important; color: #0F172A !important;
	display: inline-flex; align-items: center; justify-content: center; padding: 0 !important; cursor: pointer; transition: border-color .2s, color .2s, background-color .2s;
}
.ms-share__btn:hover { border-color: var(--ms-accent) !important; color: var(--ms-accent) !important; }
.ms-share__copy.is-copied { background: #ECFDF3 !important; border-color: #ABEFC6 !important; color: #067647 !important; }

/* CTA box */
.ms-post__cta { margin-top: 36px; background: var(--ms-navy); border-radius: 20px; padding: 28px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.ms-post__cta strong { display: block; font: 700 20px/1.3 "Plus Jakarta Sans", sans-serif; color: #fff; margin-bottom: 4px; }
.ms-post__cta span { color: #CBD5E1; font-size: 15px; }
.ms-post__cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.ms-post__cta-btns .ms-btn-quote { flex: none; padding: 0 20px; }
.ms-btn-outline--light { flex: none; background: transparent !important; color: #fff !important; border-color: rgba(255,255,255,.4) !important; padding: 0 18px; }
.ms-btn-outline--light:hover { border-color: #fff !important; }
@media (max-width: 767px) { .ms-post__cta { padding: 22px; } .ms-post__cta-btns, .ms-post__cta-btns a { width: 100%; } }

/* Prev / next */
.ms-post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; padding-bottom: 72px; }
.ms-post__nav-link { border: 1px solid var(--ms-border); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; color: #0F172A !important; transition: border-color .2s; }
.ms-post__nav-link:hover { border-color: var(--ms-accent); }
.ms-post__nav-link span { font-size: 13px; color: #64748B; }
.ms-post__nav-link strong { font: 600 15px/1.4 Inter, sans-serif; }
.ms-post__nav-link--next { text-align: right; grid-column: 2; }
@media (max-width: 767px) { .ms-post__nav { grid-template-columns: 1fr; padding-bottom: 48px; } .ms-post__nav-link--next { grid-column: auto; text-align: left; } }

/* Related */
.ms-related-posts { background: #F5F7FA; padding: 72px 0 96px; }
.ms-related-posts__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
@media (max-width: 767px) { .ms-related-posts { padding: 48px 0; } }
