/*
Theme Name: Ekansha Technologies
Theme URI: https://www.ekanshatechnologies.com/blogs/
Author: Ekansha Technologies
Author URI: https://www.ekanshatechnologies.com/
Description: Blog theme for Ekansha Technologies. Uses the main site's header, footer, menu and styles (css/site.css) so the blog matches www.ekanshatechnologies.com.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ekansha
*/

/* Blog styles. Colours, fonts and buttons come from the main site's css/site.css. */

.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;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 100;
	padding: 0.6rem 1rem;
	background: var(--color-navy);
	color: #fff;
	border-radius: 6px;
}

.skip-link:focus {
	top: 1rem;
	color: #fff;
}

.menuMainList.is-current {
	color: var(--color-primary-dark);
}

.inner-banner .banner-caption h1 {
	max-width: 52rem;
	font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.6rem);
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.banner-meta {
	margin: 0.9rem 0 0;
	color: rgba(255, 255, 255, 0.85);
	max-width: 44rem;
}

/* Layout */

.blog-main {
	background: var(--color-surface);
	padding-block: 2.5rem 3.5rem;
}

.blog-layout {
	display: grid;
	gap: 2rem;
}

.blog-layout__main,
.blog-layout__side {
	min-width: 0;
}

@media (min-width: 992px) {
	.blog-main {
		padding-block: 4rem 5rem;
	}

	.blog-layout {
		grid-template-columns: minmax(0, 1fr) 320px;
		gap: 2.5rem;
		align-items: start;
	}

	.blog-layout__side {
		position: sticky;
		top: 110px;
	}
}

.blog-page {
	max-width: 860px;
}

/* Post meta */

.post-meta {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--color-primary-dark);
}

.banner-meta .post-meta {
	color: var(--color-primary);
}

.post-meta__sep {
	opacity: 0.6;
}

/* Cards */

.blog-grid {
	display: grid;
	gap: 1.25rem;
}

@media (min-width: 640px) {
	.blog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.5rem;
	}
}

.blog-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid #e3e8ee;
	border-radius: var(--radius-card);
	overflow: hidden;
	color: var(--color-ink);
	text-decoration: none;
	transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card__link:hover,
.blog-card__link:focus-visible {
	color: var(--color-ink);
	box-shadow: var(--shadow-lift);
	transform: translateY(-2px);
}

.blog-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--color-light);
}

.blog-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.blog-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.25rem 1.4rem 1.4rem;
}

.blog-card__title {
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0.5rem 0;
	color: var(--color-navy);
}

.blog-card__excerpt {
	display: block;
	color: var(--color-muted);
	font-size: 0.95rem;
	margin-bottom: 1rem;
}

.blog-card__more {
	margin-top: auto;
	font-weight: 600;
	color: var(--color-navy);
}

.blog-card__more .fa {
	margin-left: 0.3rem;
	transition: transform 0.2s;
}

.blog-card__link:hover .blog-card__more .fa {
	transform: translateX(3px);
}

.sticky .blog-card__link {
	border-color: var(--color-primary);
}

/* Article */

.blog-article {
	background: #fff;
	border-radius: var(--radius-card);
	border: 1px solid #e3e8ee;
	padding: 1.25rem;
}

@media (min-width: 768px) {
	.blog-article {
		padding: 2.5rem 2.75rem;
	}
}

.blog-article__media {
	margin: -1.25rem -1.25rem 1.5rem;
}

@media (min-width: 768px) {
	.blog-article__media {
		margin: -2.5rem -2.75rem 2rem;
	}
}

.blog-article__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.entry-content {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--color-body);
	overflow-wrap: break-word;
}

.entry-content > * + * {
	margin-top: 1.1em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	color: var(--color-navy);
	font-weight: 600;
	line-height: 1.3;
	margin-top: 1.8em;
	margin-bottom: 0.5em;
}

