/*
 *
 * City University of Hong Kong
 * ----------------------------
 * Site Specific CSS
 *
 */

/* ============================ Place your custom CSS here */

/* === Fixed header on mobile === */

body.cityu-offcanvas-open {
    position: static;
    overflow: hidden;
  }

@media (max-width: 991px) {
    .cityu-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    background-color: #fff;
    z-index: 1010;
    }

    .cityu-menu{
    position: fixed;
    z-index: 1020;
    }

    nav.cityu-menu + * {
        padding-top: 70px;
    }

}

/* === Common styles === */

.cityu-content {
    line-height: 1.75rem;
}

.polygon-background {
    padding: 2.5rem 0 3rem 0;
    clip-path: polygon(0% 0%, 100% 20%, 100% 80%, 0% 100%);
    background-color: #f8f9fa;
    background: linear-gradient(225deg, #f8f9fa 0%, #dee2e6 100%);
}

.all-lists li{
    margin-bottom: 1rem !important;
}

.g-25-4 {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
}

/* Reset to g-4 for sm and larger */
@media (min-width: 576px) {
    .g-25-4 {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.5rem;
    }
}

.g-25-3 {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
}

/* Reset to g-3 for sm and larger */
@media (min-width: 576px) {
    .g-25-3 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
}

.link-scroll-margin{
    scroll-margin-top: 20px;
}

@media (min-width: 992px) {
    .link-scroll-margin{
        scroll-margin-top: 60px;
    }
}

.btn-cityu-outline{
    color: rgb(33, 37, 41);
    border: .667px solid rgb(222, 226, 230);
    outline: none;
}

.btn-cityu-outline:focus{
    color: rgb(33, 37, 41);
    border: .667px solid rgb(222, 226, 230);
    outline: 2px solid black;
}

.btn-cityu-outline:hover{
    color:#bf165e;
    border: .667px solid #bf165e;
    outline: none;
}

.image-cityu-outline:hover,
.image-cityu-outline:focus{
    outline: .667px solid #bf165e;
}

.ratio-3x4{
    --bs-aspect-ratio: calc(4 / 3 * 100%);
}

/* === PhotoSwipe caption customization for gallery and artworks === */

.pswp__gallery-custom-caption {
    background: rgba(0, 0, 0, 0.75);
    font-size: 1rem;
    color: #fff;
    width: calc(100% - 32px);
    max-width: 800px;
    padding: 1rem;
    border-radius: .375rem !important;
    position: absolute;
    left: 50%;
    bottom: 1rem;
    text-align: center;
    transform: translateX(-50%);
}

/* === Artwork styles === */

.pswp__artwork-custom-caption {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    max-width: 800px;
    padding: 1rem;
    border-radius: .375rem !important;
    position: absolute;
    left: calc(50vw + 250px);
    bottom: 50%;
    transform: translateX(-50%) translateY(+50%);
}

@media (max-width: 991px) {
    .pswp__artwork-custom-caption {
        width: calc(100% - 32px);
        left: 50%;
        bottom: 1rem;
        transform: translateX(-50%);
    }
}

.artwork-link{
    color: #df7433;
    text-decoration: none;
}

.artwork-link:hover{
    color: #da562b;
}

.artwork-expand{
    position: relative;
    max-height: 350px;
    transition: max-height 0.3s ease-in-out;
    overflow: hidden;
}

.artwork-cover-gradient{
    position: absolute;
    padding: 0 !important;
    margin: 0 !important;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    min-height: 50px;
    transition: min-height 0.3s ease-in-out;
}

.artwork-cover-gradient.expanded{
    min-height: 0px;
}

.artwork-expand.expanded{
    max-height: 2500px;
}

/* === News panel expand/collapse styles === */

.news-year-heading{
    background-color: white;
    transition: background-color 0.1s ease-in-out;
}

.news-year-heading:hover{
    background-color: #f8f9fa;
    
}

.news-year-highlight{
    background-image: linear-gradient(to right,#df7433 0,#da562b 35%,#cc103c 80%,#9f0d43 100%);
    height: 5px;
    width: 0%;
    transition: width 0.3s ease-in-out;
}

.news-year-highlight.expanded{
    width: 100%;
}

.news-panel{
    max-height: 0px;
    transition: max-height 0.3s cubic-bezier(1, 0, 0, 1);
    overflow: hidden;
}

.news-panel.expanded{
    max-height: 20000px;
}

.news-chevron{
    transition: transform 0.3s ease-in-out;
}

.news-chevron.expanded{
    transform: rotate(-180deg);
}