/* 
Theme Name: Magister Gardens
Theme URI: https://magistergardens.com/
Author: Freelance-Creator
Author URI: https://www.freelance-creator.com/
Template: astra
Version: 1.0.0
*/

/* Astra Header Builder */
#ast-desktop-header, #ast-mobile-header {
	position: fixed;
	top: 0;
	left: 0;
	padding: 0;
	width: 100%;
	-webkit-transition: all ease-out .5s;
	-moz-transition: all ease-out .5s;
	-o-transition: all ease-out .5s;
	transition: all ease-out .5s;
}

#ast-desktop-header.active, #ast-mobile-header.active {
	background-color: rgba(255, 255, 255, 0.7);
	box-shadow: 0px 1px 1px #EEE;
	padding: 0;
}

#ast-desktop-header.active img.custom-logo, #ast-mobile-header.active img.custom-logo {
	content: url('/wp-content/uploads/2026/09/web-logo_dark.png');
	width: 260px!important;
	-webkit-transition: all ease-out .5s;
	-moz-transition: all ease-out .5s;
	-o-transition: all ease-out .5s;
	transition: all ease-out .5s;
}

#ast-desktop-header.active .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg, #ast-mobile-header.active .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg, #ast-desktop-header.active .ast-header-social-1-wrap .ast-social-color-type-custom svg, #ast-mobile-header.active .ast-header-social-1-wrap .ast-social-color-type-custom svg {
	fill: #574229;
}

.ast-header-break-point .main-navigation .stack-on-mobile li {
	text-align: center;
}

.site-header .site-description {
	padding-top: 5px;
	text-align: center;
}

#ast-desktop-header.active .ast-site-identity .site-description, #ast-mobile-header.active .ast-site-identity .site-description {
	color: #574229;
}

/* Google Translate */
.gtranslate_wrapper .glink {
	color: #ffffff !important;
}

#ast-desktop-header.active .gtranslate_wrapper .glink,
#ast-mobile-header.active .gtranslate_wrapper .glink {
	color: #574229 !important;
}

.gtranslate_wrapper .glink.gt-current-lang {
	color: #ffffff !important;
	font-weight: bold;
}

#ast-desktop-header.active .gtranslate_wrapper .glink.gt-current-lang,
#ast-mobile-header.active .gtranslate_wrapper .glink.gt-current-lang {
	color: #574229 !important;
	font-weight: bold;
}

/* Fix background slideshow in Elementor */
@media (min-width: 768px) {
	.elementor-element[data-id="4e9f254"] .elementor-background-slideshow {
		position: fixed !important;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: -1;
		background-size: cover !important;
		background-position: center center !important;
		background-attachment: fixed !important;
	}
}

/* Content */
.error404 #content {
	margin-top: 100px;
}

/* Single image zoom on hover */
.fc-zoom .elementor-widget-container {
	overflow: hidden; /* clips the zoom */
	position: relative;
	isolation: isolate;
	transform: translateZ(0); /* keeps the clipped area on a stable layer */
}

.fc-zoom img {
	display: block;
	width: 100%;
	transform: scale(1) translateZ(0); /* explicit base state */
	backface-visibility: hidden;
	will-change: transform;
	transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.fc-zoom:hover img {
	transform: scale(1.08) translateZ(0);
}

/* Gallery */
.fc-gallery,
.fc-gallery .elementor-widget-container,
.fc-gallery .elementor-image-gallery,
.fc-gallery .gallery {
	padding: 0 !important;
	margin: 0 !important;
}

.fc-gallery .gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	grid-auto-rows: 200px;
	grid-auto-flow: dense;
	gap: 10px;
}

.fc-gallery .gallery-item {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	position: relative;
	overflow: hidden;
	isolation: isolate;
	transform: translateZ(0);
}

.fc-gallery .gallery-icon,
.fc-gallery .gallery-icon a {
	display: block;
	height: 100%;
}

.fc-gallery .gallery-icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1) translateZ(0);
	backface-visibility: hidden;
	will-change: transform, filter;
	transition: transform .6s cubic-bezier(.2, .7, .2, 1), filter .4s ease;
}

.fc-gallery .gallery-item:nth-child(7n + 1) {
	grid-column: span 2;
	grid-row: span 2;
}

.fc-gallery .gallery-item:hover img {
	transform: scale(1.08) translateZ(0);
}

.fc-gallery .gallery:hover .gallery-item:not(:hover) img {
	filter: brightness(.65) saturate(.8);
}

.fc-gallery .gallery-icon a::after {
	content: "+";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font: 300 42px/1 sans-serif;
	color: #fff;
	background: linear-gradient(to top, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0) 60%);
	opacity: 0;
	transition: opacity .35s ease;
}

.fc-gallery .gallery-item:hover .gallery-icon a::after {
	opacity: 1;
}

@media (max-width: 767px) {
	.fc-gallery .gallery {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: 150px;
		gap: 6px;
	}
	
	.fc-gallery .gallery-item:nth-child(7n + 1) {
		grid-column: span 2;
		grid-row: span 1;
	}
}

