/* ======== SAAS EXACT MATCH STYLING ======== */

/* Sidebar General Container */
.sidebar-wrapper {
    border: 1px solid rgba(0, 43, 99, 0.1) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 43, 99, 0.04) !important;
    overflow: hidden !important;
    background: #ffffff !important;
    transition: all 0.3s ease;
}

/* Sidebar Title/Header Bar */
.sidebar-wrapper>div:first-child {
    background: linear-gradient(135deg, var(--theme-color1) 0%, #003a85 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 20px 24px !important;
}

.sidebar-wrapper>div:first-child .icon-circle {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.sidebar-wrapper:hover>div:first-child .icon-circle {
    transform: scale(1.08) rotate(5deg);
}

.sub-sidebar-accordion {
    padding: 16px !important;
}

/* Accordion Items styled as nested cards */
.sub-sidebar-accordion .accordion-item {
    margin-bottom: 12px !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #fafbfc !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sub-sidebar-accordion .accordion-item:last-child {
    margin-bottom: 0 !important;
}

.sub-sidebar-accordion .accordion-item:hover {
    border-color: rgba(0, 43, 99, 0.15) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
}

/* Accordion Header buttons */
.sub-accordion-btn {
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px;
    color: #475569 !important;
    padding: 10px 18px !important;
    background-color: transparent !important;
    border: none !important;
    border-left: 4px solid transparent !important;
    box-shadow: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 0 !important;
}

.sub-accordion-btn:hover {
    color: var(--theme-color1) !important;
    background-color: rgba(0, 43, 99, 0.02) !important;
}

.sub-accordion-btn i {
    transition: transform 0.3s ease;
}

.sub-accordion-btn:hover i {
    transform: scale(1.15);
}

/* Accordion Button - Custom Chevron Arrow instead of default bootstrap styling */
.sub-accordion-btn::after {
    width: 16px !important;
    height: 16px !important;
    background-size: 16px !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2364748b'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease !important;
    transform: rotate(271deg);
}

/* Active State for Accordion Button */
.sub-accordion-btn:not(.collapsed) {
    background: linear-gradient(90deg, #fff4f5 0%, #ffffff 100%) !important;
    border-left: 4px solid var(--theme-color2) !important;
    color: var(--theme-color2) !important;
}

.sub-accordion-btn:not(.collapsed)::after {
    transform: rotate(-180deg) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ad2024'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}



/* Sidebar Sub-Menu List Body */
.accordion-body {
    background-color: #ffffff !important;
    padding: 8px 12px 14px 12px !important;
}

/* Sidebar Nav Links */
.sidebar-menu-list a.nav-link {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #556275 !important;
    padding: 9px 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 0px !important;
    margin-bottom: 4px !important;
    transition: all 0.25s ease !important;
    background: transparent !important;
    border-radius: 8px !important;
    position: relative;
}

.sidebar-menu-list a.nav-link:last-child {
    margin-bottom: 0 !important;
}

/* Hover effect with subtle horizontal translation */
.sidebar-menu-list a.nav-link:hover {
    color: var(--theme-color1) !important;
    background: #f4f7fa !important;
    transform: translateX(4px);
}

/* Active Nav Link Styling */
.sidebar-menu-list a.nav-link.active {
    background: #fff4f5 !important;
    color: var(--theme-color2) !important;
    font-weight: 700 !important;
}



/* Custom indicator dot (the dot next to items) */
.sidebar-menu-list a.nav-link span {
    display: inline-block !important;
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background-color: #cbd5e1 !important;
    margin-right: 12px !important;
    margin-left: 4px !important;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
}

/* Active Nav Dot Scaling & Glowing effect */
.sidebar-menu-list a.nav-link.active span {
    background-color: var(--theme-color2) !important;
    transform: scale(1.3);
    box-shadow: 0 0 6px rgba(173, 32, 36, 0.6);
}



.sidebar-menu-list a.nav-link:hover span {
    background-color: var(--theme-color1) !important;
}

#subCollapseCmie .sidebar-menu-list a.nav-link:hover span {
    background-color: var(--theme-color1) !important;
}

/* Open Access Resources button styling (Modern Flat design) */
#openAccessBtn {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    padding: 10px 18px !important;
    transition: all 0.25s ease !important;
    background: transparent !important;
    border: none !important;
    border-left: 4px solid transparent !important;
    border-radius: 0 !important;
}

#openAccessBtn:hover {
    background-color: rgba(173, 32, 36, 0.02) !important;
    color: var(--theme-color2) !important;
    padding-left: 28px !important;
}

#openAccessBtn:hover i {
    color: var(--theme-color2) !important;
}

#openAccessBtn.active {
    background: linear-gradient(90deg, #fff4f5 0%, #ffffff 100%) !important;
    border-left-color: var(--theme-color2) !important;
    color: var(--theme-color2) !important;
}

#openAccessBtn.active i {
    color: var(--theme-color2) !important;
}

