/* =========================================================
   Cubetek – Azure-style Navbar (fixed height, scaled logo)
   Dark header, larger gap, white brand text
   File: /wwwroot/css/navbar.css
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
    /* Visuals */
    --azure-blue: #0078d4; /* Azure accent (underline & CTA) */
    --text-100: #f8fafc; /* near white for text on dark bg */
    --text-200: #e5e7eb; /* light grey for nav links */
    --text-300: #cfd3d6; /* hover/underline color */
    --bg-header: #0f172a; /* darker header (slate/navy) */
    --bg-header-contrast: #0b1220; /* subtle dark variant (mobile/separators) */
    --border-100: #1f2937; /* subtle bottom rule on dark */
    --hover-underline: 2px;
    /* Layout */
    --nav-h: 72px; /* FIXED navbar height */
    --logo-scale: 1.35; /* visual scale of the logo without growing header */
    --brand-gap: 16px; /* space between logo and "Cubetek" */
}

/* ---------- Body offset for fixed header ----------
   Keep this roughly equal to --nav-h (+ a bit of comfort)
---------------------------------------------------- */
body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding-top: calc(var(--nav-h) + 12px); /* prevents content hidden under fixed header */
}

/* ---------- Navbar shell ---------- */
.azure-nav.navbar {
    background: var(--bg-header);
    box-shadow: 0 1px 0 var(--border-100); /* subtle bottom rule */
    padding: 0; /* no vertical padding -> fixed height */
    min-height: var(--nav-h);
    height: var(--nav-h);
    line-height: 0; /* avoid extra space from inline elements */
    overflow: visible; /* allow scaled logo to overflow visually */
}

/* Ensure Bootstrap list reset & flex layout behave */
.azure-nav .navbar-nav {
    list-style: none;
}

/* ---------- Brand (logo + name) ---------- */
.azure-nav .navbar-brand {
    display: flex;
    align-items: center; /* vertically center within fixed height */
    gap: var(--brand-gap); /* <<< bigger space between logo and "Cubetek" */
    min-height: var(--nav-h);
    height: var(--nav-h);
    padding: 0;
    text-decoration: none;
}

/* Logo: layout height matches navbar, visual size via scale */
.azure-nav .brand-mark {
    height: 46px; /* layout height stays fixed */
    width: auto;
    object-fit: contain;
    display: block;
    /* Make the logo LOOK bigger without stretching the navbar */
    transform: translateY(0) scale(var(--logo-scale));
    transform-origin: center; /* scale from center for symmetry */
}

/* Brand text: white on dark header */
.azure-nav .brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--text-100); /* <<< white brand text */
    line-height: 1; /* keeps it centered relative to logo */
    display: inline-block;
    white-space: nowrap;
}

/* ---------- Nav links ---------- */
.azure-nav .nav-link {
    color: var(--text-200); /* light grey for dark header */
    font-weight: 500;
    padding: 0 0.75rem; /* no vertical padding to keep row height fixed */
    margin: 0 0.15rem;
    position: relative;
    transition: color 140ms ease;
    text-decoration: none;
    height: var(--nav-h); /* full-height click target */
    display: inline-flex;
    align-items: center; /* vertical center */
}

    .azure-nav .nav-link:hover {
        color: var(--text-100);
    }

    /* Underline indicator (Azure-like) with good contrast on dark bg */
    .azure-nav .nav-link::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 10px; /* sits slightly above the bottom edge */
        margin: 0 auto;
        width: 0;
        height: var(--hover-underline);
        background-color: var(--azure-blue); /* azure accent */
        transition: width 160ms ease;
    }

    .azure-nav .nav-link:hover::after {
        width: 100%;
    }

    .azure-nav .nav-link.active,
    .azure-nav .nav-link[aria-current="page"] {
        color: var(--text-100);
        font-weight: 600;
    }

        .azure-nav .nav-link.active::after,
        .azure-nav .nav-link[aria-current="page"]::after {
            width: 100%;
        }

/* ---------- CTA button ---------- */
.azure-cta {
    background: var(--azure-blue);
    color: #fff;
    border: 1px solid var(--azure-blue);
    padding: 0.5rem 1rem;
    border-radius: 4px; /* Azure uses small radius */
    font-weight: 600;
    text-decoration: none;
    transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

    .azure-cta:hover {
        background: #0a6dc2;
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(0,120,212,0.25);
    }

/* ---------- Toggler (mobile) ---------- */
.azure-nav .navbar-toggler {
    border-color: rgba(255,255,255,0.35);
    padding: 0.35rem 0.55rem;
}

    .azure-nav .navbar-toggler:focus {
        box-shadow: 0 0 0 2px rgba(0,120,212,0.45);
    }

.azure-nav .navbar-toggler-icon {
    filter: invert(1) brightness(200%);
}
/* visible on dark */

/* Collapse panel — add separation on mobile */
@media (max-width: 991.98px) {
    .azure-nav .navbar-collapse {
        border-top: 1px solid var(--border-100);
        background: var(--bg-header); /* keep same dark bg inside panel */
        margin-top: 0;
        padding: 0.35rem 0;
    }

    /* Body offset stays similar; change if your mobile header differs */
    body {
        padding-top: calc(var(--nav-h) + 8px);
    }
}

/* ---------- Focus visibility (keyboard accessibility) ---------- */
.azure-nav .nav-link:focus-visible,
.azure-nav .navbar-brand:focus-visible,
.azure-cta:focus-visible {
    outline: 3px solid rgba(0,120,212,0.55);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- Optional system dark mode ----------
   (keeps header dark but adapts tokens if you want)
------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-header: #0b1220;
        --bg-header-contrast: #0a0f1a;
        --border-100: #111827;
    }

    .azure-nav .navbar-toggler-icon {
        filter: invert(1);
    }
}
