/* Almaeena Core — components rendered by the Elementor widgets and shortcodes.
   Colours and fonts come from the theme's CSS variables (fallbacks included). */

.alm-videos {
	display: grid;
	grid-template-columns: repeat(var(--alm-cols, 3), minmax(0, 1fr));
	gap: clamp(1.25rem, 2.5vw, 2rem);
}
.alm-videos--single { grid-template-columns: 1fr; }
.alm-videos--feature > .alm-video:first-child { grid-column: 1 / -1; }
.alm-videos--feature > .alm-video:first-child .alm-video__title { font-size: 1.5rem; }

.alm-video { margin: 0; }
.alm-video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--alm-deep, #0F3B3A);
	overflow: hidden;
	border-radius: 2px;
}
.alm-video--4x3 .alm-video__frame { aspect-ratio: 4 / 3; }
.alm-video--21x9 .alm-video__frame { aspect-ratio: 21 / 9; }
.alm-video--9x16 .alm-video__frame { aspect-ratio: 9 / 16; max-height: 80vh; margin-inline: auto; }
.alm-video__frame iframe,
.alm-video__frame video,
.alm-video__play,
.alm-video__play img {
	position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.alm-video__frame video { object-fit: contain; background: #000; }
.alm-video__play { padding: 0; margin: 0; cursor: pointer; background: transparent; display: block; }
.alm-video__play img { object-fit: cover; transition: opacity .2s ease; }
.alm-video__play:hover img { opacity: .82; }
.alm-video__icon {
	position: absolute; left: 1rem; bottom: 1rem;
	width: 3.5rem; height: 3.5rem; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--alm-paper, #F4F7F6); color: var(--alm-deep, #0F3B3A);
	box-shadow: 0 0 0 6px rgba(15, 59, 58, .35);
}
.alm-video__play:focus-visible { outline: 3px solid var(--alm-gold, #C9A23A); outline-offset: 3px; }
.alm-video__title {
	margin-top: .75rem;
	font-family: var(--alm-serif, Georgia, serif);
	font-size: 1.125rem; line-height: 1.35; color: inherit;
}
.alm-video__caption { margin: .25rem 0 0; opacity: .75; font-size: .95rem; }

/* ---------- Article lists ---------- */
.alm-articles__tools {
	display: flex; flex-wrap: wrap; gap: 1rem 2rem;
	align-items: center; justify-content: space-between;
	margin-bottom: 1.5rem;
}
.alm-tabs { display: flex; gap: .25rem; flex-wrap: wrap; }
.alm-tabs__tab {
	padding: .5rem .9rem; text-decoration: none;
	color: var(--alm-ink, #142423);
	border: 1px solid var(--alm-mist, #D9E4E1); border-radius: 2rem;
	font-size: 1rem; line-height: 1.2;
}
.alm-tabs__tab[lang="ar"] { font-family: var(--alm-arabic, serif); }
.alm-tabs__tab:hover { border-color: var(--alm-green, #1E6B66); }
.alm-tabs__tab[aria-current="page"] { background: var(--alm-deep, #0F3B3A); border-color: var(--alm-deep, #0F3B3A); color: #fff; }
.alm-search { display: flex; min-width: min(100%, 22rem); flex: 0 1 26rem; }
.alm-search input {
	flex: 1; min-width: 0; padding: .65rem .9rem; font: inherit;
	border: 1px solid var(--alm-mist, #D9E4E1); border-right: 0; border-radius: 2px 0 0 2px; background: #fff;
}
.alm-search button {
	padding: .65rem 1.1rem; font: inherit; cursor: pointer; border: 0; border-radius: 0 2px 2px 0;
	background: var(--alm-green, #1E6B66); color: #fff;
}
.alm-search button:hover { background: var(--alm-deep, #0F3B3A); }
.alm-articles__count { margin: 0 0 1rem; color: var(--alm-muted, #4C5F5D); font-size: .95rem; }

.alm-articles__list {
	display: grid;
	grid-template-columns: repeat(var(--alm-cols, 1), minmax(0, 1fr));
	column-gap: clamp(1.5rem, 4vw, 3.5rem);
}
.alm-entry {
	position: relative;
	padding: 1.5rem 0 1.6rem;
	border-top: 1px solid var(--alm-mist, #D9E4E1);
}
.alm-entry__meta { margin: 0 0 .4rem; font-size: .9rem; color: var(--alm-muted, #4C5F5D); display: flex; gap: .75rem; }
.alm-entry__cat { color: var(--alm-green, #1E6B66); }
.alm-entry__title {
	margin: 0; font-family: var(--alm-serif, Georgia, serif);
	font-size: clamp(1.3rem, 1.1rem + .6vw, 1.6rem); line-height: 1.25; font-weight: 500;
	max-width: 38ch;
}
.alm-entry__title a { color: var(--alm-ink, #142423); text-decoration: none; }
.alm-entry__title a::after { content: ""; position: absolute; inset: 0; } /* whole entry is clickable */
.alm-entry:hover .alm-entry__title a { color: var(--alm-green, #1E6B66); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.alm-entry__title a:focus-visible { outline: 3px solid var(--alm-gold, #C9A23A); outline-offset: 4px; }
.alm-entry__excerpt { margin: .6rem 0 0; color: var(--alm-body, #33413F); max-width: 68ch; line-height: 1.6; }
.alm-entry__more { display: none; }
.alm-entry--arabic { text-align: right; }
.alm-entry--arabic .alm-entry__title,
.alm-entry--arabic .alm-entry__excerpt { font-family: var(--alm-arabic, serif); }
.alm-entry--arabic .alm-entry__title { line-height: 1.6; font-weight: 600; font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); max-width: none; }
.alm-entry--arabic .alm-entry__excerpt { line-height: 1.95; max-width: none; }
.alm-articles--single { max-width: 52rem; }
.alm-articles--single .alm-entry__excerpt, .alm-articles--single .alm-entry__title { max-width: none; }

.alm-pagination { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.alm-pagination .page-numbers {
	min-width: 2.6rem; padding: .5rem .8rem; text-align: center; text-decoration: none;
	border: 1px solid var(--alm-mist, #D9E4E1); border-radius: 2px; color: var(--alm-ink, #142423);
}
.alm-pagination .page-numbers.current { background: var(--alm-deep, #0F3B3A); border-color: var(--alm-deep, #0F3B3A); color: #fff; }
.alm-pagination .page-numbers.dots { border: 0; }
.alm-pagination a.page-numbers:hover { border-color: var(--alm-green, #1E6B66); }
.alm-empty { padding: 1.5rem 0; color: var(--alm-muted, #4C5F5D); }

/* ---------- Portrait ring ---------- */
.alm-ring {
	position: relative; width: min(100%, 30rem); aspect-ratio: 1; margin-inline: auto;
	color: var(--alm-gold, #C9A23A);
}
.alm-ring__text { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.alm-ring__text text {
	fill: currentColor; font-family: var(--alm-serif, Georgia, serif);
	font-size: 31px; letter-spacing: .03em; font-weight: 500;
}
.alm-ring--spin .alm-ring__text { animation: alm-spin 90s linear infinite; transform-origin: 50% 50%; }
.alm-ring .alm-ring__img {
	position: absolute; left: 50%; top: 50%; width: 76%; height: 76%;
	transform: translate(-50%, -50%); object-fit: cover; border-radius: 50%;
	background: var(--alm-green, #1E6B66);
}
@keyframes alm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .alm-ring--spin .alm-ring__text { animation: none; } }

/* Honeypot */
.alm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 900px) {
	.alm-videos { grid-template-columns: repeat(min(var(--alm-cols, 3), 2), minmax(0, 1fr)); }
	.alm-articles__list { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.alm-videos { grid-template-columns: 1fr; }
	.alm-articles__tools { flex-direction: column; align-items: stretch; }
	.alm-search { flex-basis: auto; }
}
.elementor-widget-alm-ring { width: 100%; }
@media (max-width: 1024px) { .alm-ring { width: min(26rem, 84vw); } }
