/* =========================================================
   SVHMC
   DEPARTMENT DETAIL PAGE
   ========================================================= */

.department-page {
    background: #f4f8fa;
    color: #263f50;
}

.department-page .wrap {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
}


/* =========================================================
   TOP BANNER
   ========================================================= */

.department-hero {
    min-height: 250px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-inner {
    padding-top: 38px;
    padding-bottom: 43px;
}


/* BREADCRUMB */

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 17px;

    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.breadcrumbs a {
    color: #ffffff;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    opacity: 0.65;
}

.breadcrumbs strong {
    font-weight: 500;
}


/* BANNER TITLE */

.department-hero h1 {
    margin: 0;

    color: #ffffff;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 37px;
    line-height: 1.12;
    font-weight: 700;

    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.department-hero p {
    margin: 11px 0 0;

    color: #ffffff;

    font-size: 17px;
    line-height: 1.45;
}


/* =========================================================
   MAIN PAGE
   ========================================================= */

.department-main {
    padding: 20px 0 54px;
}

.department-layout {
    display: grid;

    grid-template-columns: 270px minmax(0, 1fr);

    gap: 16px;

    align-items: start;
}


/* =========================================================
   COMMON CARDS
   ========================================================= */

.sidebar-card,
.content-card,
.faculty-section {
    background: #ffffff;

    border: 1px solid #dce6ec;
    border-radius: 5px;

    box-shadow: 0 2px 8px rgba(17, 66, 95, 0.025);
}


/* =========================================================
   LEFT DEPARTMENT SIDEBAR
   ========================================================= */

.sidebar-card {
    overflow: hidden;
}

.sidebar-card h2 {
    margin: 0;

    padding: 17px 16px 13px;

    color: #073f68;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 700;

    border-bottom: 1px solid #e5edf1;
}


.department-list {
    display: flex;
    flex-direction: column;

    padding: 0 5px 10px;
}


.department-list a {
    min-height: 40px;

    padding: 10px 13px;

    border-bottom: 1px solid #e6edf1;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    color: #164a6b;

    text-decoration: none;

    font-size: 13px;
}


.department-list a:last-child {
    border-bottom: 0;
}


.department-list a:hover {
    background: #f4f9fc;
}


.department-list a.active {
    margin-left: -5px;

    padding-left: 18px;

    background: #e4f3fb;

    border-left: 4px solid #087dc2;

    color: #073f68;

    font-weight: 700;
}


.department-list b {
    color: #56809a;

    font-size: 18px;
    font-weight: 400;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.department-content {
    min-width: 0;
}


.content-card {
    position: relative;

    padding: 18px 17px;

    margin-bottom: 13px;
}


/* PRINT / SHARE */

.content-tools {
    position: absolute;

    top: 11px;
    right: 13px;

    display: flex;

    gap: 12px;
}


.content-tools button {
    padding: 3px;

    border: 0;

    background: transparent;

    color: #0878b8;

    cursor: pointer;

    font-size: 12px;
}


.content-tools button:hover {
    text-decoration: underline;
}


/* =========================================================
   ABOUT DEPARTMENT
   ========================================================= */

.about-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.4fr)
        minmax(300px, 0.92fr);

    gap: 30px;

    align-items: start;
}


.about-grid.no-feature-image {
    grid-template-columns: 1fr;
}


.about-copy h2 {
    margin: 0 0 10px;

    color: #073f68;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 23px;
    font-weight: 700;
}


.department-description {
    padding-right: 5px;

    color: #344d5d;

    font-size: 14px;
    line-height: 1.65;
}


/* =========================================================
   DEPARTMENT PHOTO

   IMPORTANT:
   This is NOT the top banner image.
   Only separately uploaded department/gallery images
   appear here.
   ========================================================= */

.feature-image {
    position: relative;

    margin: 20px 0 0;
}


.feature-image img {
    display: block;

    width: 100%;
    height: 210px;

    object-fit: cover;

    border-radius: 5px;
}


.feature-image figcaption {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    padding: 24px 12px 9px;

    color: #ffffff;

    font-size: 12px;

    background:
        linear-gradient(
            transparent,
            rgba(0, 0, 0, 0.78)
        );

    border-radius: 0 0 5px 5px;
}


/* =========================================================
   ADDITIONAL DEPARTMENT IMAGES
   ========================================================= */

.approved-gallery {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    margin-top: 20px;

    padding-top: 16px;

    border-top: 1px solid #e5edf1;
}


.approved-gallery figure {
    margin: 0;
}


.approved-gallery img {
    display: block;

    width: 100%;
    height: 150px;

    object-fit: cover;

    border-radius: 4px;
}


.approved-gallery figcaption {
    margin-top: 5px;

    color: #6e8390;

    font-size: 11px;
}


/* =========================================================
   FACULTY MEMBERS
   ========================================================= */

.faculty-section {
    padding: 14px 16px 16px;

    margin-top: 14px;

    overflow: hidden;
}


/* FACULTY TITLE ROW */

.faculty-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 11px;
}


.faculty-heading h2 {
    margin: 0;

    color: #073f68;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 22px;

    line-height: 1.2;

    font-weight: 700;
}


.faculty-heading-actions {
    display: flex;

    align-items: center;

    gap: 14px;
}


/* VIEW ALL */

.view-all-faculty {
    color: #0785cc;

    font-size: 13px;

    text-decoration: none;

    white-space: nowrap;
}


.view-all-faculty span {
    margin-left: 5px;

    font-size: 18px;
}


.view-all-faculty:hover {
    text-decoration: underline;
}


