* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Kanit", sans-serif;
}

:root {
    --white: #fff;
    --white-567: #F5F6F7;
    --blue: #002DEB;
    --red: #ED1C24;
    --padding-top-banner: 2rem;
    --text-white: #FFFFFF;
    --text-black: #000000;
    --text-blue: #002DEB;
    --text-blue-header: #323463;
    --text-red: #ED1C24;
    --text-sub-blue: #AFEBFF;
    --text-sub-black: #777777;
}

.header-banner {
    height: max-content;
    padding: 16ch 0;
    background-color: var(--white-567);
    padding-top: calc(var(--padding-top-banner) + 120px - (var(--padding-top-banner) * 2 / 3) + 16ch);
}

.header-banner h1, .header-banner h2 {
    color: var(--text-blue);
    font-family: "Kanit", sans-serif;
}

.header-banner  h1 {
    font-size: 1.5rem !important;
}

.header-banner  h2 {
    font-weight: 700 !important;
    font-size: max(5vw, 2rem) !important;

}

.title-header {
    /* width: 100%; */
}

.title-header h2 {
    width: max-content;
    font-size: 3.5rem;
    font-weight: 500;
}

.title-header-underline {
    width: 70%;
    height: 6px;
    margin-top: 5px;
    border-radius: 2px;
    background-color: var(--red);
}

.video-box {
    width: 100%;
}

.video-card {
    display: flex;
    flex-direction: column;
}

.video-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.video-card h3 {
    font-family: "Kanit", sans-serif;
    color: var(--text-blue-header);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.video-card .detail {
    margin-top: 2rem;
}

.detail span {
    font-family: "Kanit", sans-serif;
    font-weight: 400;
    display: flex;
    flex-direction: column;
}

.detail span:first-child {
    color: var(--text-red);
    font-size: 1rem;
}

.detail span:last-child {
    color: var(--text-blue-header);
    font-size: calc(1rem - 1px);
}

/* #gallery {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url(../img/resources/banner-gallery.png) no-repeat center center; 
    background-size: cover;
    width: 100%;
    min-height: 400px;
    transition: all 1s ease-in-out;
} */

#gallery {
    background:
        linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
        url(../img/resources/banner-gallery.png) no-repeat top center;

    background-size: cover;
    background-attachment: scroll;

    width: 100%;
    min-height: 400px;
    transition: all 0.2s ease-in-out;
}

#gallery .title-header h2 {
    color: var(--text-white);
}

.gallery-card {
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);

}


.gallery-card:hover, .gallery-card:focus {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
    

}
.gallery-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center top;
    border-radius: 1rem 1rem 0 0;
}

.gallery-card.more {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;

    opacity: 0;
    transform: translateY(-20px);
    clip-path: inset(0 0 100% 0);
    overflow: hidden;

    transition:
        max-height 0.8s ease,
        opacity 0.5s ease,
        transform 0.5s ease,
        clip-path 0.8s ease;
}

.gallery-card.more.show {
    max-height: 1000px;

    padding-top: inherit;
    padding-bottom: inherit;
    margin-top: 1.5rem;
    margin-bottom: inherit;

    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
}

.card-folder {
    padding: 0.5rem 0.5rem;
    background-color: var(--white);
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.card-folder h3 {   
    margin-top: 0.3rem;
    font-size: 1rem;
    /* line-height: 1.5; */

    /* display: -webkit-box; */
    /* -webkit-box-orient: vertical; */
    /* -webkit-line-clamp: 2; */
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    overflow-wrap: break-word;
    line-break: loose;
    hyphens: none;

    font-weight: 400;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    text-overflow: clip;
}

.card-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.image-circle {
    display: flex;  
}

.image-circle img {
    --square-size: 34px;
    height: var(--square-size);
    width: var(--square-size);
    border-radius: 50%;
    border: 2px solid #fff;
}

.image-circle img:not(:first-child){
    margin-left: -20px;
}

.meta {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-sub-black);
    font-size: 1rem;
}

.mask {
    -webkit-mask-image: url(../img/resources/folder.svg);
    mask-image: url(../img/resources/folder.svg);
    mask-size: cover;
    -webkit-mask-size: cover;
    margin-top: -10%;
}

.display-none {
    display: none;
}

.gallery-btn {
    display: flex;
    padding: 6rem 0;    
    justify-content: center;
    align-items: center;
    margin: 0;
}

.gallery-btn a {
    color: var(--text-white);
    font-size: 1.5rem;
    border: 1px solid var(--white);
    padding: 0.5rem 1.5rem;
    display: none;
    transition: all 0.2s ease-in-out;
}

.gallery-btn a:hover, .gallery-btn a:focus {
    background-color: var(--white);
    color: var(--text-black);
}

.gallery-btn a.active {
    display: block;
}

.sub-title-header-underline {
    width: 100%;
    height: 6px;
    margin-top: 5px;
    border-radius: 2px;
    background-color: var(--red);
}

.sub-title-header {
    font-size: 3rem;
}

.document-card {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    height: max-content;
}

.document-card img {
    padding: 0 3rem;
}

.document-card h4 {
    font-size: 24px;
    text-align: center;
    color: var(--text-blue-header);
}

.document-box a {
    width: max-content;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    border: 1.2px solid rgba(28, 80, 176, 0.361);
    color: #282650;
    transition: all 0.2s ease-in-out;
}

.document-box a:hover, .document-box a:focus {
    background-color: #282650;
    color: #FFF;
}

@media screen and (max-width: 1400px) {
    .title-header h2 {
        font-size: 3rem;
    }
}

@media screen and (max-width:1366px) {
    .header-banner {
        padding-top: calc(var(--padding-top-banner) + 90px - (var(--padding-top-banner) * 2 / 3) + 16ch);
    }

}

@media screen and (max-width: 1199px) {
    :root {
        --padding-top-banner: 1rem;
    }
    .header-banner {
        padding-top: calc(var(--padding-top-banner) + 70px - (var(--padding-top-banner) * 2 / 3) + 16ch);
    }
}

@media screen and (max-width:1024px) {
    .header-banner {
        padding-top: calc(var(--padding-top-banner) + 75px - (var(--padding-top-banner) * 2 / 3) + 16ch);
    }
    .title-header h2 {
        font-size: 2rem;
    }
}

@media screen and (max-width: 991px) {
    #gallery {
        background: #000000;
    }

    .card-folder h3 {
        font-size: max(1rem, calc(2.25vw + 0.01px));
    }

    .image-circle img {
        --square-size: 36px;
    }
}

@media screen and (max-width: 767px) {
    .card-folder h3 {
        font-size: max(1rem, calc(3.5vw + 0.01px));
    }

    .image-circle img {
        --square-size: max(36px, calc(7vw + 0.01px));
    }

    .meta {
        font-size: max(1rem, calc(3.5vw + 0.01px));
    }
}

@media screen and (max-width: 576px) {
    .title-header h2 {
        font-size: 1.5rem;
    }
}