/**
 * Theme templates (not loaded on Elementor pages): page hero, blog list, post cards, single post,
 * entry content typography, comments, search form, 404, call-to-action.
 *
 * @package saidul-islam
 */

@keyframes sdl-float-in {

	from {
		opacity: 0;
		transform: translateY(14px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* ==========================================================================
   Page hero (design: breadcrumb section; sits under the transparent header)
   ========================================================================== */

.sdl-page-hero {
	position: relative;
	margin-top: calc(-1 * var(--sdl-header-h));
	padding: calc(var(--sdl-header-h) + clamp(48px, 6vw, 84px)) var(--sdl-gutter) clamp(52px, 6vw, 90px);
	overflow: hidden;
	background: var(--sdl-bg) url("../images/page-hero-bg.webp") center / cover no-repeat;
	color: var(--sdl-ink);
}

.sdl-page-hero__inner {
	position: relative;
	max-width: var(--sdl-container);
	margin: 0 auto;
	animation: sdl-float-in 0.7s ease both;
}

.sdl-page-hero__inner > * {
	max-width: 780px;
}

.sdl-page-hero__title {
	margin-bottom: 22px;
	font-size: var(--sdl-fs-h1);
	line-height: 1.04;
	text-wrap: balance;
}

.sdl-page-hero__intro {
	max-width: 56ch;
	color: var(--sdl-text);
	font-size: var(--sdl-fs-lead);
	text-wrap: pretty;
}

.sdl-page-hero__search {
	max-width: 520px;
	margin-top: 28px;
}

/* ==========================================================================
   Post list: topics, featured card, grid, pagination
   ========================================================================== */

.sdl-posts {
	padding: var(--sdl-section-y) var(--sdl-gutter);
	background: var(--sdl-white);
}

.sdl-topics__list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 clamp(28px, 3.5vw, 44px);
	padding: 0;
	list-style: none;
}

.sdl-topics__link {
	display: inline-block;
	padding: 10px 18px;
	border: 1px solid rgba(16, 20, 15, 0.14);
	border-radius: var(--sdl-radius-pill);
	background: var(--sdl-white);
	color: var(--sdl-ink);
	font-size: 14.5px;
	font-weight: 600;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sdl-topics__link:hover {
	border-color: var(--sdl-green);
	color: var(--sdl-ink);
}

.sdl-topics__link[aria-current="page"] {
	border-color: var(--sdl-ink);
	background: var(--sdl-ink);
	color: var(--sdl-bg);
}

.sdl-post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
	gap: 22px;
}

.sdl-post-card {
	display: flex;
}

.sdl-post-card__link {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: clamp(12px, 1.4vw, 16px);
	border: 1px solid var(--sdl-line-soft);
	border-radius: var(--sdl-radius-md);
	background: var(--sdl-white);
	box-shadow: 0 2px 6px rgba(16, 20, 15, 0.015);
	color: var(--sdl-ink);
	transition: border-color 0.2s ease;
}

.sdl-post-card__link:hover {
	border-color: rgba(65, 182, 85, 0.35);
	color: var(--sdl-ink);
}

.sdl-post-card__media {
	margin-bottom: 18px;
}

.sdl-post-card .sdl-post-card__img,
.sdl-post-card__placeholder {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--sdl-radius-sm);
	background: #f6f8f5;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.sdl-post-card__placeholder {
	background: linear-gradient(135deg, var(--sdl-green-tint), var(--sdl-blue-tint));
}

.sdl-post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 0 6px 8px;
}

.sdl-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	color: var(--sdl-muted);
	font-family: var(--sdl-font-mono);
	font-size: 11.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sdl-chip {
	padding: 4px 9px;
	border-radius: var(--sdl-radius-pill);
	background: var(--sdl-green-tint);
	color: var(--sdl-green-deep);
}

a.sdl-chip:hover {
	background: var(--sdl-green-fill);
	color: var(--sdl-green-deep);
}

.sdl-post-card__title {
	margin-bottom: 10px;
	font-size: clamp(19px, 1.8vw, 22px);
	letter-spacing: -0.01em;
	line-height: 1.25;
	text-wrap: balance;
}

.sdl-post-card__excerpt {
	margin-bottom: 18px;
	color: var(--sdl-text);
	font-size: 15px;
	line-height: 1.6;
	text-wrap: pretty;
}

.sdl-post-card__more {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-bottom: 3px;
	border-bottom: 1.5px solid var(--sdl-green);
	font-size: 14.5px;
	font-weight: 600;
}

/* Featured (first) post */
.sdl-post-card--featured {
	margin-bottom: clamp(28px, 3.5vw, 40px);
}

