/* =====================================================
   BIOGRAPHY PAGES – REFACTORED & IMPROVED
===================================================== */

/* ---------------- HERO ---------------- */
.bio-hero {
    position: relative;
    background:
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0,0,0,0.6)),
        url('/static/images/common_hero_banner.jpg') center/cover no-repeat;
    padding: 100px 0;
    color: #fff;
    text-align: center;
    min-height: 65vh;
}

.bio-hero h1 {
    font-family: var(--font-saira, 'Saira', sans-serif);
    font-size: 3.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

.terracotta-text {
    color: #C65D3B; /* Terracotta */
}

.bio-hero p {
    font-family: var(--font-inter, 'Inter', sans-serif);
    font-size: 1.3rem;
    max-width: 900px;
    margin: 1rem auto 0;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
}

/* ---------------- BREADCRUMB ---------------- */
.bio-breadcrumb {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.95rem;
    padding: 0.6rem 1.5rem;
}

/* ---------------- CONTENT ---------------- */
.bio-content {
    padding: 60px 0;
    background: transparent;
}

/* ---------------- SIDEBAR ---------------- */
.bio-sidebar {
    position: sticky;
    top: 130px;
    z-index: 100;
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 20px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.bio-sidebar .card-header {
    background: var(--primary, #007bff);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

/* Sidebar search */
.bio-sidebar-search {
    padding: 0.5rem 0;
}

.bio-sidebar-search input {
    width: 100%;
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    border: 1px solid #ddd;
    transition: border-color 0.2s ease;
}

.bio-sidebar-search input:focus {
    border-color: var(--primary, #007bff);
    outline: none;
}

/* Sidebar links */
.bio-sidebar-links {
    max-height: 100%;
    overflow-y: auto;
    margin-top: 1rem;
}

.bio-h2 {
    padding: 0.7rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
    border-radius: 0.5rem;
}

.bio-h2:hover {
    background: rgba(246, 176, 127, 0.1);
}

.bio-h2::after {
    content: "\f078"; /* Font Awesome down arrow */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    transition: transform 0.25s ease;
}

.bio-h2.collapsed::after {
    transform: rotate(-90deg);
}

.bio-sub {
    padding-left: 1.2rem;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.bio-sub.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.bio-h3 {
    font-size: 0.9rem;
    display: block;
    padding: 0.5rem 1.25rem;
    color: var(--dark, #343a40);
    border-radius: 0.5rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.bio-h3:hover {
    background: rgba(0,123,255,0.1);
}

.bio-h3.active {
    background: var(--primary, #007bff);
    color: #fff;
}

/* ---------------- MAIN CONTENT ---------------- */
.bio-main {
    border-radius: 0.75rem;
    background-color: #fff;
    padding: 2.5rem;
    line-height: 1.7;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* Headings */
.bio-main h2,
.bio-main h3 {
    font-family: var(--font-saira, 'Saira', sans-serif);
    color: var(--primary, #007bff);
    scroll-margin-top: 130px;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Paragraphs */
.bio-main p {
    font-family: var(--font-inter, 'Inter', sans-serif);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted, #6c757d);
    margin-bottom: 1rem;
    text-align: justify;
}

/* Lists */
.bio-main ul {
    list-style: none;
    padding-left: 0;
}

.bio-main ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 0.5rem;
    font-family: var(--font-inter, 'Inter', sans-serif);
    color: var(--text-muted, #6c757d);
    font-size: 1rem;
}

.bio-main ul li::before {
    content: "\f058"; /* Font Awesome check circle */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.2rem;
    color: var(--primary, #007bff);
}

/* Quotes */
.bio-quote {
    border-left: 5px solid var(--primary, #007bff);
    padding-left: 1rem;
    margin: 2rem 0;
    font-style: italic;
    background: rgba(0,123,255,0.05);
    transition: background 0.3s ease;
}

.bio-quote.active {
    background: rgba(0,123,255,0.12);
}

/* ---------------- PROGRESS BAR ---------------- */
#bioProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: var(--primary, #007bff);
    z-index: 9999;
    transition: width 0.25s ease;
}

/* ---------------- MOBILE ---------------- */
@media (max-width: 991.98px) {
    .bio-sidebar {
        position: fixed;
        left: -85%;
        width: 85%;
        height: 100vh;
        z-index: 9998;
        transition: left 0.3s ease;
    }

    .bio-sidebar.open {
        left: 0;
    }
}

@media (max-width: 767.98px) {
    .bio-hero h1 { font-size: 2.5rem; }
    .bio-hero p { font-size: 1rem; }
    .bio-main { padding: 1.5rem; }
    .bio-main h2 { font-size: 1.8rem; }
    .bio-main h3 { font-size: 1.4rem; }
    .bio-main p, .bio-main ul li { font-size: 0.95rem; }
}
