/* IIT Companion - Section Menu (inner-page sidebar)
   Colour scheme mirrors the previous sidebar accordion: blue title bar,
   grey rows with blue text inverting to blue/white on hover, lighter grey
   sub-rows, white third level. */

/* Editor-only survival class for replaced widgets (also in programme-cards.css) */
.iitc-hide-all {
    display: none !important;
}

/* Containers with align-items other than stretch shrink widgets to their
   content width; these widgets must always span their column. */
.elementor-widget-iit_section_menu {
    width: 100% !important;
    max-width: 100%;
}

.iitc-sm {
    background: #FFFFFF;
    font-family: Roboto, Arial, sans-serif;
}

.iitc-sm-title {
    font-family: "Roboto Slab", Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    color: #FFFFFF;
    background: #002D74;
    padding: 9px 10px;
}

.iitc-sm-list {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
}

/* The theme gives list items vertical margins; keep the rows touching. */
.iitc-sm li {
    margin: 0 !important;
    padding: 0 !important;
}

.iitc-sm-list > li {
    border-bottom: 1px solid #002D74;
}

.iitc-sm-list > li:last-child {
    border-bottom: 0;
}

/* The !important guards keep the theme's global button/link styling
   (a #37A8FF background, among others) out of the menu rows. */
.iitc-sm a,
.iitc-sm .iitc-sm-toggle,
.iitc-sm .iitc-sm-dead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    text-align: left;
    background: #EDECEC !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
    text-decoration: none;
    color: #002D74 !important;
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    padding: 8px 10px !important;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.iitc-sm .iitc-sm-dead {
    cursor: default;
}

/* Second level: lighter grey, slightly inset */
.iitc-sm .iitc-sm-panel a,
.iitc-sm .iitc-sm-panel .iitc-sm-toggle,
.iitc-sm .iitc-sm-panel .iitc-sm-dead {
    background: #E5E4E4 !important;
    padding: 7px 10px 7px 14px !important;
    font-size: 13.5px;
    font-weight: 400;
}

/* Third level and deeper: white */
.iitc-sm .iitc-sm-panel .iitc-sm-panel a,
.iitc-sm .iitc-sm-panel .iitc-sm-panel .iitc-sm-toggle,
.iitc-sm .iitc-sm-panel .iitc-sm-panel .iitc-sm-dead {
    background: #FFFFFF !important;
    padding-left: 20px !important;
}

.iitc-sm a:hover,
.iitc-sm .iitc-sm-toggle:hover,
.iitc-sm .iitc-sm-panel a:hover,
.iitc-sm .iitc-sm-panel .iitc-sm-toggle:hover {
    color: #FFFFFF !important;
    background: #002D74 !important;
}

/* Current page: white with a blue accent bar, so it reads without the heavy fill */
.iitc-sm .is-current > a {
    background: #FFFFFF !important;
    color: #002D74 !important;
    font-weight: 700 !important;
    border-left: 3px solid #002D74 !important;
    padding-left: 11px !important;
}

.iitc-sm .iitc-sm-panel .iitc-sm-panel .is-current > a {
    padding-left: 17px !important;
}

.iitc-sm .is-current > a:hover {
    background: #002D74 !important;
    color: #FFFFFF !important;
}

.iitc-sm-chev {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid #002D74;
    border-bottom: 2px solid #002D74;
    transform: rotate(45deg);
    margin-right: 4px;
    transition: transform 0.25s ease, border-color 0.15s ease;
}

.iitc-sm-toggle:hover .iitc-sm-chev {
    border-color: #FFFFFF;
}

.iitc-sm-group.is-open > .iitc-sm-toggle > .iitc-sm-chev {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.iitc-sm-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.iitc-sm-group.is-open > .iitc-sm-panel {
    max-height: none;
}

.iitc-sm-panel > .iitc-sm-list > li {
    border-bottom: 0;
}

.iitc-sm-editor-note {
    color: #98A6C3;
    font-size: 11.5px;
    padding: 10px;
    border-top: 1px dashed #E3EAF5;
    margin-top: 6px;
}
