﻿/* Navbar horizontal */
.navbar-nav > li {
    position: relative;
}

    .navbar-nav > li > a {
        padding: 12px 18px;
        color: #fff !important;
        /*background: #2A3342;*/
        background: #1d093b;
        text-decoration: none;
        font-weight: 500;
        transition: background 0.3s, color 0.3s, transform 0.2s;
        border-radius: 5px;
    }

        .navbar-nav > li > a:hover,
        .navbar-nav > li > a:focus {
            background: linear-gradient(90deg, #00C1AE, #00E3C1);
            color: #fff;
            transform: scale(1.05);
        }

/* Dropdown menu with blur & shadow */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    /*background: rgba(41, 50, 64, 0.95);*/ /* semi-transparent */
    background: #301a52;
    backdrop-filter: blur(8px); /* glassy effect */
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    padding: 0;
    z-index: 1000;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s ease;
}

    .dropdown-menu.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

    .dropdown-menu li a {
        display: flex;
        align-items: center;
        padding: 10px 15px;
        color: #fff !important;
        font-size: 0.95rem;
        white-space: nowrap;
        transition: background 0.3s, transform 0.2s;
    }

        .dropdown-menu li a:hover,
        .dropdown-menu li a:focus {
            background: rgba(0, 152, 138, 0.85);
            transform: scale(1.02);
        }

/* Submenu positioning */
.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        top: 100%; /* below parent */
        left: 0;
    }

    .dropdown-submenu .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%; /* fly out right */
    }

    .dropdown-submenu.dropstart > .dropdown-menu {
        left: auto;
        right: 100%;
    }

/* FontAwesome icons */
/*.submenu-toggle > i.fa-folder {
    margin-right: 8px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.submenu-toggle[aria-expanded="true"] > i.fa-folder {
    transform: rotate(90deg);
    color: #00C1AE;
}

.submenu-toggle .toggle-arrow {
    margin-left: auto;
    font-size: 0.7em;
    transition: transform 0.3s ease, color 0.3s ease;
    color: #fff;
}

.submenu-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
    color: #00C1AE;
}*/

.submenu-toggle > i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.submenu-toggle[aria-expanded="true"] > i {
    transform: rotate(90deg); /* rotates any icon, not just folder */
    color: #00C1AE; /* optional active color */
}



/* Prevent wrapping */
.dropdown-menu li a {
    white-space: nowrap;
}

/* Hide Bootstrap default caret */
.dropdown-toggle::after {
    display: none !important;
}




/* Animate submenu sliding from top for first level dropdowns */
.dropdown-menu {
    display: block; /* always block for animation */
    opacity: 0;
    transform: translateY(-15px); /* start slightly above */
    transition: all 0.3s ease;
    pointer-events: none; /* prevent clicks when hidden */
}

    .dropdown-menu.show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

/* Animate nested flyout submenus */
.dropdown-submenu .dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

    .dropdown-submenu .dropdown-submenu > .dropdown-menu.show {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

/* Smooth rotation for folder icon */
.submenu-toggle > i.fa-folder {
    transition: transform 0.3s ease, color 0.3s ease;
}

.submenu-toggle[aria-expanded="true"] > i.fa-folder {
    transform: rotate(90deg);
}

/* Arrow rotation animation */
.submenu-toggle .toggle-arrow {
    transition: transform 0.3s ease, color 0.3s ease;
}

.submenu-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
}




/* Nested flyout submenus with staggered animation */
.dropdown-submenu .dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    transform: translateX(-10px) scaleY(0.9);
    opacity: 0;
    transition: all 0.25s ease;
    pointer-events: none;
}

    /* Show 3rd-level submenu with smooth cascading effect */
    .dropdown-submenu .dropdown-submenu > .dropdown-menu.show {
        transform: translateX(0) scaleY(1);
        opacity: 1;
        pointer-events: auto;
    }

    /* Optional: add slight delay for each nested level for cascading feel */
    .dropdown-submenu .dropdown-submenu > .dropdown-menu li {
        transition: transform 0.2s ease, opacity 0.2s ease;
    }






/* =============================
   SUBMENU ITEM PADDING & ICONS
============================= */
.dropdown-menu li a {
    white-space: nowrap;
    padding-left: 15px; /* base padding for submenu items */
    display: flex;
    align-items: center;
}

    .dropdown-menu li a i.fa {
        margin-right: 5px; /* spacing between icon and text */
        width: 16px; /* optional: fix icon width for alignment */
    }

/* 2nd level submenu (3rd overall) */
.dropdown-submenu .dropdown-submenu > .dropdown-menu li a {
    padding-left: 35px;
}

/* 3rd level submenu (4th overall) */
.dropdown-submenu .dropdown-submenu .dropdown-submenu > .dropdown-menu li a {
    padding-left: 45px;
}

/* Optional: Adjust folder icon color */
.navbar-nav .dropdown-menu li a i.fa-folder {
    color: #FFD700; /* gold folder icon */
}

.navbar-nav .dropdown-menu li a i.fa-file {
    color: #FFFFFF; /* white file icon */
}




/* Folder icon color red for opened parent menu */
.submenu-toggle[aria-expanded="true"] > i.fa-folder {
    color: red;
}



/* Change file icon color on submenu item hover */
.dropdown-menu li a:hover i.fa-file {
    color: red; /* file icon turns red on hover */
}







