@media (max-width: 480px) {
	.site-header .navigation-right>a.btn.custom-home-btn {
    	font-size: 0.8rem;
	}

	.top-bar-search.top-bar-search-main-header {
		display: none;
	}
}

/* Header home buttons: consult (#sec scroll) + WhatsApp */
html {
	scroll-behavior: smooth;
}

#free-consultation {
	scroll-margin-top: 90px;
}

.site-header .navigation-right>a.btn.custom-home-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	position: relative;
	padding: 4px 9px;
	font-size: 0.78rem;
	line-height: 1.8;
	height: auto;
}

@media (min-width: 768px) {
	.site-header .navigation-right {
		gap: 3px;
	}

	.site-header .navigation-right>a.btn.custom-home-btn {
		margin: 0;
	}
}

/* Laptops (~1200-1600px): smaller main menu so header items stay in one row */
@media (min-width: 1200px) and (max-width: 1600px) {
	.site-header .sc_studi-main-menu .main-navigation>li {
		margin-left: 2px;
	}

	.site-header .sc_studi-main-menu .main-navigation>li>a {
		font-size: 14px;
		padding: 7px 9px;
	}
}

/* Desktop: text only (icon is for mobile) */
.custom-home-btn__icon {
	display: none;
}

@media (max-width: 767px) {
	/* Mobile: compact buttons in one row next to the hamburger */
	.site-header .navigation-right {
		flex-wrap: nowrap;
		gap: 4px;
	}

	.site-header .navigation-right>a.btn.custom-home-btn {
		justify-content: center;
		flex: 0 0 auto;
		width: 30px;
		height: 30px;
		min-height: 0;
		padding: 0;
		font-size: 0.64rem;
		border-radius: 4px;
	}

	.custom-home-btn__icon {
		width: 16px;
		height: 16px;
	}

	/* Phone / WhatsApp: icon only */
	.custom-home-btn--phone .custom-home-btn__text,
	.custom-home-btn--whatsapp .custom-home-btn__text {
		display: none;
	}

	.custom-home-btn__icon {
		display: block;
	}

	/* Success cases / free consult: text only, no icon */
	.site-header .navigation-right>a.btn.custom-home-btn--success,
	.site-header .navigation-right>a.btn.custom-home-btn--consult {
		width: auto;
		padding: 0 6px;
	}

	.custom-home-btn--success .custom-home-btn__icon,
	.custom-home-btn--consult .custom-home-btn__icon {
		display: none;
	}

	.custom-home-btn--success .custom-home-btn__text,
	.custom-home-btn--consult .custom-home-btn__text {
		display: block;
		font-size: 0.64rem;
		line-height: 1.3;
		white-space: nowrap;
	}

	/* Hover tooltip only for phone / WhatsApp */
	.custom-home-btn--phone[data-tooltip]::after,
	.custom-home-btn--whatsapp[data-tooltip]::after {
		content: attr(data-tooltip);
		position: absolute;
		top: calc(100% + 8px);
		left: 50%;
		transform: translateX(-50%);
		padding: 4px 8px;
		border-radius: 4px;
		background: #222;
		color: #fff;
		font-size: 0.7rem;
		line-height: 1.5;
		white-space: nowrap;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity .15s;
		z-index: 20;
	}

	.custom-home-btn[data-tooltip]:hover::after,
	.custom-home-btn[data-tooltip]:focus-visible::after {
		opacity: 1;
		visibility: visible;
	}

	/* Keep tooltips of the edge buttons inside the screen */
	.custom-home-btn--phone[data-tooltip]::after {
		left: auto;
		right: 0;
		transform: none;
	}

	.custom-home-btn--whatsapp[data-tooltip]::after {
		left: 0;
		transform: none;
	}
}

   /* خنثی کردن width اضافه‌شده توسط LiteSpeed (Add Missing Sizes) روی لوگو */
   .studiare-logo img {
   	width: auto;
   }
   
   /* ===============================
   چیدمان اسلایدرها قبل از اجرای JS (LiteSpeed Delayed)
   =============================== */

