html {
	scroll-behavior: smooth;
}

:root {
	--max-width: 1400px;
	--accent: #8B4513;
	--bg: #FAF6F1;
	--muted: #796A5E;
	--card-bg: #FFFFFF;
	--text: #2C1810;
	/* added ochre */
	--ochre: #C48A2C;
	--ochre-contrast: #1a1108;
	/* dark text for contrast */
}

* {
	box-sizing: border-box
}

body {
	margin: 0;
	font-family: "Cormorant Garamond", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
}

.hero {
	text-shadow: 2px 2px 3px black;

}

.container {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2rem;
}

.site-header {
	background: transparent;
	border: none;
	padding: 2rem 0;
}

.brand {
	font-size: 2rem;
	font-weight: 500;
	letter-spacing: 0.5px;
}

.main-nav a {
	margin-right: 1rem;
	color: var(--text);
	text-decoration: none;
	font-family: "Cormorant Garamond", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	font-size: 1.2rem;
	transition: color 0.3s;
}

.main-nav a:hover {
	color: var(--accent);
}

.hero {
	padding: 8rem 0;
	text-align: left;
	background: var(--bg);
	/* ensure default text color for hero */
	color: #e6e4b8;
	position: relative;
	overflow: hidden;
	text-align: justify;
	text-justify: inter-character;
}

/* layered background elements (two layers for smooth crossfade) */
.hero-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transition: opacity 1s ease-in-out;
	opacity: 0;
	z-index: 0;
	will-change: opacity;
}

.hero-bg.show {
	opacity: 1;
}

/* dark overlay for contrast */
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(rgba(12, 8, 6, 0.45), rgba(12, 8, 6, 0.25));
	pointer-events: none;
	z-index: 1;
}

/* ensure hero content sits above the overlay */
.hero .container {
	position: relative;
	z-index: 3;
}

.hero h2 {
	font-size: 3.5rem;
	font-weight: 400;
	margin: 1rem 0;
	color: #e6e4b8;
	line-height: 1.2;
	opacity: 0;
	animation: fadeInBg 0.5s ease-in 1s forwards;
}

.hero-h2-ar {
	font-family: Cairo, Tahoma;
	direction: rtl;
	opacity: 0;
	animation: fadeInBg 0.5s ease-in 1s forwards;
}

.hero p {
	font-size: 1.5rem;
	color: #e6e4b8;
	margin-bottom: 2rem;
	opacity: 0;
	animation: fadeInBg 1s ease-in 2s forwards;
}

.hero-p-ar {
	font-family: Cairo, Tahoma;
	direction: rtl;
}

.view .btn {
	opacity: 0;
	animation: fadeInBg 1s ease-in 3s forwards;
}

.view-ar .btn {
	opacity: 0;
	float: right;
	animation: fadeInBg 1s ease-in 3s forwards;
}

.btn {
	display: inline-block;
	background: transparent;
	color: #e6e4b8;
	padding: 1rem 2rem;
	border: 1px solid #e6e4b8;
	text-decoration: none;
	transition: all 0.3s;
	font-family: "Cormorant Garamond", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	font-size: 1.1rem;
}

.btn:hover {
	background: var(--text);
	color: var(--bg);
}

/* hero-specific button contrast */
.hero .btn {
	color: #e6e4b8;
	border-color: #e6e4b8;
}

.hero .btn:hover {
	background: #fff;
	color: var(--text);
}

.grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	margin-top: 2rem;
}

.card {
	background: none;
	padding: 0;
	border-radius: 0;
	box-shadow: none;
	transition: opacity 0.3s;
	position: relative;
	overflow: visible;
	/* allow image to spill outside */
}

.card img:hover {
	transform: scale(1.6);
	/* enlarge smoothly */
	z-index: 999;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.card img {
	width: 100%;
	height: 400px;
	object-fit: cover;
	/* keep consistent */
	margin-bottom: 1.2rem;
	transition: transform 0.5s ease, box-shadow 0.5s ease;
	transform-origin: center center;
	position: relative;
	z-index: 1;
}

.card figcaption {
	font-size: 1.1rem;
	color: var(--text);
	font-style: italic;
}

.about,
.contact {
	padding: 4rem 0;
}

h3 {
	font-size: 2.5rem;
	font-weight: 400;
	margin-bottom: 2rem;
}

#contact {
	background-color: var(--bg);
}

.site-header {
	background-color: white;
}

