/* Navigation Bar - Uses CSS variables from customTheme.css */

.custom-navbar {
    background: linear-gradient(135deg, #2A363B 0%, #1a2429 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 0.4rem 0;
    border-bottom: 2px solid var(--theme-secondary);
}

    /* Brand badge: pill-shaped amber gradient that mirrors the landing page's
       "Visualize Your Risk" CTA. White text with a dark shadow gives strong
       luminance contrast on the bright amber/gold (still distinct in grayscale
       and across common color-vision deficiencies). The white inset highlight,
       outer shadow, and outline are non-color cues that reinforce the shape. */
    .custom-navbar .navbar-brand {
        color: white;
        font-weight: 800;
        font-size: 19px;
        letter-spacing: 0.02em;
        transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
        padding: 0.35rem 0.95rem;
        border-radius: 999px;
        background: var(--theme-gradient-button);
        border: 1px solid rgba(255, 255, 255, 0.35);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
        position: relative;
    }

        .custom-navbar .navbar-brand:hover,
        .custom-navbar .navbar-brand:focus-visible {
            color: white;
            transform: translateY(-1px);
            filter: brightness(1.06);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
            outline: none;
        }

    .custom-navbar .navbar-toggler {
        border-color: var(--theme-shadow-primary);
        padding: 0.35rem 0.6rem;
    }

        .custom-navbar .navbar-toggler:focus {
            box-shadow: 0 0 0 0.2rem var(--theme-focus-ring);
        }

    .custom-navbar .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23EA580C' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        width: 1.25em;
        height: 1.25em;
    }

    .custom-navbar .nav-link {
        color: white;
        opacity: 0.85;
        font-weight: 500;
        font-size: 14px;
        padding: 0.4rem 1rem;
        margin: 0 0.15rem;
        border-radius: 6px;
        transition: all 0.2s ease;
        position: relative;
    }

        .custom-navbar .nav-link:hover {
            background: var(--theme-gradient-header);
            color: white;
            border-color: var(--theme-primary);
            transform: translateY(-1px);
            box-shadow: 0 3px 10px var(--theme-shadow-hover);
        }

        .custom-navbar .nav-link.active {
            color: white;
            background: var(--theme-gradient-header);
            font-weight: 600;
            box-shadow: 0 2px 6px var(--theme-shadow-hover);
        }

            .custom-navbar .nav-link.active:hover {
                color: #1a2429;
                filter: brightness(1.1);
                box-shadow: 0 3px 10px var(--theme-shadow-hover);
            }

        /* Login button special styling */
        .custom-navbar .nav-link.btn-login {
            color: white;
        }

            .custom-navbar .nav-link.btn-login:hover {
                background: var(--theme-gradient-header);
                color: white;
                border-color: var(--theme-primary);
                transform: translateY(-1px);
                box-shadow: 0 3px 10px var(--theme-shadow-hover);
            }

        /* Contact button - reset native <button> styling so it matches <a> nav links */
        .custom-navbar .nav-link.nav-contact {
            background: transparent;
            border: none;
            cursor: pointer;
        }

/* ==========================================
   Resources Dropdown
   ========================================== */

/* Bootstrap renders the toggle caret via ::after on .dropdown-toggle. Pull it
   in slightly so it sits naturally next to the label without throwing off the
   nav-link's padding rhythm. */
.custom-navbar .nav-link.dropdown-toggle::after {
    margin-left: 0.45rem;
    vertical-align: 0.15em;
    border-top-color: rgba(255, 255, 255, 0.7);
}

/* Open state: Bootstrap toggles `.show` on the toggle while the menu is open.
   Bootstrap's default `.show` color is barely visible on the dark navbar, so
   mirror the hover treatment (amber gradient + white text) for a clearly
   "pressed" affordance that ties visually to the open panel below. */
.custom-navbar .nav-link.dropdown-toggle.show {
    background: var(--theme-gradient-header);
    color: white;
    opacity: 1;
    box-shadow: 0 2px 6px var(--theme-shadow-hover);
}

    .custom-navbar .nav-link.dropdown-toggle.show::after {
        border-top-color: white;
    }

/* Dropdown panel: dark surface that echoes the navbar gradient, with an amber
   top border for a subtle visual anchor back to the toggle. */
