
.flip-card {
    background-color: transparent;
    height: 100%;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 150px;
    text-align: center;
    transition: transform 1.5s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    padding: 25px 0px 25px 0px;
    align-items: center;
    justify-content: center;
}

.flip-card-front {
    background-color: #005587;
    height: 100%;
    color: #FFC72C !important;
    font-weight: 600;
}

.flip-card-front h3 {
    color: #FFC72C !important;
    font-weight: 600;
}

.flip-card-back {
    background-color: #8BB8E8;
    height: 100%;
    color: aqua;
    font-weight: 600;
    transform: rotateY(180deg)
}

    .flip-card-back a {
        color: #000000;
    }

        .flip-card-back a:hover {
            color: #000000;
        }

    .listTitle h3 {
        font-weight: 700 !important;
        color: #003B5C !important;
    }

.listTitle-home {
    font-weight: 700 !important;
    color: #003B5C !important;
    font-size:1.5em; 
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* =======================
   TOP SLIDESHOW / FLEXSLIDER
   ======================= */
#main-slideshow {
    margin: 12px 0;
    position: relative;
}

    #main-slideshow .flexslider,
    #main-slideshow .flexslider .slides,
    #main-slideshow .flexslider .slides > li {
        width: 100%;
    }

    #main-slideshow .slides img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
        max-height: 420px;
    }

/* Caption box stacks on mobile; reverts to side panel on desktop */
#caption-box {
    position: static;
    width: 100%;
    padding: 12px 16px;
    height: auto;
    background: #fff100;
}

.flex-caption {
    font-size: clamp(14px, 2.7vw, 16px);
}

@media (min-width: 1024px) {
    #caption-box {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 38%;
        padding: 2.5% 2%;
    }
}

/* =======================
   TWO-COLUMN HERO (#topPictureContainer)
   ======================= */
#topPictureContainer {
    width: 100%;
    margin: 0;
}

    #topPictureContainer .media {
        position: relative;
        padding: 0;
        overflow: hidden;
    }

        #topPictureContainer .media img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

#topPictureCaptionDiv {
    left: 12px;
    right: 12px;
    bottom: 12px;
}

#topPictureContainer .content {
    padding: clamp(18px, 4vw, 50px);
    background: rgba(255,199,44,.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Stack on tablets/phones */
@media (max-width: 900px) {
    #topPictureContainer {
        display: block !important;
    }

        #topPictureContainer .columns {
            width: 100% !important;
        }

        #topPictureContainer .media {
            max-height: 360px;
        }
}

/* =======================
   EXPLORE FLIP CARDS (extends your existing rules)
   ======================= */
/* Your base provided rules remain; these are additive tweaks */

/* Roomier default padding */
.flip-card-front, .flip-card-back {
    padding: 20px 16px;
}

