/* =========================================================
   CIPUC HEADER DROPDOWNS
   Fixes hover gap + About/Courses dropdowns
   ========================================================= */

.cipuc-nav-dropdown{
    position:relative;
}

/* Keep a transparent hover bridge between nav link and dropdown */
.cipuc-nav-dropdown::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:100%;
    height:16px;
    display:block;
}

.cipuc-nav-dropdown > .dropdown-toggle::after{
    margin-left:7px;
    vertical-align:.15em;
}

.cipuc-dropdown-menu{
    min-width:255px;
    padding:10px;
    border:1px solid #e7edf5;
    border-radius:16px;
    box-shadow:0 18px 45px rgba(4,38,79,.18);
    margin-top:0 !important;

    /* IMPORTANT: remove hover gap */
    top:calc(100% + 6px) !important;
}

.cipuc-dropdown-menu::before{
    content:"";
    position:absolute;
    top:-7px;
    left:38px;
    width:14px;
    height:14px;
    background:#fff;
    transform:rotate(45deg);
    border-left:1px solid #e7edf5;
    border-top:1px solid #e7edf5;
}

.cipuc-dropdown-menu .dropdown-item{
    color:#082f63;
    font-weight:750;
    padding:11px 14px;
    border-radius:10px;
    transition:.18s ease;
}

.cipuc-dropdown-menu .dropdown-item i{
    width:21px;
    color:#d69800;
}

.cipuc-dropdown-menu .dropdown-item:hover,
.cipuc-dropdown-menu .dropdown-item:focus{
    background:#eef5ff;
    color:#c98500;
}

/* Desktop: stable hover */
@media(min-width:1200px){

    .cipuc-nav-dropdown:hover > .dropdown-menu,
    .cipuc-nav-dropdown > .dropdown-menu:hover{
        display:block;
    }

    .cipuc-nav-dropdown:hover > .nav-link{
        color:#c98500 !important;
    }

    /* makes the invisible bridge cover the small visual gap */
    .cipuc-nav-dropdown > .dropdown-menu{
        margin-top:0 !important;
    }
}

/* Mobile: use Bootstrap click behavior only */
@media(max-width:1199px){

    .cipuc-nav-dropdown::after{
        display:none;
    }

    .cipuc-dropdown-menu{
        position:static !important;
        transform:none !important;
        min-width:0;
        width:100%;
        margin:4px 0 10px !important;
        border:0;
        border-radius:12px;
        box-shadow:none;
        background:#f6f9fe;
    }

    .cipuc-dropdown-menu::before{
        display:none;
    }

    .cipuc-dropdown-menu .dropdown-item{
        padding:11px 16px;
    }
}