/*
Theme Name: HijraStory
Theme URI: https://hijrastory.com
Author: HijraStory
Author URI: https://hijrastory.com
Description: A fancy, modern, elegant and clean WordPress theme for HijraStory.
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hijrastory
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
*/

:root {
	--hs-color-primary: #17643a;
	--hs-color-primary-dark: #0e4b2a;
	--hs-color-secondary: #2f855a;
	--hs-color-accent: #d5a63a;
	--hs-color-text: #173227;
	--hs-color-muted: #60736a;
	--hs-color-bg: #f5f8f6;
	--hs-color-surface: #ffffff;
	--hs-color-border: rgba(23, 50, 39, 0.12);
	--hs-radius: 1.25rem;
	--hs-radius-sm: 0.75rem;
	--hs-shadow: 0 8px 30px rgba(21, 65, 43, 0.08);
	--hs-shadow-lg: 0 20px 50px rgba(21, 65, 43, 0.14);
	--hs-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.75;
	color: var(--hs-color-text);
	background: radial-gradient(circle at top left, #eef8f1 0, transparent 38rem), var(--hs-color-bg);
	overflow-wrap: break-word;
}

a {
	color: var(--hs-color-primary);
	text-decoration: none;
	transition: var(--hs-transition);
}

a:hover,
a:focus {
	color: var(--hs-color-primary-dark);
	text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.025em;
	margin: 0 0 1rem;
	color: var(--hs-color-text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }

img,
iframe,
embed,
video,
object {
	max-width: 100%;
	height: auto;
}

img {
	border-radius: var(--hs-radius-sm);
}

table {
	max-width: 100%;
	width: 100%;
	border-collapse: collapse;
}

td,
th {
	word-break: break-word;
}

pre {
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow-x: auto;
}

.container {
	width: calc(100% - 2.5rem);
	max-width: 1240px;
	margin: 0 auto;
}

.content-area,
.widget-area,
.post-card,
.entry-content,
.widget {
	min-width: 0;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	left: 1rem;
	top: 1rem;
	z-index: 99999;
	background: var(--hs-color-primary);
	color: #fff;
	padding: 0.75rem 1.25rem;
	border-radius: var(--hs-radius-sm);
	transform: translateY(-200%);
}

.skip-link:focus {
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
	transform: translateY(0);
}

.site-header {
	background: rgba(255, 255, 255, 0.92);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid var(--hs-color-border);
	box-shadow: 0 4px 24px rgba(21, 65, 43, 0.05);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 76px;
	padding: 0.75rem 0;
	position: relative;
}

.site-branding {
	display: flex;
	flex-direction: column;
}

.site-title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.7rem;
	font-weight: 700;
	letter-spacing: -0.035em;
	margin: 0;
	line-height: 1.1;
}

.site-title a {
	background: linear-gradient(135deg, var(--hs-color-primary) 0%, var(--hs-color-secondary) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.site-description {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
	color: var(--hs-color-muted);
}

.main-navigation {
	display: flex;
	align-items: center;
}

.nav-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0.25rem;
}

.nav-menu a {
	display: block;
	padding: 0.55rem 0.9rem;
	border-radius: 999px;
	color: var(--hs-color-text);
	font-weight: 650;
	font-size: 0.925rem;
	white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus,
.nav-menu .current-menu-item a,
.nav-menu .current_page_item a {
	background: rgba(30, 86, 49, 0.1);
	color: var(--hs-color-primary);
	text-decoration: none;
}

.menu-toggle {
	display: none;
	background: var(--hs-color-primary);
	color: #fff;
	border: 0;
	padding: 0.65rem 1rem;
	border-radius: 999px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 6px 16px rgba(23, 100, 58, 0.2);
	cursor: pointer;
}

.site-content {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
	gap: clamp(2rem, 4vw, 3rem);
	padding: 2.75rem 0 3.5rem;
}

.content-area:only-child,
.no-sidebar .content-area,
body.sidebar-no-widgets .content-area {
	grid-column: 1 / -1;
	max-width: 820px;
	margin: 0 auto;
	width: 100%;
}

.page-header {
	margin-bottom: 2rem;
}

.page-title {
	font-size: 2.25rem;
	margin-bottom: 0.5rem;
}

.archive-description {
	color: var(--hs-color-muted);
}

.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}

.post-card {
	background: var(--hs-color-surface);
	border: 1px solid var(--hs-color-border);
	border-radius: var(--hs-radius);
	box-shadow: var(--hs-shadow);
	overflow: hidden;
	transition: var(--hs-transition);
	display: flex;
	flex-direction: column;
}

.post-card:hover {
	transform: translateY(-4px);
	border-color: rgba(23, 100, 58, 0.25);
	box-shadow: var(--hs-shadow-lg);
}

.post-card .post-thumbnail {
	display: block;
	overflow: hidden;
}

.post-card .post-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 0;
	transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
	transform: scale(1.05);
}

.post-card-content {
	padding: 1.35rem 1.4rem 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.entry-title {
	font-size: 1.35rem;
	margin-bottom: 0.65rem;
	line-height: 1.28;
}

.entry-title a {
	color: var(--hs-color-text);
}

.entry-title a:hover,
.entry-title a:focus {
	color: var(--hs-color-primary);
	text-decoration: none;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--hs-color-muted);
	margin-bottom: 0.85rem;
}

.entry-meta .sep {
	margin: 0 0.35rem;
}

.entry-summary {
	color: var(--hs-color-muted);
	font-size: 0.95rem;
	line-height: 1.7;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.entry-summary p {
	margin: 0;
}

.post-thumbnail {
	margin-bottom: 1.5rem;
}

.post-thumbnail img {
	width: 100%;
	border-radius: var(--hs-radius);
}

.entry-content {
	font-size: 1.05rem;
	line-height: 1.85;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.single-post .site-main > article {
	background: var(--hs-color-surface);
	border: 1px solid var(--hs-color-border);
	border-radius: var(--hs-radius);
	box-shadow: var(--hs-shadow);
	padding: clamp(1.25rem, 4vw, 2.5rem);
}

.single-post .site-main > article > .entry-header {
	margin-bottom: 1.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--hs-color-border);
}

.single-post .entry-title {
	font-size: clamp(2rem, 4.5vw, 3rem);
	line-height: 1.12;
}

.single-post .entry-content > p:first-child {
	font-size: 1.12em;
}

.single-post .entry-footer {
	margin-top: 2rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--hs-color-border);
}

.entry-content > * {
	margin-bottom: 1.5rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 2rem;
}

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

.button,
button,
input[type="submit"],
.wp-block-button__link {
	display: inline-block;
	background: linear-gradient(135deg, var(--hs-color-primary) 0%, var(--hs-color-primary-dark) 100%);
	color: #fff;
	padding: 0.75rem 1.5rem;
	border: 0;
	border-radius: 999px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: var(--hs-transition);
	box-shadow: 0 6px 16px rgba(30, 86, 49, 0.25);
}

.button:hover,
button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(30, 86, 49, 0.35);
	color: #fff;
	text-decoration: none;
}

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

