/* ============================================================
   R/ Jeilani National School - public site
   News & Events: landing page, category bar, calendar, detail sidebar.
   Loaded after site.css; uses the shared tokens only.
   ============================================================ */

/* ---------- Hero (news landing) ---------- */
.ne-hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	background: linear-gradient(120deg, var(--green) 0%, var(--green-2) 100%);
	background-size: cover;
	background-position: center;
	border-bottom: 3px solid var(--gold);
}
body.has-flying-crest .ne-hero { padding-top: 58px; }
.ne-hero-scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(15, 58, 33, .84) 0%, rgba(15, 58, 33, .58) 55%, rgba(15, 58, 33, .24) 100%);
}
.ne-hero-inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 34px 0 30px;
}
.ne-hero .breadcrumb ol { margin-bottom: 2px; }
.ne-hero-accent { width: 44px; height: 4px; border-radius: 2px; background: var(--gold); }
.ne-hero h1 {
	margin: 0;
	font-family: var(--display);
	font-size: 34px;
	line-height: 1.15;
	color: #fff;
}
.ne-hero-lead {
	margin: 0;
	max-width: 72ch;
	font-size: 13.5px;
	line-height: 1.55;
	color: rgba(255, 255, 255, .86);
}

/* ---------- Category bar ---------- */
.news-events-nav {
	background: var(--white);
	border-bottom: 1px solid var(--sage);
	box-shadow: var(--shadow);
}
.news-events-nav-inner {
	display: flex;
	gap: 2px;
	overflow-x: auto;
	scrollbar-width: thin;
	-ms-overflow-style: none;
}
.news-events-nav-inner::-webkit-scrollbar { height: 4px; }
.news-events-nav-inner::-webkit-scrollbar-thumb { background: #CDE0D2; border-radius: 2px; }
.ne-nav-item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 11px 14px;
	color: var(--ink);
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
	border-bottom: 3px solid transparent;
	transition: color .15s ease, border-color .15s ease;
}
.ne-nav-item svg.icon { width: 15px; height: 15px; color: var(--green-2); }
.ne-nav-item:hover { color: var(--green-2); border-bottom-color: var(--sage); }
.ne-nav-item.is-active { color: var(--green); border-bottom-color: var(--gold); }
.ne-nav-item.is-active svg.icon { color: var(--green); }

/* ---------- Landing layout ---------- */
.ne-section { padding: 30px 0 44px; }
.news-events-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 26px;
	align-items: start;
}
.ne-main,
.ne-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ---------- Panels ---------- */
.ne-panel {
	background: var(--white);
	border: 1px solid #DCE9DE;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 18px;
}
.ne-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}
.ne-panel-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-family: var(--serif);
	font-size: 17px;
	color: var(--green);
}
.ne-panel-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 7px;
	background: var(--sage);
	color: var(--green);
}
.ne-panel-icon svg.icon { width: 14px; height: 14px; }
.ne-panel .notice,
.ne-panel .empty-state { margin-bottom: 0; }
.ne-panel-foot {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--sage);
	font-size: 12.5px;
	font-weight: 600;
	color: var(--green);
}
.ne-panel-foot svg.icon { width: 14px; height: 14px; }
.ne-panel-foot:hover { color: var(--green-2); }

/* ---------- Featured story ---------- */
.featured-news-content {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}
.featured-news-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--sage);
}
.featured-news-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-news-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.featured-news-body p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.ne-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 20px;
	background: var(--gold-light);
	color: #8A6D1A;
	font-size: 11px;
	font-weight: 600;
}
.ne-date { font-size: 11.5px; color: var(--muted); }
.ne-featured-title { margin: 0; font-size: 20px; line-height: 1.3; }
.ne-featured-title a { color: var(--ink); }
.ne-featured-title a:hover { color: var(--green); }
.ne-readmore { margin-top: 4px; }

/* ---------- Latest news tiles ---------- */
.latest-news-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 16px;
}
.news-tile {
	display: flex;
	flex-direction: column;
	background: var(--white);
	border: 1px solid #E4EEE5;
	border-radius: var(--radius);
	overflow: hidden;
}
.news-tile:hover { border-color: var(--green-2); }
.news-tile-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--sage);
	overflow: hidden;
}
.news-tile-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-tile-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 12px 14px 14px;
}
.news-tile-title { margin: 0; font-size: 14.5px; line-height: 1.35; }
.news-tile-title a { color: var(--ink); }
.news-tile-title a:hover { color: var(--green); }
.news-tile-body p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.ne-latest .pagination { margin-top: 20px; }

/* ---------- Upcoming events / announcements rows ---------- */
.event-rows,
.ann-rows { list-style: none; margin: 0; padding: 0; }
.event-row,
.ann-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #EAF1EB;
}
.event-row:last-child,
.ann-row:last-child { border-bottom: 0; padding-bottom: 0; }
.event-row:first-child,
.ann-row:first-child { padding-top: 0; }
.event-date,
.ann-date {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 48px;
	border-radius: 8px;
	background: var(--sage);
	color: var(--green);
	line-height: 1.1;
}
.event-date strong,
.ann-date strong { font-size: 17px; }
.event-date span,
.ann-date span { font-size: 9.5px; letter-spacing: .4px; text-transform: uppercase; }
.event-info,
.ann-info { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.event-name,
.ann-name { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.event-name:hover,
.ann-name:hover { color: var(--green); }
.event-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--muted); }
.event-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.event-meta svg.icon { width: 12px; height: 12px; color: var(--green-2); }
.event-chevron { flex: 0 0 auto; color: var(--green-2); }
.event-chevron svg.icon { width: 15px; height: 15px; }
.ann-action {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--green);
}
.ann-action svg.icon { width: 12px; height: 12px; }
.ann-action:hover { color: var(--green-2); }

