/* ============================================================
   Site-wide card + image hover
   Card lift shadow + image zoom — preserves border-radius on hover
   ============================================================ */

:root {
    --card-hover-shadow:
        0 4px 8px rgba(28, 43, 74, 0.08),
        0 12px 32px rgba(28, 43, 74, 0.14),
        0 28px 56px rgba(28, 43, 74, 0.12);
    --card-hover-shadow-dark: 0 12px 40px rgba(0, 0, 0, 0.28);
    --card-hover-zoom: 1.06;
    --card-hover-duration: 0.6s;
    --card-hover-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --card-hover-radius: var(--radius-card, 25px);
}

/* ---- Card lift on hover (keep overflow hidden for rounded corners) ---- */

.edu-card,
.trng-card,
.rc-card-h,
.rc-card-v,
.smc-card,
.impact-engagement-card,
.mep-news-card,
.mep-featured-story-card,
.mep-webinar-card,
.gallery-card,
.count-card,
.overview-grid-item,
.tr-course-card,
.utd-related-card,
.rph-card,
.pub-card:has(.pub-card-img),
.pub-card:has(.pub-card-thumb),
.ev-people-card,
.collab-feature-card,
.impact-event-feature-card,
.rih-article,
.cohort-card,
.alumni-card,
.funder-card,
.edu-count-inner,
.sd-media-card,
.pi-media-card,
.irb-team-card,
.mep-document-card,
.int-benefit-card,
.int-objective-card,
.int-eligibility-panel,
.int-contact-card,
.exchange-partner-card,
.exchange-testimonial-card,
.alumni-leader-card,
.alumni-engage-card,
.staff-member {
    transition: box-shadow var(--card-hover-duration) ease;
}

.edu-card:hover,
.trng-card:hover,
.rc-card-h:hover,
.rc-card-v:hover,
.smc-card:hover,
.impact-engagement-card:hover,
.mep-news-card:hover,
.mep-featured-story-card:hover,
.mep-webinar-card:hover,
.gallery-card:hover,
.count-card:hover,
.overview-grid-item:hover,
.tr-course-card:hover,
.utd-related-card:hover,
.rph-card:hover,
.pub-card:has(.pub-card-img):hover,
.pub-card:has(.pub-card-thumb):hover,
.collab-feature-card:hover,
.impact-event-feature-card:hover,
.rih-article:hover,
.cohort-card:hover,
.alumni-card:hover,
.funder-card:hover,
.edu-count-inner:hover,
.sd-media-card:hover,
.pi-media-card:hover,
.irb-team-card:hover,
.mep-document-card:hover,
.int-benefit-card:hover,
.int-objective-card:hover,
.int-eligibility-panel:hover,
.int-contact-card:hover,
.exchange-partner-card:hover,
.exchange-testimonial-card:hover,
.alumni-leader-card:hover,
.alumni-engage-card:hover,
.staff-member:hover {
    transform: none;
    overflow: hidden !important;
    z-index: 2;
    box-shadow: var(--card-hover-shadow) !important;
    border-color: #e5e7eb;
}

.ev-people-card:hover {
    transform: none;
    overflow: hidden !important;
    z-index: 2;
    box-shadow: var(--card-hover-shadow-dark);
}

/* Education section */
.edu-section .edu-cards {
    overflow: visible;
    padding: 16px 12px;
    margin: -16px -12px;
}

.edu-section .edu-card {
    transition:
        box-shadow var(--card-hover-duration) ease,
        transform var(--card-hover-duration) var(--card-hover-ease);
}

.edu-section .edu-card:hover {
    overflow: hidden !important;
    z-index: 3;
    box-shadow: var(--card-hover-shadow) !important;
}

.edu-section .edu-card.edu-card--featured {
    overflow: hidden !important;
}

.edu-section .edu-card.edu-card--featured:hover {
    overflow: hidden !important;
}

.edu-section .edu-card--featured .edu-card-link {
    border-radius: 999px !important;
}

/* Training section */
.trng-section {
    overflow: visible;
}

.trng-section .trng-inner {
    overflow: visible;
}

/* Keep hover shadow room; do not force overflow:visible on slider rows */
.trng-section .trng-cards:not(.trng-cards--slider) {
    overflow: visible;
}

.trng-section .trng-cards {
    padding: 16px 12px;
    margin: -16px -12px;
}

.trng-section .trng-cards.trng-cards--slider {
    overflow-x: auto !important;
    overflow-y: visible;
    padding: 16px var(--site-gutter) 60px;
    margin-bottom: -40px;
}

.trng-section .trng-card {
    transition:
        box-shadow var(--card-hover-duration) ease,
        border-color var(--card-hover-duration) ease;
}

