/* ============================================================
   HWS Summer Internships — flip-grid component
   Drop at: /_resources/css/internship-grid.css
   Brand colors are set once below; replace the two TODO hexes
   with the official Brand Standards values.
   ============================================================ */

.hws-intern {
    --hws-purple: #3C3489;   /* TODO: official Brand Standards purple */
    --hws-orange: #B0420F;   /* TODO: official Brand Standards orange */
    --hws-tile-back: #3C3489;
    --hws-gap: 12px;
    display: block;
    max-width: 560px;        /* ~1/3 of the homepage column; tune to fit */
    font-family: inherit;    /* inherits site CeraPro */
}

.hws-intern__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 1rem;
}

.hws-intern__eyebrow {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5a5a5a;
}

.hws-intern__count {
    margin: 0;
}

.hws-intern__nav {
    display: flex;
    gap: 8px;
}

.hws-intern__prev,
.hws-intern__next {
    font: inherit;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--hws-purple);
    border-radius: 4px;
    background: #fff;
    color: var(--hws-purple);
    cursor: pointer;
}

.hws-intern__prev:hover,
.hws-intern__next:hover {
    background: var(--hws-purple);
    color: #fff;
}

.hws-intern__prev:focus-visible,
.hws-intern__next:focus-visible {
    outline: 2px solid var(--hws-purple);
    outline-offset: 2px;
}

.hws-intern__prev[disabled],
.hws-intern__next[disabled] {
    opacity: 0.4;
    cursor: default;
}

.hws-intern__prev[disabled]:hover,
.hws-intern__next[disabled]:hover {
    background: #fff;
    color: var(--hws-purple);
}

.hws-intern__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--hws-gap);
    -webkit-perspective: 1200px;
    perspective: 1200px;
}

.hws-intern__tile {
    position: relative;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    transition: transform 0.18s ease;
}

.hws-intern__tile:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--hws-orange);
}

.hws-intern__inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hws-intern__face {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 6px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.hws-intern__front {
    align-items: center;
    justify-content: center;
    background: var(--hws-purple);
}

.hws-intern__front--alt {
    background: var(--hws-orange);
}

.hws-intern__photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
}

.hws-intern__mono {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.hws-intern__year {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    font-size: 0.75rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.hws-intern__frontname {
    position: absolute !important;
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 1;
    display: block;
    margin: 0;
    padding: 22px 10px 9px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: left;
    color: #fff;
    background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72));
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72));
}

.hws-intern__back {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
    justify-content: flex-start;
    text-align: left;
    padding: 12px 12px 10px;
    background: var(--hws-tile-back);
}

.hws-intern__employer {
    margin: 0 !important;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.hws-intern__line {
    margin: auto 0 0 !important;
    padding-top: 6px;
    font-size: 0.72rem;
    line-height: 1.25;
    color: #d7d3f2;
}

@media (hover: hover) {
    .hws-intern__tile:hover {
        transform: scale(1.06);
        z-index: 2;
    }
    .hws-intern__tile:hover .hws-intern__inner {
        -webkit-transform: rotateY(180deg);
        transform: rotateY(180deg);
    }
}

.hws-intern__tile.is-flipped {
    transform: scale(1.06);
    z-index: 2;
}

.hws-intern__tile.is-flipped .hws-intern__inner {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

@media (max-width: 480px) {
    .hws-intern__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .hws-intern__tile,
    .hws-intern__inner {
        transition: none !important;
    }
}