/* ---------- Calendar ---------- */
.calendar-list { list-style: none; margin: 0; padding: 0; }
.calendar-list li {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid #EAF1EB;
}
.calendar-list li:last-child { border-bottom: 0; }
.calendar-date {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 54px;
	border-radius: 8px;
	background: var(--sage);
	color: var(--green);
	line-height: 1.1;
}
.calendar-date strong { font-size: 18px; }
.calendar-date span { font-size: 9.5px; letter-spacing: .4px; text-transform: uppercase; }
.calendar-list a { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.calendar-list a:hover { color: var(--green); }
.calendar-venue {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 2px;
	font-size: 11.5px;
	color: var(--muted);
}
.calendar-venue svg.icon { width: 12px; height: 12px; color: var(--green-2); }
.calendar { max-width: 100%; }
.calendar > .text-link { margin-top: 16px; }

.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 6px;
	margin-bottom: 18px;
}
.cal-dow {
	padding: 4px 0;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .6px;
	text-transform: uppercase;
	color: var(--muted);
	text-align: center;
}
.cal-day {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-height: 92px;
	padding: 5px 6px;
	background: var(--white);
	border: 1px solid #E4EEE5;
	border-radius: var(--radius-sm);
	overflow: hidden;
}
.cal-day.empty { background: var(--ivory); border: 1px dashed #F0EAD8; }
.cal-num { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.cal-events { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day.today { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.cal-day.today .cal-num { color: var(--green); }
.cal-event {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	padding: 2px 4px;
	border-radius: 4px;
	background: var(--sage);
	color: var(--green);
	font-size: 10.5px;
	font-weight: 600;
	line-height: 1.25;
}
.cal-event:hover { background: #D9E9DA; }
.cal-more { font-size: 10px; font-weight: 700; color: #8A6D1A; }

/* ---------- Detail page sidebar ---------- */
.related-panel > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 7px 0;
	border-bottom: 1px solid #CDE0D2;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ink);
}
.related-panel > a:last-child { border-bottom: 0; }
.related-panel > a:hover { color: var(--green); }
.related-panel > a span[aria-hidden='true'] { flex: 0 0 auto; color: var(--green-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.news-events-layout { grid-template-columns: minmax(0, 1fr); }
	.ne-side { flex-flow: row wrap; }
	.ne-side .ne-panel { flex: 1 1 320px; }
}

@media (max-width: 860px) {
	.ne-hero h1 { font-size: 28px; }
	.featured-news-content { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.cal-day { min-height: 78px; }
}

@media (max-width: 640px) {
	.ne-hero-inner { padding: 22px 0 20px; }
	.ne-hero h1 { font-size: 26px; }
	.ne-hero-lead { font-size: 12.5px; }
	.ne-section { padding: 22px 0 32px; }
	.ne-panel { padding: 14px; }
	.ne-panel-title { font-size: 16px; }
	.latest-news-grid { grid-template-columns: minmax(0, 1fr); }
	.ne-side { flex-direction: column; }
	.ne-side .ne-panel { flex: 1 1 auto; }
	.calendar-grid { gap: 4px; }
	.cal-day { min-height: 62px; padding: 4px; gap: 2px; }
	.cal-event { -webkit-line-clamp: 1; font-size: 10px; }
	.calendar-list li { gap: 10px; }
	.neighbor-nav .button { flex: 1 1 100%; justify-content: center; }
}

/* Phone: the seven-column month grid is unreadable, so show it as an agenda
   (the month itself is always visible in the toolbar above). */
@media (max-width: 560px) {
	.calendar-grid { display: block; margin-bottom: 14px; }
	.cal-dow,
	.cal-day.empty,
	.cal-day.is-blank { display: none; }
	.cal-day {
		flex-direction: row;
		align-items: flex-start;
		gap: 8px;
		min-height: 0;
		margin-bottom: 6px;
		padding: 8px;
	}
	.cal-day.today { box-shadow: none; background: var(--ivory); }
	.cal-num {
		flex: 0 0 34px;
		padding: 5px 0;
		border-radius: 6px;
		background: var(--sage);
		color: var(--green);
		font-size: 13px;
		text-align: center;
	}
	.cal-events { flex: 1 1 auto; gap: 4px; }
	.cal-event { -webkit-line-clamp: 2; font-size: 11.5px; padding: 3px 6px; }
	.cal-more { font-size: 10.5px; }
}

@media (max-width: 420px) {
	.cal-dow { font-size: 9px; letter-spacing: .2px; }
	.cal-day { min-height: 54px; padding: 3px; }
	.cal-num { font-size: 10px; }
	.cal-event { padding: 1px 3px; font-size: 9px; }
	.cal-more { font-size: 9px; }
	.news-events-nav-inner { gap: 0; }
	.ne-nav-item { padding: 10px 10px; font-size: 11.5px; gap: 5px; }
	.ne-nav-item svg.icon { width: 13px; height: 13px; }
}