.trng-section .trng-card:hover {
    overflow: hidden !important;
    z-index: 3;
    border-color: transparent;
    box-shadow: var(--card-hover-shadow) !important;
}

/* Impact events list — room for card shadow */
.impact-events-list,
.col-lg-9:has(.impact-event-feature-card) {
    overflow: visible;
}

.impact-event-feature-card {
    transition:
        box-shadow var(--card-hover-duration) ease,
        border-color var(--card-hover-duration) ease;
}

.impact-event-feature-card:hover {
    overflow: hidden !important;
    z-index: 2;
}

.rih-article:hover {
    background: #ffffff !important;
}

/* Internship page — grid spacing for card shadows */
.int-objectives-grid,
.int-benefits-grid,
.int-eligibility-panels {
    overflow: visible;
    padding: 12px 8px;
    margin: -12px -8px;
}

.int-benefit-card,
.int-objective-card,
.int-eligibility-panel,
.int-contact-card {
    border-radius: var(--card-hover-radius, 15px);
}

/* Internship — info panels: no card hover */
.int-key-info,
.int-support-block.bg-int-block {
    transition: none;
}

.int-key-info:hover,
.int-support-block.bg-int-block:hover {
    box-shadow: none !important;
    transform: none !important;
}

.int-roles-panel {
    transition: none;
}

.int-roles-panel:hover {
    box-shadow: 0 12px 40px rgba(26, 43, 72, 0.08) !important;
    transform: none !important;
}

/* School Management Committee — room for card shadow */
.smc-section .smc-grid {
    overflow: visible;
    padding: 12px 8px;
    margin: -12px -8px;
}

.smc-section .smc-grid>[class*="col-"] {
    overflow: visible;
}

a.smc-card--link:hover {
    overflow: hidden !important;
    z-index: 2;
    box-shadow: var(--card-hover-shadow) !important;
}

/* Our Staff — room for card shadows */
.staff-group-members .row {
    overflow: visible;
    padding: 12px 8px;
    margin: -12px -8px;
}

.staff-member-col {
    overflow: visible;
}

a.staff-member--link:hover {
    overflow: hidden !important;
    z-index: 2;
    background-color: #ffffff;
    box-shadow: var(--card-hover-shadow) !important;
}

/* MPH page — room for card shadows (stats, cohort, alumni) */
.education-container .row.g-3:has(.edu-count-inner),
.education-container .row.g-4:has(.cohort-card),
.mph-alumni-section .row.g-4 {
    overflow: visible;
    padding: 12px 8px;
    margin: -12px -8px;
}

.education-container .row.g-3:has(.edu-count-inner)>[class*="col-"],
.education-container .row.g-4:has(.cohort-card)>[class*="col-"],
.mph-alumni-section .row.g-4>[class*="col-"] {
    overflow: visible;
}

/* MEP page — room for card shadows (overview grid, stats, gallery) */
.overview-grid-row,
.education-container .row:has(.count-card),
.mempten-section .row.g-3:has(.gallery-card) {
    overflow: visible;
    padding: 12px 8px;
    margin: -12px -8px;
}

.overview-grid-row>[class*="col-"],
.education-container .row:has(.count-card)>[class*="col-"],
.mempten-section .row.g-3:has(.gallery-card)>[class*="col-"] {
    overflow: visible;
}

/* Exchange program — room for card shadows */
.exchange-partners-grid {
    overflow: visible;
    padding: 12px 8px;
    margin: -12px -8px;
}

.exchange-testimonials-carousel-wrap {
    overflow: visible;
}

.exchange-testimonials-track {
    padding-top: 16px;
    padding-bottom: 16px;
}

/* Alumni page — room for card shadows */
/* .alumni-leaders-grid,
.alumni-engage-grid {
    overflow: visible;
    padding: 12px 8px;
    margin: -12px -8px;
} */

/* ---- Image wrappers: clip zoom + border-radius ---- */

/* Top-of-card images */
.edu-card-img,
.trng-card-img,
.rc-card-v-img,
.smc-card-img-wrap,
.cohort-img-wrap,
.alumni-img-wrap,
.exchange-partner-card-img,
.exchange-testimonial-card-img,
.mep-news-card-image-link,
.mep-featured-story-media,
.mep-webinar-media,
.impact-engagement-media,
.pub-card-img,
.pub-card-thumb,
.gallery-card .img-placeholder {
    border-radius: var(--card-hover-radius) var(--card-hover-radius) 0 0 !important;
}

/* Horizontal / inset images (left or thumbnail) */
.rc-card-h-img {
    border-radius: var(--card-hover-radius) 0 0 var(--card-hover-radius) !important;
}

