/* =====================================================================
   GALLERY HOME SECTION — Premium Light Theme
   Al Rahma Theme · gallery-home.css
   ===================================================================== */

/* ----- CSS Custom Properties ----- */
:root {
	--gallery-bg:             #f8f9fa;
	--gallery-card-bg:        #ffffff;
	--gallery-card-radius:    12px;
	--gallery-card-shadow:    0 4px 20px rgba(0, 0, 0, 0.08);
	--gallery-card-hover:     0 12px 40px rgba(0, 0, 0, 0.15);
	--gallery-overlay-bg:     rgba(2, 67, 91, 0.55);
	--gallery-overlay-hover:  rgba(2, 67, 91, 0.75);
	--gallery-primary:        #ff2714;
	--gallery-dark:           #02435b;
	--gallery-caption-bg:     #ffffff;
	--gallery-caption-color:  #333333;
	--gallery-transition:     0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	--gallery-zoom-size:      52px;
}

/* =====================================================================
   SECTION WRAPPER
   ===================================================================== */
.alrahma-gallery-section {
	position: relative;
	padding: 80px 0 90px;
	background-color: var(--gallery-bg);
	overflow: hidden;
}

/* subtle decorative bg pattern */
.alrahma-gallery-section::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: radial-gradient(circle at 1px 1px, rgba(2, 67, 91, 0.03) 1px, transparent 0);
	background-size: 40px 40px;
	pointer-events: none;
	z-index: 0;
}

.alrahma-gallery-section > * {
	position: relative;
	z-index: 1;
}

/* =====================================================================
   SECTION HEADER
   ===================================================================== */
.alrahma-gallery-header {
	margin-bottom: 50px;
}

.alrahma-gallery-subtitle {
	display: inline-block;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--gallery-primary);
	margin-bottom: 12px;
	position: relative;
	padding: 6px 20px;
	background: rgba(255, 39, 20, 0.08);
	border-radius: 30px;
}

.alrahma-gallery-title {
	font-size: clamp(1.6rem, 4vw, 2.5rem);
	font-weight: 800;
	color: var(--gallery-dark);
	margin-bottom: 20px;
	line-height: 1.3;
}

/* Divider with icon */
.alrahma-gallery-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin-top: 5px;
}

.alrahma-gallery-divider::before,
.alrahma-gallery-divider::after {
	content: '';
	width: 60px;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--gallery-primary));
}

.alrahma-gallery-divider::after {
	background: linear-gradient(90deg, var(--gallery-primary), transparent);
}

.alrahma-gallery-divider-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--gallery-primary);
	color: #fff;
	font-size: 1rem;
	margin: 0 12px;
	box-shadow: 0 4px 15px rgba(255, 39, 20, 0.3);
}

/* =====================================================================
   CAROUSEL WRAPPER
   ===================================================================== */
.alrahma-gallery-carousel-wrapper {
	position: relative;
	padding: 0 0 20px;
}

/* =====================================================================
   GALLERY CARD / ITEM
   ===================================================================== */
.alrahma-gallery-item {
	padding: 8px;
}

.alrahma-gallery-link {
	display: block;
	text-decoration: none;
	border-radius: var(--gallery-card-radius);
	overflow: hidden;
	background: var(--gallery-card-bg);
	box-shadow: var(--gallery-card-shadow);
	transition: box-shadow var(--gallery-transition), transform var(--gallery-transition);
}

.alrahma-gallery-link:hover,
.alrahma-gallery-link:focus-visible {
	box-shadow: var(--gallery-card-hover);
	transform: translateY(-6px);
	text-decoration: none;
}

/* ----- Image Wrapper ----- */
.alrahma-gallery-image-wrap {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: #e9ecef;
}

.alrahma-gallery-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.alrahma-gallery-link:hover .alrahma-gallery-img {
	transform: scale(1.08);
}

/* ----- Overlay ----- */
.alrahma-gallery-overlay {
	position: absolute;
	inset: 0;
	background: var(--gallery-overlay-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity var(--gallery-transition), background var(--gallery-transition);
}

.alrahma-gallery-link:hover .alrahma-gallery-overlay,
.alrahma-gallery-link:focus-visible .alrahma-gallery-overlay {
	opacity: 1;
	background: var(--gallery-overlay-hover);
}

/* ----- Zoom Icon ----- */
.alrahma-gallery-zoom-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--gallery-zoom-size);
	height: var(--gallery-zoom-size);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	border: 2px solid rgba(255, 255, 255, 0.5);
	color: #fff;
	font-size: 1.25rem;
	transform: scale(0.7);
	transition: transform var(--gallery-transition), background var(--gallery-transition);
}

.alrahma-gallery-link:hover .alrahma-gallery-zoom-icon {
	transform: scale(1);
	background: rgba(255, 255, 255, 0.35);
}

/* ----- Caption ----- */
.alrahma-gallery-caption {
	padding: 14px 16px;
	background: var(--gallery-caption-bg);
	text-align: center;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.alrahma-gallery-caption-text {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--gallery-caption-color);
	transition: color var(--gallery-transition);
}

.alrahma-gallery-link:hover .alrahma-gallery-caption-text {
	color: var(--gallery-primary);
}

/* =====================================================================
   OWL CAROUSEL NAV
   ===================================================================== */
.alrahma-gallery-carousel .owl-nav {
	position: absolute;
	width: calc(100% + 80px);
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	justify-content: space-between;
	pointer-events: none;
	z-index: 10;
}

.alrahma-gallery-carousel .owl-nav button.owl-prev,
.alrahma-gallery-carousel .owl-nav button.owl-next {
	pointer-events: auto;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--gallery-dark) !important;
	color: #fff !important;
	font-size: 1.1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
	opacity: 0;
}

