/*
Theme Name: Aspire Digital Blog
Theme URI: https://aspiredigital.pk/blog/
Author: Aspire Digital
Author URI: https://aspiredigital.pk/
Description: Blog theme for aspiredigital.pk. Reuses the main website's CSS, JavaScript, fonts, header, footer and contact section so the blog looks exactly like the site.
Version: 1.0.5
Requires at least: 6.3
Requires PHP: 8.0
Text Domain: aspire-blog
*/

/* The site's /assets/css/main.css loads first; these rules only add what the blog needs. */

.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 .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* ---------- Blog hero: search + 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: var(--r-pill); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); }
.blog-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 185, 31, .15); }
.blog-search > .ico { flex: none; color: var(--muted-on-dark); }
.blog-search input { flex: 1; min-width: 0; padding: 10px 0; border: 0; background: none; color: var(--white); 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: var(--r-pill); 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: var(--white); }
.blog-cats a.is-active { background: var(--white); border-color: var(--white); color: var(--ink); }

/* ---------- Post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; }
.post-card:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--shadow); }
.post-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper); }
.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(232, 1, 54, .25), transparent 55%), radial-gradient(circle at 10% 90%, rgba(255, 185, 31, .2), transparent 55%), var(--ink); color: rgba(255, 255, 255, .5); }
.post-card-ph .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(--text); font-size: .8125rem; }
.post-meta > * + *::before { content: ''; display: inline-block; width: 4px; height: 4px; margin-right: 14px; border-radius: 50%; background: var(--line); vertical-align: middle; }
.post-cat { display: inline-flex; padding: 4px 10px; border-radius: var(--r-pill); background: rgba(232, 1, 54, .08); color: var(--red-deep); font-size: .75rem; font-weight: 700; }
.post-cat:hover { background: rgba(232, 1, 54, .15); }
.post-meta .post-cat + *::before { display: none; }
.post-card-title { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.015em; }
.post-card-title a { color: var(--text-dark); background-image: linear-gradient(currentColor, currentColor); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .35s var(--ease); }
.post-card:hover .post-card-title a { background-size: 100% 2px; }
.post-card-excerpt { color: var(--text); font-size: .95rem; line-height: 1.6; }
.post-card .link-arrow { margin-top: auto; padding-top: 6px; color: var(--red); font-size: .9rem; }

.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: var(--r-pill); border: 1px solid var(--line); color: var(--text-dark); font-weight: 600; }
.pagination .page-numbers:hover { border-color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* Empty state */
.blog-empty { max-width: 560px; margin: 0 auto; padding: clamp(36px, 6vw, 64px); border-radius: var(--r-lg); background: var(--paper); text-align: center; }
.blog-empty .svc-ico { margin: 0 auto 20px; }
.blog-empty h2 { font-size: 1.5rem; }
.blog-empty p { margin: 10px 0 24px; }

/* ---------- Single post ---------- */
.post-hero { padding-bottom: clamp(120px, 14vw, 180px); }
.post-hero-inner { position: relative; max-width: 900px; }
.post-cat-dark { margin-bottom: 18px; background: rgba(255, 255, 255, .08); color: var(--gold); }
.post-cat-dark:hover { background: rgba(255, 255, 255, .14); }
.post-title { color: var(--white); font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; }
.post-hero .lead { margin-top: 18px; }
.post-byline { display: flex; align-items: center; gap: 14px; margin-top: 28px; color: var(--muted-on-dark); }
.post-byline strong { display: block; color: var(--white); 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-red); color: var(--white); font-size: .85rem; font-weight: 800; }
.post-avatar-lg { width: 64px; height: 64px; font-size: 1.1rem; }

.post-cover { position: relative; margin-top: clamp(-150px, -11vw, -90px); }
.post-cover img { display: block; width: 100%; height: auto; max-height: 620px; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }

.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(32px, 4vw, 48px); }
.post-layout.no-aside { grid-template-columns: minmax(0, 820px); justify-content: center; padding-block: 0; }
.post-hero + .post-layout.no-cover { margin-top: clamp(-120px, -10vw, -80px); }
.post-hero + .post-layout.no-cover .entry-content { padding: clamp(28px, 4vw, 48px); border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow); }

