/* Quran Academy — main styles */

:root {
	--color-bg: #f7f5f0;
	--color-surface: #ffffff;
	--color-text: #1c1917;
	--color-muted: #57534e;
	--color-primary: #14532d;
	--color-primary-hover: #166534;
	--color-accent: #b45309;
	--color-accent-hover: #c2410c;
	--color-border: #e7e5e4;
	--font-sans: "Outfit", system-ui, sans-serif;
	--font-arabic: "Amiri", "Traditional Arabic", serif;
	--radius: 12px;
	--shadow: 0 4px 24px rgba(28, 25, 23, 0.08);
	--container: 1120px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-bg);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

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

a:hover {
	text-decoration: underline;
}

.container {
	width: min(100% - 2rem, var(--container));
	margin-inline: auto;
}

.narrow {
	max-width: 720px;
	margin-inline: auto;
}

.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:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 1000;
	padding: 0.75rem 1rem;
	background: var(--color-primary);
	color: #fff;
	clip: auto;
	width: auto;
	height: auto;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.65rem 1.25rem;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	border-radius: 999px;
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
	text-decoration: none;
}

.btn--sm {
	padding: 0.4rem 0.9rem;
	font-size: 0.85rem;
}

.btn--lg {
	padding: 0.85rem 1.5rem;
	font-size: 1rem;
}

.btn--primary {
	background: var(--color-primary);
	color: #fff;
}

.btn--primary:hover {
	background: var(--color-primary-hover);
	color: #fff;
}

.btn--accent {
	background: var(--color-accent);
	color: #fff;
	border-color: var(--color-accent);
}

.btn--accent:hover {
	background: var(--color-accent-hover);
	border-color: var(--color-accent-hover);
	color: #fff;
}

.btn--ghost {
	background: transparent;
	color: var(--color-primary);
	border-color: var(--color-border);
}

.btn--outline {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.6);
}

.btn--outline:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.btn--light {
	background: #fff;
	color: var(--color-primary);
}

.btn--light:hover {
	background: var(--color-bg);
	color: var(--color-primary);
}

/* Header */
.header-top {
	background: var(--color-primary);
	color: #ecfdf5;
	font-size: 0.8rem;
}

.header-top a {
	color: #fff;
}

.header-top__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding-block: 0.5rem;
}

.header-top__social {
	display: flex;
	gap: 0.75rem;
}

.header-top__social a {
	font-weight: 700;
	opacity: 0.9;
}

.header-top__phones {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.header-top__auth {
	display: flex;
	gap: 0.5rem;
}

.header-main {
	background: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
	position: sticky;
	top: 0;
	z-index: 50;
}

.header-main__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 0.85rem;
}

.site-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
	font-size: 1.15rem;
	color: var(--color-text);
	text-decoration: none;
}

.site-logo:hover {
	text-decoration: none;
	color: var(--color-primary);
}

.site-logo__mark {
	font-size: 1.5rem;
	line-height: 1;
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: none;
	cursor: pointer;
}

.nav-toggle__bar {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--color-text);
	border-radius: 1px;
	transition: transform 0.2s, opacity 0.2s;
}

.primary-nav {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.menu--primary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.menu--primary a {
	color: var(--color-text);
	font-weight: 500;
	font-size: 0.95rem;
}

.menu--primary a:hover {
	color: var(--color-primary);
	text-decoration: none;
}

.header-cta {
	white-space: nowrap;
}

@media (max-width: 900px) {
	.header-top__phones {
		display: none;
	}

	.nav-toggle {
		display: flex;
	}

	.primary-nav {
		position: fixed;
		inset: 0 0 0 auto;
		width: min(100%, 320px);
		background: var(--color-surface);
		flex-direction: column;
		align-items: stretch;
		padding: 5rem 1.5rem 2rem;
		box-shadow: var(--shadow);
		transform: translateX(100%);
		transition: transform 0.25s ease;
		z-index: 40;
	}

	body.nav-open .primary-nav {
		transform: translateX(0);
	}

	body.nav-open::after {
		content: "";
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
		z-index: 30;
	}

	.menu--primary {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}

	.menu--primary li {
		width: 100%;
		border-bottom: 1px solid var(--color-border);
	}

	.menu--primary a {
		display: block;
		padding: 0.85rem 0;
	}
}

/* Hero */
.hero {
	position: relative;
	padding: clamp(3rem, 8vw, 5rem) 0;
	overflow: hidden;
	color: #fff;
}

.hero__bg {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(135deg, rgba(20, 83, 45, 0.92) 0%, rgba(22, 101, 52, 0.88) 50%, rgba(120, 53, 15, 0.85) 100%),
		url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
	z-index: 0;
}

.hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	align-items: center;
}

