/* static/css/our_brief_history.css */

/* Import variables if you have a separate variables.css or similar */
/* @import 'variables.css'; */

/* History Hero Section - Specific for this page's banner */
.history-hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
                url('../images/history_hero_banner.jpg') no-repeat center center;
    background-size: cover;
    background-position: center;
    padding: 100px 0; /* More vertical padding */
    color: #fff;
    position: relative; /* For text overlay */
    overflow: hidden; /* Ensure no overflow */
}

.history-hero h1 {
    font-family: var(--font-saira, 'Saira', sans-serif); /* Use your heading font variable, with fallbacks */
    font-size: 4.2rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5); /* Stronger shadow */
}

.history-hero .lead {
    font-family: var(--font-inter, 'Inter', sans-serif); /* Use your body font variable, with fallbacks */
    font-size: 1.4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Main Page Heading Style (e.g., "Our Brief History") - This applies to the .history-hero h1 as well */
.history-page-heading { /* Specific class from your HTML */
    text-align: center;
    letter-spacing: 1px;
}

/* Main Content Section */
.history-content {
    /* Made background transparent */
    background-color: transparent; /* Changed from var(--light) */
    padding: 60px 0;
}

/* Sidebar Styling */
.sticky-sidebar {
    position: sticky;
    top: 130px; /* Adjust based on navbar height + desired offset */
    z-index: 100; /* Ensure it stays above other content if needed */
    background-color: white; /* Ensure it has a background to stand out */
    border-radius: 0.75rem; /* Consistent with main-content-card */
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); /* Consistent shadow */
    padding: 20px; /* Add internal padding */
    max-height: calc(100vh - 150px); /* Limit height and enable scroll if content is long */
    overflow-y: auto;
}