.entry-content h2 { font-size: 1.6rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content h4 { font-size: 1.15rem; }

.entry-content p,
.entry-content ul,
.entry-content ol {
	margin-bottom: 0;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.4rem;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.entry-content li + li {
	margin-top: 0.35em;
}

.entry-content a {
	color: var(--color-navy);
	text-decoration: underline;
	text-decoration-color: var(--color-primary);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.entry-content a:hover {
	color: var(--color-primary-dark);
}

.entry-content img,
.entry-content video,
.entry-content iframe {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.entry-content blockquote {
	margin-inline: 0;
	padding: 0.5rem 0 0.5rem 1.25rem;
	border-left: 4px solid var(--color-primary);
	color: var(--color-muted);
	font-style: italic;
}

/* Many posts were pasted into <pre> blocks; show them as normal wrapped text. */
.entry-content pre {
	white-space: pre-wrap;
	word-break: break-word;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	background: none;
	padding: 0;
	border: 0;
	overflow: visible;
}

.entry-content pre.wp-block-code,
.entry-content pre code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9rem;
	white-space: pre;
	display: block;
	background: var(--color-ink);
	color: #e8edf2;
	padding: 1rem 1.25rem;
	border-radius: 8px;
	overflow-x: auto;
}

.entry-content code {
	font-size: 0.9em;
	background: var(--color-surface);
	padding: 0.1em 0.35em;
	border-radius: 4px;
}

.entry-content table {
	display: block;
	width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--color-line);
	padding: 0.55rem 0.75rem;
	text-align: left;
}

.entry-content th {
	background: var(--color-surface);
	color: var(--color-navy);
}

.entry-content hr {
	border: 0;
	border-top: 1px solid var(--color-line);
	margin-block: 2rem;
}

.alignleft { float: left; margin: 0.3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.3rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }

@media (max-width: 575px) {
	.alignleft,
	.alignright {
		float: none;
		margin: 1rem 0;
	}
}

.wp-caption,
.wp-block-image figcaption,
.wp-caption-text {
	max-width: 100%;
	font-size: 0.85rem;
	color: var(--color-secondary);
	text-align: center;
}

.page-links {
	margin-top: 2rem;
	font-weight: 600;
}

.blog-article__footer {
	margin-top: 2rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--color-line);
	font-size: 0.95rem;
	color: var(--color-muted);
}

.blog-article__footer p {
	margin: 0 0 0.5rem;
}

.blog-article__tags a {
	display: inline-block;
	margin: 0 0.4rem 0.4rem 0;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
	background: var(--color-surface);
	color: var(--color-navy);
	font-size: 0.85rem;
}

.blog-article__cats a {
	color: var(--color-navy);
	font-weight: 600;
}

/* Call to action */

.blog-cta {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 1.5rem;
	padding: 1.5rem;
	border-radius: var(--radius-card);
	background: linear-gradient(100deg, var(--color-navy-deep) 0%, var(--color-navy) 100%);
	color: #fff;
}

.blog-cta h2 {
	font-size: 1.3rem;
	font-weight: 600;
	color: #fff;
	margin: 0 0 0.35rem;
}

.blog-cta p {
	margin: 0;
	color: rgba(255, 255, 255, 0.8);
}

.blog-cta .btn {
	align-self: flex-start;
	white-space: nowrap;
}

@media (min-width: 768px) {
	.blog-cta {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 1.75rem 2rem;
	}

	.blog-cta .btn {
		align-self: center;
	}
}

/* Previous / next */

.post-navigation {
	margin-top: 1.5rem;
}

.post-navigation .nav-links {
	display: grid;
	gap: 1rem;
}

@media (min-width: 640px) {
	.post-navigation .nav-links {
		grid-template-columns: 1fr 1fr;
	}

	.post-navigation .nav-next {
		grid-column: 2;
		text-align: right;
	}
}

.post-navigation a {
	display: block;
	height: 100%;
	padding: 1rem 1.25rem;
	background: #fff;
	border: 1px solid #e3e8ee;
	border-radius: var(--radius-card);
	color: var(--color-navy);
	text-decoration: none;
}

.post-navigation a:hover {
	box-shadow: var(--shadow-lift);
	color: var(--color-navy);
}

.post-navigation .nav-label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-primary-dark);
	margin-bottom: 0.25rem;
}

.post-navigation .nav-title {
	font-weight: 600;
}

/* Pagination */

.pagination {
	margin-top: 2rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	height: 2.75rem;
	padding: 0 0.75rem;
	background: #fff;
	border: 1px solid #e3e8ee;
	border-radius: 8px;
	color: var(--color-navy);
	font-weight: 600;
}

.pagination .page-numbers.current,
.pagination a.page-numbers:hover {
	background: var(--color-navy);
	border-color: var(--color-navy);
	color: #fff;
}

/* Sidebar */

.blog-layout__side {
	display: grid;
	gap: 1.25rem;
}

.blog-widget {
	background: #fff;
	border: 1px solid #e3e8ee;
	border-radius: var(--radius-card);
	padding: 1.25rem 1.4rem;
}

.blog-widget__title {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--color-navy);
	margin: 0 0 0.9rem;
}

.blog-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.blog-recent li + li {
	border-top: 1px solid var(--color-line);
}

