/* =========================================================================
   Chronicle — front-end styles
   All colours come from CSS variables set in the admin (see settings).
   ========================================================================= */

.chr,
.chr *,
.chr *::before,
.chr *::after { box-sizing: border-box; }

.chr {
	--chr-radius: 10px;
	color: var(--chr-text, #4a4a55);
	font-size: 16px;
	line-height: 1.6;
}

.chr img { max-width: 100%; height: auto; display: block; }

.chr-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}
.chr-container--narrow { max-width: 820px; }

.chr-page { padding-bottom: 10px; }

/* ------------------------------------------------------------------ Banner */
.chr-banner {
	background: var(--chr-heading, #16161d);
	color: #fff;
	padding: 48px 20px;
	margin-bottom: 34px;
}
.chr-banner__inner { max-width: 1200px; margin: 0 auto; }
.chr-banner__title {
	margin: 0;
	color: #fff;
	font-size: clamp(24px, 4vw, 40px);
	font-weight: 800;
	letter-spacing: -0.01em;
}

/* ----------------------------------------------------------- Section head */
.chr-sechead {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 30px 0 20px;
}
.chr-sechead__line,
.chr-sechead__text::before {
	content: "";
	display: inline-block;
	width: 28px;
	height: 3px;
	background: var(--chr-accent, #e63950);
	border-radius: 3px;
}
.chr-sechead__text {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	font-size: 14px;
	color: var(--chr-accent, #e63950);
}
.chr-sechead__text--sm { font-size: 13px; }

/* ------------------------------------------------------------------- Grids */
.chr-grid { display: grid; gap: 22px; }

.chr-grid--tiles   { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.chr-grid--events  { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.chr-grid--videos  { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.chr-grid--gallery { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* Year / month tiles */
.chr-tile {
	position: relative;
	display: block;
	border-radius: var(--chr-radius);
	overflow: hidden;
	text-decoration: none;
	background: var(--chr-heading, #16161d);
	aspect-ratio: 4 / 3;
	box-shadow: 0 6px 20px rgba(0,0,0,.08);
	transition: transform .25s ease, box-shadow .25s ease;
}
.chr-tile:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.16); }
.chr-tile__img { position: absolute; inset: 0; }
.chr-tile__img img { width: 100%; height: 100%; object-fit: cover; }
.chr-tile__ph {
	position: absolute; inset: 0;
	background: linear-gradient(135deg, var(--chr-heading,#16161d), #33333f);
}
.chr-tile::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.15) 55%, rgba(0,0,0,0) 100%);
}
.chr-tile__label {
	position: absolute; left: 0; right: 0; bottom: 0;
	z-index: 2;
	padding: 18px;
	color: #fff;
	font-weight: 800;
	font-size: 20px;
}

/* Event tiles */
.chr-event {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 210px;
	border-radius: var(--chr-radius);
	overflow: hidden;
	text-decoration: none;
	background-color: var(--chr-heading, #16161d);
	background-size: cover;
	background-position: center;
	box-shadow: 0 6px 20px rgba(0,0,0,.08);
	transition: transform .25s ease, box-shadow .25s ease;
}
.chr-event:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.16); }
.chr-event__overlay {
	position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.05));
}
.chr-event__title {
	position: relative; z-index: 2;
	padding: 18px; color: #fff; font-weight: 700; font-size: 17px;
}

/* Video cards */
.chr-vcard {
	display: flex; flex-direction: column;
	border-radius: var(--chr-radius);
	overflow: hidden;
	text-decoration: none;
	background: var(--chr-card-bg, #fff);
	border: 1px solid var(--chr-border, #ececef);
	box-shadow: 0 6px 20px rgba(0,0,0,.05);
	transition: transform .25s ease, box-shadow .25s ease;
}
.chr-vcard:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.14); }
.chr-vcard__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background-color: var(--chr-heading, #16161d);
	background-size: cover; background-position: center;
}
.chr-vcard__body { padding: 16px 18px 20px; }
.chr-vcard__body h4 { margin: 8px 0 10px; color: var(--chr-heading, #16161d); font-size: 17px; line-height: 1.35; }

/* Play button */
.chr-play {
	position: absolute; top: 50%; left: 50%;
	width: 66px; height: 66px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: rgba(0,0,0,.55);
	border: 2px solid #fff;
}
.chr-play::after {
	content: ""; position: absolute; top: 50%; left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 12px 0 12px 20px;
	border-color: transparent transparent transparent #fff;
}
.chr-play--sm { width: 48px; height: 48px; }
.chr-play--sm::after { border-width: 9px 0 9px 15px; }

/* ---------------------------------------------------------- Featured block */
.chr-featured-wrap { margin-bottom: 30px; }
.chr-featured {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 26px;
	align-items: start;
}
.chr-feat-video {
	border-radius: var(--chr-radius);
	overflow: hidden;
	background: var(--chr-card-bg, #fff);
	border: 1px solid var(--chr-border, #ececef);
	box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.chr-feat-video__media {
	position: relative;
	display: block;
	width: 100%;
	border: 0;
	cursor: pointer;
	aspect-ratio: 16 / 9;
	background-color: var(--chr-heading, #16161d);
	background-size: cover; background-position: center;
}
.chr-feat-video__body { padding: 18px 20px 22px; }
.chr-feat-video__body h3 { margin: 8px 0; font-size: 22px; line-height: 1.3; }
.chr-feat-video__body h3 a { color: var(--chr-heading, #16161d); text-decoration: none; }
.chr-feat-video--wide { display: block; margin-bottom: 20px; }

.chr-feat-speeches { display: flex; flex-direction: column; gap: 16px; }
.chr-feat-speech {
	display: block; text-decoration: none;
	padding: 18px 20px;
	border-radius: var(--chr-radius);
	background: var(--chr-card-bg, #fff);
	border: 1px solid var(--chr-border, #ececef);
	transition: border-color .2s ease, transform .2s ease;
}
.chr-feat-speech:hover { transform: translateY(-2px); border-color: var(--chr-accent, #e63950); }
.chr-feat-speech h4 { margin: 8px 0; color: var(--chr-heading, #16161d); font-size: 17px; line-height: 1.35; }

/* --------------------------------------------------------------- Speeches */
.chr-speeches__grid {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 34px;
	align-items: start;
	margin-bottom: 10px;
}
.chr-speeches__list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}
.chr-speech-item {
	display: block;
	text-decoration: none;
	padding: 20px 22px;
	border-radius: var(--chr-radius);
	background: var(--chr-card-bg, #fff);
	border: 1px solid var(--chr-border, #ececef);
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.chr-speech-item:hover {
	transform: translateY(-3px);
	border-color: var(--chr-accent, #e63950);
	box-shadow: 0 10px 22px rgba(0,0,0,.08);
}
.chr-speech-item__title {
	margin: 0 0 10px;
	color: var(--chr-heading, #16161d);
	font-size: 18px;
	line-height: 1.35;
	font-weight: 700;
}
.chr-speeches__list .chr-pagination { grid-column: 1 / -1; }

.chr-feat-card {
	border-radius: var(--chr-radius);
	overflow: hidden;
	background: var(--chr-card-bg, #fff);
	border: 1px solid var(--chr-border, #ececef);
	box-shadow: 0 8px 24px rgba(0,0,0,.06);
	position: sticky;
	top: 20px;
}
.chr-feat-card__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.chr-feat-card__body { padding: 18px 20px 22px; }
.chr-feat-card__body h3 { margin: 8px 0 14px; font-size: 20px; line-height: 1.3; }
.chr-feat-card__body h3 a { color: var(--chr-heading, #16161d); text-decoration: none; }

/* --------------------------------------------------------- Latest boxes */
.chr-latest-boxes {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin: 46px 0 10px;
}
.chr-box {
	background: var(--chr-box-bg, #1b1b1b);
	color: var(--chr-box-text, #fff);
	border-radius: var(--chr-radius);
	padding: 26px 24px;
	min-height: 150px;
	display: flex;
	flex-direction: column;
}
.chr-box__label {
	color: var(--chr-accent, #e63950);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	font-size: 13px;
}
.chr-box__title {
	color: var(--chr-box-text, #fff);
	margin: 12px 0 auto;
	font-size: 18px;
	line-height: 1.35;
	font-weight: 700;
}
.chr-box__title--empty { opacity: .6; font-weight: 500; }
.chr-box__link {
	margin-top: 16px;
	color: var(--chr-box-text, #fff);
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	display: inline-flex; align-items: center; gap: 8px;
}
.chr-box__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chr-accent, #e63950); }

/* ------------------------------------------------------------- Single pages */
.chr-single { padding-bottom: 10px; }
.chr-single--speech, .chr-single--video { padding-top: 30px; }
.chr-single--photo { padding-top: 30px; }
.chr-single__title {
	color: var(--chr-heading, #16161d);
	font-size: clamp(24px, 3.6vw, 36px);
	line-height: 1.25;
	font-weight: 800;
	margin: 6px 0 16px;
}
.chr-single__body { font-size: 17px; line-height: 1.8; }
.chr-single__body p { margin: 0 0 1.2em; }
.chr-single__intro { margin-bottom: 22px; }

.chr-share { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; font-size: 14px; color: var(--chr-muted,#8a8a94); }
.chr-share__btn {
	width: 34px; height: 34px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--chr-heading, #16161d);
	color: #fff; text-decoration: none;
	font-weight: 700; font-size: 14px;
	text-transform: lowercase;
}
.chr-share__btn:hover { background: var(--chr-accent, #e63950); }

/* Video player 16:9 */
.chr-video-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--chr-radius);
	overflow: hidden;
	background: #000;
	margin: 8px 0 26px;
}
.chr-video-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.chr-transcript { font-size: 16px; line-height: 1.8; }
.chr-transcript p { margin: 0 0 1.1em; }

/* Speech gallery (horizontal thumbs) */
.chr-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 12px;
	margin: 6px 0 26px;
}
.chr-gallery__item {
	border: 0; padding: 0; cursor: pointer;
	aspect-ratio: 4 / 3;
	border-radius: 8px;
	background-color: var(--chr-heading,#16161d);
	background-size: cover; background-position: center;
}

/* Photo event gallery cells */
.chr-gcell {
	border: 0; padding: 0; cursor: pointer;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	background-color: var(--chr-heading,#16161d);
	background-size: cover; background-position: center;
	transition: transform .2s ease;
}
.chr-gcell:hover { transform: scale(1.02); }

/* --------------------------------------------------------------- Bits */
.chr-tag {
	display: inline-block;
	color: var(--chr-accent, #e63950);
	text-transform: uppercase;
	letter-spacing: 0.07em;
	font-weight: 700;
	font-size: 12px;
}
.chr-date { color: var(--chr-muted, #8a8a94); font-size: 14px; font-weight: 500; }
.chr-date--top { display: inline-block; margin-bottom: 6px; }
.chr-morelink { color: var(--chr-accent, #e63950); font-weight: 700; font-size: 14px; text-decoration: none; }

.chr-btn {
	display: inline-block;
	background: var(--chr-btn-bg, #16161d);
	color: var(--chr-btn-text, #fff);
	text-decoration: none;
	padding: 13px 26px;
	border-radius: 40px;
	font-weight: 700;
	font-size: 15px;
	transition: opacity .2s ease, transform .2s ease;
}
.chr-btn:hover { opacity: .9; transform: translateY(-1px); color: var(--chr-btn-text, #fff); }
.chr-return { margin: 34px 0 8px; }

.chr-empty {
	padding: 30px;
	text-align: center;
	color: var(--chr-muted, #8a8a94);
	background: rgba(0,0,0,.02);
	border: 1px dashed var(--chr-border, #ececef);
	border-radius: var(--chr-radius);
}

.chr-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chr-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 12px;
	border-radius: 8px;
	border: 1px solid var(--chr-border, #ececef);
	color: var(--chr-heading, #16161d);
	text-decoration: none;
	font-weight: 600;
}
.chr-pagination .page-numbers.current { background: var(--chr-accent, #e63950); color: #fff; border-color: var(--chr-accent, #e63950); }
.chr-pagination .page-numbers:hover:not(.current) { border-color: var(--chr-accent, #e63950); }

/* --------------------------------------------------------------- Lightbox */
.chr-modal {
	position: fixed; inset: 0;
	display: none;
	z-index: 100000;
	align-items: center;
	justify-content: center;
}
.chr-modal.is-open { display: flex; }
.chr-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.9); }
.chr-modal__inner {
	position: relative;
	z-index: 2;
	width: min(1000px, 94vw);
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
}
.chr-modal__stage { width: 100%; display: flex; align-items: center; justify-content: center; }
.chr-modal__stage img { max-width: 100%; max-height: 86vh; width: auto; height: auto; border-radius: 6px; }
.chr-modal__stage .chr-modal__video { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.chr-modal__stage .chr-modal__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }

.chr-modal__close {
	position: absolute; top: -44px; right: 0;
	width: 40px; height: 40px;
	border: 0; cursor: pointer;
	background: transparent; color: #fff;
	font-size: 34px; line-height: 1;
}
.chr-modal__nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 52px; height: 52px;
	border: 0; cursor: pointer;
	background: rgba(255,255,255,.14);
	color: #fff; font-size: 22px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
}
.chr-modal__nav:hover { background: rgba(255,255,255,.28); }
.chr-modal__prev { left: -66px; }
.chr-modal__next { right: -66px; }
.chr-modal.is-video .chr-modal__nav { display: none; }

/* ============================================================= Responsive */
@media (max-width: 980px) {
	.chr-featured { grid-template-columns: 1fr; }
	.chr-speeches__grid { grid-template-columns: 1fr; }
	.chr-feat-card { position: static; max-width: 520px; }
}

@media (max-width: 760px) {
	.chr-modal__prev { left: 6px; }
	.chr-modal__next { right: 6px; }
	.chr-modal__close { top: -40px; }
	.chr-latest-boxes { grid-template-columns: 1fr; }
	.chr-banner { padding: 34px 20px; margin-bottom: 26px; }
}

@media (max-width: 560px) {
	.chr { font-size: 15px; }
	.chr-speeches__list { grid-template-columns: 1fr; }
	.chr-grid { gap: 16px; }
	.chr-grid--tiles,
	.chr-grid--events,
	.chr-grid--videos,
	.chr-grid--gallery { grid-template-columns: 1fr 1fr; }
	.chr-tile__label { font-size: 16px; padding: 14px; }
	.chr-container { padding: 0 16px; }
}

@media (max-width: 380px) {
	.chr-grid--videos { grid-template-columns: 1fr; }
}