.impact-event-feature-image-link,
.rih-article-thumb,
.overview-grid-item,
.pd-article-img,
.ed-related-thumb,
.rb-related-thumb {
    border-radius: var(--card-hover-radius) !important;
}

.impact-engagement-media,
.mep-news-card-image-link,
.mep-featured-story-media,
.mep-webinar-media,
.tr-course-thumb,
.utd-related-thumb,
.ev-people-photo,
.collab-feature-image,
.impact-event-feature-image-link,
.cohort-img-wrap,
.alumni-img-wrap,
.exchange-partner-card-img,
.exchange-testimonial-card-img,
.staff-member-avatar,
.sd-media-thumb,
.pi-media-thumb,
.mep-document-card-image-wrap,
.irb-team-card-img,
.pub-card-img,
.pub-card-thumb,
.rph-card-img,
.edu-card-img,
.trng-card-img,
.rc-card-h-img,
.rc-card-v-img,
.smc-card-img-wrap,
.overview-grid-item,
.gallery-card .img-placeholder,
.rih-article-thumb,
.ed-related-thumb,
.rb-related-thumb,
.pd-article-img {
    overflow: hidden !important;
    isolation: isolate;
}

.int-about-figure {
    overflow: hidden !important;
    isolation: isolate;
    border-radius: var(--card-hover-radius) !important;
}

/* Zoom layers inherit frame radius */
.edu-card-img::before,
.trng-card-img::before,
.rc-card-h-img::before,
.rc-card-v-img::before,
.rph-card-img::before,
.pub-card-img::before {
    border-radius: inherit;
}

/* ---- Image zoom: <img> elements ---- */

.impact-engagement-image,
.mep-news-card-image,
.mep-featured-story-image,
.mep-webinar-image,
.gallery-card img,
.overview-grid-img,
.tr-course-thumb img,
.pub-card-thumb img,
.utd-related-thumb img,
.ev-people-photo img,
.collab-feature-image img,
.impact-event-feature-image,
.rih-article-thumb-img,
.cohort-img,
.alumni-img,
.funder-card-img,
.smc-card-img,
.mep-document-card-image,
.irb-team-card-photo,
.pi-media-thumb img,
.sd-media-thumb img,
.ed-related-thumb img,
.rb-related-thumb img,
.pd-article-img-src,
.int-about-figure img,
.exchange-partner-card img,
.exchange-testimonial-card img,
.staff-member-avatar img {
    transition: transform var(--card-hover-duration) var(--card-hover-ease);
}

.impact-engagement-card:hover .impact-engagement-image,
.mep-news-card:hover .mep-news-card-image,
.mep-featured-story-card:hover .mep-featured-story-image,
.mep-webinar-card:hover .mep-webinar-image,
.gallery-card:hover img,
.overview-grid-item:hover .overview-grid-img,
.tr-course-card:hover .tr-course-thumb img,
.pub-card:has(.pub-card-thumb):hover .pub-card-thumb img,
.utd-related-card:hover .utd-related-thumb img,
.ev-people-card:hover .ev-people-photo img,
.collab-feature-card:hover .collab-feature-image img,
.impact-event-feature-card:hover .impact-event-feature-image,
.impact-event-feature-image-link:hover .impact-event-feature-image,
.rih-article:hover .rih-article-thumb-img,
.cohort-card:hover .cohort-img,
.alumni-card:hover .cohort-img,
.alumni-card:hover .alumni-img,
.funder-card:hover .funder-card-img,
.smc-card:hover .smc-card-img,
.mep-document-card:hover .mep-document-card-image,
.irb-team-card:hover .irb-team-card-photo,
.pi-media-card:hover .pi-media-thumb img,
.sd-media-card:hover .sd-media-thumb img,
.ed-related-item:hover .ed-related-thumb img,
.rb-related-item:hover .rb-related-thumb img,
.pd-article:hover .pd-article-img-src,
.int-about-figure:hover img,
.exchange-partner-card:hover img,
.exchange-testimonial-card:hover img,
.staff-member:hover .staff-member-avatar img {
    transform: scale(var(--card-hover-zoom));
}

/* ---- Image zoom: background-image panels ---- */

.rph-card-img::before,
.pub-card-img::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: inherit;
    background-position: inherit;
    background-repeat: inherit;
    transition: transform var(--card-hover-duration) var(--card-hover-ease);
    z-index: 0;
    border-radius: inherit;
}

.rph-card:hover .rph-card-img::before,
.pub-card:has(.pub-card-img):hover .pub-card-img::before {
    transform: scale(var(--card-hover-zoom));
}

.rph-card-img .rph-badge,
.pub-card-img .pub-cat-badge,
.pub-card-img::after,
.impact-event-feature-badge {
    z-index: 1;
}