/* ================================================
   Modern Services Sidebar — Card Style
   Matching: light background, white cards, arrow icons
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────── */
:root {
    --msb-bg:            #e8f0f7;          /* light blue-grey background */
    --msb-header-bg:     #1e3a5f;          /* deep navy for header */
    --msb-header-text:   #ffffff;
    --msb-card-bg:       #ffffff;          /* white item cards */
    --msb-card-border:   rgba(30, 58, 95, 0.08);
    --msb-card-shadow:   0 2px 10px rgba(30, 58, 95, 0.08);
    --msb-card-hover-bg: #1e3a5f;          /* navy on hover */
    --msb-card-hover-text: #ffffff;
    --msb-active-bg:     #1e3a5f;          /* active = navy */
    --msb-active-text:   #ffffff;
    --msb-arrow-bg:      #1e3a5f;          /* arrow icon bg */
    --msb-arrow-text:    #ffffff;
    --msb-arrow-active:  #4a9eda;          /* lighter blue arrow when active */
    --msb-text:          #2c3e50;
    --msb-radius:        14px;
    --msb-card-radius:   10px;
    --msb-transition:    all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --msb-font-body:     'Inter', -apple-system, sans-serif;
    --msb-font-head:     'Poppins', -apple-system, sans-serif;
}

/* ── Outer Wrapper (what sits in the col-lg-3) ─── */
.msb-sidebar-col {
    padding-left: 0 !important;
}

/* ── Mobile Toggle Button ──────────────────────── */
.msb-mobile-toggle {
    display: none;               /* hidden on desktop */
    width: 100%;
    padding: 14px 18px;
    background: var(--msb-header-bg);
    color: var(--msb-header-text);
    border: none;
    border-radius: var(--msb-radius) var(--msb-radius) 0 0;
    font-family: var(--msb-font-body);
    font-size: 0.95rem;
    font-weight: 600;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: var(--msb-transition);
    letter-spacing: 0.01em;
}

.msb-mobile-toggle:hover {
    background: #698484;
}

.msb-toggle-label {
    display: flex;
    align-items: center;
}

.msb-toggle-chevron {
    font-size: 0.85rem;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.msb-mobile-toggle[aria-expanded="true"] .msb-toggle-chevron {
    transform: rotate(180deg);
}

/* ── Main Sidebar Container ────────────────────── */
.msb-sidebar {
    background: var(--msb-bg);
    border-radius: var(--msb-radius);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(30, 58, 95, 0.12);
    padding: 0 0 16px 0;
    margin: 20px 16px 20px 0;
    transition: var(--msb-transition);
}

/* ── Header Block ──────────────────────────────── */
.msb-header {
    background: #b9c7c8;
    padding: 22px 20px 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

/* .msb-header-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
} */

.msb-header-icon i {
    font-size: 1.2rem;
    color: #ffffff;
}

.msb-header-title {
    font-family: var(--msb-font-head);
    font-size: 1.1rem;
    font-weight: 700;
    color: #1d1b1b;
    margin: 0;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

/* ── Service Item Cards ────────────────────────── */
.msb-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 14px 8px 14px;
}

.msb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--msb-card-bg);
    border: 1px solid var(--msb-card-border);
    border-radius: var(--msb-card-radius);
    padding: 12px 14px;
    text-decoration: none;
    color: var(--msb-text);
    font-family: var(--msb-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    transition: var(--msb-transition);
    box-shadow: var(--msb-card-shadow);
    cursor: pointer;

    /* Entrance animation */
    opacity: 0;
    animation: msbSlideIn 0.45s ease forwards;
}

@keyframes msbSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Arrow icon badge */
.msb-item-label {
    flex: 1;
    min-width: 0;
}

/* .msb-item-arrow {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    background: var(--msb-arrow-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--msb-transition);
} */

.msb-item-arrow i {
    font-size: 0.75rem;
    color: var(--msb-arrow-text);
    transition: transform 0.25s ease;
}

/* Hover state */
.msb-item:hover {
    background: #4c666f;
    color: var(--msb-card-hover-text);
    border-color: #4c666f;
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.22);
}

.msb-item:hover .msb-item-arrow {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.08);
}

.msb-item:hover .msb-item-arrow i {
    color: #ffffff;
    transform: translate(2px, -2px);
}

/* Active (current page) state */
.msb-item--active {
    background: #4c666f;
    color: var(--msb-active-text);
    border-color: var(--msb-active-bg);
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.25);
}

.msb-item--active .msb-item-arrow {
    background: #587680;
}

.msb-item--active .msb-item-arrow i {
    color: #ffffff;
}

.msb-item--active:hover {
    transform: translateX(4px);
}

/* ── Footer CTA ────────────────────────────────── */
.msb-footer {
    padding: 12px 14px 4px 14px;
}

.msb-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2a5298 100%);
    color: #ffffff;
    font-family: var(--msb-font-body);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--msb-card-radius);
    transition: var(--msb-transition);
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.3);
    letter-spacing: 0.01em;
}

.msb-cta-btn:hover {
    background: linear-gradient(135deg, #16304f 0%, #1e3a80 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(30, 58, 95, 0.38);
}

.msb-cta-btn i {
    font-size: 0.9rem;
}

/* ── Custom Scrollbar (desktop sticky) ────────── */
.msb-sidebar::-webkit-scrollbar {
    width: 5px;
}
.msb-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.msb-sidebar::-webkit-scrollbar-thumb {
    background: rgba(30, 58, 95, 0.25);
    border-radius: 10px;
}
.msb-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 58, 95, 0.45);
}

/* ── Desktop Sticky Behaviour ──────────────────── */
@media (min-width: 992px) {
    .msb-sidebar {
        position: sticky;
        top: 90px;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        overflow-x: hidden;
        align-self: flex-start;
        margin-top: 30px;
    }

    /* Ensure right column has no extra left padding */
    .row > .col-lg-3 {
        padding-left: 6px !important;
    }
}

/* ── Mobile / Tablet ───────────────────────────── */
@media (max-width: 991.98px) {
    .msb-mobile-toggle {
        display: flex;
        border-radius: 12px;
        margin: 20px 0 30px 0; /* Added space before footer when closed */
        background: #698484 !important; /* Match footer color */
    }

    .msb-sidebar {
        margin: 0 0 50px 0;
        border-radius: 0 0 var(--msb-radius) var(--msb-radius);

        /* Hidden by default — JS will toggle */
        display: none;
        animation: msbDropDown 0.35s ease;
    }

    .msb-sidebar.msb-open {
        display: block;
    }

    @keyframes msbDropDown {
        from {
            opacity: 0;
            transform: translateY(-12px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .msb-header {
        padding: 18px 16px 14px 16px;
    }

    .msb-list {
        padding: 4px 12px 10px 12px;
        gap: 7px;
    }

    .msb-item {
        padding: 13px 14px;
        font-size: 0.92rem;
    }

    .msb-footer {
        padding: 10px 12px 6px 12px;
    }
}

@media (max-width: 576px) {
    .msb-item {
        font-size: 0.88rem;
        padding: 12px 12px;
    }

    .msb-item-arrow {
        width: 28px;
        height: 28px;
    }

    .msb-header-title {
        font-size: 1rem;
    }

    .msb-mobile-toggle {
        font-size: 0.9rem;
        padding: 13px 16px;
    }
}

/* ── Smooth Page Scroll ────────────────────────── */
html {
    scroll-behavior: smooth;
}
