/* TEQ blocks — matches the original elephant.co.ke components. */

.teq-hp { position: absolute !important; left: -9999px !important; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.teq-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	padding: .55rem 1.6rem;
	border: 2px solid #000;
	border-radius: 999px;
	background: #fff;
	color: #000;
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .15s, color .15s, opacity .15s;
}
.teq-btn:hover { background: #000; color: #fff; }
.teq-btn--blue { background: #39b8ff; border-color: #39b8ff; color: #fff; }
.teq-btn--blue:hover { background: #1fa7f5; border-color: #1fa7f5; color: #fff; }
.teq-btn--link { border: 0; padding: 0; background: none; color: #39b8ff; border-radius: 0; }
.teq-btn--link:hover { background: none; color: #39b8ff; text-decoration: underline; }
.teq-btn--glass { background: rgba(0, 0, 0, .1); border-color: #fff; color: #fff; backdrop-filter: blur(6px); }
.teq-btn--glass:hover { background: #fff; color: #000; }
.teq-btn:disabled { opacity: .45; cursor: not-allowed; }
.teq-btn:disabled:hover { background: inherit; color: inherit; }
.teq-btn--blue:disabled:hover { background: #39b8ff; color: #fff; }
.teq-btn.is-busy { opacity: .6; }
.teq-modal-trigger { margin: 1rem 0; }
.teq-modal-trigger--center { text-align: center; }

/* ---------- Tabs ---------- */
.teq-tabs { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin: 0 0 2.5rem; }
.teq-tab {
	padding: .45rem 1.4rem;
	border-radius: 999px;
	border: 2px solid #000;
	background: #fff;
	color: #000;
	font: inherit;
	font-weight: 600;
	font-size: 17px;
	cursor: pointer;
}
.teq-tab.is-active { background: #39b8ff; border-color: #39b8ff; color: #fff; }

/* ---------- Card grids ---------- */
.teq-cards {
	list-style: none;
	margin: 0 0 3rem;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}
@media (min-width: 768px) { .teq-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; } }

.teq-shelf__title { text-align: center; margin: 0 0 1.5rem; font-size: var(--wp--preset--font-size--x-large, 33px); font-weight: 300; }
.teq-card { margin: 0; }
.teq-card__button {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: #f4f4f4;
	border-radius: .75rem;
	overflow: hidden;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
	transition: transform .2s ease, box-shadow .2s ease;
}
.teq-card__button:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .22); }
.teq-card__img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 0 !important; }
.teq-card__bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: .55rem;
	background: rgba(0, 0, 0, .6);
	color: #fff;
	font-weight: 700;
	font-size: 17px;
	text-align: center;
}

/* Video cards */
.teq-cards--video { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) { .teq-cards--video { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .teq-cards--video { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.teq-vcard__play,
.teq-acard__button {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: .75rem;
	overflow: hidden;
	background: #000;
	cursor: pointer;
}
.teq-vcard__img, .teq-acard__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0 !important; transition: opacity .2s; }
.teq-acard__img { aspect-ratio: 1 / 1; }
.teq-vcard__play:hover .teq-vcard__img, .teq-acard__button:hover .teq-acard__img { opacity: .8; }
.teq-play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	backdrop-filter: blur(8px);
	border: 2px solid #fff;
}
.teq-play::after {
	content: "";
	position: absolute;
	left: 25px;
	top: 19px;
	border-style: solid;
	border-width: 12px 0 12px 20px;
	border-color: transparent transparent transparent #fff;
}
.teq-vcard__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem .1rem 0; }
.teq-vcard__title, .teq-acard__title { font-weight: 700; font-size: 17px; color: #000; }
.teq-acard__title { display: block; padding-top: .6rem; }
.teq-vcard__download { border: 0; background: none; padding: 0; color: #39b8ff; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; }
.teq-vcard__download:hover { text-decoration: underline; }
.teq-cards--audio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .teq-cards--audio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .teq-cards--audio { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Learning units */
.teq-unit { padding: 0 0 2rem; margin: 0 0 2.5rem; border-bottom: 1px solid #c0c0c0; }
.teq-unit:last-child { border-bottom: 0; }
.teq-unit__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.teq-unit__label { font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.teq-unit__title { margin: .5rem 0 1.5rem; font-size: var(--wp--preset--font-size--x-large, 33px); font-weight: 300; }
.teq-unit__thumb img { max-width: 420px; width: 100%; border-radius: .75rem; }

/* ---------- People ---------- */
.teq-team {
	list-style: none;
	margin: 0 0 3rem;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem 1rem;
}
@media (min-width: 768px) { .teq-team { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .teq-team { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.5rem; } }
.teq-person { margin: 0; }
.teq-person__img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: .75rem; margin-bottom: .75rem; }
.teq-person__name { display: block; font-weight: 700; font-size: 17px; color: #000; }
.teq-person__name a { color: inherit; }
.teq-person__role { display: block; font-size: 17px; color: #969696; line-height: 1.3; }
.teq-memorial { margin: 0 auto 2rem; max-width: 560px; }
.teq-memorial img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: .75rem; display: block; }

/* ---------- Logos ---------- */
.teq-logos {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	align-items: center;
}
@media (min-width: 768px) { .teq-logos { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .teq-logos { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2rem; } }
.teq-logos__item a, .teq-logos__item > img { display: block; }
.teq-logos__img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; border-radius: 0 !important; transition: transform .2s; }
.teq-logos__item a:hover .teq-logos__img { transform: scale(1.04); }

/* ---------- Press ---------- */
.teq-press { list-style: none; margin: 0; padding: 0; }
.teq-press li { margin: 0 0 .75rem; }
.teq-press a { color: #000; }
.teq-press a:hover { color: #39b8ff; text-decoration: none; }

/* ---------- Download card ---------- */
.teq-dcard {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	min-height: 230px;
	padding: 1.5rem;
	border-radius: .75rem;
	background: #333 center / cover no-repeat;
	margin: 0 0 1.5rem;
}
@media (min-width: 768px) { .teq-dcard { min-height: 350px; } }
@media (min-width: 1280px) { .teq-dcard { min-height: 420px; } }

/* ---------- Modal ---------- */
.teq-modal-open, .teq-modal-open body { overflow: hidden; }
.teq-modal-container {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4.5rem 1rem 1rem;
	background: rgba(255, 255, 255, .5);
	-webkit-backdrop-filter: blur(26px);
	backdrop-filter: blur(26px);
	animation: teq-fade .2s ease;
}
@keyframes teq-fade { from { opacity: 0; } to { opacity: 1; } }
.teq-modal {
	position: relative;
	background: #fff;
	border-radius: 1rem;
	box-shadow: 0 0 10px rgba(0, 0, 0, .1);
	padding: 1.5rem;
	width: 100%;
	max-width: 32rem;
	max-height: 90vh;
	overflow: auto;
	text-align: center;
}
.teq-modal--wide { max-width: 64rem; text-align: left; padding: 2rem clamp(1.5rem, 4vw, 3.5rem); }
.teq-modal--video { max-width: 72rem; padding: 0; background: #000; overflow: hidden; }
.teq-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	border: 0;
	background: none;
	color: #000;
	cursor: pointer;
	padding: 0;
	line-height: 0;
}
.teq-modal__body > :first-child { margin-top: 0; }
.teq-modal__body h2 { font-size: var(--wp--preset--font-size--x-large, 44px); }
.teq-modal__body p, .teq-modal__body li { color: #374151; line-height: 1.75; }
.teq-modal__body img { max-width: 100%; height: auto; }
.teq-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.teq-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.teq-video-langs { display: flex; gap: .5rem; align-items: center; justify-content: center; padding: .75rem; color: #fff; font-size: 15px; }
.teq-video-langs .teq-tab { font-size: 15px; padding: .25rem 1rem; }

/* Download dialog */
.teq-dl__title { margin: 0 0 .5rem; font-size: 33px; font-weight: 300; }
.teq-dl__item { font-weight: 700; margin: 0 0 .25rem; }
.teq-dl__intro { color: #969696; font-size: 17px; margin: 0 0 1.25rem; }
.teq-dl__langs { display: flex; gap: 1.5rem; justify-content: center; margin: 0 0 1.25rem; flex-wrap: wrap; }
.teq-radio { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; cursor: pointer; }
.teq-radio input { width: 1.25rem; height: 1.25rem; accent-color: #3662ff; }
.teq-dl__agree { display: flex; gap: .9rem; text-align: left; font-size: 12px; line-height: 1.5; font-weight: 600; margin: 0 0 1.25rem; cursor: pointer; }
.teq-dl__agree input { flex: 0 0 auto; width: 1.4rem; height: 1.4rem; margin-top: .1rem; accent-color: #39b8ff; }
.teq-dl__buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; }
.teq-dl__error { color: #cb0000; font-size: 15px; margin: .75rem 0 0; }
.teq-dl__error:empty { display: none; }

/* ---------- Podcast player ---------- */
.teq-player {
	position: fixed;
	left: 50%;
	bottom: 1rem;
	transform: translateX(-50%);
	z-index: 9999;
	display: flex;
	align-items: center;
	gap: 1rem;
	width: min(48rem, calc(100% - 2rem));
	padding: .75rem 1rem;
	border-radius: 1rem;
	background: rgba(0, 0, 0, .75);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	color: #fff;
}
.teq-player[hidden] { display: none; }
.teq-player__title { font-weight: 700; font-size: 15px; flex: 0 1 12rem; }
.teq-player audio { flex: 1 1 auto; min-width: 0; height: 40px; }
.teq-player__close { border: 0; background: none; color: #fff; cursor: pointer; line-height: 0; padding: .25rem; }
@media (max-width: 600px) { .teq-player { flex-wrap: wrap; } .teq-player__title { flex-basis: calc(100% - 3rem); } }

/* ---------- Form ---------- */
.teq-form { max-width: 48rem; margin: 0 auto 3rem; }
.teq-field { margin: 0 0 1.25rem; }
.teq-field label { display: block; font-weight: 700; font-size: 17px; margin-bottom: .35rem; }
.teq-field input, .teq-field select {
	width: 100%;
	padding: .7rem .9rem;
	border: 1px solid #c0c0c0;
	border-radius: .5rem;
	background: #fff;
	font: inherit;
	font-size: 17px;
}
.teq-field input:focus, .teq-field select:focus { outline: 2px solid #39b8ff; outline-offset: 1px; border-color: #39b8ff; }
.teq-field__help { font-size: 15px; color: #969696; margin: .35rem 0 0; }
.teq-terms { margin: 2rem 0 1.5rem; padding: 1.25rem 1.5rem; border: 1px solid #c0c0c0; border-radius: .75rem; font-size: 15px; }
.teq-terms p { margin: 0 0 .75rem; }
.teq-check { display: flex; gap: .75rem; align-items: flex-start; font-weight: 700; cursor: pointer; }
.teq-check input { width: 1.3rem; height: 1.3rem; accent-color: #39b8ff; margin-top: .15rem; }
.teq-notice { max-width: 48rem; margin: 0 auto 2rem; padding: 1.25rem 1.5rem; border-radius: .75rem; }
.teq-notice--success { background: #e8f6ff; border: 1px solid #39b8ff; }
.teq-notice--success h3 { margin: 0 0 .5rem; }
.teq-notice--error { background: #fdecec; border: 1px solid #cb0000; color: #7a0000; }
.teq-notice--error ul { margin: 0; padding-left: 1.2rem; }

.teq-img-placeholder { display: block; width: 100%; aspect-ratio: 1 / 1; background: #eee; }

/* Editor-only */
.teq-modal-editor { border: 1px dashed #c0c0c0; border-radius: .75rem; padding: 1rem; }
.teq-modal-editor__hint { font-size: 13px; color: #969696; margin: .75rem 0; }
