/* Gallery tabs and shared video carousel presentation. */
.temple-gallery-tabs-shell { width: 100%; }
.temple-gallery-view-tabs {
	position: sticky;
	top: 82px;
	z-index: 20;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	width: min(720px, calc(100% - 32px));
	margin: 18px auto 28px;
	padding: 7px;
	border: 1px solid rgba(201,154,46,.38);
	border-radius: 999px;
	background: rgba(255,255,255,.96);
	box-shadow: 0 10px 28px rgba(58,44,30,.12);
	backdrop-filter: blur(12px);
}
.temple-gallery-view-tabs button {
	min-height: 48px;
	padding: 8px 20px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--temple-maroon);
	font-weight: 900;
	cursor: pointer;
}
.temple-gallery-view-tabs button[aria-selected="true"] {
	background: var(--temple-maroon);
	color: #fff;
	box-shadow: 0 7px 18px rgba(128,0,0,.2);
}
.temple-gallery-view-panel[hidden] { display: none !important; }
.temple-gallery-view-panel > .temple-gallery-videos { margin-top: 0; }
.temple-gallery-videos {
	width: min(1320px, calc(100% - 32px));
	margin: 48px auto 0;
	padding: clamp(24px, 4vw, 46px);
	border: 1px solid rgba(128,0,0,.12);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 20px 55px rgba(58,44,30,.08);
}
.temple-video-library-head {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 30px;
	margin-bottom: 30px;
}
.temple-video-library-head > div { max-width: 740px; }
.temple-video-library-head h2 { margin: 4px 0 10px; }
.temple-video-library-head p:last-child { margin: 0; color: #6f6253; }
.temple-youtube-channel {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	flex: 0 0 auto;
	min-height: 46px;
	padding: 10px 18px;
	border: 1px solid rgba(128,0,0,.24);
	border-radius: 999px;
	background: #fff;
	color: var(--temple-maroon);
	font-weight: 900;
	text-decoration: none;
	box-shadow: 0 8px 22px rgba(64,38,22,.08);
}
.temple-youtube-channel:hover,
.temple-youtube-channel:focus-visible { background: var(--temple-maroon); color: #fff; }
.temple-video-collections { display: grid; gap: clamp(38px, 6vw, 66px); }
.temple-video-collection {
	width: 100%;
	padding-top: 28px;
	border-top: 1px solid rgba(128,0,0,.12);
}
.temple-video-collection-copy {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 24px;
}
.temple-video-collection-copy .overline { margin: 0 0 4px; }
.temple-video-collection-copy h3 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.temple-video-collection-copy div > p:last-child { max-width: 760px; margin: 8px 0 0; color: #6f6253; line-height: 1.55; }
.temple-video-count {
	flex: 0 0 auto;
	padding: 7px 12px;
	border-radius: 999px;
	background: #fff5dd;
	color: var(--temple-maroon);
	font-weight: 900;
	white-space: nowrap;
}
.temple-youtube-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(20px, 2.5vw, 30px);
}
.temple-youtube-card { min-width: 0; }
.temple-youtube-thumbnail {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 16px;
	background: #151515;
	box-shadow: 0 10px 26px rgba(36,27,20,.16);
	cursor: pointer;
}
.temple-youtube-thumbnail::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.22), transparent 42%);
	transition: background .2s ease;
}
.temple-youtube-thumbnail img,
.temple-youtube-thumbnail video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease, opacity .2s ease;
}
.temple-youtube-thumbnail:hover img,
.temple-youtube-thumbnail:focus-visible img,
.temple-youtube-thumbnail:hover video,
.temple-youtube-thumbnail:focus-visible video { transform: scale(1.035); opacity: .9; }
.temple-youtube-thumbnail:hover::after,
.temple-youtube-thumbnail:focus-visible::after { background: rgba(0,0,0,.12); }
.temple-youtube-card-play {
	position: absolute;
	z-index: 2;
	inset: 50% auto auto 50%;
	display: grid;
	place-items: center;
	width: 64px;
	height: 46px;
	border-radius: 14px;
	background: #c00;
	box-shadow: 0 8px 24px rgba(0,0,0,.34);
	transform: translate(-50%, -50%);
	transition: transform .2s ease, background .2s ease;
}
.temple-youtube-thumbnail:hover .temple-youtube-card-play,
.temple-youtube-thumbnail:focus-visible .temple-youtube-card-play { background: #e00000; transform: translate(-50%, -50%) scale(1.08); }
.temple-youtube-card-play i {
	width: 0;
	height: 0;
	margin-left: 3px;
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-left: 14px solid #fff;
}
.temple-youtube-card-copy { padding: 15px 3px 0; }
.temple-youtube-card-copy h4 { margin: 0; font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.3; }
.temple-youtube-card-copy h4 button {
	padding: 0;
	border: 0;
	background: transparent;
	color: #271f1a;
	font: inherit;
	font-weight: 800;
	text-align: left;
	cursor: pointer;
}
.temple-youtube-card-copy h4 button:hover,
.temple-youtube-card-copy h4 button:focus-visible { color: var(--temple-maroon); text-decoration: underline; }
.temple-youtube-card-copy > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: 9px;
	color: #7a6d61;
	font-size: .94rem;
	font-weight: 700;
}
.temple-youtube-card-copy a { color: var(--temple-maroon); text-decoration: none; }
.temple-youtube-card-copy a:hover,
.temple-youtube-card-copy a:focus-visible { text-decoration: underline; }
.temple-video-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: clamp(34px, 5vw, 54px);
	padding-top: 24px;
	border-top: 1px solid rgba(128,0,0,.12);
}
.temple-video-pagination button,
.temple-video-modal-actions button {
	min-height: 42px;
	padding: 9px 16px;
	border: 1px solid rgba(128,0,0,.22);
	border-radius: 999px;
	background: #fff8eb;
	color: var(--temple-maroon);
	font-weight: 900;
	cursor: pointer;
}
.temple-video-pagination button:hover,
.temple-video-pagination button:focus-visible,
.temple-video-modal-actions button:hover,
.temple-video-modal-actions button:focus-visible { background: var(--temple-maroon); color: #fff; }
.temple-video-pagination button:disabled,
.temple-video-modal-actions button:disabled { opacity: .42; cursor: not-allowed; }
.temple-video-pagination [data-video-page-status] { min-width: 92px; color: #6f6253; font-weight: 900; text-align: center; }
.temple-youtube-modal[hidden] { display: none !important; }
.temple-youtube-modal {
	position: fixed;
	z-index: 99999;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 20px;
}
.temple-youtube-modal-backdrop { position: absolute; inset: 0; background: rgba(18,13,10,.82); backdrop-filter: blur(8px); }
.temple-youtube-modal-dialog {
	position: relative;
	z-index: 1;
	width: min(980px, 100%);
	overflow: hidden;
	border: 1px solid rgba(255,255,255,.18);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 28px 90px rgba(0,0,0,.45);
}
.temple-youtube-modal-player { width: 100%; aspect-ratio: 16 / 9; background: #111; }
.temple-youtube-modal-player iframe,
.temple-youtube-modal-player video { width: 100%; height: 100%; border: 0; object-fit: contain; }
.temple-youtube-modal-close {
	position: absolute;
	z-index: 2;
	top: 12px;
	right: 12px;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid rgba(255,255,255,.32);
	border-radius: 50%;
	background: rgba(0,0,0,.7);
	color: #fff;
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
}
.temple-youtube-modal-close:hover,
.temple-youtube-modal-close:focus-visible { background: var(--temple-maroon); }
.temple-youtube-modal-copy {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 22px;
	padding: 18px 22px 20px;
}
.temple-youtube-modal-copy h3 { margin: 0; font-size: clamp(1.2rem, 2.5vw, 1.65rem); }
.temple-youtube-modal-copy [data-video-modal-position] { display: block; margin-top: 4px; color: #776b61; font-weight: 800; }
.temple-video-modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.temple-youtube-modal-copy a { flex: 0 0 auto; color: var(--temple-maroon); font-weight: 900; text-decoration: none; }
.temple-youtube-modal-copy a:hover,
.temple-youtube-modal-copy a:focus-visible { text-decoration: underline; }
.temple-video-empty {
	padding: clamp(30px, 6vw, 64px) 24px;
	border: 1px dashed rgba(128,0,0,.28);
	border-radius: 16px;
	background: rgba(255,255,255,.72);
	text-align: center;
}
.temple-video-empty strong { display: block; color: var(--temple-maroon); font-family: "Playfair Display", serif; font-size: clamp(1.5rem, 3vw, 2rem); }
.temple-video-empty p { margin: 8px 0 0; color: #6f6253; }
.temple-youtube-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #151515;
}
.temple-youtube-player img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease, opacity .2s ease;
}
.temple-youtube-player:hover img { transform: scale(1.025); opacity: .88; }
.temple-youtube-player button {
	position: absolute;
	inset: 50% auto auto 50%;
	width: 68px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: #c00;
	box-shadow: 0 8px 24px rgba(0,0,0,.35);
	transform: translate(-50%, -50%);
	cursor: pointer;
}
.temple-youtube-player button span {
	display: block;
	width: 0;
	height: 0;
	margin: auto;
	border-top: 9px solid transparent;
	border-bottom: 9px solid transparent;
	border-left: 15px solid #fff;
}
.temple-youtube-player button:hover,
.temple-youtube-player button:focus-visible { background: #e00000; transform: translate(-50%, -50%) scale(1.06); }
.temple-youtube-player iframe { width: 100%; height: 100%; border: 0; }
.temple-update-media { display: block; width: 100%; }
.temple-update-images {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	width: min(720px, 100%);
	margin-bottom: 18px;
}
.temple-update-images.is-single { grid-template-columns: minmax(0, 1fr); }
.temple-update-image {
	overflow: hidden;
	aspect-ratio: 4 / 3;
	margin: 0;
	border-radius: 12px;
	background: #eee7dc;
}
.temple-update-image img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
.temple-update-images.is-single.is-portrait {
	width: min(480px, 100%);
	margin-inline: auto;
}
.temple-update-images.is-single.is-portrait .temple-update-image {
	aspect-ratio: var(--temple-image-ratio, 3 / 4);
	background: transparent;
}
.temple-update-images.is-single.is-portrait .temple-update-image img {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: contain;
}
.temple-video-carousel { width: min(860px, 100%); margin-inline: auto; outline: none; }
.temple-update-media .temple-video-carousel { width: min(720px, 100%); margin-inline: 0; }
.temple-video-stage {
	overflow: hidden;
	border: 1px solid rgba(201,154,46,.34);
	border-radius: 14px;
	background: #151515;
	box-shadow: 0 14px 34px rgba(34,25,18,.16);
}
.temple-video-slide[hidden] { display: none !important; }
.temple-video-slide {
	display: block !important;
	grid-template-columns: none !important;
	gap: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	margin: 0;
	background: #151515;
}
.temple-video-slide > .wp-video { position: relative; width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; background: #111; }
.temple-video-slide .mejs-container,
.temple-video-slide .mejs-inner,
.temple-video-slide .mejs-mediaelement,
.temple-video-slide video { width: 100% !important; height: 100% !important; max-width: 100%; }
.temple-video-slide video { object-fit: contain; background: #111; }
.temple-video-caption { padding: 18px 22px 20px; background: #fff; }
.temple-video-caption h3 { margin: 0 0 6px; }
.temple-video-caption p { margin: 0; color: #6f6253; }
.temple-watch-youtube {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 2px;
	color: var(--temple-maroon);
	font-weight: 900;
	text-decoration: none;
}
.temple-watch-youtube:hover,
.temple-watch-youtube:focus-visible { color: #c00; text-decoration: underline; }
.temple-video-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.temple-video-controls button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	padding: 8px 18px;
	border: 1px solid rgba(145,93,28,.38);
	border-radius: 999px;
	background: #fff8eb;
	color: var(--temple-maroon);
	font-weight: 900;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
}
.temple-video-controls .tvc-arrow { font-size: 1.05em; line-height: 1; }
.temple-video-controls button:hover,
.temple-video-controls button:focus-visible { border-color: var(--temple-saffron); background: var(--temple-saffron); color: #fff; }
.temple-video-controls [data-video-status] { min-width: 62px; color: var(--temple-maroon); font-weight: 900; text-align: center; }
@media (max-width: 900px) {
	.temple-gallery-view-tabs { top: 68px; }
	.temple-video-library-head { align-items: flex-start; flex-direction: column; }
	.temple-youtube-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.temple-update-list article.has-image .temple-update-images .temple-update-image { grid-column: auto; }
}

@media (max-width: 560px) {
	.temple-update-list article,
	.temple-update-list article.has-image {
		display: grid;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 16px;
		padding: 18px 16px;
	}
	.temple-update-list time {
		grid-column: 1 !important;
		justify-self: start;
		width: 82px;
		padding: 10px 7px;
	}
	.temple-update-media,
	.temple-update-list article.has-image .temple-update-media,
	.temple-update-list article.has-image > div:last-child,
	.temple-update-list article > div:last-child {
		grid-column: 1 !important;
		width: 100%;
		min-width: 0;
	}
	.temple-update-list h3 {
		font-size: clamp(1.65rem, 8vw, 2.15rem);
		line-height: 1.15;
		overflow-wrap: normal;
		word-break: normal;
		hyphens: none;
	}
	.temple-update-list p { font-size: 1rem; line-height: 1.55; }
	.temple-update-images { grid-template-columns: minmax(0, 1fr); }
	.temple-update-media .temple-video-carousel,
	.temple-gallery-videos,
	.temple-video-carousel { width: 100%; }
	.temple-gallery-videos { padding: 16px 12px 22px; }
	.temple-video-collections { gap: 18px; }
	.temple-video-collection { padding-top: 22px; }
	.temple-video-collection-copy { flex-direction: column; gap: 12px; }
	.temple-video-library-head { gap: 18px; margin-bottom: 22px; }
	.temple-youtube-channel { width: 100%; }
	.temple-youtube-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.temple-youtube-thumbnail { border-radius: 12px; }
	.temple-youtube-card-copy > div { align-items: flex-start; flex-direction: column; gap: 5px; }
	.temple-youtube-modal { padding: 10px; }
	.temple-youtube-modal-dialog { border-radius: 14px; }
	.temple-youtube-modal-copy { align-items: flex-start; flex-direction: column; gap: 10px; padding: 15px 16px 18px; }
	.temple-video-modal-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
	.temple-video-pagination { gap: 8px; }
	.temple-video-pagination button { padding-inline: 12px; }
	.temple-youtube-player button { width: 60px; height: 43px; }
	.temple-video-stage { border-radius: 10px; }
	.temple-video-controls {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 18px;
		margin-top: 14px;
	}
	.temple-video-controls button {
		gap: 0;
		width: 46px;
		height: 46px;
		min-height: 0;
		padding: 0;
		border-radius: 50%;
		font-size: 1.25rem;
		box-shadow: 0 4px 12px rgba(128,0,0,.14);
	}
	.temple-video-controls .tvc-label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
	.temple-video-controls .tvc-arrow { font-size: 1.25rem; }
	.temple-video-controls button:first-child,
	.temple-video-controls button:last-child { justify-self: auto; }
	.temple-video-controls [data-video-status] { min-width: 48px; font-size: .95rem; }
}
