/*
Theme Name: Al Qur'an
Description: A clean, elegant and responsive WordPress theme designed for Qur'an-focused websites, Islamic content, articles and educational resources.
Version: 1.0.0
Author: Nexa Themes
Requires at least: 6.0
Tested up to: 6.9
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: al-quran
Domain Path: /languages
Tags: blog, education, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================
   Design Tokens
   ========================================================= */

:root {
	--aq-primary: #075744;
	--aq-primary-dark: #064b3a;
	--aq-primary-light: #14765f;

	--aq-gold: #b99645;
	--aq-gold-light: #f2d58c;

	--aq-text: #24352f;
	--aq-text-light: #65736d;

	--aq-background: #ffffff;
	--aq-surface: #f7faf8;
	--aq-border: rgba(20, 91, 74, 0.10);

	--aq-container-width: 1200px;

	--aq-content-width: 800px;

	--aq-radius-small: 8px;
	--aq-radius-medium: 14px;
	--aq-radius-large: 22px;

	--aq-shadow-small: 0 6px 20px rgba(20, 91, 74, 0.05);
	--aq-shadow-medium: 0 12px 34px rgba(20, 91, 74, 0.08);

	--aq-transition: 0.2s ease;
}


/* =========================================================
   Box Sizing
   ========================================================= */

html {
	box-sizing: border-box;

	scroll-behavior: smooth;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}


/* =========================================================
   Document
   ========================================================= */

body {
	margin: 0;

	font-family:
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		Roboto,
		Helvetica,
		Arial,
		sans-serif;

	font-size: 16px;
	font-weight: 400;
	line-height: 1.7;

	color: var(--aq-text);
	background: var(--aq-background);

	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}


/* =========================================================
   Main Site
   ========================================================= */

.site-main {
	display: block;

	width: 100%;
	min-width: 0;
}


/* =========================================================
   Container
   ========================================================= */

.aq-container {
	width: min(
		calc(100% - 48px),
		var(--aq-container-width)
	);

	margin-right: auto;
	margin-left: auto;
}


/* =========================================================
   Typography
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-top: 0;

	font-weight: 700;
	line-height: 1.25;

	color: var(--aq-primary);
}

p {
	margin-top: 0;
	margin-bottom: 1.25em;
}

blockquote {
	margin: 1.5em 0;
	padding: 1em 1.25em;

	border-left: 4px solid var(--aq-gold);

	background: var(--aq-surface);
}

blockquote > :last-child {
	margin-bottom: 0;
}

strong,
b {
	font-weight: 700;
}


/* =========================================================
   Links
   ========================================================= */

a {
	color: var(--aq-primary-light);

	text-decoration-thickness: 1px;
	text-underline-offset: 2px;

	transition:
		color var(--aq-transition);
}

a:hover {
	color: var(--aq-primary);
}

a:focus-visible {
	outline: 3px solid rgba(185, 150, 69, 0.45);
	outline-offset: 3px;
}


/* =========================================================
   Images & Media
   ========================================================= */

img {
	display: block;

	max-width: 100%;
	height: auto;
}

figure {
	margin: 0;
}

iframe,
embed,
object,
video {
	display: block;

	max-width: 100%;
}

svg {
	max-width: 100%;
}


/* =========================================================
   Lists
   ========================================================= */

ul,
ol {
	margin-top: 0;
	margin-bottom: 1.25em;
}

ul ul,
ul ol,
ol ul,
ol ol {
	margin-bottom: 0;
}


/* =========================================================
   Tables
   ========================================================= */

table {
	width: 100%;

	margin-bottom: 1.5em;

	border-collapse: collapse;
	border-spacing: 0;
}

th,
td {
	padding: 10px 12px;

	text-align: left;

	border: 1px solid var(--aq-border);
}

th {
	font-weight: 700;

	color: var(--aq-primary);
	background: var(--aq-surface);
}


/* =========================================================
   Forms
   ========================================================= */

