html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.btn-icon {
    padding: 0.25rem; /* equal padding on all sides */
    width: 1.75rem; /* fixed square shape */
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem; /* optional: adjust to taste */
}

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;
}

/*.content {
    padding-top: 1.1rem;
}
*/
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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI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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;
}
/* Improved module headers - flush top-right admin panel + dropdown compatibility */
.moddiv {
    position: relative; /* Required for absolute positioning */
}

.modheaderhide {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%; /* Covers right half on large screens */
    min-width: 300px; /* Ensures decent hover area on medium screens */
    height: 50px; /* Matches #topblock height */
    z-index: 10;
    background: transparent;
    cursor: pointer; /* Subtle hint that right side is interactive */
    transition: background 0.2s ease;
}

@media (max-width: 991px) {
    .modheaderhide {
        width: 70%; /* Wider hover area on tablets */
    }
}

@media (max-width: 767px) {
    .modheaderhide {
        width: 100%; /* Full width on mobile if needed – dropdowns often become touch menus anyway */
    }
}

.modheaderhide:hover {
    background: rgba(255, 255, 255, 0.08);
}

.modheaderhide:hover .modheaderadmin {
    display: inline-flex;
}

.modheaderadmin {
    position: absolute;
    top: 0.25rem;
    right: 0.35rem;
    max-width: min(100% - 0.7rem, 28rem);
    min-height: 2rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.2rem 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
    display: none;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    color: #1f2933;
    font-size: 0.85rem;
    line-height: 1;
    z-index: 20;
    overflow: hidden;
}
    /* Module title ("Welcome" / Zoom In) */
    .modheaderadmin .head {
        max-width: 16rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 600;
        font-size: 0.88rem;
        color: #1f2933;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.15rem 0.25rem;
        margin: 0;
        line-height: 1.1;
    }
        .modheaderadmin .head:hover {
            text-decoration: underline;
            color: #005b99;
        }

    /* Icon buttons - force icons to white */
    .modheaderadmin .commandbutton {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.75rem;
        height: 1.75rem;
        color: #334155;
        text-decoration: none;
        opacity: 0.85;
        transition: opacity 0.2s ease, color 0.2s ease;
        flex: 0 0 auto;
    }
        .modheaderadmin .commandbutton:hover {
            color: #005b99;
            opacity: 1;
        }

        .modheaderadmin .commandbutton i {
            font-size: 1rem !important;
            line-height: 1;
        }

        .modheaderadmin .commandbutton img {
            width: 20px;
            height: 20px;
            /*filter: brightness(0) invert(1);*/
            vertical-align: middle;
        }
/* unorganized */
.field-gallery {
    display: grid;
    gap: 1rem;
    color: #1f2933;
}

.field-gallery-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #d7dde5;
    padding-bottom: 0.65rem;
}

.field-gallery-title h2 {
    margin: 0;
    font-size: clamp(1.15rem, 1rem + 0.7vw, 1.75rem);
    font-weight: 650;
    line-height: 1.2;
}

.field-gallery-subtitle {
    color: #64748b;
    font-size: 0.9rem;
}

.field-gallery-subtitle::before {
    content: "(";
}

.field-gallery-subtitle::after {
    content: ")";
}

.field-gallery-actions,
.field-gallery-nav,
.field-gallery-pager {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.field-gallery-actions {
    justify-content: flex-end;
    flex-shrink: 0;
}

.field-gallery-breadcrumb {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
    font-size: 0.88rem;
    min-width: 0;
}

.field-gallery-title-path {
    flex: 1 1 auto;
}

.field-gallery-breadcrumb a {
    color: #475569;
    text-decoration: none;
}

.field-gallery-breadcrumb a:hover {
    color: #005b99;
    text-decoration: underline;
}

.field-gallery-breadcrumb a:not(:last-child)::after {
    content: "/";
    color: #94a3b8;
    margin-left: 0.35rem;
}

.field-gallery-breadcrumb a:last-of-type::after {
    content: "/";
    color: #94a3b8;
    margin-left: 0.35rem;
}

.field-gallery-current-title {
    color: #1f2933;
    font-size: clamp(1.05rem, 1rem + 0.35vw, 1.35rem);
    font-weight: 650;
    line-height: 1.2;
}

.field-gallery-figure {
    margin: 0;
    display: grid;
    gap: 0.4rem;
    justify-items: stretch;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.field-gallery-figure img {
    display: block;
    max-width: 100%;
    max-height: min(76vh, 980px);
    width: 100%;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}

.field-gallery-figure figcaption {
    min-height: 1.25rem;
    color: #64748b;
    font-size: 0.86rem;
    text-align: center;
}

.field-gallery-text {
    max-width: 72ch;
    color: #334155;
    line-height: 1.55;
}

.field-gallery-text p:last-child {
    margin-bottom: 0;
}

.field-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.field-gallery-thumb {
    display: grid;
    gap: 0.4rem;
    text-decoration: none;
    color: #1f2933;
    min-width: 0;
}

.field-gallery-thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid #d8dee7;
    border-radius: 6px;
    background: #f7f8fa;
}

.field-gallery-thumb span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
}

