/*
    Endorsements Grid Styles
*/

.hm-eg-wrap {
    width: 100%;
}

/* Filter buttons */
.hm-eg-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0rem;
    margin: 0 auto 2rem auto;
    background: #FFAA09;
    background: linear-gradient(90deg, rgba(255, 170, 9, 1) 0%, rgba(255, 41, 37, 1) 100%);
    width: fit-content;
    justify-content: center;
}

.hm-eg-filter-btn {
    cursor: pointer;
    border: none;
    padding: 15px 30px;
    background: transparent;
    line-height: 1;
    font-size: 0.95rem;
    font-family: Roboto, Arial, sans-serif;
    border-radius: 0;
    font-size: 19px;
    text-transform: uppercase;
}

.hm-eg-filter-btn[aria-pressed="true"] {
    opacity: 0.85;
    background-color: black;
}

/* Grid columns */
.hm-eg-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.75rem;
}

/* card */
.hm-eg-card {
    overflow: hidden;
    position: relative;
    background: #FC5B1C;
    background: linear-gradient(90deg, rgba(252, 91, 28, 1) 0%, rgba(253, 54, 35, 1) 100%);
    color: white;
    transition: transform .35s cubic-bezier(.4, 0, .2, 1), opacity .25s ease;
    transform-origin: center;
}

/* hiding */
.hm-eg-card.is-hiding {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

/* initial */
.hm-eg-card.is-entering {
    transform: scale(0);
    opacity: 0;
}

/* Smooth image zoom */
.hm-eg-img {
    width: 100%;
    height: 100% !important;
    object-fit: cover !important;
    padding: 0 !important;
    transition: transform 0.4s ease;
    transform-origin: center;
}

/* Glass shine layer */
.hm-eg-card::before {
    content: "";
    position: absolute;
    left: -140%;
    bottom: -80%;
    width: 240%;
    height: 240%;

    /* shiny line like a crystal */
    background: linear-gradient(230deg,
            transparent 42%,
            rgba(255, 255, 255, 0.15) 47%,
            rgba(255, 255, 255, 0.55) 50%,
            rgba(255, 255, 255, 0.15) 53%,
            transparent 58%);

    transform: rotate(25deg);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
}

/* Hover effects */
.hm-eg-card:hover .hm-eg-img {
    transform: scale(1.08);
}

.hm-eg-card:hover::before {
    opacity: 1;
    animation: hmGlassShine 1s ease forwards;
}

.hm-eg-body {
    position: relative;
    z-index: 2;
}

.hm-eg-hidden {
    display: none !important;
}

.hm-eg-media {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: white;
    position: relative;
    z-index: 1;
}

/* Fallback when no image exists */
.hm-eg-img--empty {
    background: white
}

/* Text area */
.hm-eg-body {
    padding: 16px;
}

/* Legacy line-height feel */
.hm-eg-name {
    margin: 0;
    line-height: 105%;
    font-size: 19px !important;
    font-family: Roboto, Arial, sans-serif;
    text-align: center;
}

/* Use h4 to mimic your old sizing */
.hm-eg-role {
    margin: 0.25rem 0 0 0;
    font-size: 13px !important;
    line-height: 105%;
    opacity: 0.85;
    font-family: Roboto, Arial, sans-serif;
    text-align: center;
    margin-bottom: 10px;
}


@media (max-width: 1520px) {
    .hm-eg-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .hm-eg-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 768px) {
    .hm-eg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 563px) {
    .hm-eg-media {
        height: 180px;
    }

    .hm-eg-name {
        font-size: 15px !important;
    }

    .hm-eg-role {
        font-size: 13px !important;
    }

    .hm-eg-body {
        padding: 4px !important;
    }
}

/* Keyframes: down to up */
@keyframes hmGlassShine {
    from {
        left: -120%;
        bottom: -160%;
    }

    to {
        left: 120%;
        bottom: 120%;
    }
}