.pagination .nav-links a,
.pagination .nav-links span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border-radius: 999px;
	font-weight: 600;
	background: var(--hs-color-surface);
	box-shadow: var(--hs-shadow);
}

.pagination .nav-links .current,
.pagination .nav-links a:hover,
.pagination .nav-links a:focus {
	background: var(--hs-color-primary);
	color: #fff;
	text-decoration: none;
}

.widget-area {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.widget {
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid var(--hs-color-border);
	border-radius: var(--hs-radius);
	box-shadow: var(--hs-shadow);
	padding: 1.35rem;
}

.widget-title,
.widget .wp-block-heading {
	font-size: 1.05rem;
	margin: 0 0 1rem;
	padding: 0 0 0.75rem;
	border-bottom: 1px solid var(--hs-color-border);
	position: relative;
}

.widget-title::after,
.widget .wp-block-heading::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 2.75rem;
	height: 3px;
	border-radius: 999px;
	background: var(--hs-color-accent);
}

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

.widget li {
	padding: 0.65rem 0;
	border-bottom: 1px solid var(--hs-color-border);
	line-height: 1.5;
}

.widget li:last-child {
	border-bottom: 0;
}

.widget a {
	color: var(--hs-color-text);
}

.widget a:hover,
.widget a:focus {
	color: var(--hs-color-primary);
}