/* --- بلاگ: owl carousel قالب --- */
.owl-carousel.jpowl:not(.owl-loaded) {
	--ava-cols: 1;
	--ava-gap: 30px;
	display: flex !important;
	flex-wrap: nowrap;
	gap: var(--ava-gap);
	overflow: hidden;
}
.owl-carousel.jpowl:not(.owl-loaded) > * {
	flex: 0 0 calc((100% - (var(--ava-cols) - 1) * var(--ava-gap)) / var(--ava-cols));
	min-width: 0;
}
@media (min-width: 768px) {
	.owl-carousel.jpowl:not(.owl-loaded) { --ava-cols: 3; }
}
@media (min-width: 1025px) {
	.owl-carousel.jpowl:not(.owl-loaded) { --ava-cols: 4; }
}

/* --- اساتید: Nested Carousel المنتور (Swiper) --- */
.e-n-carousel.swiper:not(.swiper-initialized) {
	--ava-cols: 2;
	--ava-gap: 10px;
	overflow: hidden;
}
.e-n-carousel.swiper:not(.swiper-initialized) > .swiper-wrapper {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--ava-gap);
}
.e-n-carousel.swiper:not(.swiper-initialized) > .swiper-wrapper > .swiper-slide {
	flex: 0 0 calc((100% - (var(--ava-cols) - 1) * var(--ava-gap)) / var(--ava-cols));
	width: auto;
	min-width: 0;
}
@media (min-width: 768px) {
	.e-n-carousel.swiper:not(.swiper-initialized) { --ava-cols: 4; }
}
@media (min-width: 1025px) {
	.e-n-carousel.swiper:not(.swiper-initialized) { --ava-cols: 5; }
}
/* ===============================
   Mobile header: right -> left = hamburger, 4 buttons, logo (one row)
   =============================== */
@media (max-width: 767px) {
	html body .site-header .site-header-inner {
		display: flex !important;
		direction: rtl;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center;
		justify-content: flex-start;
	}

	html body .site-header .site-header-inner > .navigation-right {
		order: 1 !important;
		flex: 1 1 auto;
		min-width: 0;
		flex-wrap: nowrap !important;
		justify-content: flex-start !important;
		align-items: center;
	}

	html body .site-header .site-header-inner > .navigation-left {
		order: 2 !important;
		flex: 0 0 auto;
		margin-inline-start: auto;
	}

	html body .site-header .navigation-right > .mobile-nav-toggle {
		order: -1 !important;
		flex: 0 0 auto;
		margin-inline: 0 6px;
	}
}

/* ===============================
   Off-canvas menu: open from the right, overlay the page (no push)
   =============================== */
@media (max-width: 1199px) {
	html body.rtl .off-canvas-navigation {
		left: auto !important;
		right: 0 !important;
		transform: translate(300px, 0) !important;
	}

	html body.rtl.off-canvas-open .off-canvas-navigation {
		transform: translate(0, 0) !important;
		visibility: visible;
	}

	html body.rtl.off-canvas-open .wrap,
	html body.rtl.off-canvas-open .navigation,
	html body.rtl.off-canvas-open .studi_notif_bar,
	html body.rtl.off-canvas-open .scBR,
	html body.rtl.off-canvas-open .sc_studi_btm_addtocart_fixed_btn_holder_container {
		transform: none !important;
	}

	html body.rtl .off-canvas-overlay {
		box-shadow: inset 37px 0 72px -6px rgba(0, 0, 0, .1);
	}

	html body.rtl .off-canvas-navigation,
	html body.rtl .off-canvas-main {
		direction: rtl;
		text-align: right;
	}
}

/* Mobile logo: spacing from the right (not the left) */
@media (max-width: 767px) {
	html body.rtl .site-header .site-logo .studiare-logo-wrap {
		padding-left: 0 !important;
		padding-right: 10px !important;
	}
}

/* Dark overlay behind the open mobile menu */
@media (max-width: 1199px) {
	html body.rtl .off-canvas-overlay {
		background-color: rgba(0, 0, 0, .55) !important;
		box-shadow: none !important;
	}
}
