/* =====================================================
   ABOUT PAGE â€” R/ Jeilani National School
   ===================================================== */

/* --- Hero Banner (uses homepage .hero classes for crest flight) --- */
.about-hero {
    min-height: 280px;
}

.about-hero .hero-carousel {
    height: 100%;
}

.about-hero .hero-slide {
    background-color: #176B3A;
}

.about-hero .hero-slide.is-empty {
    background: linear-gradient(135deg, #176B3A 0%, #1a7a42 50%, #2E8B57 100%);
}

/* --- Body Layout --- */
.about-body {
    background: #FFFDF5;
    padding: 40px 0 56px;
}

.about-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* --- Sidebar --- */
.about-sidebar {
    width: 270px;
    flex-shrink: 0;
    background: #FFFFFF;
    border: 1px solid #E8F1E8;
    border-radius: 8px;
    padding: 12px 0;
    position: sticky;
    top: 80px;
}

.about-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.about-sidebar-list li {
    margin: 0;
    padding: 0;
}

.about-sidebar-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #183A2B;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.about-sidebar-list a .icon {
    width: 14px;
    height: 14px;
    transform: rotate(-90deg);
    opacity: 0.4;
    flex-shrink: 0;
}

.about-sidebar-list a:hover {
    background: #E8F1E8;
    border-left-color: #2E8B57;
}

.about-sidebar-list a.is-active {
    background: #E8F1E8;
    border-left-color: #D6B63C;
    color: #176B3A;
    font-weight: 600;
}

.about-sidebar-list a.is-active .icon {
    opacity: 0.8;
    color: #D6B63C;
}

/* --- Content Column --- */
.about-content {
    flex: 1;
    min-width: 0;
}

/* --- About Intro Section --- */
.about-intro-section {
    margin-bottom: 32px;
}

.about-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.about-section-heading {
    font-family: var(--font);
    font-size: 26px;
    font-weight: 700;
    color: #183A2B;
    margin: 0 0 4px;
    line-height: 1.25;
}

.gold-divider {
    display: block;
    width: 48px;
    height: 2px;
    background: #D6B63C;
    margin-top: 10px;
    margin-bottom: 16px;
    border-radius: 1px;
}

.about-intro-body {
    font-size: 15px;
    line-height: 1.65;
    color: #183A2B;
    margin: 0 0 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    line-height: 1.3;
}

.btn .icon {
    width: 16px;
    height: 16px;
}

.btn-gold {
    background: #D6B63C;
    color: #183A2B;
}

.btn-gold:hover {
    opacity: 0.9;
}

.btn-green {
    background: #176B3A;
    color: #fff;
}

.btn-green:hover {
    opacity: 0.9;
}

/* Intro Photo */
.about-intro-photo {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #E8F1E8;
    aspect-ratio: 16 / 10;
}

.about-intro-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-photo-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E8F1E8;
    color: #2E8B57;
    opacity: 0.5;
}

.about-photo-placeholder .icon {
    width: 48px;
    height: 48px;
}

/* --- Bottom Grid: History + Principal --- */
.about-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

