/*
Theme Name: Nawara Clinic
Theme URI: https://nawaraclinic.com
Template: nawaraclinic
Text Domain: nawaraclinic-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
*/

/* ==========================================================================
   Nawara Clinic — Facebook Reels
   ========================================================================== */

/*
 * Reel wrapper
 * Uses the full width of its Elementor Loop column.
 */
.nawara-reel {
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
	min-width: 0;
	overflow: hidden;
}

/*
 * Vertical Reel format.
 */
.nawara-reel__media {
	position: relative;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: 16px;
	background: #111;
}

/*
 * Facebook iframe fills the full Reel area.
 */
.nawara-reel__iframe {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	border: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

/*
 * Fallback Facebook link.
 */
.nawara-reel__fallback {
	width: 100%;
	margin-top: 10px;
	text-align: center;
}

.nawara-reel__fallback-link {
	display: inline-block;
	max-width: 100%;
	font-family: "Cairo", sans-serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.6;
	color: #C78018;
	text-decoration: none;
	transition:
		opacity 0.2s ease,
		color 0.2s ease;
}

.nawara-reel__fallback-link:hover,
.nawara-reel__fallback-link:focus-visible {
	color: #D69A35;
	text-decoration: underline;
}

.nawara-reel__fallback-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/*
 * Elementor Loop Grid compatibility.
 */
.elementor-loop-container .nawara-reel,
.e-loop-item .nawara-reel {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin-inline: auto;
}

/*
 * Prevent Elementor Loop Item wrappers
 * from shrinking the iframe unexpectedly.
 */
.elementor-loop-container .nawara-reel__media,
.e-loop-item .nawara-reel__media {
	width: 100%;
}

/*
 * Mobile.
 */
@media (max-width: 767px) {

	.nawara-reel,
	.elementor-loop-container .nawara-reel,
	.e-loop-item .nawara-reel {
		width: calc(100vw - 16px);
		max-width: calc(100vw - 16px);
		margin-inline: calc((100% - (100vw - 16px)) / 2);
	}

	.nawara-reel__media {
		aspect-ratio: 9 / 16;
		border-radius: 12px;
	}

	.nawara-reel__fallback {
		margin-top: 8px;
	}

	.nawara-reel__fallback-link {
		font-size: 12.5px;
	}
}

/*
 * Hide the Elementor Reels section on the frontend
 * until at least one Reel exists.
 *
 * Keep it visible inside Elementor editor.
 */
body:not(.elementor-editor-active)
.elementor-element-artreels1:has(.e-loop-nothing-found-message) {
	display: none;
}

/* ==========================================================================
   Nawara Clinic — Articles Taxonomy Filter
   ========================================================================== */

/* Scope styles to the Articles page taxonomy filter only. */
.elementor-element-dfb141c .e-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	direction: rtl;
}

.elementor-element-dfb141c .e-filter-item {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 9px 18px;
	margin: 0;
	border: 1px solid #E9DFD3;
	border-radius: 14px;
	background: #FFFFFF;
	color: #58534E;
	font-family: "Cairo", sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease,
		transform 0.2s ease;
}

.elementor-element-dfb141c .e-filter-item:hover {
	border-color: #C78018;
	background: #FFF9F0;
	color: #C78018;
	transform: translateY(-1px);
}

.elementor-element-dfb141c .e-filter-item[aria-pressed="true"] {
	border-color: #C78018;
	background: #C78018;
	color: #FFFFFF;
}

.elementor-element-dfb141c .e-filter-item[aria-pressed="true"]:hover {
	border-color: #D69A35;
	background: #D69A35;
	color: #FFFFFF;
}

.elementor-element-dfb141c .e-filter-item:focus-visible {
	outline: 2px solid #C78018;
	outline-offset: 3px;
}

@media (max-width: 767px) {
	.elementor-element-dfb141c .e-filter {
		gap: 8px;
	}

	.elementor-element-dfb141c .e-filter-item {
		min-height: 40px;
		padding: 8px 14px;
		font-size: 13px;
		border-radius: 12px;
	}
}