/* Blog: article cards, the article page with its sidebar, and calls to action. */

.blog-body { padding-top: 64px; }

/* Cards */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e0e5ea; transition: box-shadow .35s, border-color .35s; }
.post-card:hover { box-shadow: 0 24px 55px rgba(23, 54, 89, .1); border-color: #c9d8e8; }
.post-card-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 28px; overflow: hidden; background: linear-gradient(145deg, #f7f9fb, #edf3f8); }
.post-card-media::after { content: ""; position: absolute; width: 200px; height: 200px; border: 1px solid rgba(11, 99, 238, .1); border-radius: 50%; opacity: 0; transform: scale(.8); transition: .45s; }
.post-card:hover .post-card-media::after { opacity: 1; transform: scale(1.6); }
.post-card-media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 15px 12px rgba(19, 49, 82, .12)); transition: transform .45s; }
.post-card:hover .post-card-media img { transform: scale(1.04) rotate(-1deg); }
.post-card-body { display: flex; flex: 1; flex-direction: column; padding: 26px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.post-meta > * + *::before { content: "·"; margin-right: 12px; color: #b5c2d0; }
.post-cat { color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.post-cat:hover { color: var(--navy); }
.post-card-title { margin: 0 0 12px; font-size: 22px; line-height: 1.2; letter-spacing: -.025em; }
.post-card-title a:hover { color: var(--blue); }
.post-card-body > p { margin: 0 0 24px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.post-card-body .text-link { align-self: flex-start; margin-top: auto; }

/* The newest article spans the whole row */
.post-card--featured { grid-column: 1 / -1; flex-direction: row; }
.post-card--featured .post-card-media { flex: 1.1; min-height: 420px; aspect-ratio: auto; padding: 44px; }
.post-card--featured .post-card-body { flex: 1; justify-content: center; padding: 52px 48px; }
.post-card--featured .post-card-title { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -.045em; }
.post-card--featured .post-card-body > p { font-size: 16px; }
.post-card--featured .post-card-body .text-link { margin-top: 0; }

/* Pagination (the header menu also uses .nav-links, so reset its styles here) */
.navigation.blog-pagination { margin-top: 56px; }
.navigation.blog-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.navigation.blog-pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.navigation.blog-pagination .page-numbers::after { display: none; }
.navigation.blog-pagination .page-numbers.current,
.navigation.blog-pagination a.page-numbers:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Article hero */
.post-hero { padding-bottom: 120px; }
.post-hero .kicker { display: inline-block; }
.post-hero .kicker:hover { color: #fff; }
.post-hero h1 { max-width: 980px; font-size: clamp(38px, 5.2vw, 68px); line-height: 1.02; }
.post-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 30px; color: #b7c7d9; font-size: 14px; }
.post-hero-meta > * + *::before { content: "·"; margin-right: 14px; }

/* Cover image, overlapping the hero */
.post-body { padding-top: 0; }
.post-cover { position: relative; z-index: 1; display: grid; place-items: center; aspect-ratio: 21 / 9; margin: -64px 0 64px; padding: 40px; background: linear-gradient(145deg, #edf5ff, #f8fafc); border: 1px solid #e0e5ea; box-shadow: var(--shadow); }
.post-cover img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 25px 22px rgba(17, 45, 76, .2)); }

/* Article with sidebar */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; align-items: start; }
.post-article { min-width: 0; }

.post-content { max-width: 720px; color: #2a3a4c; font-size: 17px; line-height: 1.8; }
.post-content > * { margin-top: 0; margin-bottom: 24px; }
.post-content h2 { margin: 60px 0 18px; color: var(--ink); font-size: clamp(28px, 3vw, 36px); line-height: 1.15; letter-spacing: -.035em; scroll-margin-top: 110px; }
.post-content h3 { margin: 36px 0 12px; color: var(--ink); font-size: 21px; letter-spacing: -.02em; }
.post-content strong { color: var(--ink); }
.post-content a:not(.button) { font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-content ul,
.post-content ol { padding-left: 0; list-style: none; }
.post-content li { position: relative; margin-bottom: 12px; padding-left: 30px; }
.post-content ul > li::before { content: ""; position: absolute; top: .72em; left: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.post-content ol { counter-reset: step; }
.post-content ol > li { counter-increment: step; }
.post-content ol > li::before { content: counter(step); position: absolute; top: .28em; left: 0; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--ice); color: var(--blue); font-size: 12px; font-weight: 850; line-height: 1; }
.post-content blockquote { margin: 40px 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--blue); color: var(--ink); font-size: 20px; font-weight: 600; line-height: 1.6; letter-spacing: -.01em; }
.post-content blockquote p { margin: 0; }

/* "Quick answer" box */
.post-content .post-summary { margin-bottom: 44px; padding: 30px 34px 10px; background: var(--ice); border: 1px solid #d4e4f7; }
.post-content .post-summary h2 { margin: 0 0 16px; color: var(--blue); font-size: 14px; letter-spacing: .19em; text-transform: uppercase; }
.post-content .post-summary li { margin-bottom: 14px; }

/* Tables */
.post-content .wp-block-table { margin: 32px 0 40px; overflow-x: auto; }
.post-content table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.post-content th,
.post-content td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.post-content thead th { background: var(--ink); border-bottom: 0; color: #fff; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.post-content tbody tr:nth-child(even) { background: #f7f9fb; }
.post-content tbody td:first-child { color: var(--ink); font-weight: 700; }

/* End-of-article call to action */
.post-cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; max-width: 720px; margin-top: 64px; padding: 40px 44px; background: radial-gradient(circle at 85% 30%, rgba(24, 119, 255, .55), transparent 45%), linear-gradient(120deg, #10263f, #203e62); color: #fff; }
.post-cta .kicker { margin-bottom: 12px; }
.post-cta h2 { margin: 0 0 10px; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.1; letter-spacing: -.035em; }
.post-cta p { margin: 0; color: #d3e1f1; font-size: 15px; line-height: 1.6; }
.post-cta-actions { display: flex; flex-direction: column; flex-shrink: 0; align-items: flex-start; gap: 14px; }
.post-cta-phone { color: #fff; font-size: 18px; font-weight: 800; letter-spacing: .01em; }
.post-cta-phone:hover { color: #b9d8ff; }

/* Sidebar: store and categories scroll away; contents and sharing then stay in view */
.post-sidebar { display: flex; flex-direction: column; gap: 20px; align-self: stretch; }
.side-sticky { position: sticky; top: 107px; display: grid; gap: 20px; max-height: calc(100vh - 127px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9d5e2 transparent; }
.side-block { padding: 26px; background: #fff; border: 1px solid #e0e5ea; }
.side-title { margin: 0 0 16px; color: var(--ink); font-size: 13px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }

.toc-list { margin: 0; padding: 0; list-style: none; counter-reset: toc; border-left: 1px solid var(--line); }
.toc-list li { counter-increment: toc; }
.toc-list a { display: flex; gap: 10px; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 2px solid transparent; color: var(--muted); font-size: 14px; line-height: 1.4; transition: color .2s, border-color .2s; }
.toc-list a::before { content: counter(toc, decimal-leading-zero); padding-top: 1px; color: #a9b6c4; font-size: 12px; font-weight: 700; }
.toc-list a:hover { color: var(--ink); }
.toc-list a.is-active { border-left-color: var(--blue); color: var(--blue); font-weight: 700; }
.toc-list a.is-active::before { color: var(--blue); }

.side-store { background: radial-gradient(circle at 90% 0%, rgba(24, 119, 255, .55), transparent 55%), linear-gradient(140deg, #10263f, #203e62); border-color: transparent; color: #fff; }
.side-store .kicker { margin-bottom: 10px; color: #b9d8ff; font-size: 12px; }
.side-store h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.03em; }
.side-store p { margin: 0 0 18px; color: #d3e1f1; font-size: 14px; line-height: 1.6; }
.side-facts { display: grid; gap: 10px; margin: 0 0 22px; padding: 18px 0 0; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 14px; list-style: none; }
.side-facts li { display: flex; align-items: flex-start; gap: 10px; }
.side-facts li::before { content: "✓"; color: #7fb6ff; font-weight: 800; }
.side-btn { width: 100%; background: #fff; color: var(--ink); }
.side-btn:hover { background: #eaf3ff; }
.side-store-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 14px; font-weight: 700; }
.side-store-links a { padding-bottom: 3px; border-bottom: 1px solid rgba(255, 255, 255, .3); color: #fff; }
.side-store-links a:hover { border-color: #b9d8ff; color: #b9d8ff; }

.side-links { margin: 0; padding: 0; list-style: none; }
.side-links li + li { border-top: 1px solid #edf0f3; }
.side-links a { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; color: var(--ink); font-size: 15px; font-weight: 600; }
.side-links a::after { content: "→"; color: var(--blue); transition: transform .2s; }
.side-links a:hover { color: var(--blue); }
.side-links a:hover::after { transform: translateX(4px); }

.share-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.share-links a,
.share-links button { display: flex; align-items: center; justify-content: center; height: 42px; padding: 0 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .2s, color .2s; }
.share-links a:hover,
.share-links button:hover,
.share-links .is-copied { border-color: var(--blue); color: var(--blue); }

/* Contents box shown above the article on smaller screens */
.post-toc-inline { display: none; margin-bottom: 32px; background: #fff; border: 1px solid var(--line); }
.post-toc-inline summary { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; font-size: 13px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; list-style: none; cursor: pointer; }
.post-toc-inline summary::-webkit-details-marker { display: none; }
.post-toc-inline summary::after { content: "+"; color: var(--blue); font-size: 20px; line-height: 1; }
.post-toc-inline[open] summary::after { content: "−"; }
.post-toc-inline .toc-list { margin: 0 20px 18px; }

/* More articles */
.post-related { padding: 90px 0 110px; background: var(--cream); }
.post-related h2 { margin: 0 0 34px; font-size: clamp(32px, 3.6vw, 46px); line-height: 1; letter-spacing: -.05em; }
.post-related .post-card-title { font-size: 20px; }

@media (max-width: 1120px) {
	.post-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 48px; }
}

@media (max-width: 1000px) {
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-card--featured { flex-direction: column; }
	.post-card--featured .post-card-media { min-height: 0; aspect-ratio: 16 / 10; padding: 28px; }
	.post-card--featured .post-card-body { padding: 32px; }
	.post-cover { aspect-ratio: 16 / 9; }
	.post-layout { grid-template-columns: 1fr; gap: 56px; }
	.post-content,
	.post-cta { max-width: none; }
	.post-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.side-sticky { position: static; display: contents; max-height: none; overflow: visible; }
	.post-sidebar .side-toc { display: none; }
	.post-toc-inline { display: block; }
	.post-cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 680px) {
	.blog-body { padding-top: 40px; }
	.post-grid,
	.post-sidebar { grid-template-columns: 1fr; }
	.post-card-body,
	.post-card--featured .post-card-body { padding: 22px; }
	.post-hero { padding-bottom: 90px; }
	.post-cover { aspect-ratio: 4 / 3; margin: -48px 0 36px; padding: 20px; }
	.post-content { font-size: 16px; }
	.post-content h2 { margin-top: 44px; }
	.post-content .post-summary { padding: 24px 22px 6px; }
	.post-cta { margin-top: 48px; padding: 32px 24px; }
	.post-related { padding: 64px 0 80px; }
}