.alrahma-gallery-carousel:hover .owl-nav button.owl-prev,
.alrahma-gallery-carousel:hover .owl-nav button.owl-next {
	opacity: 1;
}

.alrahma-gallery-carousel .owl-nav button.owl-prev:hover,
.alrahma-gallery-carousel .owl-nav button.owl-next:hover {
	background: var(--gallery-primary) !important;
	transform: scale(1.1);
	box-shadow: 0 6px 25px rgba(255, 39, 20, 0.35);
}

.alrahma-gallery-carousel .owl-nav button span {
	font-size: 1.4rem;
	line-height: 1;
}

/* =====================================================================
   OWL CAROUSEL DOTS
   ===================================================================== */
.alrahma-gallery-carousel .owl-dots {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 30px;
}

.alrahma-gallery-carousel .owl-dots .owl-dot {
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
}

.alrahma-gallery-carousel .owl-dots .owl-dot span {
	display: block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #d1d5db;
	transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.alrahma-gallery-carousel .owl-dots .owl-dot:hover span {
	background: var(--gallery-dark);
	transform: scale(1.2);
}

.alrahma-gallery-carousel .owl-dots .owl-dot.active span {
	background: var(--gallery-primary);
	transform: scale(1.3);
	box-shadow: 0 0 0 4px rgba(255, 39, 20, 0.2);
}

/* =====================================================================
   SCROLL-REVEAL ANIMATIONS
   ===================================================================== */
.alrahma-gallery-section .alrahma-gallery-header {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.alrahma-gallery-section.is-visible .alrahma-gallery-header {
	opacity: 1;
	transform: translateY(0);
}

.alrahma-gallery-section .alrahma-gallery-carousel-wrapper {
	opacity: 0;
	transform: translateY(40px);
	transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
}

.alrahma-gallery-section.is-visible .alrahma-gallery-carousel-wrapper {
	opacity: 1;
	transform: translateY(0);
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

/* Tablet */
@media (max-width: 991.98px) {
	.alrahma-gallery-section {
		padding: 60px 0 70px;
	}

	.alrahma-gallery-header {
		margin-bottom: 35px;
	}

	.alrahma-gallery-carousel .owl-nav {
		width: calc(100% + 40px);
	}

	.alrahma-gallery-carousel .owl-nav button.owl-prev,
	.alrahma-gallery-carousel .owl-nav button.owl-next {
		width: 42px;
		height: 42px;
		font-size: 1rem;
		opacity: 1;
	}
}

/* Mobile */
@media (max-width: 767.98px) {
	.alrahma-gallery-section {
		padding: 50px 0 60px;
	}

	.alrahma-gallery-header {
		margin-bottom: 30px;
	}

	.alrahma-gallery-title {
		font-size: 1.5rem;
	}

	.alrahma-gallery-divider::before,
	.alrahma-gallery-divider::after {
		width: 40px;
	}

	.alrahma-gallery-divider-icon {
		width: 38px;
		height: 38px;
		font-size: 0.9rem;
	}

	.alrahma-gallery-carousel .owl-nav {
		width: calc(100% + 16px);
	}

	.alrahma-gallery-carousel .owl-nav button.owl-prev,
	.alrahma-gallery-carousel .owl-nav button.owl-next {
		width: 36px;
		height: 36px;
		font-size: 0.9rem;
		opacity: 1;
	}

	.alrahma-gallery-item {
		padding: 4px;
	}

	.alrahma-gallery-caption {
		padding: 10px 12px;
	}

	.alrahma-gallery-caption-text {
		font-size: 0.85rem;
	}

	.alrahma-gallery-zoom-icon {
		width: 44px;
		height: 44px;
		font-size: 1.1rem;
	}
}

/* Small mobile */
@media (max-width: 575.98px) {
	.alrahma-gallery-section {
		padding: 40px 0 50px;
	}

	.alrahma-gallery-carousel .owl-dots {
		gap: 8px;
		margin-top: 24px;
	}

	.alrahma-gallery-carousel .owl-dots .owl-dot span {
		width: 10px;
		height: 10px;
	}
}

/* =====================================================================
   RTL SUPPORT
   ===================================================================== */
[dir="rtl"] .alrahma-gallery-carousel .owl-nav {
	flex-direction: row-reverse;
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
	.alrahma-gallery-img,
	.alrahma-gallery-overlay,
	.alrahma-gallery-zoom-icon,
	.alrahma-gallery-link,
	.alrahma-gallery-caption-text,
	.alrahma-gallery-section .alrahma-gallery-header,
	.alrahma-gallery-section .alrahma-gallery-carousel-wrapper {
		transition-duration: 0.01ms !important;
	}
}

/* =====================================================================
   PRINT
   ===================================================================== */
@media print {
	.alrahma-gallery-section {
		padding: 20px 0;
		background: #fff;
	}

	.alrahma-gallery-section::before {
		display: none;
	}

	.alrahma-gallery-overlay,
	.alrahma-gallery-carousel .owl-nav,
	.alrahma-gallery-carousel .owl-dots {
		display: none !important;
	}

	.alrahma-gallery-link {
		box-shadow: none;
		border: 1px solid #ddd;
	}
}

/* =====================================================================
   GLIGHTBOX OVERRIDES (brand consistency)
   ===================================================================== */
.goverlay {
	background: rgba(2, 67, 91, 0.92) !important;
}

.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev {
	background: rgba(255, 39, 20, 0.85) !important;
	border: none !important;
}

.glightbox-clean .gclose:hover,
.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover {
	background: rgba(255, 39, 20, 1) !important;
}

.glightbox-clean .gdesc-inner h4 {
	color: #fff;
	font-weight: 700;
}