.custom-navbar .custom-dropdown-menu {
    background: linear-gradient(135deg, #2A363B 0%, #1a2429 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 2px solid var(--theme-secondary);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    padding: 0.35rem;
    margin-top: 0.35rem;
    min-width: 230px;
}

    .custom-navbar .custom-dropdown-menu .dropdown-item {
        color: white;
        opacity: 0.85;
        font-weight: 500;
        font-size: 14px;
        padding: 0.5rem 0.75rem;
        border-radius: 6px;
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        transition: background 0.2s ease, color 0.2s ease, transform 0.12s ease;
    }

        .custom-navbar .custom-dropdown-menu .dropdown-item:hover,
        .custom-navbar .custom-dropdown-menu .dropdown-item:focus-visible {
            background: var(--theme-gradient-header);
            color: white;
            opacity: 1;
            outline: none;
            box-shadow: 0 2px 8px var(--theme-shadow-hover);
        }

        .custom-navbar .custom-dropdown-menu .dropdown-item.active,
        .custom-navbar .custom-dropdown-menu .dropdown-item:active {
            background: var(--theme-gradient-header);
            color: white;
            opacity: 1;
            font-weight: 600;
        }

    .custom-navbar .custom-dropdown-menu .dropdown-item-sub {
        font-size: 12px;
        font-weight: 400;
        opacity: 0.7;
        line-height: 1.3;
    }

/* Mobile collapse-within-collapse: when the navbar is collapsed (<= lg), the
   dropdown panel renders inline rather than as a floating menu. Strip the
   surface styling so it visually nests inside the mobile menu chrome that
   already wraps the navbar items. */
@media (max-width: 991px) {
    .custom-navbar .custom-dropdown-menu {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 0 0.75rem;
        margin: 0.15rem 0 0.25rem;
        min-width: 0;
    }

        .custom-navbar .custom-dropdown-menu .dropdown-item {
            padding: 0.45rem 0.75rem;
        }
}

/* ==========================================
   Contact Modal
   ========================================== */

.contact-modal .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.contact-modal .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem 1.25rem;
}

.contact-modal .modal-title {
    font-weight: 700;
    color: #212529;
}

.contact-modal .modal-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.contact-modal-intro {
    color: rgba(33, 37, 41, 0.75);
    margin-bottom: 1.1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Side-by-side layout: team list on the left, feedback form on the right.
   Collapses to a single column at the lg breakpoint where the modal also
   narrows. */
.contact-modal-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 1.5rem 2rem;
    align-items: start;
}

.contact-modal-section-heading {
    font-weight: 700;
    color: #212529;
    font-size: 1rem;
    margin: 0 0 0.85rem;
}

.contact-modal-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Card-flip container: the <li> itself provides the 3D perspective; visual
   styling (background, border, padding) lives on the .contact-card-face faces
   so both sides of the flip share the same look. */
.contact-modal-list li.contact-card {
    perspective: 900px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.contact-card-inner {
    position: relative;
    display: grid;
    grid-template-areas: "face";
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.4, 0.05, 0.2, 1);
    min-height: 100%;
}

.contact-card.is-flipped .contact-card-inner {
    transform: rotateY(180deg);
}

.contact-card-face {
    grid-area: face;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 0.85rem;
    background: rgba(0, 0, 0, 0.025);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 6px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    position: relative;
}

.contact-card-back {
    transform: rotateY(180deg);
}

.contact-card.is-flipped .contact-card-front {
    pointer-events: none;
}

.contact-card:not(.is-flipped) .contact-card-back {
    pointer-events: none;
}

/* Flip-icon button: ghost-secondary styling — visible bordered button that
   sits in the top-right of each face. Clicks bubble up to the card's flip
   handler. */