.field-gallery-thumb:hover img {
    border-color: #7aa7c7;
}

.field-gallery-pager {
    justify-content: center;
    color: #64748b;
}

@media (max-width: 640px) {
    .field-gallery-header {
        align-items: stretch;
        flex-direction: column;
    }

    .field-gallery-actions {
        justify-content: flex-start;
    }

    .field-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    }
}

.field-gallery-nav-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2rem;
}

.field-gallery-photo-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 100%;
}

.field-gallery-photo-stage img {
    grid-area: 1 / 1;
}

.field-gallery-photo-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 3.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(16, 24, 40, 0.48);
    color: #fff;
    text-decoration: none;
    opacity: 0.86;
    z-index: 2;
}

.field-gallery-photo-nav:hover,
.field-gallery-photo-nav:focus {
    background: rgba(16, 24, 40, 0.72);
    color: #fff;
    opacity: 1;
}

.field-gallery-photo-nav-prev {
    left: 0.5rem;
}

.field-gallery-photo-nav-next {
    right: 0.5rem;
}

.field-gallery-photo-nav i {
    font-size: 1.5rem;
}

@media (max-width: 640px) {
    .field-gallery-photo-nav {
        width: 2.25rem;
        height: 3rem;
    }
}

.field-gallery-caption {
    min-height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 0.86rem;
    text-align: center;
}

.field-gallery-details-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.field-gallery-photo-stage .field-gallery-photo-nav {
    top: 0;
    bottom: 0;
    transform: none;
    width: 30%;
    height: auto;
    border-radius: 0;
    background: transparent;
    opacity: 1;
}

.field-gallery-photo-stage .field-gallery-photo-nav:hover,
.field-gallery-photo-stage .field-gallery-photo-nav:focus {
    background: rgba(16, 24, 40, 0.18);
}

.field-gallery-photo-stage .field-gallery-photo-nav-prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 0.75rem;
}

.field-gallery-photo-stage .field-gallery-photo-nav-next {
    right: 0;
    justify-content: flex-end;
    padding-right: 0.75rem;
}

.field-gallery-photo-stage .field-gallery-photo-nav i {
    width: 2.25rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(16, 24, 40, 0.55);
}

.field-gallery-text summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    color: #006bb7;
    font-weight: 600;
    margin-bottom: 0.5rem;
}


.field-gallery-photo-stage .field-gallery-photo-nav {
    width: 42%;
    z-index: 8;
}

.field-gallery-photo-stage .field-gallery-photo-nav-prev {
    cursor: w-resize;
}

.field-gallery-photo-stage .field-gallery-photo-nav-next {
    cursor: e-resize;
}

.field-gallery-photo-link {
    grid-area: 1 / 1;
    display: block;
    width: 100%;
    max-width: 100%;
    cursor: e-resize;
}

.field-gallery-photo-link img {
    display: block;
}
.field-gallery-photo-stage {
    grid-template-columns: auto minmax(0, auto) auto;
    column-gap: 0.5rem;
}

.field-gallery-side-link {
    align-self: center;
    width: 2.75rem;
    height: 4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(16, 24, 40, 0.62);
    color: #fff;
    text-decoration: none;
    z-index: 3;
}

.field-gallery-side-link:hover,
.field-gallery-side-link:focus {
    background: rgba(16, 24, 40, 0.82);
    color: #fff;
}

.field-gallery-side-link i {
    font-size: 1.65rem;
}

.field-gallery-photo-link {
    min-width: 0;
}

@media (max-width: 640px) {
    .field-gallery-photo-stage {
        column-gap: 0.25rem;
    }

    .field-gallery-side-link {
        width: 2.25rem;
        height: 3.25rem;
    }
}

.field-gallery-photo-link {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    text-decoration: none;
    cursor: pointer;
}

.field-gallery-primary-arrow {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 3.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(16, 24, 40, 0.62);
    color: #fff;
    pointer-events: none;
}

.field-gallery-photo-link[title^="Previous"] .field-gallery-primary-arrow {
    right: auto;
    left: 0.75rem;
}

.field-gallery-primary-arrow i {
    font-size: 1.6rem;
}