.sdl-post-card--featured .sdl-post-card__link {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	align-items: center;
	gap: clamp(22px, 3.5vw, 48px);
	padding: clamp(14px, 1.6vw, 20px);
	border-color: rgba(16, 20, 15, 0.06);
	border-radius: var(--sdl-radius-xl);
	background: #f6f8f5;
	box-shadow: none;
}

.sdl-post-card--featured .sdl-post-card__media {
	margin-bottom: 0;
}

.sdl-post-card--featured .sdl-post-card__img,
.sdl-post-card--featured .sdl-post-card__placeholder {
	border-radius: 16px;
}

.sdl-post-card--featured .sdl-post-card__body {
	padding: clamp(4px, 1.5vw, 20px);
}

.sdl-post-card--featured .sdl-meta {
	margin-bottom: 16px;
	font-size: 12px;
}

.sdl-post-card--featured .sdl-chip {
	padding: 5px 10px;
}

.sdl-post-card--featured .sdl-post-card__title {
	margin-bottom: 14px;
	font-size: clamp(26px, 2.8vw, 38px);
	letter-spacing: -0.02em;
	line-height: 1.12;
}

.sdl-post-card--featured .sdl-post-card__excerpt {
	max-width: 52ch;
	margin-bottom: 24px;
	font-size: 16px;
}

.sdl-post-card--featured .sdl-post-card__more {
	margin-top: 0;
	font-size: 15px;
}

/* Pagination */
.sdl-pagination {
	margin-top: clamp(36px, 4vw, 52px);
}

.sdl-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.sdl-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid rgba(16, 20, 15, 0.14);
	border-radius: var(--sdl-radius-pill);
	color: var(--sdl-ink);
	font-size: 15px;
	font-weight: 600;
}

.sdl-pagination a.page-numbers:hover {
	border-color: var(--sdl-green);
	color: var(--sdl-green-text);
}

.sdl-pagination .page-numbers.current {
	border-color: var(--sdl-ink);
	background: var(--sdl-ink);
	color: var(--sdl-bg);
}

.sdl-pagination .page-numbers.dots {
	border-color: transparent;
}

.sdl-empty {
	padding: clamp(28px, 4vw, 48px);
	border-radius: var(--sdl-radius-md);
	background: var(--sdl-surface);
	color: var(--sdl-text);
	text-align: center;
}

/* ==========================================================================
   Single post and plain pages
   ========================================================================== */

.sdl-single__head > * {
	max-width: 860px;
}

.sdl-single__head .sdl-meta {
	margin-bottom: 18px;
	font-size: 12px;
}

.sdl-single__title {
	margin-bottom: 20px;
	font-size: var(--sdl-fs-h1-service);
	line-height: 1.06;
	text-wrap: balance;
}

.sdl-single__media {
	position: relative;
	z-index: 1;
	max-width: calc(1040px + 2 * var(--sdl-gutter));
	margin: clamp(-40px, -3vw, -20px) auto 0;
	padding: 0 var(--sdl-gutter);
}

.sdl-single__media .sdl-single__img {
	display: block;
	width: 100%;
	height: auto;
	border: clamp(6px, 1vw, 10px) solid var(--sdl-white);
	border-radius: 26px;
	box-shadow: var(--sdl-shadow-frame);
}

.sdl-single__media figcaption {
	text-align: center;
}

.sdl-page-body {
	max-width: calc(760px + 2 * var(--sdl-gutter));
	margin: 0 auto;
	padding: clamp(40px, 5vw, 64px) var(--sdl-gutter) var(--sdl-section-y);
}

.sdl-page-body--comments {
	padding-top: 0;
}

/* Entry content typography (block editor output) */
.sdl-entry__content {
	color: var(--sdl-text);
	font-size: 17px;
	line-height: 1.75;
	overflow-wrap: break-word;
}

.sdl-entry__content > * + * {
	margin-top: 1.25em;
}

.sdl-entry__content h2,
.sdl-entry__content h3,
.sdl-entry__content h4 {
	margin-top: 1.9em;
	color: var(--sdl-ink);
	line-height: 1.2;
}

.sdl-entry__content h2 {
	font-size: clamp(24px, 2.6vw, 32px);
}

.sdl-entry__content h3 {
	font-size: clamp(20px, 2vw, 24px);
	letter-spacing: -0.01em;
}

.sdl-entry__content h4 {
	font-size: 18px;
	letter-spacing: -0.01em;
}