/* =========================================================
   FACULTY ARROWS
   ========================================================= */

.faculty-arrows {
    display: flex;

    gap: 5px;
}


.faculty-arrow {
    width: 29px;
    height: 29px;

    border: 1px solid #cddfe8;

    border-radius: 50%;

    background: #ffffff;

    color: #0878b8;

    cursor: pointer;

    font-size: 21px;

    line-height: 25px;
}


.faculty-arrow:hover {
    background: #edf7fc;
}


/* =========================================================
   FACULTY HORIZONTAL SCROLLER

   Exactly 4 faculty visible on desktop.
   Faculty 5 onwards scroll horizontally.
   ========================================================= */

.faculty-grid {
    display: flex;

    gap: 16px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;

    scroll-snap-type: x mandatory;

    scrollbar-width: thin;

    scrollbar-color:
        #9ebdce
        #edf3f6;

    padding-bottom: 8px;
}


/* CHROME / EDGE SCROLLBAR */

.faculty-grid::-webkit-scrollbar {
    height: 6px;
}


.faculty-grid::-webkit-scrollbar-track {
    background: #edf3f6;

    border-radius: 10px;
}


.faculty-grid::-webkit-scrollbar-thumb {
    background: #9ebdce;

    border-radius: 10px;
}


/* =========================================================
   FACULTY CARD

   Four cards exactly across available width.
   ========================================================= */

.faculty-card {
    flex:
        0 0
        calc((100% - 48px) / 4);

    min-width: 0;

    background: #ffffff;

    border: 1px solid #dbe6ec;

    border-radius: 5px;

    overflow: hidden;

    scroll-snap-align: start;
}


/* =========================================================
   FACULTY PHOTO

   Ratio matched to approved reference.
   ========================================================= */

.faculty-photo {
    height: 145px;

    background: #f1f6f8;

    display: flex;

    align-items: flex-start;
    justify-content: center;

    overflow: hidden;
}


.faculty-photo img {
    display: block;

    width: auto;

    max-width: 100%;

    height: 145px;

    object-fit: contain;

    object-position: center top;
}


/* NO PHOTO */

.faculty-placeholder {
    width: 100%;

    height: 145px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #e9f4fa;

    color: #0878b8;

    font-size: 42px;

    font-weight: 700;
}


/* =========================================================
   FACULTY TEXT

   Proportions matched to approved reference.
   ========================================================= */

.faculty-details {
    padding: 11px 13px 12px;
}


.faculty-details h3 {
    margin: 0 0 7px;

    color: #073f68;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 14px;

    line-height: 1.25;

    font-weight: 700;
}


.faculty-designation {
    margin-bottom: 6px;

    color: #344b59;

    font-size: 12px;

    line-height: 1.3;

    font-weight: 400;
}


.faculty-qualification {
    color: #687a85;

    font-size: 11.5px;

    line-height: 1.3;

    font-weight: 400;
}


/* =========================================================
   EMPTY DEPARTMENT
   ========================================================= */

.empty-department {
    padding: 70px 0;
}


.empty-department h1 {
    color: #073f68;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 30px;

    font-weight: 700;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {

    .department-layout {
        grid-template-columns:
            220px
            minmax(0, 1fr);
    }


    .about-grid {
        grid-template-columns: 1fr;
    }


    .feature-image {
        margin-top: 5px;
    }


    /*
       Show approximately 2.5 faculty cards.
       This indicates visually that horizontal scrolling
       is available.
    */

    .faculty-card {
        flex:
            0 0
            calc((100% - 24px) / 2.5);
    }

}


/* =========================================================
   SMALL TABLET
   ========================================================= */

@media (max-width: 760px) {

    .department-page .wrap {
        padding-left: 18px;
        padding-right: 18px;
    }


    .department-layout {
        grid-template-columns: 1fr;
    }


    .department-list {
        display: grid;

        grid-template-columns:
            repeat(2, 1fr);
    }


    .department-list a {
        border: 1px solid #e5edf1;

        margin:
            -1px
            0
            0
            -1px;
    }


    .department-list a.active {
        margin:
            -1px
            0
            0
            -1px;
    }


    .department-hero {
        min-height: 220px;
    }


    .department-hero h1 {
        font-size: 31px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .faculty-heading {
        align-items: flex-start;
    }


    .faculty-heading-actions {
        gap: 7px;
    }


    /*
       Mobile uses swipe scrolling.
       Hide arrow buttons.
    */

    .faculty-arrows {
        display: none;
    }


    /*
       Show one complete card and part of next card.
       This makes scrolling obvious.
    */

    .faculty-card {
        flex: 0 0 82%;
    }


    .faculty-photo {
        height: 145px;
    }


    .faculty-photo img {
        height: 145px;
    }


    .faculty-placeholder {
        height: 145px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 520px) {

    .department-list,
    .approved-gallery {
        grid-template-columns: 1fr;
    }


    .content-tools {
        position: static;

        justify-content: flex-end;

        margin-bottom: 8px;
    }


    .feature-image img {
        height: 190px;
    }

}


/* =========================================================
   PRINT
   ========================================================= */

@media print {

    .site-header,
    .topbar,
    .department-sidebar,
    .content-tools,
    .faculty-arrows,
    footer {
        display: none !important;
    }


    .department-layout {
        display: block;
    }


    .department-main {
        padding: 0;
    }


    .content-card,
    .faculty-section {
        border: 0;

        box-shadow: none;
    }


    .faculty-grid {
        display: grid;

        grid-template-columns:
            repeat(4, 1fr);

        overflow: visible;
    }


    .faculty-card {
        width: auto;
    }

}