/*
Theme Name: Astra Child (CAPIC)
Theme URI: https://ncic-cnci.ca/
Description: Astra child theme for CAPIC/NCIC. Holds the custom capic_speakers and capic_agenda shortcodes so they survive Astra updates. Do not put custom code back into the parent Astra theme.
Author: CAPIC
Template: astra
Version: 1.0.0
Text Domain: astra-child
*/

/* ============================================================
   CAPIC custom styles
   All selectors are namespaced with .capic- so they never
   collide with Astra's own styles.
   ============================================================ */

.capic-speakers,
.capic-speakers-heading,
.capic-agenda {
	--capic-red: #c8102e;
	--capic-ink: #242424;
	--capic-grey: #6b7280;
	--capic-light: #f5f6f8;
}

/* ---------- Speakers ---------- */
.capic-speakers-heading {
	text-align: center;
	color: var(--capic-red);
	font-size: 1.35rem;
	font-weight: 700;
	margin: 34px 0 20px;
}
.capic-speakers-heading:first-child { margin-top: 0; }

.capic-speakers {
	display: grid;
	gap: 30px 18px;
	justify-content: center;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	max-width: 1080px;
	margin: 0 auto;
	padding: 10px 0;
}
.capic-speakers-k {
	grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
	max-width: 1000px;
}
.capic-speakers-g,
.capic-speakers-i {
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.capic-speaker {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	text-align: center;
	cursor: default;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.capic-speaker.capic-has-bio { cursor: pointer; }

.capic-speaker-photo {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--capic-light);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
	transition: transform .15s ease, box-shadow .15s ease;
}
.capic-speakers-k .capic-speaker-photo { width: 150px; height: 150px; }
.capic-has-bio:hover .capic-speaker-photo {
	transform: translateY(-3px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, .16);
}
.capic-speaker-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.capic-initials { font-size: 1.6rem; font-weight: 700; color: var(--capic-red); }

.capic-speaker-name {
	color: var(--capic-red);
	font-weight: 700;
	font-size: .95rem;
	line-height: 1.25;
}
.capic-speaker-title {
	color: var(--capic-grey);
	font-size: .78rem;
	line-height: 1.3;
	margin-top: 4px;
	max-width: 170px;
}

/* ---------- Speaker bio modal ---------- */
.capic-modal { position: fixed; inset: 0; z-index: 99999; display: none; }
.capic-modal.is-open { display: block; }
.capic-modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.capic-modal-box {
	position: relative;
	max-width: 640px;
	width: 92%;
	max-height: 85vh;
	overflow: auto;
	background: #fff;
	border-radius: 12px;
	margin: 6vh auto;
	padding: 30px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.capic-modal-close {
	position: absolute; top: 10px; right: 16px;
	border: 0; background: none; font-size: 2rem; line-height: 1;
	color: #999; cursor: pointer;
}
.capic-modal-close:hover { color: var(--capic-red); }
.capic-modal-header { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.capic-modal-photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.capic-modal-name { color: var(--capic-red); font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.capic-modal-title { color: var(--capic-grey); font-size: .9rem; margin-top: 3px; }
.capic-modal-bio { color: var(--capic-ink); font-size: .95rem; line-height: 1.65; }
.capic-modal-bio p { margin: 0 0 12px; }
.capic-modal-bio ul, .capic-modal-bio ol { margin: 0 0 12px 20px; }
.capic-modal-bio li { margin: 0 0 6px; }

/* ---------- Agenda ---------- */
.capic-agenda { max-width: 900px; margin: 0 auto; }
.capic-agenda-tabs {
	display: flex; gap: 10px; justify-content: center;
	margin-bottom: 26px; flex-wrap: wrap;
}
.capic-agenda-tab {
	border: 1px solid #e2e3e7;
	background: #fff;
	border-radius: 8px;
	padding: 10px 24px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 112px;
	transition: background .15s ease, border-color .15s ease;
}
.capic-agenda-tab .capic-tab-num {
	font-weight: 700; color: var(--capic-ink);
	font-size: .95rem; letter-spacing: .04em;
}
.capic-agenda-tab .capic-tab-date { font-size: .72rem; color: var(--capic-grey); margin-top: 3px; }
.capic-agenda-tab.is-active { background: var(--capic-red); border-color: var(--capic-red); }
.capic-agenda-tab.is-active .capic-tab-num,
.capic-agenda-tab.is-active .capic-tab-date { color: #fff; }

.capic-agenda-day { display: none; }
.capic-agenda-day.is-active { display: block; }
.capic-agenda-item {
	display: flex; gap: 22px;
	padding: 20px 0;
	border-bottom: 1px solid #ececec;
}
.capic-agenda-item:last-child { border-bottom: 0; }
.capic-agenda-time { flex: 0 0 150px; color: var(--capic-red); font-weight: 700; font-size: .9rem; }
.capic-agenda-topic { font-weight: 700; color: var(--capic-ink); font-size: 1.05rem; margin-bottom: 5px; }
.capic-agenda-room { color: var(--capic-grey); font-size: .8rem; margin-bottom: 5px; }
.capic-agenda-details { color: #4b5563; font-size: .9rem; line-height: 1.6; }
.capic-agenda-speakers { margin-top: 8px; font-size: .85rem; color: var(--capic-red); font-weight: 600; }

/* ---------- Notices / fallback ---------- */
.capic-notice { text-align: center; color: var(--capic-grey); padding: 26px; font-style: italic; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
	.capic-agenda-item { flex-direction: column; gap: 6px; }
	.capic-agenda-time { flex-basis: auto; }
	.capic-modal-box { padding: 22px; }
}