/**
 * Image Quote Slider Module
 * Full-viewport fade slider with frosted glass quote panel (left) and progress bar controls (bottom-right).
 */

/* ===========================
   # Section shell
=========================== */

.image-quote-slider-module {
	position:   relative;
	min-height: 60svh;
	overflow:   hidden;
	background: var(--nec-grey, #384249);
}

/* Fallback background colour — only visible on slides with no background image. */
.iqsm--bg-grey {
	background: var(--nec-grey, #384249);
}

.iqsm--bg-blue {
	background: var(--nec-blue, #1414A0);
}

.iqsm--bg-orange {
	background: var(--nec-orange, #EB6E00);
}

/* ===========================
   # Slides — absolute stack, fade in/out
=========================== */

.iqsm__slide {
	position:   absolute;
	inset:      0;
	opacity:    0;
	transition: opacity 0.9s ease;
	z-index:    1;
}

.iqsm__slide.is-active {
	opacity: 1;
	z-index: 2;
}

/* ===========================
   # Background image
=========================== */

.iqsm__bg {
	position:            absolute;
	inset:               0;
	background-position: center;
	background-size:     cover;
	background-repeat:   no-repeat;
}

/* ===========================
   # Dark overlay (right side fade, keeps image visible on left)
=========================== */

.iqsm__overlay {
	position:   absolute;
	inset:      0;
	background: linear-gradient(
		to right,
		rgba(0, 0, 0, 0.2) 0%,
		rgba(0, 0, 0, 0.0) 45%,
		rgba(0, 0, 0, 0.4) 100%
	);
	z-index: 1;
}

/* ===========================
   # Frosted glass quote panel
=========================== */

.iqsm__panel {
	position:       absolute;
	top:            50%;
	left:           60px;
	transform:      translateY(-50%);
	width:          clamp(300px, 44%, 580px);
	z-index:        3;
	display:        flex;
	flex-direction: column;
	justify-content: center;
	gap:            32px;
	padding:        60px 60px;
	overflow:       hidden;
	/* Frosted glass */
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
}

/* ===========================
   # Quote block
=========================== */

.iqsm__quote {
	display:        flex;
	flex-direction: column;
	gap:            12px;
}

.iqsm__quote-mark {
  display: block;
  font-family: var(--nec-font, 'Neo Sans Std', sans-serif);
  font-size: 118px;
  line-height: 0px;
  color: var(--nec-orange, #EB6E00);
  flex-shrink: 0;
  padding-top: 50px;
}

.iqsm__quote-body {
	color:       rgba(255, 255, 255, 0.95);
	font-family: var(--nec-font, 'Neo Sans Std', sans-serif);
	font-size:   clamp(0.9375rem, calc(0.9rem + 0.22vw), 1.1875rem);
	font-weight: 400;
	line-height: 1.7;
	overflow-y:  auto;
}

.iqsm__quote-body p {
	margin: 0 0 14px;
}

.iqsm__quote-body p:last-child {
	margin: 0;
}

.iqsm__quote-body strong,
.iqsm__quote-body b {
	font-weight: 500;
	color: var(--black);
}

.iqsm__quote-body em,
.iqsm__quote-body i {
	font-style: italic;
}

/* ===========================
   # Citation
=========================== */

.iqsm__citation {
	display:        flex;
	flex-direction: column;
	gap:            4px;
	padding-top:    0px;
	/*border-top:     1px solid rgba(255, 255, 255, 0.2);*/
}

.iqsm__citation-name {
	display:        block;
	font-family:    var(--nec-font, 'Neo Sans Std', sans-serif);
	font-size:      0.9375rem;
	font-weight:    500;
	letter-spacing: 0.04em;
	color: var(--black);
}

.iqsm__citation-job {
	display:     block;
	font-family: var(--nec-font, 'Neo Sans Std', sans-serif);
	font-size:   0.8125rem;
	font-weight: 400;
	color: var(--black);
}

/* Orange/Blue fallback background — only on slides with no background image
   of their own (a slide that DOES have an image keeps the default colours,
   since it sits over a photo + dark overlay, not the flat fallback colour).
   .iqsm__quote-body itself is white by default, but its .content-block p/li
   descendants (the actual wp_kses_post output) get overridden back to black
   by the sitewide .content-block p, .content-block li rule (additions.css)
   — override those back to white here, scoped to this fallback state only. */
.iqsm--bg-orange .iqsm__slide--no-image .iqsm__quote-mark,
.iqsm--bg-blue .iqsm__slide--no-image .iqsm__quote-mark,
.iqsm--bg-orange .iqsm__slide--no-image .iqsm__citation-name,
.iqsm--bg-blue .iqsm__slide--no-image .iqsm__citation-name,
.iqsm--bg-orange .iqsm__slide--no-image .iqsm__citation-job,
.iqsm--bg-blue .iqsm__slide--no-image .iqsm__citation-job,
.iqsm--bg-orange .iqsm__slide--no-image .iqsm__quote-body,
.iqsm--bg-blue .iqsm__slide--no-image .iqsm__quote-body,
.iqsm--bg-orange .iqsm__slide--no-image .iqsm__quote-body p,
.iqsm--bg-blue .iqsm__slide--no-image .iqsm__quote-body p,
.iqsm--bg-orange .iqsm__slide--no-image .iqsm__quote-body li,
.iqsm--bg-blue .iqsm__slide--no-image .iqsm__quote-body li {
	color: var(--nec-white, #fff);
}

/* ===========================
   # Controls area (bottom-right)
=========================== */

.iqsm__controls {
	position:    absolute;
	bottom:      40px;
	right:       48px;
	z-index:     10;
	display:     flex;
	align-items: center;
	gap:         16px;
}

/* ===========================
   # Timeline bars
=========================== */

.iqsm__timelines {
	display:     flex;
	align-items: center;
	gap:         8px;
}

.iqsm__bar {
	position:      relative;
	display:       block;
	width:         56px;
	height:        3px;
	padding:       0;
	background:    rgba(255, 255, 255, 0.28);
	border:        none;
	cursor:        pointer;
	overflow:      hidden;
	border-radius: 2px;
	transition:    background 0.2s ease;
}

.iqsm__bar:hover {
	background: rgba(255, 255, 255, 0.5);
}

.iqsm__bar-fill {
	position:   absolute;
	top:        0;
	left:       0;
	height:     100%;
	width:      0%;
	background: var(--nec-orange, #EB6E00);
}

/* ===========================
   # Numbered circle pause button
=========================== */

.iqsm__playpause {
	display:         flex;
	align-items:     center;
	justify-content: center;
	width:           44px;
	height:          44px;
	padding:         0;
	background:      rgba(255, 255, 255, 0.12);
	border:          1.5px solid rgba(255, 255, 255, 0.4);
	border-radius:   50%;
	color:           var(--nec-white, #fff);
	cursor:          pointer;
	transition:      background 0.2s ease, border-color 0.2s ease;
	flex-shrink:     0;
}

.iqsm__playpause:hover,
.iqsm__playpause:focus-visible {
	background:   rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.8);
	outline:      none;
}

.iqsm__icon {
	width:  14px;
	height: 14px;
}

/* ===========================
   # Responsive — 991px
=========================== */

@media (max-width: 991px) {
	.iqsm__panel {
		padding: 56px 40px;
		width:   clamp(280px, 52%, 520px);
	}

	.iqsm__controls {
		right:  24px;
		bottom: 28px;
	}

	.iqsm__bar {
		width: 40px;
	}
}

/* ===========================
   # Responsive — 768px (panel inset with fixed height, controls stacked below)
=========================== */

@media (max-width: 768px) {
	.iqsm__panel {
		top:        30px;
		left:       30px;
		right:      30px;
		bottom:     auto;
		transform:  none;
		width:      auto;
		max-height: 340px;
		padding:    32px 20px;
		justify-content: flex-start;
		overflow-y: auto;
	}

	.iqsm__quote-mark {
		font-size: 2.5rem;
	}

	.iqsm__controls {
		/* Sits directly under the now fixed-height panel above. */
		top:    calc(30px + 340px + 20px);
		left:   30px;
		right:  auto;
		bottom: auto;
	}

	.iqsm__bar {
		width: 32px;
	}
}

/* ===========================
   # Responsive — 480px
=========================== */

@media (max-width: 480px) {
	.iqsm__panel {
		top:        20px;
		left:       20px;
		right:      20px;
		max-height: 280px;
		gap:        20px;
	}

	.iqsm__citation {
		padding-top: 16px;
	}

	.iqsm__controls {
		top:  calc(20px + 280px + 16px);
		left: 20px;
	}
}