.contact-card-flip {
    position: absolute;
    top: 0.45rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(33, 37, 41, 0.22);
    padding: 0;
    border-radius: 6px;
    color: rgba(33, 37, 41, 0.6);
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.contact-card-flip:hover,
.contact-card-flip:focus-visible {
    color: #c47d00;
    background: rgba(196, 125, 0, 0.08);
    border-color: rgba(196, 125, 0, 0.5);
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(196, 125, 0, 0.15);
}

.contact-card-flip:active {
    transform: scale(0.96);
}

.contact-card-back-name {
    font-weight: 600;
    color: #212529;
    font-size: 0.85rem;
    opacity: 0.75;
    padding-right: 2.25rem; /* clear the flip button */
}

.contact-modal-name {
    font-weight: 600;
    color: #212529;
    font-size: 0.95rem;
    padding-right: 2.25rem; /* clear the flip button */
}

.contact-modal-title {
    font-size: 0.82rem;
    color: rgba(33, 37, 41, 0.65);
    font-weight: 500;
    line-height: 1.3;
}

.contact-modal-bio {
    font-size: 0.85rem;
    color: rgba(33, 37, 41, 0.8);
    line-height: 1.4;
    margin: 0.2rem 0 0.25rem;
}

.contact-modal-email {
    color: #c47d00;
    text-decoration: none;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.contact-modal-email:hover,
.contact-modal-email:focus-visible {
    color: #8a5700;
    text-decoration: underline;
}

/* ==========================================
   Contact Modal — Feedback Form
   ========================================== */

.contact-modal-feedback {
    /* When side-by-side with the team grid, no top border is needed; the
       columns separate themselves via the grid gap. The narrow-screen media
       query below restores the top border when the grid stacks. */
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.contact-modal-feedback-heading {
    font-weight: 700;
    color: #212529;
    font-size: 1rem;
    margin: 0 0 0.35rem;
}

.contact-modal-feedback-sub {
    color: rgba(33, 37, 41, 0.7);
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0 0 0.85rem;
}

/* Featured call-to-action linking to the external Microsoft Forms feedback
   form. Full-width block button so it reads as the primary path; the inline
   "Send a quick note" submit button below stays small and right-aligned, so
   the two don't visually compete despite sharing the theme gradient. Mirrors
   the hover/focus treatment of .contact-modal-feedback-submit. */
.contact-modal-feedback-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 1.1rem;
    background: var(--theme-gradient-header, linear-gradient(135deg, #EA580C, #c2410c));
    color: white;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    border-radius: 6px;
    transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.contact-modal-feedback-cta:hover,
.contact-modal-feedback-cta:focus-visible {
    filter: brightness(1.05);
    box-shadow: 0 3px 10px var(--theme-shadow-hover, rgba(234, 88, 12, 0.35));
    color: white;
    text-decoration: none;
    outline: none;
}

.contact-modal-feedback-cta svg {
    flex: 0 0 auto;
}

/* Labeled separator between the external-form CTA and the inline note form. */
.contact-modal-feedback-divider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.95rem 0;
    color: rgba(33, 37, 41, 0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact-modal-feedback-divider::before,
.contact-modal-feedback-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.contact-modal-feedback-form .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.2rem;
}

.contact-modal-feedback-form .form-label .required-mark {
    color: #c0392b;
    font-weight: 700;
}

.contact-modal-feedback-form .form-label .optional-mark {
    color: rgba(33, 37, 41, 0.5);
    font-weight: 400;
    font-size: 0.78rem;
}

.contact-modal-feedback-form .form-control {
    font-size: 0.9rem;
}

.contact-modal-feedback-form textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.contact-modal-feedback-actions {
    display: flex;
    justify-content: flex-end;
}

.contact-modal-feedback-submit {
    background: var(--theme-gradient-header, linear-gradient(135deg, #EA580C, #c2410c));
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.4rem 1.1rem;
    border-radius: 6px;
    transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.contact-modal-feedback-submit:hover:not(:disabled),
.contact-modal-feedback-submit:focus-visible:not(:disabled) {
    filter: brightness(1.05);
    box-shadow: 0 3px 10px var(--theme-shadow-hover, rgba(234, 88, 12, 0.35));
    color: white;
}

.contact-modal-feedback-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.contact-modal-feedback-status {
    margin-top: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.contact-modal-feedback-status.is-success {
    background: rgba(40, 167, 69, 0.1);
    color: #1e7e34;
    border: 1px solid rgba(40, 167, 69, 0.25);
}

.contact-modal-feedback-status.is-error {
    background: rgba(192, 57, 43, 0.08);
    color: #962d22;
    border: 1px solid rgba(192, 57, 43, 0.25);
}

/* Stack the side-by-side layout on narrower viewports (matches Bootstrap's
   .modal-xl → .modal-lg fallback at the lg breakpoint). */
@media (max-width: 991px) {
    .contact-modal-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .contact-modal-list {
        grid-template-columns: 1fr;
    }

    .contact-modal-feedback {
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        padding-top: 1.1rem;
    }
}

/* Mobile menu styling */
@media (max-width: 991px) {
    .custom-navbar .navbar-collapse {
        background: rgba(42, 54, 59, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 8px;
        margin-top: 0.75rem;
        padding: 0.75rem;
        border: 1px solid var(--theme-focus-ring);
    }

    .custom-navbar .nav-link {
        margin: 0.2rem 0;
    }

        .custom-navbar .nav-link.btn-login {
            margin-left: 0;
            margin-top: 0.4rem;
        }
}