.hero__eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.8rem;
	opacity: 0.95;
	margin: 0 0 0.75rem;
}

.hero__title {
	font-size: clamp(1.85rem, 4vw, 2.75rem);
	line-height: 1.15;
	font-weight: 700;
	margin: 0 0 1rem;
}

.hero__lead {
	font-size: 1.05rem;
	opacity: 0.95;
	margin: 0 0 1.5rem;
	max-width: 36ch;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.hero__card {
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--radius);
	padding: 1.75rem;
	text-align: center;
}

.hero__arabic {
	font-family: var(--font-arabic);
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin: 0 0 1rem;
	line-height: 1.8;
}

.hero__card-caption {
	margin: 0;
	font-size: 0.9rem;
	opacity: 0.9;
}

@media (max-width: 768px) {
	.hero__inner {
		grid-template-columns: 1fr;
	}

	.hero__aside {
		order: -1;
	}
}

/* Sections */
.section {
	padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.section-title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin: 0 0 1rem;
	text-align: center;
}

.section-subtitle {
	text-align: center;
	color: var(--color-muted);
	margin: -0.5rem 0 2rem;
}

.section-lead {
	text-align: center;
	color: var(--color-muted);
	margin: 0 0 1.5rem;
}

.section--intro .section-title,
.section--intro .section-lead {
	text-align: center;
}

.section--intro .btn {
	display: block;
	width: fit-content;
	margin-inline: auto;
}

.section--intro {
	background: var(--color-surface);
}

.section--features {
	background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
}

.section--courses {
	background: var(--color-surface);
}

.section--kids {
	background: var(--color-bg);
}

.section--why {
	background: var(--color-surface);
}

.section--steps {
	background: var(--color-bg);
}

.section--faq {
	background: var(--color-surface);
}

.section--testimonials {
	background: linear-gradient(180deg, var(--color-bg) 0%, #ebe8e0 100%);
}

.section--contact {
	background: var(--color-surface);
	border-top: 1px solid var(--color-border);
}

/* Feature grid */
.feature-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.25rem;
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
}

.feature-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
}

.feature-card__icon {
	display: block;
	font-size: 1.25rem;
	margin-bottom: 0.75rem;
	color: var(--color-accent);
}

.feature-card h3 {
	margin: 0 0 0.5rem;
	font-size: 1.05rem;
}

.feature-card p {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.95rem;
}

/* Course grid */
.course-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.5rem;
	margin-top: 2rem;
}

.course-card {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s, transform 0.2s;
}

.course-card:hover {
	box-shadow: var(--shadow);
	transform: translateY(-2px);
}

.course-card__media {
	height: 140px;
	background: linear-gradient(145deg, #14532d 0%, #166534 40%, #ca8a04 100%);
	opacity: 0.9;
}

.course-card__title {
	margin: 1rem 1.25rem 0.5rem;
	font-size: 1.1rem;
}

.course-card__desc {
	margin: 0 1.25rem 1rem;
	color: var(--color-muted);
	font-size: 0.95rem;
	flex: 1;
}

.course-card__link {
	margin: 0 1.25rem 1.25rem;
	font-weight: 600;
	color: var(--color-accent);
}

/* Split */
.split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2.5rem;
	align-items: center;
}

.split__panel {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 1.75rem;
	box-shadow: var(--shadow);
}

.checklist {
	margin: 0;
	padding-left: 1.25rem;
	color: var(--color-muted);
}

.checklist li {
	margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
	.split {
		grid-template-columns: 1fr;
	}
}

/* Why grid */
.why-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-top: 2rem;
}

.why-item {
	background: var(--color-bg);
	border-radius: var(--radius);
	padding: 1.25rem;
	border: 1px solid var(--color-border);
}

