/* Container for the Page Header */
.partials-page-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 1450px;
    margin: 0 auto;
    width: 100%;


    padding: clamp(32px, calc(var(--unit) * 64), 64px) 0 clamp(32px, calc(var(--unit) * 64), 64px) 0;

    gap: clamp(16px, calc(var(--unit) * 32), 32px);
    box-sizing: border-box;
}

/* Breadcrumbs Styling */
.partials-page-header__breadcrumbs {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(8px, calc(var(--unit) * 12), 16px);
    font-family: 'Outfit', sans-serif;

    /* Pushes breadcrumbs right to align perfectly with the H1 text.
       Calculated exactly from: Back Arrow (37px) + Gap (15px) = 52px */
    padding-left: clamp(37px, calc(var(--unit) * 52), 52px);
}

/* Breadcrumb Links */
.partials-page-header__breadcrumbs a {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: clamp(6px, calc(var(--unit) * 6), 6px);
    font-weight: 400;
    font-size: clamp(14px, calc(var(--unit) * 20), 20px);
    line-height: 1.25;
    color: #2A2B2C;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Specific styling for the first Breadcrumb (Home) to match Figma dark gray */
.partials-page-header__breadcrumbs a:first-child {
    color: #2A2B2C;
}

.partials-page-header__breadcrumbs a:hover {
    color: var(--accent-copper);
}

/* Home SVG Icon */
.partials-page-header__breadcrumbs a svg {
    width: clamp(16px, calc(var(--unit) * 24), 24px);
    height: clamp(16px, calc(var(--unit) * 24), 24px);
    flex-shrink: 0;
}

/* .partials-page-header__breadcrumbs a img{
    
width: clamp(16px, calc(var(--unit) * 26), 26px);
    height: clamp(17px, calc(var(--unit) * 28), 28px);

} */
/* Chevron Divider SVG */
.partials-page-header__breadcrumbs>svg {
    width: clamp(4px, calc(var(--unit) * 6), 6px);
    height: clamp(8px, calc(var(--unit) * 12), 12px);
    flex-shrink: 0;
}

/* Active Breadcrumb (Current Page) */
.partials-page-header__breadcrumbs .active {
    font-weight: 400;
    font-size: clamp(14px, calc(var(--unit) * 20), 20px);
    line-height: 1.25;
    color: var(--accent-copper);
}

/* Main Header Section */
.partials-page-header__main {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap; 
    gap: 16px;
}

/* Title & Back Button Group */
.partials-page-header__title-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(8px, calc(var(--unit) * 15), 15px);
}

/* Back Button */
.partials-page-header__back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(24px, calc(var(--unit) * 37), 37px);
    height: clamp(24px, calc(var(--unit) * 37), 37px);
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.partials-page-header__back-btn:hover {
    opacity: 0.7;
}

.partials-page-header__back-btn svg {
    width: 100%;
    height: auto;
}

/* Page Title / Heading */
.partials-page-header__title {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(32px, calc(var(--unit) * 56), 56px);
    line-height: 0.7;
    /* Derived from 64px line-height in Figma */
    color: var(--primary-dark);
    margin: 0;
}

/* Optional Right Element Group */
.partials-page-header__actions {
    display: flex;
    align-items: center;
}

.partials-institute-page-wrapper {
    background-color: var(--bg-light, #FFFDF9);
    /* Set to 0 so the sidebar can touch the footer */
    padding-bottom: 96px;
    padding-left: 5%;
    padding-right: 5%;
    font-family: 'Outfit', sans-serif;
    width: 100%;
    box-sizing: border-box;
}

/* This container centers the entire layout (Sidebar + Content) */
.partials-institute-container {
    max-width: 1450px;

    /* Sidebar (367) + Gap (141) + Content (958) */
    margin: 0 auto;
    width: 100%;
    padding-bottom: 96px;
}

/* pagination */


.notif-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 60px;
}

.page-link-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #2A2B2C;
}

.page-link-num.active {
    background-color: #05192D;
    color: #FFFFFF;
}

.page-link-dots {
    color: #545558;
}


/* sidebar */
.partials-institute-container {
    padding-bottom: 0px;
}

.sidebar {
    flex: 0 0 clamp(250px, calc(var(--unit) * 367), 367px);
    background: #FFF5E8;
    border-radius: 20px 20px 0px 0px;
    /* padding-bottom: 100%; */
    /* Remove position: sticky and height: fit-content from here */
    /* Remove padding: 32px 0 from here (we will move it to the menu) */
}

/* Optional: Make the sidebar's internal scrollbar (if triggered) look clean */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #BF7771;
    /* Matches your copper accent */
    border-radius: 4px;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;

    /* ADDED: Make the inner list sticky instead of the whole background */
    position: sticky;
    top: 40px;
    /* Adjust this if you want it to stick lower/higher */
    padding: 32px 0;
    padding-bottom: clamp(64px, calc(var(--unit) * 96), 96px) !important;
    /* Moved the top/bottom padding here */
}

.sidebar-menu li {
    /* 32px margin on left and right pushes the border inwards */
    margin: 0 32px 0 clamp(37px, calc(var(--unit) * 52), 52px);
    border-bottom: 0.5px solid #BF7771;
}

/* .sidebar-menu li:last-child {
        border-bottom: none;
    } */

.sidebar-menu a {
    display: flex;
    align-items: center;
    /* Padding stays fixed to maintain the structural height */
    padding: 10px 0px;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;

    /* FONTS CLAMPED HERE AS REQUESTED */
    font-size: clamp(14px, calc(var(--unit) * 16), 16px);
    line-height: clamp(20px, calc(var(--unit) * 24), 24px);

    color: #2A2B2C;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-menu li.active a,
.sidebar-menu a:hover {
    color: #BF7771;
    font-weight: 600;
}

/* =========================================================
       RESPONSIVE ADJUSTMENTS
       ========================================================= */
@media (max-width: 1100px) {
    .sidebar {
        width: 100%;
        max-width: 100%;
        flex: auto;
        border-radius: 20px;
    }
}


/* =========================================================
       FILTER SECTION
       ========================================================= */
.filter-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: clamp(8px, calc(var(--unit) * 12), 12px);
    margin-bottom: clamp(24px, calc(var(--unit) * 40), 40px);
}

.filter-select {
    background: #F8F9FA;
    border: 1px solid #D1D5DB;
    border-radius: clamp(12px, calc(var(--unit) * 20), 20px);
    padding: clamp(6px, calc(var(--unit) * 8), 8px) clamp(12px, calc(var(--unit) * 20), 20px);
    font-family: 'Outfit', sans-serif;
    font-size: clamp(12px, calc(var(--unit) * 14), 14px);
    outline: none;
    cursor: pointer;
}

/* 1. Prevent sidebar from sticking and breaking the page flow when it stacks at 1100px */
@media (max-width: 1100px) {
    .sidebar-menu {
        position: relative;
        top: 0;
        padding-bottom: 32px !important;
    }
}

/* 2. Fix header, breadcrumbs, and filters for mobile screens */
@media (max-width: 768px) {
    .partials-page-header__breadcrumbs {
        padding-left: 0; /* Removes the large desktop indent */
        flex-wrap: wrap; /* Allows long breadcrumbs to wrap to the next line */
    }
    
    .partials-page-header__main {
        flex-direction: column; /* Stacks the title and right-side buttons */
        align-items: flex-start;
        gap: 16px;
    }

    .filter-section, 
    .notif-pagination {
        flex-wrap: wrap; /* Prevents filters/pagination from bleeding off screen */
        justify-content: flex-start;
    }
}