html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.maintenance {
    font-size: 2rem;
    font-weight: bold;
    color: #6c757d;
}

.error {
    font-size: 12rem;
    font-weight: bold;
}

.error401 {
    color: #17a2b8;
}

.error403 {
    color: #ffc107;
}

.error404 {
    color: #dc3545;
}

.error500 {
    color: #dc3545;
}

.min-vh-50 {
    min-height: 50vh !important;
}

.mt-10 {
    margin-top: 8rem;
}

.position-relative {
    position: relative;
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Dark transparent background */
    color: white; /* Text color */
    display: flex;
    justify-content: center; /* Center items horizontally */
    align-items: center; /* Center items vertically */
    flex-direction: column; /* Stack items vertically */
    opacity: 0; /* Start invisible */
    transition: opacity 0.3s ease; /* Smooth transition */
}

.position-relative:hover .overlay {
    opacity: 1; /* Show overlay on hover */
}

.category-list {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap to the next line */
    justify-content: center; /* Center items */
}

.category-item {
    margin: 10px; /* Space between items */
    text-align: center; /* Center text below the image */
}

.category-image {
    width: 50px; /* Set width for category images */
    height: 50px; /* Set height for category images */
    object-fit: cover; /* Maintain aspect ratio */
}

.link {
    color: white; /* Link color */
    text-decoration: none; /* Remove underline */
    display: flex;
    flex-direction: column; /* Stack image and text */
    align-items: center; /* Center items */
}

.link:hover {
    text-decoration: underline; /* Underline on hover */
}

.no-text-decor {
    text-decoration: none;
}

.image-container {
    overflow: hidden; /* Ensures image doesn't overflow the card on zoom */
}

.hover-zoom {
    transition: transform 0.5s ease; /* Smooth zoom effect */
    width: 100%;
    height: auto;
}

.hover-zoom-sm:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease-in-out;
}

.card:hover .card-img-top {
    transform: scale(1.1); 
    transition: transform 0.3s ease-in-out;
}

.card-img-top {
    transition: transform 0.3s ease-in-out; 
}

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-area {
    flex: 1 0 auto;
    padding-bottom: 1rem;
}

#footer {
    flex-shrink: 0;
}

.app-shell .top-row {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    gap: 1rem;
}

.app-shell .top-row a {
    color: #444;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.app-shell .top-row a:hover,
.app-shell .top-row .nav-link:hover {
    color: #007bff;
}

/* ─── Dropdown Toggle ───────────────────────────────────────────────────────── */
.app-shell .dropdown-toggle .nav-link {
    position: relative;
    padding-right: 1.5rem;
}

.app-shell .dropdown-toggle .nav-link::after {
    content: "▾";
    position: absolute;
    right: 0;
    font-size: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

/* ─── Dropdown Menu ────────────────────────────────────────────────────────── */
.app-shell .dropdown-menu {
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    min-width: 12rem;
    background-color: #fff;
}

.app-shell .dropdown-menu .dropdown-item {
    padding: 0.5rem 1rem;
    color: #444;
    transition: background-color 0.2s, color 0.2s;
}

.app-shell .dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
    color: #ffffff !important;          /* text color */
    background-color: #77b9ff !important; /* background color */
}

.nav-link.dropdown-toggle {
    margin-left: 24px;
    padding: 0;
}

.dropdown-menu.show[aria-labelledby="servicesDropdown"] {
    padding: 0 !important; 
    margin-top: -8px !important;
}

/* ─── Force the menu to open left-aligned to its toggle ───────────────────── */
.app-shell .dropdown-toggle {
    position: relative;  /* ensure child absolute positioning is relative to this */
}

.app-shell .dropdown-toggle .dropdown-menu {
    /* override Bootstrap’s default left/right */
    left: 0 !important;
    right: auto !important;
    transform: none !important;  /* remove any translateX from previous rules */
}

/* ─── Make the hover background cover the entire width ───────────────────── */
.app-shell .dropdown-menu .dropdown-item {
    display: block;      /* ensures full-width anchor */
    width: 100%;
}

.app-shell .dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;  /* same as before or your brand-color */
    color: #007bff;
}