/* Guest Reviews */

.mg-reviews {
	--mg-brown:	   #574229;	 /* accents, stars, card top */
	--mg-espresso: #2e2010;	 /* dark brown (hover) */
	--mg-ink:      #3a3a3a;	 /* main text */
	--mg-muted:    #4a4f58;	 /* secondary text */
	--mg-line:     #e4ddd3;	 /* borders */
	--mg-card:     #ffffff;
	--mg-radius:   18px;

	overflow: hidden;
	color: var(--mg-ink);
}

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

/* Header */

.mg-reviews__head {
	max-width: 820px;
	margin: 0 auto clamp(36px, 5vw, 56px);
	text-align: center;
}

.mg-reviews__eyebrow {
	display: inline-block;
	margin-bottom: 14px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--mg-brown);
}

.mg-reviews__title { margin: 0 0 16px; }

.mg-reviews__intro {
	max-width: 600px;
	margin: 0 auto;
	color: var(--mg-muted);
}

.mg-reviews__stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	margin: 40px 0 0;
	padding: 0;
	list-style: none;
	background: var(--mg-line);
	border: 1px solid var(--mg-line);
	border-radius: var(--mg-radius);
	overflow: hidden;
}

.mg-reviews__stats li {
	padding: 22px 12px;
	background: var(--mg-card);
}

.mg-reviews__stats strong {
	display: block;
	color: var(--mg-brown);
}

.mg-reviews__stats span {
	display: block;
	margin-top: 8px;
	letter-spacing: 0.04em;
	color: var(--mg-muted);
}

/* Scrolling quotes */
.mg-reviews__marquee {
	margin: 0 0 clamp(40px, 6vw, 70px);
	padding: 18px 0;
	border-block: 1px solid var(--mg-line);
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.mg-reviews__track {
	display: flex;
	width: max-content;
	gap: 56px;
	animation: mg-marquee 45s linear infinite;
}

.mg-reviews__marquee:hover .mg-reviews__track { animation-play-state: paused; }

.mg-reviews__track span {
	position: relative;
	font-style: italic;
	white-space: nowrap;
}

.mg-reviews__track span::after {
	content: "✦";
	position: absolute;
	right: -36px;
	font-style: normal;
	color: var(--mg-brown);
}

@keyframes mg-marquee {
	to { transform: translateX(-50%); }
}

/* Review cards */
.mg-reviews__grid {
	max-width: 1240px;
	margin: 0 auto;
	columns: 3 340px;
	column-gap: 24px;
}

.mg-card {
	display: inline-block;
	width: 100%;
	margin: 0 0 24px;
	padding: 28px 28px 22px;
	background: var(--mg-card);
	border: 1px solid var(--mg-line);
	border-top: 4px solid var(--mg-brown);
	border-radius: var(--mg-radius);
	break-inside: avoid;
	transition: transform .35s ease, box-shadow .35s ease;
}

.mg-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px -22px rgba(43, 42, 38, 0.35);
}

.mg-stars {
	letter-spacing: 3px;
	color: var(--mg-brown);
}

.mg-card__title { margin: 14px 0 0; }

.mg-card__body {
	position: relative;
	margin-top: 14px;
	max-height: 11.5em;
	overflow: hidden;
	transition: max-height .5s ease;
}

.mg-card__body p { margin: 0 0 0.9em; }
.mg-card__body p:last-child { margin-bottom: 0; }

.mg-card__body.is-clamped::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 3.5em;
	background: linear-gradient(to bottom, transparent, var(--mg-card));
	pointer-events: none;
	transition: opacity .3s;
}

.mg-card__body.is-open { max-height: 200em; }
.mg-card__body.is-open::after { opacity: 0; }

.mg-more {
	display: inline-block;
	margin: 10px 14px 0 0;
	padding: 0;
	font: inherit;
	font-weight: 600;
	color: var(--mg-brown);
	background: none;
	border: 0;
	border-bottom: 1px solid currentColor;
	cursor: pointer;
}

.mg-more:hover { color: var(--mg-espresso); background: none; }

.mg-card__foot {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px dashed var(--mg-line);
}

.mg-avatar {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: #fff;
	background: var(--mg-brown);
	border-radius: 50%;
}

.mg-who {
	display: flex;
	flex-direction: column;
	color: var(--mg-muted);
}

.mg-who strong { color: var(--mg-ink); }

.mg-badge {
	margin-left: auto;
	padding: 5px 10px;
	font-weight: 600;
	white-space: nowrap;
	color: var(--mg-muted);
	border: 1px solid var(--mg-line);
	border-radius: 6px;
}

/* Responsive */
@media (max-width: 767px) {
	.mg-reviews__stats { grid-template-columns: repeat(2, 1fr); }
	.mg-card { padding: 24px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.mg-reviews__track { animation: none; }
	.mg-card,
	.mg-card__body { transition: none; }
}