.site-footer {
	background: linear-gradient(135deg, #0c2f1e 0%, #123e28 100%);
	color: #fff;
	padding: 1.35rem 0;
	margin-top: 1rem;
	box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.footer-inner {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2rem;
}

.site-footer .widget {
	background: rgba(255, 255, 255, 0.05);
	box-shadow: none;
	color: #fff;
}

.site-footer .widget-title {
	background: none;
	color: #fff;
	margin: 0 0 1rem;
	padding: 0;
	border-radius: 0;
}

.site-footer .widget a {
	color: #fff;
	opacity: 0.85;
}

.site-footer .widget a:hover,
.site-footer .widget a:focus {
	opacity: 1;
	color: #fff;
}

.site-info {
	text-align: center;
	font-size: 0.875rem;
	opacity: 0.7;
}

.site-info p {
	margin: 0;
}

.comments-area {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--hs-color-border);
}

.comment-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.comment-list .comment {
	margin-bottom: 1.5rem;
}

.comment-meta {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

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

.comment-metadata {
	font-size: 0.8rem;
	color: var(--hs-color-muted);
}

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

.comment-form input:not([type="checkbox"]):not([type="submit"]),
.comment-form textarea {
	width: 100%;
	padding: 0.8rem 0.9rem;
	border: 1px solid var(--hs-color-border);
	border-radius: var(--hs-radius-sm);
	background: var(--hs-color-surface);
	color: var(--hs-color-text);
	font: inherit;
}

@media (max-width: 900px) {
	.site-content {
		display: block;
		padding: 2rem 0 3rem;
	}

	.widget-area {
		order: 2;
		margin-top: 2rem;
	}

	.posts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.container {
		width: calc(100% - 1.25rem);
	}

	.menu-toggle {
		display: inline-block;
	}

	#primary-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		max-width: 100%;
		max-height: calc(100vh - 5rem);
		overflow-y: auto;
		background: var(--hs-color-surface);
		box-shadow: var(--hs-shadow-lg);
		padding: 0.75rem;
		border: 1px solid var(--hs-color-border);
		border-radius: var(--hs-radius-sm);
		z-index: 100;
	}

	#primary-menu.toggled {
		display: flex;
		flex-direction: column;
	}

	.nav-menu {
		flex-direction: column;
		gap: 0.25rem;
	}

	.nav-menu a {
		padding: 0.7rem 0.8rem;
		white-space: normal;
	}

	.header-inner {
		flex-wrap: wrap;
		min-height: 66px;
		padding: 0.6rem 0;
	}

	.main-navigation {
		margin-left: auto;
	}

	.site-title {
		font-size: 1.4rem;
	}

	.posts-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.single-post .site-main > article {
		padding: 1.15rem;
		border-radius: 1rem;
	}

	.single-post .entry-content {
		font-size: 1rem;
		line-height: 1.8;
	}

	.post-navigation .nav-links {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Custom page helpers (Quran / Fikih) */
.hijra-breadcrumbs {
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid var(--hs-color-border);
	border-radius: var(--hs-radius-sm);
	box-shadow: 0 5px 20px rgba(21, 65, 43, 0.05);
	padding: 0.75rem 1rem;
	margin-bottom: 1.5rem;
}

.hijra-breadcrumbs .container {
	width: 100%;
}

.hijra-breadcrumbs .container > nav > ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	font-size: 0.9rem;
	color: var(--hs-color-muted);
}

.hijra-breadcrumbs li {
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hijra-breadcrumbs li:not(:last-child)::after {
	content: '/';
	margin-left: 0.5rem;
	color: var(--hs-color-muted);
}

.hijra-breadcrumbs a {
	color: var(--hs-color-primary);
}

.hijra-breadcrumbs a:hover {
	text-decoration: underline;
}

.hijra-full-width .site-content {
	grid-template-columns: minmax(0, 1fr);
}

.hijra-full-width .content-area {
	max-width: 100%;
	width: 100%;
}

.hijra-hide-footer-widgets .footer-widgets,
.hijra-hide-footer-widgets .footer-navigation {
	display: none !important;
}

/* Search widget */
.search-form {
	display: flex;
	gap: 0.5rem;
	align-items: stretch;
}

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

.search-field {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid var(--hs-color-border);
	border-radius: var(--hs-radius-sm);
	background: var(--hs-color-surface);
	color: var(--hs-color-text);
	font: inherit;
	line-height: 1.4;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	transition: var(--hs-transition);
}

.search-field:focus {
	border-color: var(--hs-color-primary);
	box-shadow: 0 0 0 3px rgba(30, 86, 49, 0.15);
}

.search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	padding: 0;
	background: var(--hs-color-primary) !important;
	color: #fff !important;
	border: 0;
	border-radius: var(--hs-radius-sm);
	box-shadow: none !important;
	cursor: pointer;
	transition: var(--hs-transition);
}

.search-submit:hover,
.search-submit:focus {
	background: var(--hs-color-primary-dark) !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(30, 86, 49, 0.2) !important;
}

/* Social Snap share wrapper */
.ss-inline-share-wrapper,
.ss-inline-share-content,
.ss-inline-share-wrapper .ss-social-icons-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.ss-inline-share-wrapper .ss-social-icons-container {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Post navigation (Previous/Next) */
.post-navigation .nav-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 2rem;
}

.post-navigation .nav-links > div {
	min-width: 0;
}

.post-navigation .nav-links a {
	display: block;
	height: 100%;
	width: 100%;
	text-align: left;
	padding: 1rem 1.1rem;
	background: var(--hs-color-surface);
	border: 1px solid var(--hs-color-border);
	border-radius: var(--hs-radius-sm);
	box-shadow: var(--hs-shadow);
	color: var(--hs-color-text);
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.post-navigation .nav-links a:hover,
.post-navigation .nav-links a:focus {
	border-color: var(--hs-color-primary);
	color: var(--hs-color-primary);
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: var(--hs-shadow-lg);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 3px solid rgba(213, 166, 58, 0.5);
	outline-offset: 3px;
}

.footer-navigation {
	margin: 0;
}

.footer-nav-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-nav-menu a {
	color: #fff;
	font-size: 0.875rem;
	opacity: 0.82;
}

.footer-nav-menu a:hover,
.footer-nav-menu a:focus {
	color: #fff;
	opacity: 1;
}

.page-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 2rem;
}

.page-links a,
.page-links > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid var(--hs-color-border);
	border-radius: 999px;
	background: var(--hs-color-surface);
	font-weight: 700;
}

