.dtg-filter-bar {
    text-align: center;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-direction: row;
    flex-wrap: wrap;
}

.dtg-filter-btn {
    background: #301e5f;
    color: #FFFFFF;
    padding: 16px 40px;
    border: none;
    border-radius: 0;
    font-family: "Beausite Light", sans-serif;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease;
}

.dtg-filter-btn:hover {
    opacity: 0.85;
}

.dtg-filter-btn.active {
    opacity: 1;
    background: #6d61ee;
    color: #FFFFFF;
}

.dtg-grid {
    --dtg-cols-base: 5;
    --dtg-cols: var(--dtg-cols-base);

    display: grid;
    grid-template-columns: repeat(var(--dtg-cols), minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.dtg-bio-email{
    color:#ffffff;
    padding-bottom: 1em;
    font-family: 'Beausite Classic Regular', Helvetica, Arial, Lucida, sans-serif;
    font-size: 17px !important;
    line-height: 1.5em;
    display: block;
}
.dtg-bio-text{
    font-family: 'Beausite Classic Regular', Helvetica, Arial, Lucida, sans-serif;
    font-size: 17px !important;
    line-height: 1.5em;
}

.dtg-job-title{
    font-family: 'Beausite Classic Regular', Helvetica, Arial, Lucida, sans-serif;
    font-size: 17px !important;
    line-height: 1.5em;
}
.dtg-entrytitle{
    font-family: 'Beausite Classic Regular', Helvetica, Arial, Lucida, sans-serif;
    font-size: 22px !important;
    line-height: 1.4em;
}


.dtg-item {
    position: relative;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.dtg-item:focus-visible {
    outline: 2px solid rgba(10, 44, 63, 0.6);
    outline-offset: 4px;
}

/* When the expander is open, dim the rest of the grid slightly */
.dtg-has-expanded .dtg-item:not(.dtg-row-underlay) {
    opacity: 0.35;
}

/* Keep row items in-place, but push them behind the expander */
.dtg-row-underlay {
    opacity: 0.12;
    pointer-events: none;
}

/* Optional: keep the clicked card slightly more present behind the expander */
.dtg-item.is-active {
    opacity: 0.25;
}

.dtg-item-inner {
    position: relative;
    overflow: hidden;
    background: #301e5f;
    display: flex;
    flex-direction: column;
}

.dtg-item-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.dtg-item-image:before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(49, 0, 11, 0.2);
    z-index: 2;
    pointer-events: none;
}
.dtg-expander-photo:before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(49, 0, 11, 0.2);
    z-index: 2;
    pointer-events: none;
}

.dtg-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}



/* Hover title overlay (only on the image area) */
.dtg-item-image .hover-title {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    background: #301e5f;
    align-items: center;
    justify-content: center;
    opacity: 0;
    text-align: center;
    padding: 16px;
    color: #FFF;
    display: flex;
    flex-direction: column;
}

.dtg-item-image .hover-title h4 {
    color: #fff;
    font-size: 24px;
    margin: 0;
}

.dtg-item:hover .hover-title {
    opacity: 1;
}

/* Bio is fully removed from layout until expanded (prevents height jitter) */
.dtg-bio {
    display: none;
    color: #fff;
    padding: 16px;
    position: relative;
}

.dtg-bio h2,
.dtg-bio h3,
.dtg-bio h4,
.dtg-expander-content h2,
.dtg-expander-content h3,
.dtg-expander-content h4 {
    color: #fff;
    margin: 0 0 6px;
    padding: 0 0 6px;
}

/* Expander (overlay) */
.dtg-expander {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
}

.dtg-expander.open {
    display: block;
}
.dtg-expander-modal {
    top: 60px !important;
}
.dtg-expander-inner {
    overflow: hidden;
    display: flex;
    align-items: stretch;
    animation: dtgFadeIn 0.2s ease both;

    /* Height governed by clicked card image (via JS variable) */
    height: var(--dtg-expander-h, auto);

    /* Optional cap so it never gets silly tall */
    max-height: min(70vh, 720px);
}

.dtg-expander-image {
    height: 100%;
    aspect-ratio: 1 / 1; /* matches your grid thumbnails */
    flex: 0 0 auto;
}

.dtg-expander-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* Bio area scrolls instead of increasing height */
.dtg-expander-content {
    position: relative;
    color: #fff;
    padding: 16px;
    flex: 1 1 auto;
    height: 100%;
    overflow: auto;
    background: #31006f;
    margin-left:1rem;
    opacity: 1;
    transform: translateX(100%);
    -webkit-transform: translateX(100%);
}

.dtg-expander-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 30px;
    outline: none;
    box-shadow: none;
}

.dtg-expander-close:focus {
    outline: none;
    box-shadow: none;
}

.dtg-loading,
.dtg-error {
    padding: 16px;
    background: #301e5f;
    color: #fff;
}
.slide-in {
    animation: slide-in 0.5s forwards;
    -webkit-animation: slide-in 0.5s forwards;
}

.slide-out {
    animation: slide-out 0.5s forwards;
    -webkit-animation: slide-out 0.5s forwards;
}

body.dtg-modal-open {
    overflow: hidden;
}

@media (max-width: 1200px) {
    .dtg-grid {
        --dtg-cols: 4;
    }
    .dtg-filter-btn{
        padding: 16px 40px;
    }
}
@media (max-width: 1024px) {
    .dtg-grid {
        --dtg-cols: 3;
    }
    .dtg-filter-bar{
        display: block;
    }
    .dtg-filter-btn{
        font-size: 14px;
        padding: 16px 30px;
        display: inline-block;
        margin-bottom: 0.5rem;
        margin-right: 0.5rem;
    }
}

@media (max-width: 768px) {
    .dtg-grid {
        --dtg-cols: 2;
    }
    .dtg-filter-bar{
        display: block;
    }
    .dtg-filter-btn{
        font-size: 14px;
        padding: 16px 30px;
        display: inline-block;
        margin-bottom: 0.5rem;
        margin-right: 0.5rem;
    }
}

@media (max-width: 500px) {
    .dtg-grid {
        --dtg-cols: 1;
    }
    .dtg-filter-bar{

        display: block;
    }
    .dtg-filter-btn{
        font-size: 14px;
        padding: 16px 30px;
        display: inline-block;
        margin-bottom: 0.5rem;
        margin-right: 0.5rem;
    }
}



@media (max-width: 768px) {
    /* Expander becomes a fixed modal overlay with backdrop */
    .dtg-expander {
        position: fixed;
        inset: 0;
        padding: 16px;
        overflow: auto;
        background: rgba(0, 0, 0, 0.65);
        z-index: 99999;
    }

    .dtg-expander-inner {
        width: min(720px, 100%);
        margin: 130px auto;
        flex-direction: column;

        /* Let it size naturally on mobile */
        height: auto;
        max-height: none;
    }

    .dtg-expander-image {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        display: none;
    }

    .dtg-expander-content {
        transform: translateX(0);
        -webkit-transform: translateX(0);
        height: auto;
        overflow: visible;
    }
}

@keyframes dtgFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


@keyframes slide-in {
    100% { transform: translateX(0%); }
}

@-webkit-keyframes slide-in {
    100% { -webkit-transform: translateX(0%); }
}

@keyframes slide-out {
    0% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

@-webkit-keyframes slide-out {
    0% { -webkit-transform: translateX(0%); }
    100% { -webkit-transform: translateX(100%); }
}