/* Need Help Widget Styling */
.help-widget {
    background: linear-gradient(135deg, #f7faff 0%, #f0f5ff 100%) !important;
    border: 1px solid rgba(0, 43, 99, 0.08) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 8px 24px rgba(0, 43, 99, 0.02) !important;
    transition: all 0.3s ease;
}

.help-widget .icon-circle {
    background-color: var(--theme-color1) !important;
    color: #ffffff !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content Wrapper (Invisible) */
.creative-master-card {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}


/* ======== PREMIUM TABS REDESIGN (SINGLE CARD & FLAT GRID) ======== */

.db-modern-container {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Single main card layout */
.db-single-card {
    background: #ffffff;
    border: 2px solid #002b6387;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

/* Accent left indicator strip */
/* .db-single-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--theme-color1);
} */

/* Header section */
.db-single-header {
    margin-bottom: 0;
}

.db-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.db-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.db-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff5f5;
    color: var(--theme-color2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.db-main-title {
    font-size: 22px;
    line-height: normal;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.5px;
}

.db-meta-badge {
    background: #ffeaea;
    color: var(--theme-color2);
    font-size: 14px;
    font-weight: 600;
    padding: 1px 30px;
    border-radius: 8px;
    border: 1px solid #ffdcdc;
}

.db-description {
    font-size: 16px;
    color: #475569;
    line-height: 1.6;
    font-weight: 600;
    margin-bottom: 0;
}

/* Divider lines inside card */
.db-single-separator {
    height: 1px;
    background-color: #ab22283d;
    margin: 28px 0;
}

/* Subjects covered grid layout */
.db-subjects-section {
    margin-bottom: 0;
}

.db-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #002b63;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive flex tags for subjects */
.db-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    list-style: none;
    padding: 0;
}

/* Individual subject tag styling */
.db-subject-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    border: 2px solid #fee2e2;
    color: var(--theme-color2);
    font-size: 14px;
    line-height: normal;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(173, 32, 36, 0.02);
    text-decoration: none !important;
    cursor: default;
}

.db-subject-tag i {
    font-size: 15px;
    color: var(--theme-color2);
    transition: transform 0.25s ease;
}

.db-subject-tag:hover {
    background-color: #fff5f5;
    border-color: var(--theme-color2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(173, 32, 36, 0.08);
}

.db-subject-tag:hover i {
    transform: scale(1.1);
}

/* Footer Section inside card (banner style) */
.db-single-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    background-color: #fff5f6;
    border: 1px solid #ffe6e8;
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 12px;
}

.db-info-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.db-info-icon {
    font-size: 32px;
    color: var(--theme-color2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.db-info-title {
    font-size: 18px;
    font-weight: 700;
    color: #ab2228;
    margin-bottom: 8px;
}

.db-info-text {
    font-size: 14px;
    color: #475569;
    margin: 0;
    line-height: normal;
}

.db-action-btn {
    background: var(--theme-color2);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(173, 32, 36, 0.12);
    text-decoration: none !important;
}

.db-action-btn:hover {
    background: #8b1619;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(173, 32, 36, 0.2);
}

/* Open Access External Link Arrow Color Shift */
.oa-link-badge:hover i.text-secondary {
    color: var(--theme-color2) !important;
}

/* Creative Access Button */
.db-access-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--theme-color1), var(--theme-color2));
    color: #fff !important;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 15px;
}

.db-access-btn i {
    transition: transform 0.3s ease;
}

.db-access-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: #fff !important;
}

.db-access-btn:hover i {
    transform: translateX(5px) scale(1.1);
}

.cmie-theme .db-access-btn {
    background: linear-gradient(135deg, var(--theme-color2), #ff7e5f);
}

/* Creative Title Arrow */
.title-access-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--theme-color1);
    color: #fff !important;
    font-size: 16px;
    margin-left: 15px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    vertical-align: middle;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.title-access-arrow:hover {
    transform: translateX(5px) rotate(-45deg);
    background-color: var(--theme-color2);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.cmie-theme .title-access-arrow {
    background-color: var(--theme-color2);
}

.cmie-theme .title-access-arrow:hover {
    background-color: #ff7e5f;
}

/* Title link hover effect */
.title-link-hover {
    transition: all 0.3s ease;
}

.title-link-hover:hover {
    color: var(--theme-color1) !important;
    text-decoration: underline !important;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
}

.title-link-hover:hover i {
    color: var(--theme-color1) !important;
    transform: scale(1.1);
}

.cmie-theme .title-link-hover:hover,
.cmie-theme .title-link-hover:hover i {
    color: var(--theme-color2) !important;
}

/* ======== RESPONSIVE MEDIA QUERIES ======== */
@media (max-width: 991.98px) {
    .db-single-card {
        padding: 24px;
        margin-bottom: 0;
    }

    .db-main-title {
        font-size: 20px;
    }
}

@media (max-width: 767.98px) {
    .db-single-card {
        padding: 20px 16px;
    }

    .db-title-row {
        gap: 12px;
        flex-direction: column;
        align-items: flex-start;
    }

    .db-main-title {
        font-size: 18px;
    }

    .db-meta-badge {
        padding: 4px 15px;
        font-size: 13px;
    }

    .db-icon-box {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .db-description {
        font-size: 15px;
    }

    .db-single-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 16px;
        gap: 15px;
    }

    .db-info-group {
        justify-content: center;
        flex-direction: column;
        gap: 8px;
    }

    .db-action-btn,
    .db-access-btn {
        width: 100%;
        justify-content: center;
    }

    .db-subject-tag {
        font-size: 13px;
        padding: 8px 15px;
    }

    .title-access-arrow {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

@media (max-width: 575.98px) {
    .sidebar-wrapper>div:first-child {
        padding: 15px 20px !important;
    }

    .db-subjects-section .db-tags-container {
        flex-direction: column;
    }

    .db-subject-tag {
        width: 100%;
        justify-content: left;
    }
}