input,
textarea,
select {
	max-width: 100%;

	font: inherit;
	line-height: 1.5;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"],
input[type="week"],
select,
textarea {
	width: 100%;
	padding: 11px 13px;

	color: var(--aq-text);
	background: #ffffff;

	border: 1px solid rgba(20, 91, 74, 0.16);
	border-radius: var(--aq-radius-small);

	outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
select:focus,
textarea:focus {
	border-color: var(--aq-primary-light);

	box-shadow: 0 0 0 3px rgba(20, 118, 95, 0.10);
}

textarea {
	min-height: 140px;

	resize: vertical;
}


/* =========================================================
   Buttons
   ========================================================= */

button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
	font: inherit;
	font-weight: 600;

	cursor: pointer;
}

.aq-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-height: 46px;
	padding: 0 20px;

	font-weight: 700;
	line-height: 1.2;

	border: 1px solid transparent;
	border-radius: var(--aq-radius-small);

	text-decoration: none;

	transition:
		background-color var(--aq-transition),
		color var(--aq-transition),
		border-color var(--aq-transition),
		transform var(--aq-transition);
}

.aq-button:hover {
	text-decoration: none;
}

.aq-button:focus-visible {
	outline: 3px solid rgba(185, 150, 69, 0.45);
	outline-offset: 3px;
}

.aq-button-primary {
	color: #ffffff;
	background: var(--aq-primary-light);
}

.aq-button-primary:hover {
	color: #ffffff;
	background: var(--aq-primary);
}

.aq-button-secondary {
	color: var(--aq-primary);
	background: #ffffff;

	border-color: var(--aq-border);
}

.aq-button-secondary:hover {
	color: #ffffff;
	background: var(--aq-primary);
	border-color: var(--aq-primary);
}


/* =========================================================
   WordPress Alignment
   ========================================================= */

.alignleft {
	float: left;

	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;

	margin: 0 0 1em 1.5em;
}

.aligncenter {
	display: block;

	margin-right: auto;
	margin-left: auto;
}

.wp-block-image .alignleft,
.wp-block-image .alignright {
	max-width: 50%;
}

.wp-block-image.aligncenter {
	text-align: center;
}


/* =========================================================
   Wide / Full Width Blocks
   ========================================================= */

.alignwide {
	width: min(
		calc(100% + 80px),
		1280px
	);

	max-width: none;

	margin-right: auto;
	margin-left: auto;
}

.alignfull {
	width: 100vw;
	max-width: none;

	margin-right: calc(50% - 50vw);
	margin-left: calc(50% - 50vw);
}


/* =========================================================
   Captions
   ========================================================= */

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.wp-caption .wp-caption-text {
	margin-top: 8px;

	font-size: 14px;
	line-height: 1.5;

	color: var(--aq-text-light);
}


/* =========================================================
   Galleries
   ========================================================= */

.gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;

	margin-bottom: 1.5em;
}

.gallery-item {
	flex: 1 1 180px;

	max-width: 100%;
	margin: 0;
}

.gallery-icon img {
	width: 100%;
	height: auto;
}


/* =========================================================
   Embeds
   ========================================================= */

.wp-block-embed {
	max-width: 100%;
}

.wp-block-embed iframe {
	width: 100%;
}


/* =========================================================
   Arabic / Qur'an Typography
   ========================================================= */

[dir="rtl"],
[lang="ar"] {
	font-family:
		"Noto Naskh Arabic",
		"Amiri",
		"Traditional Arabic",
		serif;
}

.aq-arabic,
.aq-quran-text {
	font-family:
		"Noto Naskh Arabic",
		"Amiri",
		"Traditional Arabic",
		serif;

	line-height: 2;

	direction: rtl;
	text-align: right;
}


/* =========================================================
   Entry Content
   ========================================================= */

.entry-content {
	width: 100%;
	min-width: 0;
}

.entry-content > * {
	max-width: var(--aq-content-width);

	margin-right: auto;
	margin-left: auto;
}