.blog-recent a {
	display: flex;
	gap: 0.8rem;
	align-items: flex-start;
	padding: 0.7rem 0;
	color: var(--color-ink);
}

.blog-recent a:hover strong {
	color: var(--color-primary-dark);
}

.blog-recent__thumb {
	flex: none;
	width: 64px;
	height: 64px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--color-light);
}

.blog-recent__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.blog-recent time {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-secondary);
}

.blog-recent strong {
	display: block;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--color-navy);
}

.blog-cats li,
.blog-widget li {
	padding: 0.35rem 0;
	color: var(--color-secondary);
}

.blog-cats a,
.blog-widget li a {
	color: var(--color-navy);
}

.blog-widget--cta {
	background: var(--color-navy);
	border-color: var(--color-navy);
	color: rgba(255, 255, 255, 0.85);
}

.blog-widget--cta .blog-widget__title {
	color: #fff;
	font-size: 1.2rem;
}

.blog-widget--cta .eyebrow {
	color: var(--color-primary);
	margin-bottom: 0.4rem;
}

/* Search form */

.search-form {
	display: flex;
	gap: 0.5rem;
}

.search-form label {
	flex: 1;
	margin: 0;
}

.search-form .search-field {
	width: 100%;
	height: 2.75rem;
	padding: 0 0.9rem;
	border: 1px solid var(--color-field-border);
	border-radius: 8px;
	font: inherit;
	color: var(--color-field);
	background: #fff;
}

.search-form .search-field:focus {
	outline: 2px solid var(--color-primary);
	outline-offset: 1px;
}

.search-form .search-submit {
	height: 2.75rem;
	padding: 0 1rem;
	border: 0;
	border-radius: 8px;
	background: var(--color-navy);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.search-form .search-submit:hover {
	background: var(--color-navy-deep);
}

.blog-search-again,
.blog-archive-intro {
	margin-bottom: 1.5rem;
}

.blog-archive-intro {
	color: var(--color-muted);
}

.blog-empty {
	background: #fff;
	border: 1px solid #e3e8ee;
	border-radius: var(--radius-card);
	padding: 2rem 1.5rem;
	text-align: center;
}

.blog-empty h2 {
	font-size: 1.5rem;
	color: var(--color-navy);
	margin-bottom: 0.5rem;
}

.blog-empty .search-form {
	max-width: 28rem;
	margin: 1.25rem auto 0;
}

/* Comments */

.blog-comments {
	margin-top: 1.5rem;
	background: #fff;
	border: 1px solid #e3e8ee;
	border-radius: var(--radius-card);
	padding: 1.25rem;
}

@media (min-width: 768px) {
	.blog-comments {
		padding: 2rem 2.25rem;
	}
}

.blog-comments__title,
.comment-reply-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--color-navy);
	margin-bottom: 1rem;
}

.comment-list,
.comment-list .children {
	list-style: none;
	padding-left: 0;
}

.comment-list .children {
	padding-left: 1.25rem;
	border-left: 2px solid var(--color-line);
}

.comment-body {
	padding: 1rem 0;
	border-bottom: 1px solid var(--color-line);
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 600;
}

.comment-author .avatar {
	border-radius: 50%;
}

.comment-metadata {
	font-size: 0.8rem;
	margin: 0.25rem 0 0.5rem;
}

.comment-metadata a {
	color: var(--color-secondary);
}

.comment-form p {
	margin-bottom: 1rem;
}

.comment-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.3rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--color-field-border);
	border-radius: 8px;
	font: inherit;
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
}

.comment-form .comment-form-cookies-consent label {
	font-weight: normal;
}

/* Block widgets added in Appearance > Widgets */

.blog-widget h2,
.blog-widget .wp-block-heading,
.blog-widget .wp-block-search__label {
	display: block;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--color-navy);
	margin: 0 0 0.9rem;
}

.blog-widget .wp-block-search__inside-wrapper {
	display: flex;
	gap: 0.5rem;
}

.blog-widget .wp-block-search__input {
	flex: 1;
	min-width: 0;
	height: 2.75rem;
	padding: 0 0.9rem;
	border: 1px solid var(--color-field-border);
	border-radius: 8px;
	font: inherit;
}

.blog-widget .wp-block-search__button {
	height: 2.75rem;
	margin: 0;
	padding: 0 1rem;
	border: 0;
	border-radius: 8px;
	background: var(--color-navy);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.blog-widget ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.blog-widget .wp-block-group__inner-container > * + * {
	margin-top: 0;
}
