/*
 * Dini 20 — Hero slider.
 * Measures follow the source design (sharjah.ac.ae homepage banner):
 * full-height fading slides, white title bottom-start, outlined page dots,
 * white rounded announcements card bottom-end. See developer guide §5.2.
 */

.dhs {
	position: relative;
	height: 100vh;
	height: 100svh;
	min-height: 560px;
	overflow: hidden;
	background: #121614;
	color: var(--dini-white);
	isolation: isolate;
}
.dhs--large { height: 85vh; height: 85svh; min-height: 520px; }
.dhs--medium { height: 70vh; height: 70svh; min-height: 460px; }

/* ---------------------------------------------------------------- */
/* Image layers                                                      */
/* ---------------------------------------------------------------- */

.dhs-slides, .dhs-slide { position: absolute; inset: 0; }
.dhs-slide {
	opacity: 0;
	z-index: 0;
	transition: opacity var(--dhs-speed, 1.5s) ease;
}
.dhs-slide.is-active { opacity: 1; z-index: 1; }
.dhs-slide picture, .dhs-img { display: block; width: 100%; height: 100%; }
.dhs-img { object-fit: cover; object-position: 50% 50%; }

/* Slow zoom on the visible slide (source: scale 1.02 over 7s). */
.dhs--zoom .dhs-img { transform: scale(1); transition: transform 7s linear; }
.dhs--zoom .dhs-slide.is-active .dhs-img { transform: scale(1.05); }

.dhs-shade {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, var(--dhs-shade, .45)) 0%,
		rgba(0, 0, 0, calc(var(--dhs-shade, .45) * .4)) 32%,
		rgba(0, 0, 0, 0) 58%
	);
}

/* ---------------------------------------------------------------- */
/* Titles + dots                                                     */
/* ---------------------------------------------------------------- */

.dhs-content {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	z-index: 3;
	padding-bottom: 22px;
	pointer-events: none;
}
.dhs-content > * { pointer-events: auto; }

.dhs-titles { display: grid; align-items: end; margin-bottom: 54px; }
.dhs-title {
	grid-area: 1 / 1;
	margin: 0;
	max-width: min(60%, 860px);
	font-size: clamp(30px, 2.75vw, 46px);
	font-weight: 400;
	line-height: 1.3;
	color: inherit;
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .6s ease, transform .6s ease;
	text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}
.dini-rtl .dhs-title { font-weight: 600; }
.dhs-title.is-active { opacity: 1; transform: none; transition-delay: .25s; }
.dhs-title a { color: inherit; text-decoration: none; background: linear-gradient(var(--dini-green), var(--dini-green)) 0 100% / 0 2px no-repeat; transition: background-size .3s; }
.dini-rtl .dhs-title a { background-position: 100% 100%; }
.dhs-title a:hover { background-size: 100% 2px; }

.dhs-dots { display: flex; gap: 12px; }
.dhs-dot {
	width: 13px;
	height: 13px;
	padding: 0;
	border: 1px solid var(--dini-white);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background .3s, border-color .3s, transform .2s;
}
.dhs-dot:hover { background: rgba(255, 255, 255, .45); }
.dhs-dot.is-active { background: var(--dini-green); border-color: var(--dini-green); }
.dhs-dot:active { transform: scale(.9); }

/* ---------------------------------------------------------------- */
/* Announcements card                                                */
/* ---------------------------------------------------------------- */

.dhs-ann {
	position: absolute;
	z-index: 4;
	inset-inline-end: var(--dini-gutter);
	bottom: 100px;
	width: 380px;
	background: var(--dini-white);
	color: var(--dini-black);
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .55);
}
.dhs-ann-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	height: 48px;
	padding-inline: 16px 11px;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}
.dhs-ann-heading { font-size: 13.5px; font-weight: 600; }
.dhs-ann-chev {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(0, 195, 137, .16);
	color: var(--dini-green-dark);
	transition: transform var(--dini-ease);
}
.dhs-ann-chev .dini-icon { width: 14px; height: 14px; transform: rotate(180deg); }
.dhs-ann.is-open .dhs-ann-chev { transform: rotate(180deg); }
.dhs-ann.is-open .dhs-ann-toggle {
	position: absolute;
	top: 10px;
	inset-inline-end: 10px;
	z-index: 2;
	width: auto;
	height: auto;
	padding: 0;
}
.dhs-ann.is-open .dhs-ann-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.dhs-ann-body { display: none; grid-template-columns: 115px minmax(0, 1fr); height: 145px; }
.dhs-ann.is-open .dhs-ann-body { display: grid; animation: dhs-in .3s ease-out; }

.dhs-ann-media { position: relative; background: #e9ece9; }
.dhs-ann-img { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.dhs-ann-img.is-active { opacity: 1; }
.dhs-ann-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dhs-ann-dots { position: absolute; inset-inline: 0; bottom: 8px; display: flex; justify-content: center; gap: 4px; }
.dhs-ann-dots span { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: background .3s; }
.dhs-ann-dots span.is-active { background: var(--dini-white); }

.dhs-ann-texts { position: relative; }
.dhs-ann-item {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding-block: 18px 16px;
	padding-inline: 16px 46px;
	color: inherit;
	text-decoration: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .5s ease, transform .5s ease, visibility .5s;
}
.dhs-ann-item.is-active { opacity: 1; visibility: visible; transform: none; }
.dhs-ann-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.dhs-ann-go {
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--dini-green);
	color: var(--dini-black);
	transition: transform var(--dini-ease);
}
.dhs-ann-go .dini-icon { width: 13px; height: 13px; stroke-width: 2.6; }
.dhs-ann-item:hover .dhs-ann-go { transform: translateX(3px); }
.dini-rtl .dhs-ann-item:hover .dhs-ann-go { transform: translateX(-3px); }

@keyframes dhs-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- */
/* Mobile                                                            */
/* ---------------------------------------------------------------- */

@media (max-width: 767px) {
	.dhs-title { max-width: 100%; font-size: clamp(32px, 9vw, 44px); line-height: 1.2; }
	.dhs-titles { margin-bottom: 30px; }
	.dhs-content { padding-bottom: 26px; }
	.dhs:has(.dhs-ann) .dhs-titles { margin-bottom: 92px; }

	.dhs-ann { inset-inline: var(--dini-gutter); width: auto; bottom: 58px; }
	.dhs-ann-body { grid-template-columns: 96px minmax(0, 1fr); height: 124px; }
	/* The unfolded card would cover the title on small screens. */
	.dhs:has(.dhs-ann.is-open) .dhs-titles { opacity: 0; }
	.dhs-titles { transition: opacity .3s; }
}