.entry-content > .alignwide {
	max-width: 1280px;
}

.entry-content > .alignfull {
	max-width: none;
}

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

.entry-content img {
	height: auto;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.5em;
}

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


/* =========================================================
   Post / Page Meta
   ========================================================= */

.entry-meta {
	font-size: 14px;

	color: var(--aq-text-light);
}

.entry-meta a {
	color: inherit;
	text-decoration: none;
}

.entry-meta a:hover {
	color: var(--aq-primary-light);
}


/* =========================================================
   Pagination
   ========================================================= */

.nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-width: 40px;
	min-height: 40px;
	padding: 0 11px;

	color: var(--aq-primary);

	border: 1px solid var(--aq-border);
	border-radius: var(--aq-radius-small);

	text-decoration: none;
}

.page-numbers:hover,
.page-numbers.current {
	color: #ffffff;
	background: var(--aq-primary-light);
	border-color: var(--aq-primary-light);
}


/* =========================================================
   Search Form Foundation
   ========================================================= */

.search-form {
	display: flex;
	align-items: center;
	gap: 10px;

	width: 100%;
}

.search-form label {
	flex: 1 1 auto;
	min-width: 0;
}

.search-form .search-field {
	width: 100%;
}

.search-form .search-submit {
	flex: 0 0 auto;

	min-height: 44px;
	padding: 0 18px;

	color: #ffffff;
	background: var(--aq-primary-light);

	border: 0;
	border-radius: var(--aq-radius-small);
}

.search-form .search-submit:hover {
	background: var(--aq-primary);
}


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

.comments-area {
	width: 100%;
	max-width: var(--aq-content-width);

	margin-right: auto;
	margin-left: auto;
}

.comment-list {
	padding-left: 0;

	list-style: none;
}

.comment-list .children {
	padding-left: 24px;

	list-style: none;
}

.comment-body {
	padding: 20px 0;

	border-bottom: 1px solid var(--aq-border);
}

.comment-meta {
	font-size: 14px;

	color: var(--aq-text-light);
}

.comment-content {
	margin-top: 12px;
}

.comment-respond {
	margin-top: 32px;
}


/* =========================================================
   Screen Reader Text
   ========================================================= */

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

.screen-reader-text:focus {
	position: fixed !important;

	top: 10px;
	left: 10px;
	z-index: 999999;

	width: auto;
	height: auto;

	padding: 12px 16px;
	margin: 0;

	overflow: visible;
	clip: auto;

	font-size: 15px;
	font-weight: 700;

	color: #ffffff;
	background: var(--aq-primary);

	border-radius: var(--aq-radius-small);

	white-space: normal;
}


/* =========================================================
   WordPress Accessibility
   ========================================================= */

:focus:not(:focus-visible) {
	outline: none;
}

.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 3px solid rgba(185, 150, 69, 0.45);
	outline-offset: 3px;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 760px) {

	.aq-container {
		width: min(
			calc(100% - 32px),
			var(--aq-container-width)
		);
	}

	.alignwide {
		width: 100%;
	}

	.alignleft,
	.alignright {
		float: none;

		margin-right: auto;
		margin-left: auto;
	}

	.search-form {
		flex-direction: column;
		align-items: stretch;
	}

	.search-form .search-submit {
		width: 100%;
	}

	.entry-content > * {
		max-width: 100%;
	}

	.comment-list .children {
		padding-left: 16px;
	}

}


/* =========================================================
   Small Mobile
   ========================================================= */

@media (max-width: 480px) {

	.aq-container {
		width: min(
			calc(100% - 24px),
			var(--aq-container-width)
		);
	}

	body {
		font-size: 15px;
	}

}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}

}

/* =========================================================
   WordPress Compatibility Classes
   ========================================================= */

.sticky {
	/* WordPress sticky-post marker. */
}

.gallery-caption {
	display: block;
}

.bypostauthor {
	/* WordPress author marker. */
}