.sdl-entry__content a {
	color: var(--sdl-blue);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.sdl-entry__content a:hover {
	color: var(--sdl-green-text);
}

.sdl-entry__content strong {
	color: var(--sdl-ink);
	font-weight: 700;
}

.sdl-entry__content ul,
.sdl-entry__content ol {
	padding-left: 1.3em;
}

.sdl-entry__content li + li {
	margin-top: 0.4em;
}

.sdl-entry__content li::marker {
	color: var(--sdl-green);
}

.sdl-entry__content blockquote {
	margin-right: 0;
	margin-left: 0;
	padding-left: 1.2em;
	border-left: 3px solid var(--sdl-green);
	color: var(--sdl-ink);
	font-family: var(--sdl-font-display);
	font-size: 20px;
	line-height: 1.5;
}

.sdl-entry__content blockquote cite {
	display: block;
	margin-top: 0.6em;
	color: var(--sdl-muted);
	font-family: var(--sdl-font-body);
	font-size: 14px;
	font-style: normal;
}

.sdl-entry__content code,
.sdl-entry__content kbd {
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--sdl-surface);
	color: var(--sdl-ink);
	font-family: var(--sdl-font-mono);
	font-size: 0.88em;
}

.sdl-entry__content pre {
	padding: 20px 22px;
	overflow-x: auto;
	border-radius: var(--sdl-radius-sm);
	background: var(--sdl-ink);
	color: var(--sdl-bg);
	font-family: var(--sdl-font-mono);
	font-size: 14px;
	line-height: 1.6;
}

.sdl-entry__content pre code {
	padding: 0;
	background: none;
	color: inherit;
}

.sdl-entry__content img {
	border-radius: var(--sdl-radius-sm);
}

.sdl-entry__content figure {
	margin-right: 0;
	margin-left: 0;
}

.sdl-entry__content figcaption {
	margin-top: 0.6em;
	color: var(--sdl-muted);
	font-size: 14px;
	text-align: center;
}

.sdl-entry__content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.sdl-entry__content th,
.sdl-entry__content td,
.sdl-entry__content .wp-block-table th,
.sdl-entry__content .wp-block-table td {
	border: 0;
	padding: 12px 10px;
	border-bottom: 1px solid var(--sdl-line);
	text-align: left;
}

.sdl-entry__content th {
	color: var(--sdl-ink);
}

.sdl-entry__content .wp-block-table thead {
	border-bottom: 1.5px solid var(--sdl-ink);
}

.sdl-entry__content .wp-block-table td,
.sdl-entry__content .wp-block-table th {
	border-bottom: 1px solid var(--sdl-line);
}

.sdl-entry__content hr {
	height: 1px;
	margin: 2.4em 0;
	border: 0;
	background: var(--sdl-line);
}

.sdl-page-links {
	display: flex;
	gap: 8px;
	margin-top: 2em;
	font-weight: 600;
}

/* Tags */
.sdl-single__tags {
	margin-top: 40px;
}

.sdl-tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sdl-tag-list a {
	display: inline-block;
	padding: 7px 14px;
	border: 1px solid rgba(16, 20, 15, 0.14);
	border-radius: var(--sdl-radius-pill);
	color: var(--sdl-ink);
	font-size: 14px;
	font-weight: 600;
}

.sdl-tag-list a:hover {
	border-color: var(--sdl-green);
	color: var(--sdl-green-text);
}

/* Previous / next */
.sdl-post-nav {
	margin-top: 48px;
}

.sdl-post-nav .nav-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 14px;
}

.sdl-post-nav a {
	display: grid;
	gap: 6px;
	height: 100%;
	padding: 20px 24px;
	border: 1px solid rgba(16, 20, 15, 0.06);
	border-radius: 18px;
	background: #f6f8f5;
	color: var(--sdl-ink);
	transition: border-color 0.2s ease;
}

.sdl-post-nav a:hover {
	border-color: rgba(65, 182, 85, 0.35);
	color: var(--sdl-ink);
}

.sdl-post-nav .nav-next {
	text-align: right;
}

