/*
Theme Name: AspireX Solution Blog
Theme URI: https://aspirexsolution.com/blog/
Author: AspireX Solution
Author URI: https://aspirexsolution.com/
Description: Blog theme for aspirexsolution.com/blog. Reuses the main website's CSS, JavaScript, fonts, header, footer and contact section, so the blog looks exactly like the site.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 8.0
Text Domain: aspirex-blog
*/

/* The site's /assets/css/main.*.css loads first (tokens, nav, buttons, footer, sp-* blocks).
   These rules only add the blog parts. */

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.admin-bar .nav { top: 46px; }
@media (max-width: 782px) { .admin-bar .nav { top: 60px; } }

.blog-hero { position: relative; overflow: hidden; }
.blog-hero .sp-hero__copy { max-width: 880px; }
.blog-hero .sp-hero__title { max-width: 22ch; }
.blog-grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.blog-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons not in the main stylesheet */
.btn--outline { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.btn--outline:hover { border-color: var(--ink); }
.btn--outline .blog-ico { width: 18px; height: 18px; }

/* ---------- Blog hero: search and categories ---------- */
.blog-tools { display: grid; gap: 18px; margin-top: 30px; max-width: 760px; }
.blog-search { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 18px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line-light); color: var(--muted-light); }
.blog-search:focus-within { border-color: var(--blue-3); box-shadow: 0 0 0 4px rgba(91, 149, 255, .2); }
.blog-search input { flex: 1; min-width: 0; padding: 10px 0; border: 0; background: none; color: #fff; font: inherit; font-size: 1rem; outline: none; }
.blog-search input::placeholder { color: rgba(255, 255, 255, .45); }
.blog-search .btn { flex: none; }
.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-cats a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8); font-size: .875rem; font-weight: 600; transition: background-color .2s, color .2s, border-color .2s; }
.blog-cats a:hover { border-color: rgba(255, 255, 255, .4); color: #fff; }
.blog-cats a.is-active { background: #fff; border-color: #fff; color: var(--ink); }

/* ---------- Post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; background: #fff; border: 1px solid var(--line); transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(10, 75, 220, .25); }
.post-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--sky); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-ph { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(circle at 80% 10%, rgba(29, 107, 255, .35), transparent 55%), radial-gradient(circle at 10% 90%, rgba(10, 42, 156, .5), transparent 55%), linear-gradient(180deg, #030716, #061136); color: rgba(255, 255, 255, .55); }
.post-card-ph .blog-ico { width: 40px; height: 40px; }
.post-card-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 24px 26px 26px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: .8125rem; }
.post-meta > * + *::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 14px; border-radius: 50%; background: var(--muted-light); vertical-align: middle; }
.post-cat { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--sky); color: var(--blue); font-size: .75rem; font-weight: 700; }
.post-cat:hover { background: #dbe7ff; }
.post-meta .post-cat + *::before { display: none; }
.post-card-title { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.02em; font-weight: 800; }
.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--blue); }
.post-card-excerpt { color: var(--muted); font-size: .95rem; line-height: 1.6; }
.post-card .link-arrow { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; color: var(--blue); font-size: .9rem; font-weight: 700; }
.post-card .link-arrow .blog-ico { width: 16px; height: 16px; }

.post-card-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; }
.post-card-featured .post-card-img { aspect-ratio: auto; min-height: 340px; }
.post-card-featured .post-card-body { justify-content: center; padding: clamp(28px, 4vw, 48px); }
.post-card-featured .post-card-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.post-card-featured .post-card-excerpt { font-size: 1.05rem; }

/* Pagination */
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.pagination .page-numbers:hover { border-color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.blog-more { margin-top: 36px; text-align: center; }

/* Empty state */
.blog-empty { max-width: 560px; margin: 0 auto; padding: clamp(36px, 6vw, 64px); border-radius: 32px; background: var(--paper-2); text-align: center; }
.blog-empty-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 20px; border-radius: 18px; background: var(--sky); color: var(--blue); }
.blog-empty h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.blog-empty p { margin: 10px 0 24px; color: var(--muted); }

/* ---------- Single post ---------- */
.post-title { margin-top: 14px; color: #fff; font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 800; max-width: 22ch; }
.post-byline { display: flex; align-items: center; gap: 14px; margin-top: 28px; color: var(--muted-light); }
.post-byline strong { display: block; color: #fff; font-size: .95rem; }
.post-byline small { font-size: .85rem; }
.post-avatar { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; font-size: .85rem; font-weight: 800; }
.post-avatar-lg { width: 64px; height: 64px; font-size: 1.1rem; }

/* Pulls the cover up into the dark hero, but stops above the author byline. */
.post-author-link { color: inherit; text-decoration: none; }
.post-author-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-cover { position: relative; z-index: 1; margin-top: -40px; }
@media (max-width: 760px) { .post-cover { margin-top: 0; } }
.post-cover img { display: block; width: 100%; height: auto; max-height: 620px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 72px); align-items: start; padding-block: clamp(48px, 6vw, 80px); }
.post-layout.no-cover { padding-top: clamp(56px, 7vw, 88px); }
.post-layout.no-aside { grid-template-columns: minmax(0, 820px); justify-content: center; }

/* Article typography */
.entry-content { min-width: 0; max-width: 760px; color: #3a4358; font-size: 1.0938rem; line-height: 1.8; }
.entry-content > * + * { margin-top: 1.25em; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--ink); letter-spacing: -.02em; line-height: 1.25; }
.entry-content h2 { margin-top: 2em; font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 800; }
.entry-content h3 { margin-top: 1.7em; font-size: clamp(1.25rem, 1.9vw, 1.45rem); font-weight: 800; }
.entry-content h4 { margin-top: 1.5em; font-size: 1.15rem; font-weight: 700; }
.entry-content a { color: var(--blue); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--blue-2); }
.entry-content strong { color: var(--ink); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li + li { margin-top: .5em; }
.entry-content li::marker { color: var(--blue); font-weight: 700; }
.entry-content blockquote { margin-inline: 0; padding: 22px 26px; border-left: 4px solid var(--blue-2); border-radius: 0 var(--radius) var(--radius) 0; background: var(--paper-2); color: var(--ink); font-size: 1.15rem; font-weight: 600; line-height: 1.6; }
.entry-content img { height: auto; border-radius: var(--radius); }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption { margin-top: 10px; color: var(--muted); font-size: .875rem; text-align: center; }
.entry-content hr { height: 1px; border: 0; background: var(--line); margin-block: 2.4em; }
.entry-content code { padding: 2px 6px; border-radius: 6px; background: var(--paper-2); font-size: .9em; }
.entry-content pre { padding: 20px; border-radius: var(--radius); background: var(--ink); color: #e6e9ef; overflow-x: auto; font-size: .9rem; line-height: 1.6; }
.entry-content pre code { padding: 0; background: none; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content th { color: var(--ink); background: var(--paper-2); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content .alignwide { margin-inline: clamp(-80px, -6vw, 0px); max-width: none; }
.entry-content .aligncenter { margin-inline: auto; text-align: center; }
.entry-content .wp-block-button__link { display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 700; text-decoration: none; }
.entry-content .wp-block-button__link:hover { background: var(--blue-2); color: #fff; }
.entry-content .wp-block-embed iframe { width: 100%; border-radius: var(--radius); }
.page-links { margin-top: 2em; font-weight: 600; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2.4em; }
.post-tags a { padding: 6px 14px; border-radius: 999px; background: var(--paper-2); color: var(--ink); font-size: .875rem; font-weight: 600; text-decoration: none; }
.post-tags a:hover { background: var(--ink); color: #fff; }
.post-author { display: flex; gap: 20px; align-items: flex-start; margin-top: 2.4em; padding: 28px; border-radius: 32px; background: var(--paper-2); line-height: 1.6; }
.post-author .label { margin: 0; color: var(--blue); }
.post-author h2 { margin: 4px 0 8px; font-size: 1.25rem; font-weight: 800; }
.post-author p { font-size: .95rem; }

/* Sidebar */
.post-aside { position: sticky; top: 110px; display: grid; gap: 18px; }
.aside-card { position: relative; overflow: hidden; display: grid; gap: 12px; padding: 28px; border-radius: 32px; background: var(--ink); color: var(--muted-light); }
.aside-card::before { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(29, 107, 255, .45), transparent 70%); pointer-events: none; }
.aside-card > * { position: relative; }
.aside-card .label { margin: 0; }
.aside-card h2 { color: #fff; font-size: 1.3rem; line-height: 1.3; }
.aside-card p { font-size: .95rem; }
.aside-card .btn { margin-top: 4px; }
.aside-share { padding: 22px 24px; border-radius: 32px; border: 1px solid var(--line); }
.aside-share p { margin-bottom: 12px; color: var(--ink); font-size: .875rem; font-weight: 700; }
.aside-share div { display: flex; flex-wrap: wrap; gap: 8px; }
.aside-share a { padding: 8px 14px; border-radius: 999px; background: var(--paper-2); color: var(--ink); font-size: .85rem; font-weight: 600; transition: background-color .2s, color .2s; }
.aside-share a:hover { background: var(--ink); color: #fff; }

/* Comments */
.post-comments .wrap { max-width: 820px; }
.comments-title { margin-bottom: 20px; font-size: 1.4rem; font-weight: 800; }
.comment-list { display: grid; gap: 16px; margin-bottom: 40px; }
.comment-list .comment-body { padding: 22px; border-radius: var(--radius); background: var(--paper-2); }
.comment-list .children { margin: 16px 0 0 24px; display: grid; gap: 16px; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.comment-author img { border-radius: 50%; }
.comment-metadata { margin: 4px 0 10px; font-size: .8rem; }
.comment-metadata a { color: var(--muted); }
.comment-respond { padding: 28px; border-radius: 32px; border: 1px solid var(--line); }
.comment-form { display: grid; gap: 14px; }
.comment-form label { display: block; margin-bottom: 6px; color: var(--ink); font-size: .8125rem; font-weight: 600; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font: inherit; }
.comment-form textarea { min-height: 140px; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(29, 107, 255, .12); }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; }
.comment-form-cookies-consent label { margin: 0; font-weight: 500; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.post-grid { grid-template-columns: 1fr 1fr; }
	.post-layout { grid-template-columns: minmax(0, 1fr); }
	.post-aside { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
	.post-grid { grid-template-columns: 1fr; }
	.post-card-featured { grid-template-columns: 1fr; }
	.post-card-featured .post-card-img { min-height: 0; aspect-ratio: 16 / 9; }
	.post-aside { grid-template-columns: 1fr; }
	.post-author { flex-direction: column; }
	.blog-search .btn { padding-inline: 16px; }
	.entry-content { font-size: 1.04rem; }
}