.history-sidebar-img {
    border: 4px solid var(--primary, #007bff); /* Use your primary color for border, with fallback */
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border-radius: 50%; /* Make it circular as implied by 'rounded' in HTML for this image specifically */
    display: block; /* Ensures margin auto works */
    margin-left: auto;
    margin-right: auto;
    max-width: 180px;
    height: auto;
}
.history-sidebar-img:hover {
    transform: translateY(-5px); /* Slight lift on hover */
}

.list-group-item.active {
    background-color: var(--primary, #007bff) !important;
    border-color: var(--primary, #007bff) !important;
    color: #fff !important;
    border-left: 3px solid var(--primary, #007bff); /* Active state border */
}

.list-group-item {
    font-family: var(--font-inter, 'Inter', sans-serif);
    font-size: 1rem;
    color: var(--dark, #343a40); /* Use your dark variable, with fallback */
    transition: background-color 0.2s ease, color 0.2s ease, border-left-color 0.2s ease;
    border-left: 3px solid transparent; /* Default transparent border */
    padding-left: 15px; /* Space for the border */
}
.list-group-item:hover {
    background-color: var(--secondary, #6c757d) !important; /* Use your secondary color, with fallback */
    color: var(--dark, #343a40) !important; /* Keep text dark for readability */
    border-left-color: var(--primary, #007bff); /* Highlight on hover */
}

/* Main Content Card */
.main-content-card {
    border-radius: 0.75rem; /* Slightly more rounded corners */
    background-color: white; /* Ensure white background for content */
    padding: 40px; /* Added some padding for overall card content */
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); /* Consistent shadow */
    border: none; /* No border for the main card */
}

/* Section Titles (e.g., Preliminaries, Origin) */
/* The main h2 at the top of the content card */
.main-content-card h2 {
    font-family: var(--font-saira, 'Saira', sans-serif);
    color: var(--primary, #007bff); /* Use your primary color for main headings */
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    font-size: 2.2rem; /* Consistent font size */
    border-bottom: 2px solid var(--secondary, #6c757d); /* Add a subtle border */
}

/* Sub-section titles like "Preliminaries", "Origin" */
.main-content-card h3.section-title {
    font-family: var(--font-saira, 'Saira', sans-serif);
    font-size: 1.8rem;
    color: var(--dark, #343a40); /* Use dark for sub-headings for readability */
    font-weight: 700;
    margin-top: 2.5rem; /* More space above these section titles */
    margin-bottom: 1.5rem;
    padding-left: 35px; /* Space for icon */
    position: relative;
    border-bottom: none; /* No underline for sub-headings */
}
.main-content-card h3.section-title::before {
    content: "\f058"; /* Font Awesome Check Circle icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary, #007bff);
    font-size: 1.2rem;
}


.main-content-card p {
    font-family: var(--font-inter, 'Inter', sans-serif);
    text-align: justify;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted, #6c757d); /* Using your text-muted variable, with fallback */
    margin-bottom: 1rem;
}

.main-content-card ul {
    list-style: none; /* Remove default bullet */
    padding-left: 0;
}
.main-content-card ul li {
    font-family: var(--font-inter, 'Inter', sans-serif);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted, #6c757d); /* Using your text-muted variable, with fallback */
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 25px; /* Space for custom bullet */
}
.main-content-card ul li::before {
    content: "\f058"; /* Font Awesome Check Circle icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.2rem;
    color: var(--primary, #007bff);
}

.history-image {
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
}
.history-image:hover {
    transform: scale(1.02);
}

/* Blockquote style */
.main-content-card .blockquote {
    border-left: 5px solid var(--primary, #007bff);
    padding-left: 20px;
    margin: 2rem 0;
    font-size: 1.15rem;
    color: var(--text-muted, #6c757d); /* Using your text-muted variable, with fallback */
    font-style: italic;
}

/* NEW: Styles for Accordion and Secretary List */
.accordion-button {
    font-family: var(--font-inter, 'Inter', sans-serif);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary, #007bff); /* Use your primary color */
    background-color: var(--light, #f8f9fa); /* A light background */
    border: 1px solid var(--border-color-light, #dee2e6); /* Using your border variable */
    border-radius: 0.5rem; /* Rounded corners */
    transition: background-color 0.2s ease, color 0.2s ease;
}

.accordion-button:not(.collapsed) {
    color: #fff; /* White text when expanded */
    background-color: var(--primary, #007bff); /* Primary color background when expanded */
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb, 0, 123, 255), 0.25); /* Focus ring using primary color */
}

.accordion-body {
    font-family: var(--font-inter, 'Inter', sans-serif);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted, #6c757d); /* Using your text-muted variable */
    padding: 1.5rem;
    background-color: #fff; /* White background for the content area */
    border: 1px solid var(--border-color-light, #dee2e6);
    border-top: none; /* No top border as it connects to the button */
    border-radius: 0 0 0.5rem 0.5rem; /* Only bottom rounded corners */
}

.secretary-list li {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.secretary-list li span.fw-bold {
    color: var(--dark, #343a40); /* Strong dark color for names */
}

.secretary-list li span.text-muted {
    font-size: 0.95rem;
}

/* Ensure Font Awesome icons work within accordion buttons */
.accordion-button::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f055"; /* Plus icon for collapsed state */
    transition: transform 0.2s ease-in-out;
}

.accordion-button:not(.collapsed)::after {
    content: "\f056"; /* Minus icon for expanded state */
    transform: rotate(180deg);
}


/* Responsive adjustments */
@media (max-width: 1200px) {
    .history-hero h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 991.98px) {
    .history-hero {
        padding: 80px 0 60px 0;
    }
    .history-hero h1 {
        font-size: 2.8rem;
    }
    .history-hero .lead {
        font-size: 1.1rem;
    }
    .sticky-sidebar {
        position: static; /* Disable sticky on smaller screens */
        top: auto;
        max-height: none; /* Remove max-height constraint */
        overflow-y: visible; /* Remove scrollbar */
        margin-bottom: 30px; /* Add some space below sidebar on small screens */
    }
    .main-content-card h2 { /* Adjust main content h2 for smaller screens */
        font-size: 2rem;
    }
    .main-content-card h3.section-title {
        font-size: 1.6rem;
    }
    .main-content-card p, .main-content-card ul li {
        font-size: 1rem;
    }
    .main-content-card {
        padding: 25px; /* Adjust padding for smaller screens */
    }
}

@media (max-width: 767.98px) {
    .history-hero h1 {
        font-size: 2.2rem;
    }
    .history-hero .lead {
        font-size: 1rem;
    }
    .main-content-card h2 { /* Adjust main content h2 for even smaller screens */
        font-size: 1.8rem;
    }
    .main-content-card h3.section-title {
        font-size: 1.4rem;
    }
    .main-content-card p, .main-content-card ul li {
        font-size: 0.95rem;
    }
}