/* ==========================================================================
   STYLE GUIDE PAGE: SWATCHES & TOKEN PREVIEWS
   ========================================================================== */
.lgm-sg-swatch {
	border-radius: var(--radius-sm, 8px);
	padding: 18px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 175px;
	box-shadow: 0 4px 14px rgba(30, 17, 36, 0.06);
	box-sizing: border-box;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lgm-sg-swatch:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(30, 17, 36, 0.1);
}

.lgm-sg-spacing-bar {
	height: 22px;
	background: var(--wp--preset--color--plum, #3D2645);
	border-radius: 4px;
	display: inline-block;
	vertical-align: middle;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & PHONE-WIDTH GUTTERS (375px - 430px)
   ========================================================================== */
html,
body {
	overflow-x: hidden;
	max-width: 100vw;
}

@media (max-width: 768px) {
	.wp-site-blocks,
	.entry-content,
	.wp-block-group.alignfull,
	.lgm-hero {
		box-sizing: border-box;
	}

	/* Ensure minimum 16px side gutter on all mobile views without horizontal overflow */
	.lgm-hero-subpage,
	.lgm-about-section,
	.lgm-contact-grid-wrap,
	.lgm-faq-accordion-card,
	.lgm-table-swipe-hint {
		padding-inline: 16px !important;
	}

	/* Keep cards comfortably contained within mobile width */
	.is-style-card,
	.is-style-card-night,
	.is-style-card-mist {
		max-width: 100% !important;
		box-sizing: border-box !important;
	}
}

/* ==========================================================================
   ARABIC & RTL SUPPORT (Polylang and dir="rtl" Readiness)
   ========================================================================== */
[dir="rtl"],
body.rtl {
	direction: rtl;
	text-align: right;
	font-family: 'Outfit', 'Noto Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6 {
	text-align: right;
}

/* Reverse directional arrows in links */
[dir="rtl"] .lgm-arrow,
[dir="rtl"] .lgm-affiliation-arrow,
[dir="rtl"] span[aria-hidden="true"]:not(.star),
body.rtl .lgm-arrow,
body.rtl .lgm-affiliation-arrow {
	display: inline-block;
	transform: scaleX(-1);
}

/* Header & navigation alignment in RTL */
[dir="rtl"] .site-header .wp-block-navigation,
body.rtl .site-header .wp-block-navigation {
	margin-inline-start: auto;
	margin-inline-end: 0;
}

[dir="rtl"] .lgm-header-actions,
body.rtl .lgm-header-actions {
	margin-inline-start: 1rem;
	margin-inline-end: 0;
}

/* Footer brand lockup in RTL */
[dir="rtl"] .lgm-footer-brand-lockup,
body.rtl .lgm-footer-brand-lockup {
	text-align: right !important;
	justify-content: flex-start !important;
}

[dir="rtl"] .lgm-footer-brand-title,
body.rtl .lgm-footer-brand-title {
	text-align: right !important;
}

/* Contact form and input fields in RTL */
[dir="rtl"] input[type="text"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] textarea,
[dir="rtl"] select,
body.rtl input[type="text"],
body.rtl input[type="email"],
body.rtl input[type="tel"],
body.rtl textarea,
body.rtl select {
	text-align: right;
	direction: rtl;
}

/* FAQ details summary toggle indicator in RTL */
[dir="rtl"] .lgm-faq-toggle,
body.rtl .lgm-faq-toggle {
	margin-inline-start: 0;
	margin-inline-end: auto;
}

/* Quick navigation TOC bar in RTL */
[dir="rtl"] .lgm-toc-bar,
body.rtl .lgm-toc-bar {
	direction: rtl;
	text-align: right;
}