.field-gallery-direction-controls {
    display: flex;
    justify-content: center;
    margin-top: 0.25rem;
}
.field-gallery-details-link {
    border: 0;
    background: transparent;
    color: #006bb7;
    padding: 0;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.field-gallery-details-link:hover,
.field-gallery-details-link:focus {
    color: #004f86;
}

.field-gallery-primary-arrow {
    opacity: 0.45;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.field-gallery-photo-link:hover .field-gallery-primary-arrow,
.field-gallery-photo-link:focus .field-gallery-primary-arrow {
    opacity: 0.78;
}
/* Mobile content should feel edge-to-edge without white side pillars. */
.page,
.page main,
.content {
    width: 100%;
    max-width: 100%;
}

.module-frame-body > .field-gallery,
.module-frame-body > div:first-child:last-child {
    max-width: 100%;
}

@media (max-width: 640.98px) {
    body {
        overflow-x: hidden;
    }

    .top-row {
        padding-left: 0 !important;
        padding-right: 0 !important;
        min-height: auto;
        border-bottom: 0;
    }

    .top-row .navbar {
        width: 100%;
    }

    article.content {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .module-frame {
        margin-left: 0;
        margin-right: 0;
    }

    .module-frame-body {
        overflow-x: hidden;
    }

    .field-gallery {
        gap: 0.5rem;
    }

    .field-gallery-header {
        gap: 0.35rem;
        padding-bottom: 0.35rem;
    }

    .field-gallery-breadcrumb {
        gap: 0.25rem;
        font-size: 0.82rem;
    }

    .field-gallery-current-title {
        font-size: 1.05rem;
    }

    .field-gallery-subtitle {
        font-size: 0.8rem;
    }

    .field-gallery-nav,
    .field-gallery-pager {
        gap: 0.25rem;
    }

    .field-gallery-nav-button span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .field-gallery-nav-button {
        min-height: 1.8rem;
        padding: 0.15rem 0.35rem;
        font-size: 0.82rem;
    }

    .field-gallery-figure {
        gap: 0.25rem;
        padding: 0;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        background: transparent;
    }

    .field-gallery-photo-stage,
    .field-gallery-photo-link,
    .field-gallery-figure img {
        width: 100%;
    }

    .field-gallery-figure img {
        max-height: min(70vh, 760px);
    }

    .field-gallery-caption {
        min-height: 1rem;
        gap: 0.35rem;
        font-size: 0.78rem;
    }

    .field-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
        gap: 0.45rem;
    }

    .field-gallery-thumb {
        gap: 0.25rem;
    }

    .field-gallery-thumb img {
        border-radius: 4px;
    }

    .field-gallery-thumb span {
        font-size: 0.78rem;
    }

    .field-gallery-primary-arrow {
        right: 0.35rem;
        width: 2.1rem;
        height: 2.7rem;
    }

    .field-gallery-photo-link[title^="Previous"] .field-gallery-primary-arrow {
        left: 0.35rem;
    }

    .field-gallery-primary-arrow i {
        font-size: 1.25rem;
    }
}

.field-gallery-image-controls {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    z-index: 14;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.15rem;
    border-radius: 4px;
    background: rgba(16, 24, 40, 0.34);
    opacity: 0.62;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.field-gallery-photo-stage:hover .field-gallery-image-controls,
.field-gallery-photo-stage:focus-within .field-gallery-image-controls {
    opacity: 1;
    background: rgba(16, 24, 40, 0.56);
}

.field-gallery-image-control {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
}

.field-gallery-image-control:hover,
.field-gallery-image-control:focus {
    color: #fff;
}

.field-gallery-image-control i {
    font-size: 1.15rem;
    line-height: 1;
}
/* Small-screen and tablet module controls: compact, icon-first hover menus. */
@media (max-width: 820px) {
    .module-frame {
        padding-top: 2.15rem;
    }

    .modheaderhide {
        width: auto;
        min-width: 2.4rem;
        height: 2.4rem;
        top: 0.15rem;
        right: 0.15rem;
        cursor: default;
    }

    .modheaderhide:hover {
        background: transparent;
    }

    .modheaderhide .modheaderadmin,
    .modheaderhide:hover .modheaderadmin,
    .modheaderhide:focus-within .modheaderadmin {
        display: inline-flex;
    }

    .modheaderadmin {
        top: 0;
        right: 0;
        min-height: 2rem;
        max-width: none;
        padding: 0.15rem;
        gap: 0.1rem;
        opacity: 0.34;
        transition: opacity 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    }

    .modheaderhide:hover .modheaderadmin,
    .modheaderhide:focus-within .modheaderadmin {
        opacity: 1;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
    }

    .modheaderadmin .head {
        display: none;
    }

    .modheaderadmin .commandbutton {
        width: 1.75rem;
        height: 1.75rem;
    }

    .field-gallery {
        position: static;
        padding-top: 0;
    }

    .field-gallery-header {
        padding-right: 0;
    }

    .field-gallery-nav {
        position: absolute;
        top: 0.15rem;
        right: 6.25rem;
        z-index: 12;
        justify-content: flex-end;
        max-width: calc(100% - 8.8rem);
        padding: 0.15rem;
        gap: 0.1rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        opacity: 0.34;
        transition: opacity 0.15s ease;
    }

    .field-gallery:hover .field-gallery-nav,
    .field-gallery:focus-within .field-gallery-nav {
        opacity: 1;
        background: transparent;
        box-shadow: none;
    }

    .field-gallery-nav-button {
        width: 1.75rem;
        height: 1.75rem;
        min-width: 1.75rem;
        min-height: 1.75rem;
        padding: 0 !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        border-color: transparent !important;
        background: transparent !important;
        color: #334155 !important;
    }

    .field-gallery-nav-button:hover,
    .field-gallery-nav-button:focus {
        color: #005b99 !important;
    }

    .field-gallery-nav-button span {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    .field-gallery-nav-button i {
        font-size: 1rem;
        line-height: 1;
    }
}
