/* ==========================================================================
   Governing body / teacher sliders and the public staff profile page.
   The cards keep the theme's own `bio-box` design - only the photo shape
   changes: round for teachers, square for governing body members.
   ========================================================================== */

.staff-section {
    padding: 60px 0;
    background-color: #f6f7f9;
    background-size: cover;
    background-position: center center;
}

.staff-section + .staff-section {
    border-top: 1px solid rgba(0, 0, 0, .06);
}

.staff-section .sec-title {
    margin-bottom: 34px;
}

/* custom.js caps every card at the narrowest slot; centre it in a wider one */
.staff-section .bio-box {
    margin-left: auto;
    margin-right: auto;
}

/* `staff-cards` carries the card treatment so the teachers page can share it
   without the section chrome above. */
.staff-cards .bio-box .dlab-media {
    overflow: hidden;
}

.staff-cards .bio-box .dlab-media img {
    display: block;
    width: 100%;
    height: 100%;
    /* the theme caps .img-fluid at 300px, which would leave a sliver of the
       masked box showing under the photo */
    max-height: none;
    object-fit: cover;
    object-position: top;
}

/* Square the masked box first - that is the element the radius is applied to,
   so a 50% radius on it is a true circle rather than a slight ellipse. */
.staff-circle .bio-box .dlab-media {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

.staff-rectangle .bio-box .dlab-media {
    border-radius: var(--thm-radius);
}

/* The theme pins grid cards to min-height: 470px, sized for its original
   full-height portraits. With the square-cropped photo that leaves ~80px of
   dead space under the name plate, so let the card hug its content. */
ul#doctors-grid.staff-cards.grid > li > .bio-box {
    min-height: 0;
}

/* The theme's hover overlay sits over the middle of the photo and swallowed the
   click, so the photo link never fired. Let clicks pass through it; its own
   social icons keep theirs. */
.staff-cards .bio-box .profile-img .overlay,
.staff-cards .bio-box .dlab-media:after {
    /* the dark wash only becomes hit-testable on hover, which is exactly when
       someone is about to click the photo */
    pointer-events: none;
}

.staff-cards .bio-box .profile-img .overlay a {
    pointer-events: auto;
}

/* the anchor fills the masked box so the whole photo is the target */
.staff-cards .bio-box .dlab-media > a {
    display: block;
    width: 100%;
    height: 100%;
}

.staff-cards .bio-box .txt-holder h5 a {
    color: inherit;
}

.staff-cards .bio-box .txt-holder h5 a:hover {
    color: var(--thm-primary);
}

/* Fewer members than the row holds: centre the stage rather than leaving a
   gap on the right. custom.js adds the class after measuring. */
.staff-carousel.is-centered .owl-stage {
    margin-left: auto;
    margin-right: auto;
}

.staff-carousel.is-centered .owl-nav {
    display: none;
}

.staff-carousel .owl-dots {
    margin-top: 10px;
    text-align: center;
}

.staff-carousel .owl-dots .owl-dot span {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin: 0 4px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, .2);
}

.staff-carousel .owl-dots .owl-dot.active span {
    width: 22px;
    border-radius: 6px;
    background-color: var(--thm-primary);
}

.staff-carousel .owl-nav button.owl-prev,
.staff-carousel .owl-nav button.owl-next {
    position: absolute;
    top: 38%;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff !important;
    background-color: var(--thm-primary) !important;
    opacity: 0;
    transition: opacity .3s ease;
}

.staff-section:hover .staff-carousel .owl-nav button.owl-prev,
.staff-section:hover .staff-carousel .owl-nav button.owl-next {
    opacity: 1;
}

.staff-carousel .owl-nav button.owl-prev { left: -16px; }
.staff-carousel .owl-nav button.owl-next { right: -16px; }


/* Profile page ----------------------------------------------------------- */

.staff-profile {
    align-items: flex-start;
}

.staff-profile-photo {
    overflow: hidden;
    border: 4px solid var(--thm-primary);
    border-radius: 50%;
    max-width: 300px;
    margin: 0 auto;
}

.staff-profile-photo.is-square {
    border-radius: var(--thm-radius);
}

.staff-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-profile-social {
    margin: 18px 0 0;
    text-align: center;
}

.staff-profile-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #fff;
    border-radius: 50%;
    background-color: var(--thm-primary);
}

.staff-profile-social a:hover {
    background-color: var(--thm-hover);
}

.staff-profile-name {
    margin: 0 0 4px;
    color: var(--thm-text);
    font-size: 26px;
    font-weight: 700;
}

.staff-profile-role {
    margin-bottom: 20px;
    color: var(--thm-primary);
    font-size: 16px;
    font-weight: 600;
}

.staff-profile-table th {
    width: 220px;
    color: var(--thm-text);
    font-weight: 600;
}

.staff-profile-table th,
.staff-profile-table td {
    padding: 11px 14px;
    color: var(--thm-secondary-text);
    border-top: 1px solid #eee;
    vertical-align: top;
}

@media (max-width: 767.98px) {
    .staff-profile-photo {
        max-width: 220px;
        margin-bottom: 22px;
    }
    .staff-profile-table th {
        width: 45%;
    }
}