/* Accessible flip on desktop (keeps your hover) */
@media (hover: hover) {
    .flip-card:focus-within .flip-card-inner {
        transform: rotateY(180deg);
    }

    .flip-card a, .flip-card button {
        outline-offset: 3px;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .flip-card-inner {
        transition: none !important;
    }
}

/* Touch devices: don’t flip—stack back content so links are tappable */
@media (hover: none) {
    .flip-card {
        height: auto;
    }

    .flip-card-inner {
        height: auto;
        transform: none !important;
        text-align: left;
    }

    .flip-card-front, .flip-card-back {
        position: relative;
        width: 100%;
        padding: 16px;
        display: block;
        -webkit-backface-visibility: visible;
        backface-visibility: visible;
        transform: none !important;
    }

    .flip-card-front {
        border-radius: 10px;
    }

    .flip-card-back {
        border-radius: 10px;
        margin-top: 8px;
    }

    .flip-card-front h3 {
        font-size: clamp(18px, 4vw, 22px);
        margin: 0;
    }

    .flip-card-back b, .flip-card-back a {
        font-size: clamp(15px, 3.5vw, 17px);
        line-height: 1.5;
    }
}

/* Optional taller desktop card */
@media (min-width: 1024px) and (hover: hover) {
    .flip-card-inner {
        height: 180px;
    }
}

/* =======================
   FEATURED STORY / IMG FIGURES
   ======================= */
.featured-story-container .bigimage {
    width: 100%;
    height: auto;
}

.featured-story-container .figcaption {
    padding: 10px 0;
}

/* =======================
   NEWS / REPORTS / GRAD RESEARCH CARDS
   ======================= */
.news-card-item {
    align-items: stretch;
    gap: 12px;
}

.news-card-img img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

.newsItemTitle {
    margin: 6px 0 8px;
    font-size: clamp(18px, 3vw, 22px);
}

.newsItemAbstract {
    margin: 0 0 6px;
}

.newsItemDateTwo {
    font-size: .95em;
    opacity: .8;
}

@media (max-width: 768px) {
    .news-card-item .columns {
        width: 100% !important;
        float: none;
    }

    .news-card-img, .news-card-info {
        padding-left: 0;
        padding-right: 0;
    }
}

/* =======================
   HOMEPAGE “NEWS” & “UPCOMING EVENTS” THUMBS
   ======================= */
.listItemThumbnail {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

.listItemTitle {
    display: inline-block;
    margin: 6px 0;
    font-weight: 600;
}

.homePageUpcomingDateTime {
    margin-top: 6px;
}

@media (max-width: 640px) {
    .controlWidth .columns {
        width: 100% !important;
        float: none;
    }
}

/* =======================
   EVENTS LIST
   ======================= */
.event-item-placeholder {
    align-items: stretch;
    gap: 10px;
}

.eventListThumbnail {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

.eventListAddress, .eventListTime {
    display: inline-block;
    margin-left: 8px;
}

.date {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    min-width: 56px;
}

    .date .day {
        font-size: 20px;
        font-weight: 700;
        line-height: 1;
    }

    .date .month {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: .4px;
    }

@media (max-width: 900px) {
    .event-item-placeholder .columns {
        width: 100% !important;
        float: none;
    }

    .event-item-placeholder .leftPadding {
        padding-left: 0 !important;
    }

    .event-item-placeholder .hideIpad {
        display: none !important;
    }

    .date {
        margin-top: 8px;
    }
}

/* =======================
   PEOPLE PROFILES
   ======================= */
.people-list .profile-container {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.people-list .profile-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    object-fit: cover;
}

.people-list .info-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: none;
}

.people-list .name {
    font-size: clamp(22px, 3.5vw, 34px);
    font-weight: 700;
}

.people-list .role, .people-list .email {
    font-size: clamp(16px, 2.8vw, 20px);
}

.people-list .divider {
    width: 100%;
    max-width: 560px;
}

@media (max-width: 900px) {
    .people-list .profile-container {
        flex-direction: column;
        gap: 14px;
    }

    .people-list .profile-image {
        max-width: 100%;
    }
}

/* =======================
   BOOKS GRID / CARDS
   ======================= */
.card {
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
    perspective: 1000px;
}

.card-content {
    min-width: 210px;
    min-height: 300px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.card-front img.book_image {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
}

.card-back {
    transform: rotateY(180deg);
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Touch: disable flip, show details below image */
@media (hover: none) {
    .card {
        max-width: 320px;
    }

    .card-content.card-back {
        position: static;
        transform: none;
        min-height: auto;
        margin-top: 8px;
        box-shadow: none;
    }

    .card:hover .card-front, .card:hover .card-back {
        transform: none;
    }
}

/* Responsive columns for books */
@media (max-width: 1100px) {
    .pageContent .large-3.columns {
        width: 50% !important;
    }
}

@media (max-width: 640px) {
    .pageContent .large-3.columns, .pageContent .large-4.columns {
        width: 100% !important;
    }
    .pageMainContentContainer {
        padding:15px; 
    }
    .listing-container {
        padding-right: .9375rem !important;
        padding-left: .9375rem !important;
    }
}

/* =======================
   SIDEBARS / LISTS
   ======================= */
.sidebar ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

    .sidebar ul li {
        margin: 8px 0;
    }

.sidebar a {
    display: inline-block;
}

/* =======================
   NAV BAR (wraps & mobile submenu support)
   ======================= */
/*.headerNavRow {
    background: rgb(0,85,135);
}

.headerNavs.topNav {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 12px;
    padding: 8px 10px !important;
    margin: 0 !important;
}

    .headerNavs.topNav > li > a {
        color: #fff;
        padding: 10px 8px;
        display: inline-block;
        font-weight: 600;
    }*/

/* Submenus: absolute on desktop; in-flow on mobile */
/*.headerSubNav {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 220px;
    background: #fff;
    color: #000;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
    padding: 8px 0;
    margin: 8px 0 0 0;
    list-style: none;
    display: none;
    z-index: 1000;
}

    .headerSubNav > li > a {
        display: block;
        padding: 10px 14px;
        color: #000 !important;
    }*/

/*@media (pointer: fine) {
    .headerNavs.topNav > li:hover > .headerSubNav,
    .headerNavs.topNav > li:focus-within > .headerSubNav {
        display: block;
    }
}*/

/* Mobile: submenus become stacked; toggle via a class you can add in JS or via checkbox hack */
/*@media (max-width: 900px) {
    .headerSubNav {
        position: static !important;
        display: none;
        background: rgba(255,255,255,.97);
        border-radius: 8px;
        box-shadow: none;
        margin-top: 0;
    }

    .headerNavs.topNav > li.is-open > .headerSubNav {
        display: block;
    }*/
    /* when parent gets .is-open */
/*}*/

/* =======================
   BUTTONS
   ======================= */
.button {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
}

/* =======================
   CLEANUP INLINE SIZES FROM CMS
   ======================= */
img[style*="height:360px"] {
    height: auto !important;
}

img[style*="width:220px"] {
    width: 100% !important;
    max-width: 220px;
}

/* =======================
   YOUR EXISTING BRANDING (from snippet)
   ======================= */
.listTitle h3 {
    font-weight: 700 !important;
    color: #003B5C !important;
}

.listTitle-home {
    font-weight: 700 !important;
    color: #003B5C !important;
    font-size: 1.5em;
}