.page-links > span,
.page-links a:hover,
.page-links a:focus {
	background: var(--hs-color-primary);
	border-color: var(--hs-color-primary);
	color: #fff;
	text-decoration: none;
}

.tag-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	color: var(--hs-color-muted);
	font-size: 0.875rem;
}

.tag-links a {
	display: inline-flex;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	background: rgba(23, 100, 58, 0.08);
	font-weight: 650;
}

.tag-links a:hover,
.tag-links a:focus {
	background: var(--hs-color-primary);
	color: #fff;
	text-decoration: none;
}

.nav-subtitle {
	display: block;
	margin-bottom: 0.25rem;
	color: var(--hs-color-muted);
	font-size: 0.72rem;
	font-weight: 750;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nav-title {
	display: block;
	font-weight: 700;
	line-height: 1.4;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--hs-color-primary);
	box-shadow: 0 0 0 3px rgba(23, 100, 58, 0.12);
	outline: none;
}

@media (max-width: 480px) {
	.site-description {
		display: none;
	}

	.site-content {
		padding-top: 1.25rem;
	}

	.post-card-content,
	.widget {
		padding: 1.1rem;
	}

	.ss-inline-share-wrapper,
	.ss-inline-share-content {
		width: 100%;
	}

	.crp_related.crp-rounded-thumbs ul {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.crp_related.crp-rounded-thumbs li {
		width: 100% !important;
		height: auto !important;
		aspect-ratio: 1;
	}

	.footer-nav-menu {
		gap: 0.5rem 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