/* --- Detail Sections (Motto, Leadership, Staff, Facilities) --- */
.about-detail-section {
    background: #FFFFFF;
    border: 1px solid #E8F1E8;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

.about-detail-body {
    font-size: 14px;
    line-height: 1.65;
    color: #183A2B;
    margin: 0;
}

.about-detail-body p {
    margin: 0 0 10px;
}

.about-detail-body p:last-child {
    margin-bottom: 0;
}

/* History Panel */
.about-history-panel {
    background: #FFFFFF;
    border: 1px solid #E8F1E8;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.about-history-text {
    padding: 24px 24px 20px;
}

.about-history-body {
    font-size: 14px;
    line-height: 1.6;
    color: #183A2B;
    margin: 0 0 16px;
}

.about-history-photo {
    margin: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.about-history-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Principal Panel */
.about-principal-panel {
    background: #FFFFFF;
    border: 1px solid #E8F1E8;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
}

.about-principal-text {
    padding: 24px 24px 20px;
}

.about-principal-quote {
    margin: 0 0 16px;
    padding: 0;
    border: none;
    font-size: 14px;
    line-height: 1.65;
    color: #183A2B;
    font-style: italic;
}

.about-principal-quote p {
    margin: 0 0 8px;
}

.about-principal-sign {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.about-principal-sign strong {
    font-size: 15px;
    color: #176B3A;
}

.about-principal-sign span {
    font-size: 13px;
    color: #183A2B;
    opacity: 0.7;
}

.about-principal-illustration {
    margin: 0;
    order: -1;
    flex: 0 0 180px;
    width: 180px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #FFFDF5;
    border-right: 1px solid #E8F1E8;
}

.about-wireframe {
    width: 100%;
    max-width: 150px;
    color: #2E8B57;
}

.about-wireframe svg {
    width: 100%;
    height: auto;
    max-height: 150px;
}

.about-principal-illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* Placeholder text */
.placeholder-text {
    color: #183A2B;
    opacity: 0.5;
    font-style: italic;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* Tablet landscape */

/* Tablet portrait */
@media (max-width: 900px) {
    .about-layout {
        flex-direction: column;
    }

    .about-sidebar {
        width: 100%;
        position: static;
        padding: 8px 0;
    }

    .about-sidebar-list {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .about-sidebar-list::-webkit-scrollbar {
        display: none;
    }

    .about-sidebar-list li {
        flex-shrink: 0;
    }

    .about-sidebar-list a {
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        padding: 10px 16px;
    }

    .about-sidebar-list a .icon {
        display: none;
    }

    .about-sidebar-list a:hover {
        border-left: none;
    }

    .about-sidebar-list a.is-active {
        border-left: none;
        border-bottom-color: #D6B63C;
    }

    .about-intro-grid {
        grid-template-columns: 1fr;
    }

    .about-bottom-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .about-body {
        padding: 24px 0 36px;
    }

    .about-section-heading {
        font-size: 22px;
    }

    .about-principal-panel { flex-direction: column; }
    .about-principal-illustration { order: 0; flex: 0 0 auto; width: 100%; max-width: 180px; min-height: auto; margin: 0 auto; border-right: 0; border-bottom: 1px solid #E8F1E8; }
}

/* Teachers & Staff: interactive org chart + accessible profile overlay */
.staff-explorer-entry {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 18px;
	padding: 14px 16px;
	border: 1px solid #DCE9DE;
	border-left: 3px solid #D6B63C;
	border-radius: 10px;
	background: linear-gradient(110deg, #F7FAF6, #FFFDF5);
}
.staff-explorer-entry p { margin: 0; color: #4C6655; font-size: 13px; line-height: 1.5; }
.staff-explorer-button {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 42px;
	padding: 0 17px;
	border: 1px solid #176B3A;
	border-radius: 999px;
	background: #176B3A;
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.staff-explorer-button:hover { transform: translateY(-2px); background: #2E8B57; box-shadow: 0 8px 18px rgba(23,107,58,.18); }
.staff-explorer-button svg.icon { width: 15px; height: 15px; }
.staff-directory-empty { margin: 14px 0 0; color: #4C6655; font-size: 13px; }

.staff-chart-modal,
.staff-profile-modal {
	position: fixed;
	inset: 0;
	z-index: 1400;
	display: grid;
	place-items: center;
	padding: 24px;
}
.staff-chart-modal[hidden], .staff-profile-modal[hidden] { display: none; }
.staff-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(12, 34, 23, .7);
	backdrop-filter: blur(9px);
	-webkit-backdrop-filter: blur(9px);
	animation: staff-backdrop-in .24s ease both;
}
.staff-chart-panel,
.staff-profile-panel {
	position: relative;
	z-index: 1;
	display: flex;
	width: min(1080px, 100%);
	max-height: min(90dvh, 940px);
	flex-direction: column;
	border: 1px solid rgba(255,255,255,.5);
	border-radius: 20px;
	background: #FFFDF5;
	box-shadow: 0 28px 90px rgba(0,0,0,.3);
	overflow: hidden;
	animation: staff-panel-in .36s cubic-bezier(.2,.8,.2,1) both;
}
.staff-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	padding: 24px 28px 18px;
	border-bottom: 1px solid #DCE9DE;
	background: rgba(255,255,255,.78);
}
.staff-modal-kicker { margin: 0 0 5px; color: #8A6D1A; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.staff-modal-header h2 { margin: 0; color: #183A2B; font-family: var(--display, Outfit, sans-serif); font-size: clamp(22px, 3vw, 30px); line-height: 1.15; }
.staff-modal-intro { margin: 7px 0 0; color: #4C6655; font-size: 13px; }
.staff-modal-close {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border: 1px solid #DCE9DE;
	border-radius: 50%;
	background: #fff;
	color: #183A2B;
	font-size: 23px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}
.staff-modal-close:hover { transform: rotate(90deg); background: #E8F1E8; }
.staff-chart-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 26px 30px 30px; }
.staff-org-tree { display: grid; justify-items: center; }
.staff-org-root {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: min(300px,100%);
	padding: 14px 20px;
	border: 1px solid rgba(214,182,60,.38);
	border-radius: 14px;
	background: linear-gradient(135deg, #176B3A, #0F4D29);
	color: #fff;
	box-shadow: 0 12px 28px rgba(23,107,58,.15);
}
.staff-org-mark { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: rgba(255,255,255,.13); color: #F8E7A0; }
.staff-org-mark img { display: block; width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.22)); }
.staff-org-root strong, .staff-org-root small { display: block; }
.staff-org-root strong { font-size: 14px; line-height: 1.3; }
.staff-org-root small { margin-top: 2px; color: rgba(255,255,255,.74); font-size: 11px; }
.staff-org-trunk { display: block; width: 2px; height: 26px; background: linear-gradient(#D6B63C,#BFD6C4); }
.staff-department-grid {
	position: relative;
	display: grid;
	width: 100%;
	grid-template-columns: repeat(auto-fit, minmax(min(250px,100%),1fr));
	align-items: start;
	gap: 22px;
	padding-top: 24px;
}
.staff-department-grid::before { position: absolute; top: 0; left: 8%; right: 8%; height: 1px; background: #BFD6C4; content: ''; }
.staff-department {
	position: relative;
	min-width: 0;
	padding: 16px;
	border: 1px solid #DCE9DE;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(24,58,43,.06);
}
.staff-department::before { position: absolute; top: -25px; left: 50%; width: 1px; height: 24px; background: #BFD6C4; content: ''; }
.staff-department-header { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; }
.staff-department-header h3 { margin: 0; color: #176B3A; font-size: 15px; }
.staff-department-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #D6B63C; box-shadow: 0 0 0 4px #F8F1D7; }
.staff-person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px,180px)); justify-content: center; gap: 12px; }
.staff-person-card {
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: center;
	padding: 10px 9px 12px;
	border: 1px solid #E4ECE5;
	border-radius: 12px;
	background: #F9FBF8;
	color: #183A2B;
	font: inherit;
	text-align: center;
	cursor: pointer;
	transition: transform .22s cubic-bezier(.2,.8,.2,1), border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
.staff-person-card:hover { transform: translateY(-4px); border-color: #B8D2BE; background: #fff; box-shadow: 0 12px 26px rgba(24,58,43,.11); }
.staff-person-card:focus-visible, .staff-modal-close:focus-visible, .staff-profile-back:focus-visible { outline: 3px solid #D6B63C; outline-offset: 3px; }
.staff-person-portrait { display: grid; width: min(150px,100%); aspect-ratio: 4 / 5; overflow: hidden; place-items: center; margin: 0 0 11px; border-radius: 9px; background: linear-gradient(145deg, #E8F1E8, #F8F1D7); color: #176B3A; }
.staff-person-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.staff-person-initials { font-family: var(--display, Outfit, sans-serif); font-size: 34px; font-weight: 700; letter-spacing: .04em; }
.staff-person-card > strong { display: block; max-width: 100%; overflow-wrap: anywhere; font-size: 13px; line-height: 1.3; }
.staff-person-role { display: block; margin-top: 4px; color: #4C6655; font-size: 11px; line-height: 1.35; }
.staff-person-more { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; color: #176B3A; font-size: 10px; font-weight: 700; }
.staff-chart-footer { padding: 11px 28px; border-top: 1px solid #DCE9DE; background: #F7FAF6; color: #4C6655; font-size: 11px; text-align: center; }
.staff-chart-footer span { color: #176B3A; font-weight: 800; }

.staff-profile-modal { z-index: 1410; }
.staff-profile-panel { width: min(720px,100%); padding: 24px; }
.staff-profile-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.staff-profile-header .staff-modal-kicker { margin-top: 12px; }
.staff-profile-content { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(0,1.2fr); align-items: start; gap: 26px; padding: 8px 0 20px; }
.staff-profile-portrait { position: relative; display: grid; min-height: 220px; aspect-ratio: 4 / 5; overflow: hidden; place-items: center; border-radius: 14px; background: linear-gradient(145deg, #E8F1E8, #F8F1D7); color: #176B3A; }
.staff-profile-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.staff-profile-portrait img[hidden], .staff-profile-initials[hidden], .staff-profile-photo-note[hidden] { display: none; }
.staff-profile-initials { font-family: var(--display, Outfit, sans-serif); font-size: 52px; font-weight: 700; }
.staff-profile-photo-note { position: absolute; right: 8px; bottom: 8px; left: 8px; padding: 6px 8px; border-radius: 999px; background: rgba(15,77,41,.78); color: #fff; font-size: 10px; text-align: center; }
.staff-profile-copy h2 { margin: 2px 0 4px; color: #183A2B; font-size: 25px; line-height: 1.15; }
.staff-profile-designation { margin: 0; color: #176B3A; font-size: 14px; font-weight: 600; }
.staff-profile-facts { margin: 20px 0 0; border-top: 1px solid #DCE9DE; }
.staff-profile-facts div { padding: 11px 0; border-bottom: 1px solid #E6EEE7; }
.staff-profile-facts dt { color: #6B806F; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.staff-profile-facts dd { margin: 4px 0 0; color: #183A2B; font-size: 13px; }
.staff-profile-biography { margin-top: 18px; }
.staff-profile-biography h3 { margin: 0 0 6px; color: #183A2B; font-size: 13px; }
.staff-profile-biography p { margin: 0; color: #4C6655; font-size: 13px; line-height: 1.6; }
.staff-profile-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid #DCE9DE; border-radius: 999px; background: #F7FAF6; color: #176B3A; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.staff-profile-back:hover { background: #E8F1E8; }
@keyframes staff-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes staff-panel-in { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 700px) {
	.staff-explorer-entry { align-items: flex-start; flex-direction: column; gap: 12px; padding: 14px; }
	.staff-explorer-button { align-self: stretch; }
	.staff-chart-modal, .staff-profile-modal { padding: 0; place-items: stretch; }
	.staff-chart-panel, .staff-profile-panel { width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
	.staff-modal-header { position: sticky; top: 0; z-index: 3; padding: 18px 18px 14px; }
	.staff-modal-header h2 { font-size: 22px; }
	.staff-chart-scroll { padding: 18px 14px 22px; }
	.staff-org-root { width: min(100%, 420px); min-width: 0; padding: 12px 14px; animation: staff-mobile-arrive .46s .04s cubic-bezier(.2,.8,.2,1) both; }
	.staff-org-mark { width: 44px; height: 44px; }
	.staff-org-mark img { width: 40px; height: 40px; }
	.staff-department-grid { grid-template-columns: minmax(0,1fr); gap: 18px; padding-top: 20px; }
	.staff-department-grid::before { left: 50%; right: auto; width: 1px; height: 100%; background: linear-gradient(#BFD6C4,#E8F1E8); }
	.staff-department { z-index: 1; padding: 13px; animation: staff-mobile-arrive .46s .14s cubic-bezier(.2,.8,.2,1) both; }
	.staff-department::before { top: -21px; height: 20px; }
	.staff-person-grid { grid-template-columns: minmax(0,1fr); justify-content: stretch; gap: 9px; }
	.staff-person-card {
		display: grid;
		grid-template-columns: 66px minmax(0,1fr);
		grid-template-areas: 'portrait name' 'portrait role' 'portrait more';
		align-items: center;
		justify-items: start;
		gap: 3px 12px;
		padding: 9px 11px;
		text-align: left;
		animation: staff-mobile-arrive .46s .23s cubic-bezier(.2,.8,.2,1) both;
	}
	.staff-person-card:nth-child(2) { animation-delay: .30s; }
	.staff-person-card:nth-child(3) { animation-delay: .37s; }
	.staff-person-card:nth-child(n+4) { animation-delay: .42s; }
	.staff-person-portrait { grid-area: portrait; width: 66px; margin: 0; aspect-ratio: 4 / 5; border-radius: 8px; }
	.staff-person-initials { font-size: 22px; }
	.staff-person-card > strong { grid-area: name; align-self: end; }
	.staff-person-role { grid-area: role; margin-top: 0; align-self: start; }
	.staff-person-more { grid-area: more; margin-top: 2px; align-self: start; }
	.staff-chart-footer { padding: 10px 14px; }
	.staff-profile-panel { padding: 0; overflow-y: auto; }
	.staff-profile-header { position: sticky; top: 0; z-index: 3; padding: 14px 16px 10px; background: #FFFDF5; border-bottom: 1px solid #DCE9DE; }
	.staff-profile-header .staff-modal-kicker { margin-top: 11px; }
	.staff-profile-content { grid-template-columns: minmax(0,1fr); gap: 18px; padding: 18px 18px 20px; }
	.staff-profile-portrait { width: min(210px,62vw); min-height: 0; margin-inline: auto; }
	.staff-profile-copy h2 { font-size: 23px; }
	.staff-profile-back { margin: 0 18px 20px; }
}
@keyframes staff-mobile-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
	.staff-modal-backdrop, .staff-chart-panel, .staff-profile-panel { animation: none !important; }
	.staff-explorer-button, .staff-modal-close, .staff-person-card { transition: none !important; }
	.staff-org-root, .staff-department, .staff-person-card { animation: none !important; opacity: 1 !important; transform: none !important; }
}