.why-item strong {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--color-primary);
}

.why-item span {
	font-size: 0.9rem;
	color: var(--color-muted);
}

/* Steps */
.steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
	counter-reset: step;
}

.steps__item {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 1.5rem;
	position: relative;
}

.steps__num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--color-primary);
	color: #fff;
	font-weight: 700;
	margin-bottom: 0.75rem;
}

.steps__item h3 {
	margin: 0 0 0.5rem;
	font-size: 1.1rem;
}

.steps__item p {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.95rem;
}

@media (max-width: 700px) {
	.steps {
		grid-template-columns: 1fr;
	}
}

/* FAQ */
.faq-item {
	border-bottom: 1px solid var(--color-border);
}

.faq-item__question {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.1rem 0;
	background: none;
	border: none;
	font: inherit;
	text-align: left;
	cursor: pointer;
	color: var(--color-text);
	font-weight: 600;
}

.faq-item__question[aria-expanded="true"] .faq-item__icon {
	transform: rotate(45deg);
}

.faq-item__icon {
	transition: transform 0.2s;
	font-size: 1.25rem;
	font-weight: 400;
	color: var(--color-accent);
}

.faq-item__answer {
	padding: 0 0 1.1rem;
	color: var(--color-muted);
}

.faq-item__answer p {
	margin: 0;
}

/* Testimonials */
.testimonial-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.5rem;
	margin-top: 2rem;
}

.testimonial {
	margin: 0;
	padding: 1.5rem;
	background: var(--color-surface);
	border-radius: var(--radius);
	border: 1px solid var(--color-border);
	box-shadow: var(--shadow);
}

.testimonial p {
	margin: 0 0 1rem;
	font-style: italic;
}

.testimonial cite {
	font-style: normal;
	font-size: 0.85rem;
	color: var(--color-muted);
}

/* Contact */
.split--contact {
	align-items: start;
}

.contact-list {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
}

.contact-list li {
	margin-bottom: 0.5rem;
}

.contact-form {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 1.5rem;
}

.field {
	display: block;
	margin-bottom: 1rem;
}

.field__label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.field input,
.field textarea {
	width: 100%;
	padding: 0.65rem 0.85rem;
	font: inherit;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	background: var(--color-surface);
}

.field textarea {
	resize: vertical;
	min-height: 100px;
}

.form-note {
	font-size: 0.8rem;
	color: var(--color-muted);
	margin: 1rem 0 0;
}

/* Entry (inner pages) */
.content-area {
	padding: 3rem 0 4rem;
}

.entry-title {
	margin-top: 0;
}

.entry-content {
	max-width: 70ch;
}

/* Footer */
.footer-cta {
	background: linear-gradient(135deg, var(--color-primary) 0%, #166534 100%);
	color: #fff;
	padding: clamp(2.5rem, 5vw, 4rem) 0;
	text-align: center;
}

.footer-cta__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
}

.footer-cta__text {
	margin: 0 0 1.5rem;
	opacity: 0.95;
	max-width: 50ch;
	margin-inline: auto;
}

.footer-main {
	padding: 3rem 0;
	background: #1c1917;
	color: #e7e5e4;
}

.footer-main a {
	color: #a8a29e;
}

.footer-main a:hover {
	color: #fff;
}

.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.2fr;
	gap: 2rem;
}

.footer-brand .site-logo {
	color: #fff;
}

.footer-brand .site-logo:hover {
	color: #fff;
	opacity: 0.9;
}

.footer-tagline {
	margin: 0.75rem 0 0;
	font-size: 0.9rem;
	color: #a8a29e;
	max-width: 32ch;
}

.footer-col h3 {
	margin: 0 0 1rem;
	font-size: 0.95rem;
	color: #fff;
}

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

.footer-col li {
	margin-bottom: 0.5rem;
}

.footer-bottom {
	background: #0c0a09;
	color: #78716c;
	padding: 1rem 0;
	font-size: 0.85rem;
}

.footer-bottom__inner {
	text-align: center;
}

@media (max-width: 900px) {
	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 500px) {
	.footer-grid {
		grid-template-columns: 1fr;
	}
}