/* Smooth rotation & color for parent menu icon */
.submenu-toggle > i.fa {
    margin-right: 8px;
    transition: transform 0.3s ease, color 0.3s ease;
    color: #FFD700; /* default folder/book color */
}

/* Rotate icon when parent menu is opened */
.submenu-toggle[aria-expanded="true"] > i.fa {
    transform: rotate(90deg);
    color: #FF0000; /* change color of opened parent menu icon */
}

/* Arrow rotation (optional) */
.submenu-toggle .toggle-arrow {
    margin-left: auto;
    font-size: 0.7em;
    transition: transform 0.3s ease, color 0.3s ease;
    color: #fff;
}

.submenu-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
    color: #00C1AE;
}

/* File icon hover color */
.dropdown-menu li a i.fa-file:hover {
    color: red;
}





/* Smooth rotation & color for parent menu icon */
.submenu-toggle > i.fa {
    margin-right: 8px;
    transition: transform 0.3s ease, color 0.3s ease;
    color: #FFD700; /* default folder/book color */
}

/* Rotate icon when parent menu is opened */
.submenu-toggle[aria-expanded="true"] > i.fa {
    transform: rotate(90deg);
    color: #FF0000; /* change color of opened parent menu icon */
}

/* Arrow rotation (optional) */
.submenu-toggle .toggle-arrow {
    margin-left: auto;
    font-size: 0.7em;
    transition: transform 0.3s ease, color 0.3s ease;
    color: #fff;
}

.submenu-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
    color: #00C1AE;
}

/* File icon hover color */
.dropdown-menu li a i.fa-file:hover {
    color: red;
}







/* =========================================================
   HOME PAGE DYNAMIC ICON MENU
   ========================================================= */

.home-menu-wrapper {
    background: #f5f7fa;
    min-height: calc(100vh - 220px);
    padding: 28px 20px 45px 20px;
}


/* Header */

.home-menu-header {
    margin-bottom: 25px;
}

.home-menu-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1f4e78;
    font-size: 20px;
    font-weight: 600;
}

    .home-menu-header-title i {
        font-size: 21px;
    }

.home-menu-header-line {
    height: 2px;
    width: 100%;
    margin-top: 10px;
    background: #dce3ea;
}


/* Grid */

.home-menu-grid {
    align-items: stretch;
}


/* Main menu card */

.home-menu-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 165px;
    padding: 20px 10px;
    background: #ffffff;
    border: 1px solid #e0e5eb;
    border-radius: 12px;
    text-decoration: none;
    color: #263238;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.06);
    transition: transform 0.20s ease, box-shadow 0.20s ease, border-color 0.20s ease;
}


    /* Hover */

    .home-menu-card:hover {
        transform: translateY(-5px);
        border-color: #1f4e78;
        box-shadow: 0 9px 24px rgba(0, 0, 0, 0.12);
        color: #1f4e78;
        text-decoration: none;
    }


/* Icon */

.home-menu-icon {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 13px;
    border-radius: 16px;
    background: #eaf2f8;
    color: #1f4e78;
    font-size: 29px;
    transition: background 0.20s ease, color 0.20s ease;
}

.home-menu-card:hover .home-menu-icon {
    background: #1f4e78;
    color: #ffffff;
}


/* Title */

.home-menu-title {
    width: 100%;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    color: #263238;
}

.home-menu-card:hover .home-menu-title {
    color: #1f4e78;
}


/* Number of children */

.home-menu-count {
    margin-top: 6px;
    font-size: 11px;
    color: #7a8691;
    text-align: center;
}

    .home-menu-count span {
        margin-left: 2px;
    }


/* =========================================================
   CHILD MENU MODAL
   ========================================================= */

.home-menu-modal {
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.20);
}


/* Modal header */

.home-menu-modal-header {
    background: #1f4e78;
    color: #ffffff;
    border-bottom: 0;
    padding: 16px 20px;
}

    .home-menu-modal-header .modal-title {
        font-size: 18px;
        font-weight: 600;
    }

    .home-menu-modal-header .btn-close {
        filter: brightness(0) invert(1);
    }


/* Modal body */

.home-menu-modal .modal-body {
    background: #f7f9fb;
    padding: 22px;
}


/* Child menu */

.home-submenu-card {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e1e6eb;
    border-radius: 9px;
    color: #263238;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

    .home-submenu-card:hover {
        transform: translateX(3px);
        border-color: #1f4e78;
        color: #1f4e78;
        box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);
        text-decoration: none;
    }


/* Child icon */

.home-submenu-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    border-radius: 7px;
    background: #eaf2f8;
    color: #1f4e78;
    font-size: 12px;
}


/* Child title */

.home-submenu-title {
    font-size: 14px;
    font-weight: 500;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 767px) {

    .home-menu-wrapper {
        padding: 20px 12px 35px 12px;
    }

    .home-menu-card {
        min-height: 145px;
    }

    .home-menu-icon {
        width: 58px;
        height: 58px;
        font-size: 24px;
    }

    .home-menu-title {
        font-size: 14px;
    }
}





.home-dashboard-link {
    color: #ffffff !important;
    font-weight: 600;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

    .home-dashboard-link i {
        font-size: 15px;
    }

    .home-dashboard-link:hover {
        background-color: rgba(255,255,255,0.12);
        color: #ffffff !important;
        border-radius: 5px;
    }






