﻿/* =========================================================
   Progression AI — Navbar Dropdown (CSS-only)
   Load order: AFTER bootstrap.min.css and site.css
   Targets markup:
     <li class="nav-item nav-item-dd">
       <details class="nav-dd">
         <summary class="nav-link">Solutions</summary>
         <div class="nav-card"> ... </div>
       </details>
     </li>
   ========================================================= */



/* ------------------------------------------------------------
                         BEGIN NAVBAR 
 -------------------------------------------------------------*/

.navbar-light .navbar-toggler {
    color: rgba(0,0,0,.55);
    border-color: var(--brand);
}

.navbar-dark .navbar-nav .nav-link{
     color: #fff;  /*rgba(255, 255, 255, .55) !important; */
}


.nav-link:hover {
    border: 1px solid #ffffff;
    border-radius: 4px;
    color: #000000;
}

.navbar-nav .nav-link {
    padding-left: 20px !important;
}

    .navbar-nav .nav-link.active {
        color: #000000;
        font-size: 20px;
        background: linear-gradient(145deg, rgba(0, 204, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(0, 204, 255, 0.15) 100%);
    }

.nav-link {
    color: #ffffff;
    font-size: 20px;
}

    /* Style active nav links */
    .nav-link.active {
        border: 1px solid #0078d7;
        border-radius: 6px;
        padding: 1px 4px 2px 4px;
        min-width: 150px;
        margin: 6px 2px;
        text-decoration: none;
        text-align: center;
    }

    /* Normal hover for non-active links */
    .nav-link:hover {
        padding: 1px 4px 2px 4px;
        margin: 6px 2px;
        border: 0;
        border-bottom: 2px solid #0078d7;
        text-align: center;
        transition: all 0.2s ease-in-out;
    }

    /* Override: active tab stays blue even on hover */
    .nav-link.active:hover {
        text-decoration: none;
        cursor: default;
    }

/* ------------------------------------------------------------
                         BEGIN DROP DOWN MENU
 -------------------------------------------------------------*/

/*overide details*/
details {
    border: none !important;
    padding: 0 !important;
    background: none;
}

/* Ensure navbar is above page content; create positioning context */
.navbar {
    position: relative;
    z-index: 1200;
}

/* The dropdown list item also becomes a positioning context */
.nav-item-dd {
    position: relative;
}

/* Make <summary> behave like a regular link item */
.nav-dd > summary {
    list-style: none; /* remove default triangle */
    display: block; /* not 'list-item' */
    cursor: pointer;
    user-select: none;
    outline: none;
    /* relies on your existing .nav-link styles for padding/color */
}

    .nav-dd > summary::-webkit-details-marker {
        display: none;
    }

    /* Optional: add a caret to the end of the label */
    .nav-dd > summary::after {
        content: "▾";
        margin-left: .4rem;
        font-size: .9em;
        opacity: .85;
        transition: transform .18s ease;
    }

.nav-dd[open] > summary::after {
    transform: rotate(180deg);
}

.nav-dd > summary:focus-visible {
    outline: 2px solid var(--ring, #93c5fd);
    outline-offset: 2px;
}

/* === Dropdown CARD ================================================== */
.nav-card {
    position: absolute;
    right: 0;
    top: calc(100% +6px); /* small bridge to avoid hover gap */
    min-width: 320px;
    max-width: 560px;
    /* Brand card look */
    background: linear-gradient( 145deg, rgba(0, 102, 204, 0.15) 0 %, rgba(255, 255, 255, 0.06) 50 %, rgba(0, 204, 255, 0.12) 100% );
    color: var(--text, #eef2ff);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--brand, #60a5fa) 28%, #ffffff10);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1300;
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

    /* Little arrow that “bridges” the hover gap */
    .nav-card::before {
        content: "";
        position: absolute;
        top: -7px;
        right: 24px;
        width: 14px;
        height: 14px;
        transform: rotate(45deg);
        background: inherit;
        border-left: inherit;
        border-top: inherit;
    }

/* Show when details is open (click/tap) */
.nav-dd[open] > .nav-card {
    /*opacity: 1 !important;*/
    visibility: visible;
    transform: translateY(0);
    background: linear-gradient(145deg, rgba(0, 102, 204, 0.15) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 204, 255, 0.12) 100%);
}

/* Also show on hover/focus (desktop pointer devices only) */
@media(hover:hover) and (pointer:fine) {
    .nav-dd:hover > .nav-card,
    .nav-dd:focus-within > .nav-card {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* === Contents inside the card ====================================== */
.nav-card__header {
    padding: 6px 8px 10px;
}

.nav-card__title {
    font-weight: 200 !important;
    font-size: 20px !important;
    color: #009688 !important;
}

.nav-card__sub {
    color: var(--muted, #a8b3d1);
    font-size: 13px;
}

.nav-card__grid {
    display: grid;
    grid-template-columns: 2fr 2fr;
    gap: 8px;
}

@media(max-width: 520px) {
    .nav-card__grid {
        grid-template-columns: 2fr;
    }
}

.nav-card__item {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    /*border-radius: 10px;*/
    text-decoration: none;
    color: cyan;
    border: 1px solid transparent;
    opacity:1 !important;
    background: linear-gradient(145deg, rgba(0, 102, 204, 0.15) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 204, 255, 0.12) 100%);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

    .nav-card__item:hover,
    .nav-card__item:focus-visible {
        border-color: color-mix(in srgb, var(--brand, #60a5fa) 35%, #ffffff10);
        background: color-mix(in srgb, var(--panel, #111732) 55%, #0000);
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(0,0,0,.28);
    }

.nav-card__item-title {
    font-weight: 200;
    font-size: 20px;
    text-decoration:underline;
    text-underline-offset:10px
}

.nav-card__item-sub {
    font-size: 12px;
    color: var(--muted, #a8b3d1);
}

/* === Mobile behaviour: inline block inside collapsed menu =========== */
/* Matches Bootstrap’s lg breakpoint (992px). Adjust if needed. */
@media(max-width: 991.98px) {
    .nav-item-dd,
    .nav-dd > summary {
        width: 100%;
    }

    /* In the collapsed navbar, render the card inline under the summary.
     Still controlled by [open] so it appears only when tapped. */
    .nav-card {
        position: static;
        margin: 8px 0 12px;
        box-shadow: none;
        transform: none;
        opacity: 0;
        /*visibility: hidden;*/
    }

    .nav-dd[open] > .nav-card {
        opacity: 1;
        visibility: visible;
    }

    .nav-card::before {
        display: none;
    }
    /* arrow not needed in flow */
}

/* === Optional: guard against overflow clipping on parent ============ */
/* If your navbar/nav container has overflow other than visible,
   the absolute-positioned card could be clipped. Keep visible: */
.navbar .container,
.navbar .navbar-collapse {
    overflow: visible;
}