/* -----------------------------------------------
   General layout
   ----------------------------------------------- */
.page {
    display: flex;
    flex-direction: column;
    position: relative;
}

main {
    flex: 1;
}

/* -----------------------------------------------
   Top-row nav
   ----------------------------------------------- */
.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 3.5rem;
}

.top-row a,
.top-row .btn-link {
    margin-left: 1.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.top-row a:hover,
.top-row .btn-link:hover {
    text-decoration: underline;
}

.top-row a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }
    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        width: 250px;
        background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
    }
    .top-row {
        position: sticky;
        top: 0;
        z-index: 1000;
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

@media (max-width: 640.98px) {
    .top-row {
        justify-content: space-between;
    }
    .top-row a,
    .top-row .btn-link {
        margin-left: 0;
    }
}

/* -----------------------------------------------
   BOOTSTRAP DROPDOWN OVERRIDES
   ----------------------------------------------- */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;   /* default hidden */
}
.dropdown-menu.show {
    display: block;  /* shown when .show is added */
}

.nav-item.dropdown .dropdown-menu {
    border: solid 0.1em transparent;
    border-top-color: #cef2ff;
    margin-top: 15px;
    left: 0 !important;
    top: 100% !important;
}

a.nav-link.dropdown-toggle {
    padding: 0;
    margin-left: 24px;
    background-color: #8EACFF !important;
    color: #fff !important;
}


@media (hover: hover) and (pointer: fine) {
    .nav-item.dropdown {
        position: relative;
    }

    .nav-item.dropdown > .dropdown-menu {
        position: absolute;
        display: block;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition:
                opacity .5s ease,
                transform .5s ease;
    }

    @media (hover: hover) and (pointer: fine) {
        .nav-item.dropdown:hover > .dropdown-menu {
            visibility: visible;
            opacity: 1;
            transform: translateY(0);
            margin-top: 15px;
        }
    }
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.content-area {
    flex-grow: 1;
}

@media (max-width: 500px) {
    .logo-default {
        width: 90px;
        height: 20px !important;
    }
    
    #logo img {
        padding: 2px;
    }
}

@media (max-width: 768px) {
    #header .header-row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }

    #logo {
        padding-right: 1px !important;
    }

    .img.logo-default {
        padding: 0px;
    }

    .primary-menu {
        display: flex;
    }

    .primary-menu .menu-container {
        display: flex;
        padding: 0;
        flex-wrap: nowrap;
    }
    
    .primary-menu .menu-container .menu-link {
        padding-right: 0;
        padding-left: 0;
    }
    
    .primary-menu .menu-item {
        margin: 0 8px;
    }
}


#components-reconnect-modal {
    display: none !important;
}

/* Loading State */
.category-loading h2 {
    color: #555;
}

/* Category Detail Styles */
.category-detail-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
}

.category-content > article {
    color: #444;
    font-size: 1rem;
    line-height: 1.7;
}

.category-content > article h2,
.category-content > article h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #222;
}

.category-content > article p {
    margin-bottom: 1rem;
}

.category-content > article img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 0.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.category-content > article blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    color: #666;
    font-style: italic;
    margin: 1.5rem 0;
    background: #f0f8ff;
}

.category-content > article pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 0.25rem;
    overflow-x: auto;
}

.category-content > article code {
    background: #eaeaea;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

.category-content > article a {
    color: #007bff;
    text-decoration: underline;
}
.category-content > article a:hover {
    color: #0056b3;
}

/* Gallery Styles (unaffected by the above) */
.category-gallery .gallery-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.category-gallery .gallery-viewer img {
    transition: transform .3s ease, box-shadow .3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.category-gallery .gallery-viewer img:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: scale3d(1.05, 1.05, 1.05);
}

.category-gallery .gallery-title:hover {
    color: #3e3e3e;
}

.category-gallery img {
    width: 100%;
    height: auto;
    border-radius: 0.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}