.contact input,
.contact textarea {
	background: #fff;
	border: 1px solid #ddd;
	padding: 1rem;
	font-family: "Cormorant Garamond", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	font-size: 1.1rem;
	/* ensure form controls are readable on ochre */
	background: rgba(255, 255, 255, 0.95);
	color: var(--ochre-contrast);
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.contact .btn {
	background: var(--accent);
	color: #fff;
	border: none;
}

.site-footer {
	padding: 4rem 0;
	font-size: 1.1rem;
	color: var(--muted);
	/* contact and footer ochre background */
	background: var(--ochre);
	color: var(--ochre-contrast);
}

.site-footer a {
	color: var(--ochre-contrast);
	text-decoration: underline;
}

.btn {
	/* button contrast */
	background: transparent;
	color: var(--ochre-contrast);
	border: 1px solid rgba(0, 0, 0, 0.12);
}


/* Image fills container but stays proportionate */
.lb-content img {
	width: 100%;
	/* expands to container width */
	height: auto;
	/* keeps aspect ratio */
	display: block;
	border-radius: 8px;
}

/* Header with close button aligned top right */
.lb-header {
	display: flex;
	justify-content: flex-end;
}

.lb-close {
	background: transparent;
	border: none;
	font-size: 1.6rem;
	cursor: pointer;
	color: #555;
	transition: color 0.2s ease;
}

.lb-close:hover {
	color: #000;
}

/* Image content styling */
.lb-content img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	transition: transform 0.3s ease;
}

.lb-content img:hover {
	transform: scale(1.02);
	/* subtle zoom on hover */
}

.lb-content p {
	margin: 0;
	color: #333;
	font-size: 0.95rem;
	line-height: 1.4;
	text-align: center;
}

/* Controls styling */
.lb-controls {
	display: flex;
	justify-content: space-between;
	margin-top: 10px;
}

.lb-controls button {
	background: #007BFF;
	border: none;
	color: white;
	padding: 6px 14px;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.lb-controls button:hover {
	background: #0056b3;
	transform: scale(1.05);
}

.lb-content {
	position: relative;
	max-width: 90%;
	max-height: 80%;
	text-align: center;
	color: #fff;
}

.lb-content img {
	max-width: 100%;
	max-height: 70vh;
	border-radius: 6px;
	display: block;
	margin: 0 auto;
	opacity: 0;
	transition: opacity 0.5s ease-in-out;
}

.lb-content img.fade-in {
	opacity: 1;
}

.lb-nav {
	position: absolute;
	top: 20px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: space-between;
	padding: 0 20px;
	z-index: 2;
}

.lb-prev,
.lb-next {
	background: rgba(0, 0, 0, 0.5);
	border: none;
	color: #fff;
	font-size: 1.5rem;
	padding: 10px 15px;
	cursor: pointer;
	border-radius: 4px;
}

.lb-prev:hover,
.lb-next:hover {
	background: rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
	.hero h2 {
		font-size: 2.5rem;
	}

	.hero p {
		font-size: 1.2rem;
	}

	.card img {
		height: 300px;
	}
}

/* Carousel */
.carousel-container {
	text-align: center;
	margin: 3rem auto;
}

.carousel-container h3 {
	color: #e6e4b8;
	text-shadow: 1px 1px 2px black;
}

.carousel {

	position: relative;
	max-width: 900px;
	margin: 0 auto;
	overflow: hidden;
}

.carousel-track {
	display: flex;
	transition: transform 0.4s ease-in-out;
}

.carousel-track img {
	width: 100%;
	height: 500px;
	object-fit: cover;
	flex-shrink: 0;
	border-radius: 10px;
}

.carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.4);
	border: none;
	color: white;
	font-size: 2rem;
	padding: 8px 12px;
	cursor: pointer;
	border-radius: 6px;
	z-index: 10;
	transition: background 0.3s ease;
}

.carousel-btn:hover {
	background: rgba(0, 0, 0, 0.7);
}

.carousel-btn.prev {
	left: 10px;
}

.carousel-btn.next {
	right: 10px;
}

/* Zoom Controls */
.zoom-controls {
	margin-top: 15px;
	display: flex;
	justify-content: center;
	gap: 10px;
}

.zoom-controls button {
	background: #ccc8c8;
	color: #fff;
	border: none;
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.2s ease;
}

.zoom-controls button:hover {
	background: #000;
}

/* Ensure zoomed images stay centered */
.carousel-track img {
	transform-origin: center center;
}

.arabic {
	font-family: 'Reem Kufi', serif;
	font-size: 2rem;
	direction: rtl;
	color: gray;
}

#about-image {
	width: auto;
	height: 18rem;
	border-radius: 8px;
	float: right;
}

/* Mobile */
@media (max-width: 768px) {
	.carousel-track img {
		height: 300px;
	}
}


/* small responsive tweak to keep spacing consistent */
@media (max-width: 600px) {

	.contact,
	.site-footer {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
}

@media (max-width: 768px) {
	.hero {
		padding: 4rem 0;
	}

	.hero::after {
		background-attachment: local;
		/* CRITICAL */
		background-position: center top;
		background-size: cover;
	}
}

/* Background image fade-in animation */
@keyframes fadeInBg {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

/* Text fade-in animation */
@keyframes fadeInText {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}