/* Article typography */
.entry-content { min-width: 0; max-width: 760px; color: #3D4452; 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(--text-dark); letter-spacing: -.02em; line-height: 1.25; scroll-margin-top: calc(var(--header-h) + 24px); }
.entry-content h2 { margin-top: 2em; font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.entry-content h3 { margin-top: 1.7em; font-size: clamp(1.25rem, 1.9vw, 1.45rem); }
.entry-content h4 { margin-top: 1.5em; font-size: 1.15rem; }
.entry-content a { color: var(--red); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--red-deep); }
.entry-content strong { color: var(--text-dark); }
.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(--red); font-weight: 700; }
.entry-content blockquote { margin-inline: 0; padding: 22px 26px; border-left: 4px solid var(--red); border-radius: 0 var(--r) var(--r) 0; background: var(--paper); color: var(--text-dark); font-size: 1.15rem; font-weight: 600; line-height: 1.6; }
.entry-content blockquote cite { display: block; margin-top: 10px; color: var(--text); font-size: .9rem; font-style: normal; font-weight: 500; }
.entry-content img { height: auto; border-radius: var(--r); }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption { margin-top: 10px; color: var(--text); 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); font-size: .9em; }
.entry-content pre { padding: 20px; border-radius: var(--r); 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(--text-dark); background: var(--paper); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content .alignwide { margin-inline: clamp(-80px, -6vw, 0px); max-width: none; }
.entry-content .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; }
.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: var(--r-pill); background: var(--red); color: var(--white); font-weight: 700; text-decoration: none; }
.entry-content .wp-block-button__link:hover { background: var(--red-deep); color: var(--white); }
.entry-content .wp-block-embed iframe { width: 100%; border-radius: var(--r); }
.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: var(--r-pill); background: var(--paper); color: var(--text-dark); font-size: .875rem; font-weight: 600; text-decoration: none; }
.post-tags a:hover { background: var(--ink); color: var(--white); }
.post-author { display: flex; gap: 20px; align-items: flex-start; margin-top: 2.4em; padding: 28px; border-radius: var(--r-lg); background: var(--paper); line-height: 1.6; }
.post-author .eyebrow { margin: 0; }
.post-author h2 { margin: 4px 0 8px; font-size: 1.25rem; }
.post-author p { font-size: .95rem; }

/* Sidebar */
.post-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 18px; }
.aside-card { position: relative; overflow: hidden; display: grid; gap: 12px; padding: 28px; border-radius: var(--r-lg); background: var(--ink); color: var(--muted-on-dark); }
.aside-card::before { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 1, 54, .45), transparent 70%); pointer-events: none; }
.aside-card > * { position: relative; }
.aside-card .eyebrow { margin: 0; color: var(--gold); }
.aside-card h2 { color: var(--white); 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: var(--r-lg); border: 1px solid var(--line); }
.aside-share p { margin-bottom: 12px; color: var(--text-dark); font-size: .875rem; font-weight: 700; }
.aside-share div { display: flex; gap: 10px; }
.aside-share a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); color: var(--text-dark); transition: background-color .2s, color .2s; }
.aside-share a:hover { background: var(--ink); color: var(--white); }
.aside-share b { font-size: .95rem; }

/* Comments */
.post-comments .wrap { max-width: 820px; }
.comments-title { margin-bottom: 20px; font-size: 1.4rem; }
.comment-list { display: grid; gap: 16px; margin-bottom: 40px; }
.comment-list .comment-body { padding: 22px; border-radius: var(--r); background: var(--paper); }
.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(--text-dark); }
.comment-author img { border-radius: 50%; }
.comment-metadata { margin: 4px 0 10px; font-size: .8rem; }
.comment-metadata a { color: var(--text); }
.comment-respond { padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.comment-form { display: grid; gap: 14px; }
.comment-form label { display: block; margin-bottom: 6px; color: var(--text-dark); 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: var(--r-sm); border: 1px solid var(--line); background: var(--paper); font: inherit; }
.comment-form textarea { min-height: 140px; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--red); background: var(--white); box-shadow: 0 0 0 4px rgba(232, 1, 54, .1); }
.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; }
}