.sdl-post-nav__label {
	color: var(--sdl-muted);
	font-family: var(--sdl-font-mono);
	font-size: 11.5px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.sdl-post-nav__title {
	font-family: var(--sdl-font-display);
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

/* Related posts */
.sdl-related {
	background: var(--sdl-surface);
}

.sdl-related__title {
	margin-bottom: clamp(24px, 3vw, 36px);
	font-size: var(--sdl-fs-h2);
	line-height: 1.14;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.sdl-comments__title {
	margin-bottom: 24px;
	font-size: clamp(22px, 2.2vw, 28px);
	line-height: 1.2;
}

.sdl-comments__list,
.sdl-comments__list .children {
	margin: 0 0 40px;
	padding: 0;
	list-style: none;
}

.sdl-comments__list .children {
	margin: 0 0 0 clamp(16px, 4vw, 44px);
}

.sdl-comments__list .comment-body {
	padding: 20px 0;
	border-bottom: 1px solid var(--sdl-line);
	color: var(--sdl-text);
	font-size: 15.5px;
}

.sdl-comments__list .comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin-bottom: 10px;
	font-size: 14px;
}

.sdl-comments__list .avatar {
	float: left;
	margin-right: 12px;
	border-radius: 50%;
}

.sdl-comments__list .fn {
	color: var(--sdl-ink);
	font-style: normal;
	font-weight: 600;
}

.sdl-comments__list .comment-metadata a {
	color: var(--sdl-muted);
}

.sdl-comments .comment-reply-link {
	color: var(--sdl-green-text);
	font-size: 14px;
	font-weight: 600;
}

.comment-form {
	display: grid;
	gap: 18px;
}

.comment-form label {
	display: block;
	margin-bottom: 8px;
	color: var(--sdl-ink);
	font-size: 14px;
	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: 1px solid rgba(16, 20, 15, 0.14);
	border-radius: var(--sdl-radius-xs);
	background: var(--sdl-white);
	color: var(--sdl-ink);
	font-size: 15.5px;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--sdl-green);
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 14px;
}

.comment-form .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 500;
}

.comment-notes,
.logged-in-as {
	color: var(--sdl-muted);
	font-size: 14px;
}

/* ==========================================================================
   Search form
   ========================================================================== */

.sdl-search {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 6px 6px 20px;
	border: 1px solid rgba(16, 20, 15, 0.14);
	border-radius: var(--sdl-radius-pill);
	background: var(--sdl-white);
	box-shadow: var(--sdl-shadow-soft);
}

.sdl-search:focus-within {
	outline: 2px solid var(--sdl-green-text);
	outline-offset: 3px;
}

.sdl-search__input {
	flex: 1;
	min-width: 0;
	padding: 8px 0;
	border: 0;
	background: none;
	color: var(--sdl-ink);
	font-size: 15.5px;
	outline: none;
}

.sdl-search__button {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--sdl-ink);
	color: var(--sdl-bg);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.sdl-search__button:hover {
	background: var(--sdl-green);
	color: var(--sdl-on-green);
}

/* ==========================================================================
   404
   ========================================================================== */

.sdl-404 {
	min-height: clamp(560px, 70vh, 760px);
}

.sdl-404__code {
	margin-bottom: 4px;
	color: #e3e8e1;
	font-family: var(--sdl-font-display);
	font-size: clamp(96px, 16vw, 200px);
	font-weight: 800;
	letter-spacing: -0.05em;
	line-height: 0.9;
}

.sdl-404__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
}

/* ==========================================================================
   Call-to-action (design: #cta)
   ========================================================================== */

.sdl-cta {
	background: var(--sdl-bg);
}

.sdl-cta__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 620px);
	place-content: center;
	justify-items: center;
	min-height: clamp(460px, 36.4vw, 560px);
	padding: clamp(40px, 5vw, 64px) var(--sdl-gutter);
	overflow: hidden;
	border-top: 1px solid rgba(16, 20, 15, 0.07);
	border-bottom: 1px solid rgba(16, 20, 15, 0.07);
	background: var(--sdl-cta-bg) url("../images/cta-bg.webp") center / cover no-repeat;
	text-align: center;
}

/* Soft light patch behind the text (wider on phones, where the avatars sit closer). */
.sdl-cta__inner::before {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 70% 45% at 50% 50%, rgba(242, 242, 242, 0.92) 50%, rgba(242, 242, 242, 0) 100%);
	content: "";
	pointer-events: none;
}

.sdl-cta__inner > * {
	position: relative;
}


.sdl-badge {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 20px;
	padding: 8px 15px;
	border: 1px solid rgba(16, 20, 15, 0.1);
	border-radius: var(--sdl-radius-pill);
	background: var(--sdl-white);
	color: var(--sdl-green-text);
	font-family: var(--sdl-font-mono);
	font-size: 11.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.sdl-badge__dot {
	width: 7px;
	height: 7px;
	border-radius: var(--sdl-radius-pill);
	background: var(--sdl-green);
}

.sdl-cta__title {
	max-width: 20ch;
	margin-bottom: 16px;
	font-size: clamp(28px, 3.4vw, 46px);
	line-height: 1.12;
	text-wrap: balance;
}

.sdl-cta__text {
	max-width: 50ch;
	margin-bottom: 28px;
	color: var(--sdl-text);
	font-size: 16.5px;
	line-height: 1.6;
	text-wrap: pretty;
}

.sdl-cta__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

@media (min-width: 768px) {

	.sdl-cta__inner::before {
		background: radial-gradient(ellipse 30% 50% at 50% 50%, rgba(242, 242, 242, 0.9) 50%, rgba(242, 242, 242, 0) 100%);
	}
}
