/*
Theme Name: NYCU-IPH-Web
Theme URI: 
Description: IPH web theme.
Author: Yuxin
Author URI: 
Version: 1.0
Tags: white, two-columns
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/


/*reset the style of css*/
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

/*initialize*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/*@media screen and (min-width: 701px) {
    li li,
    li p,
    li span,
    li p span,
    p span {
        font-size: 1em
    }
    /* 歸零 */
    /* * {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 1em;
        margin: 0;
        padding: 0;
        -webkit-font-smoothing: antialiased;
    }
    body {
        overflow: hidden;
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 100%;
        margin: 0;
        padding: 0;
        -webkit-font-smoothing: antialiased;
    }
    img {
        border: none;
    }
    a {
        font-family: 'Noto Sans TC', sans-serif;
        text-decoration: none;
        color: #646464;
    }
    .clear_both {
        clear: both;
    }
*/
/***header***/
html{
    margin: 0 !important;
    padding: 0;
    border: 0;
}

body {
    background: #2e4565;
    font-family: 'Noto Sans TC', sans-serif;
    /*-ms-overflow-style: none;  /* IE and Edge
    scrollbar-width: none;*/  /* Firefox */
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    overflow-x: hidden;
}

/*body::-webkit-scrollbar {
    display: none;
}*/

/*.header {
    position: fixed;
    width: 100%;
    height: 22%;
    background-color: #f2e7ce;
    border-bottom-left-radius: 2rem;
    border-bottom-right-radius: 2rem;
}*/


.web_name{
    min-height: 4.73958333vw;
    color: #374a73;
    font-family: 'Noto Sans TC', sans-serif;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content:space-between;
}
.Name {
    -webkit-text-stroke: 0.3px #2e4565;
    font-family: jf-openhuninn-1.0;
    font-size: 1.458333333vw;
    line-height: 1.719166666vw;
    letter-spacing: .364583333vw;
    text-align: left;
    color: #2e4565;
}
.enName
{
    -webkit-text-stroke: 0.3px #2e4565;
    font-family: jf-openhuninn-1.0;
    font-size: .9375vw;
    line-height: 1.719166666vw;
    letter-spacing: .026041666vw;;
    text-align: left;
    color: #2e4565;
}

#main-nav {
    position: fixed;
    width: 100vw;
    top:0;
    z-index: 999;
    background-color: #e4dfd2;
    border-bottom-left-radius: 2rem;
    border-bottom-right-radius: 2rem;
    box-shadow: 0px 1px 2rem -1rem rgba(0.0,0.0,0.0,0.3);
    transition: 0.3s;
}

#upper-nav {
    display: flex;
    float: left;
    align-items: center;
    /* margin-left: 3.645833333vw;
    margin-top: 1.302083333vw; */
    transform: 0.3s;
}

#nav-toolbar {
    float: right;
    display: flex;
    flex-direction: row;
    align-items: center;
   /* width: 11.30208333vw;
    /* margin-right: 3.64583333vw;
    margin-top: 2.86458333vw; */
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
    transform: translateY(0px);
    min-width: 100px;
}

#nav-toolbar > button{
    border: 0;
    background-color: transparent;
    cursor: pointer;
}

#nav-toolbar.pulldown {
    transform: translateY(calc(50% + 3vw));
    transition: 0.3s;
}
/*
#icon-en{
    width: 5vw;
    height: 2vw;
}*/

#nav-toolbar > div, #nav-toolbar > a {
   /* width: 1.666666vw;
    height: 1.666666vw;*/
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 1vw;
}

li.lang-item > a, #NYCU{
    color: #2e4565;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1.40625vw;
    text-decoration: none;
}

#nav-toolbar div img {
    width: auto;
    height: 100%;
}

.upper-nav-flex {
    display: flex;
    width: 92.7083333vw;
    margin: 0 auto;
    justify-content: space-between;
    padding-top: 1.30208333vw;
}

.nav-item {
    flex-grow: 1;
}


.cf::before,
.cf::after {
    content: " ";
    display: table;
}

.cf:after {
    clear: both;
  }

#logo img{
    width: 15.315vw;
    height: 3.75vw;
}

#logo-small{
    transition: 0.3s;
    width: 5.5vw;
    height: 5.5vw;
    margin-right: 1.5625vw;
    /*border-radius: 1.5vw;
    box-shadow: 2px 2px 6px 0 rgba(255, 111, 0, 0.6);
    background-color: #2e4565;
    text-decoration: none;
    min-width: 3.75vw;*/
    display: none;
}

#logo-small img{
    width: 5.5vw;
    height: 5.5vw;
}

/*#logo > span{
    font-family: jf-openhuninn-1.0;
    font-size: .8333333vw;
    line-height: 1.09416666vw;
    text-align: left;
    color: #e4dfd2;
}

#logo:hover{
    border-radius: 3vw;
}
*/

#nav-hr {
    /*top: 62%;*/
    margin-left: auto;
    margin-right: auto;
    margin-top: 1vw;
    height: 1.5px;
    width: 92.7083333vw;
    min-width: 92.7083333vw;
    background-color: #2e4565;
    transition: 0.3s;
}

.dropdown-menu .visible { 
    opacity: 1;
}

.nav-container{
   width: 100%;
}

#nav-menu {
    min-height: 1.51041666vw;
    align-items: flex-start;
    box-sizing: content-box;
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 1.458333333vw 9.010416666vw;
    transition: 0.3s;
}

#nav-menu.shorten {
    padding: 1.3vw 20vw 1.3vw 10.8333vw;
    transition: 0.3s;
}

#nav-menu.shorten li {
    transform: translateY(0);
    transition: 0.3s;
}

#nav-menu li a{
    z-index: 5;
    margin-right: 5px;
    display: block;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1.14vw;
    letter-spacing: 3px;
    color: #2e4565;
}

#nav-menu li a:hover{
    font-weight: bold;
}

.nav-menu-pullup {
    transform: translateY(-8vw);
}

#logo-small.stay {
    transform: translateY(6vw);
    transition: 0.3s ease-in;;
    display: block;
}

.nav-disappearable {
    transition: 0.3s;
}


.dropdown-menu {
    display: none;
    transition: 0.3s;
    padding-top: 1.5rem;

}

.dropdown-menu ul li a{
    text-decoration: none;
}

.menu-list {
    cursor: pointer;
    display: block;
    text-decoration: none;
}

.dropdown-menu ul li {
    margin-top: 1rem;
    cursor: pointer;
    width: 100%;
    height: 100%;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1rem;
    letter-spacing: 3px;
    color:#2e4565;
    list-style: none;
    text-decoration: none;
    font-weight: 300;
    line-height: 1.5;
}



#slider-section {
    background-color: #2e4565;
    padding-top: 200px;
}

#slider {
    display: grid;
    place-items: center;
    padding: 5.188rem 10.75rem 7.938rem 10.75rem
}

#search_overlay{
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #162a47;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 10;
}

#search_overlay_closebtn{
    cursor: pointer;
    position: relative;
    top: 2.6041vw;
    left: 2.6041vw;
}

#search_request_form{
    width: 34.27vw;
    height: 3.125vw;
    position: relative;
    left: 32.91vw;
    top: 8vw;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-bottom: solid 3px #ffbb00;
}

#yellow_search_btn{
    background-color: transparent;
    cursor: pointer;
    border: 0px;
}

#site_search_keyword{
    width: 70vw;
    border: 0px;
    background-color: transparent;
    margin-left: 2.5vw;
}

input.site_search_input::focus{
    outline: none;
}

input.site_search_input::placeholder{
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1vw;
    font-weight: 500;
    letter-spacing: 2.7px;
    text-align: left;
    color: #ffbb00;
}

input.site_search_input[type=text]{
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1vw;
    font-weight: 500;
    letter-spacing: 2.7px;
    text-align: left;
    color: #ffbb00;
}

.icon_toolbar_hover{
    display: none;
}

#icon-search:hover #site_search{
    display: none;
}

#icon-search:hover #site_search_hover{
    display: block;
}

#icon-calendar:hover #calendar{
    display: none;
}

#icon-calendar:hover #calendar_hover{
    display: block;
}

#icon-alumni_entry:hover #alumni_entry{
    display: none;
}

#icon-alumni_entry:hover #alumni_entry_hover{
    display: block;
}

/* style of search.php*/ 
.result_content{
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    background-color: #e4dfd2;
    position: relative;
}

#search_keyword{
    width: 82vw;
    height: auto;
    margin-left: 9vw;
    margin-right: 9vw;
    margin-bottom: 5vw;
    color: #2e4565;
    font-weight: bold;
    font-size: 3.125vw;
    letter-spacing: 0.2vw;
}

.seared_article{
    margin-top: 15vw;
}

article.article-content{
    width: 82vw;
    height: auto;
    margin: 2vw 9vw;
    padding-bottom: 2vw;
    color: grey;
    letter-spacing: 0.1vw;
    border-bottom: solid 0.15vw #2e4565; 
}

h1.article-title > a{
    color: #4f5ab8;
    text-decoration: none;
    font-size: 1.3vw;
}

h1.article-title{
    margin-bottom: 0.5vw;
}

#searchsubmit{
    background-color: transparent;
    border: none;
    color: transparent;
    padding: 15px 30px;
    text-decoration: none;
    margin: 4px 2px;
    cursor: pointer;
}

.sm-nav-toolbar{
    display: none;
}

#icon-en a{
    position: relative;
    text-decoration: none;
}

#calendar_overlay{
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #162a47;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 10;
}

#calendar_overlay_closebtn{
    cursor: pointer;
    position: relative;
    top: -23vw;
    left: 2.5vw;
}

#calendar_iframe{
    position: relative;
    width: 41.67vw;
    height: 31.25vw;
    top: 10vw;
    left: 25vw;
}

.nav-arrow-down, .nav-arrow {
    display: none;
}

#sm-img-hamburger, #sm-img-esc{
    display: none;
}

@media (max-width:960px) {
    #logo {
        width: 36px;
        height: 36px;
        border-radius: 14.4px;
        margin-right: 15px;
    }

    .web_name{
        min-height: 45.5px;
    }
    .Name {
        font-size: 14px;
        line-height: 16.5px;
        letter-spacing: 3.5px;
    }
    .enName
    {
        font-size: 9px;
        line-height: 16.5px;
        letter-spacing: 0.25px;
    }

    .nav-menu-pullup {
        transform: translateY(-80px);
    }

    #nav-menu.shorten {
        padding: 11.5px 181px 11.5px 104px;
    }

    #nav-toolbar.pulldown {
        transform: translateY(calc(50% + 40px));
    }

    #logo.stay {
        transform: translateY(80px);
    }

    #nav-menu li a{
        font-size: 10px;
    }

    #logo > span{
        font-size: 8px;
        line-height: 10.504px;
    }

    #NYCU{
        font-size: 18px;
    }

    li.lang-item > a{
        font-size: 18px;
    }
}

@media (max-width:700px) {
    #nav-toolbar{
        display: none;
    }

    .sm-nav-toolbar{
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    #sm-nav-toolbar-outer #nav-hamburger {
        display: block;   
        margin-left: 5vw;
    }

    #sm-img-hamburger{
        display: block;
    }

    .sm-nav-open > #sm-img-esc{
        display: block;
    }

    .sm-nav-open > #sm-img-hamburger{
        display: none;
    }

    #sm-nav-toolbar-inner{
        margin-top: 3vw;
    }

    #icon-alumni_entry{
        margin-left: 5vw;
    }

    #nav-hr {
        display: none;
    }

    .nav-container {
        display: none;
    }

    .upper-nav-flex {
        padding-bottom: 1.30208333vw;
    }

    .nav-menu-pullup {
        transform: none;
    }

    #nav-toolbar.pulldown {
        transform: none;
    }

    #logo.stay {
        transform: none;
    }

    .sm-nav-strech .nav-container {
        display: block;
    }

    .sm-nav-strech #nav-menu {
        flex-direction: column;
    }

    .sm-nav-strech #nav-menu li {
        margin-bottom: 2vw;
        position: relative;
    }

    .sm-nav-strech #nav-menu ul li {
        margin-bottom: 0vw;
        width: fit-content;
        margin-right: 5px;
    }

    .menu-list {
        border-bottom: #b5bbbe 1px solid;  
        padding-bottom: 2px;  
        width: fit-content;
    }

    .dropdown-menu {
        padding-top: 0;    
        height: max-content;
    }

    .dropdown-menu ul {
        height: 30px;
        display: flex;
        width: 80vw;
        margin-left: 10px;
        justify-content: flex-start;
        align-items: center;
    }

    #nav-menu.shorten {
        padding: 1.458333333vw 9.010416666vw;
    }

    /*li.lang-item > a{
        font-size: 15px;
    }*/
}

@media (max-width:480px) {
    .enName {
        display: none;
    }

    .web_name {
        justify-content: center;
    }

    .upper-nav-flex {
        height: 77px;
        padding: 0;
    }

    #logo {
        width: 37px;
        height: 37px;
    }

    #logo > span {
        font-size: 9.008px;
    }

    .Name {
        font-size: 15.008px;
    }

    /*#nav-toolbar > #icon-search {
        display: none;
    }

    #nav-toolbar > #icon-calendar {
        display: none;
    }

    #nav-toolbar > #icon-alumni_entry {
        display: none;
    }*/

    .nav-container {
        height: calc(100vh - 77px);
    }

    .sm-nav-strech #nav-menu li {
        width: 100%;
    }

    .menu-list {
        width: 100%;
    }

    #nav-menu li a {
        font-size: 17.008px;
        margin-top: 14.05px;
        padding-bottom: 14.05px;
    }

    /*.sm-nav-strech #icon-en {
        display: none;
    }

    .sm-nav-strech #nav-toolbar > #icon-calendar {
        display: none;
    }

    .sm-nav-strech #nav-toolbar > #icon-alumni_entry {
        display: block;
    }*/

    .nav-arrow-down {
        position: relative;
        width: 3.466vw;
        height: 1.8667vw;
        display: block;
    }

    .nav-arrow {
        z-index: 5;
        cursor: pointer;
        position: absolute;
        top: 14.05px;
        right: 0;
        width: 25px;
        height: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        user-select: none;
        -webkit-user-select: none;
        transform: translateY(-5px);
    }

    .dropdown-menu ul {
        flex-direction: column;
        align-items: flex-start;
        height: max-content;
    }

    .dropdown-menu ul li {
        margin-top: 0;
    }
}

.page-zone p {
	font-family: "Noto Sans TC", sans-serif;
    font-size: 1.1458333vw;
    line-height: 1.82;
    letter-spacing: 0.171875vw;
    text-align: left;
    color: #2e4565;
	padding-bottom: 1rem;
}

/* 1. 強制外層容器不換行 (桌機版) */
.page-zone .wp-block-columns.is-layout-flex {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* 強制不換行 */
    justify-content: space-between !important;
    gap: 20px !important; /* 設定固定間距 */
    align-items: flex-start !important;
	padding-bottom: 1rem;
}

/* 2. 精確計算 50% 寬度 (扣除間距的一半) */
.page-zone .wp-block-columns.is-layout-flex > .wp-block-column {
    /* 這裡的 10px 是 gap 20px 的一半 */
    flex: 0 0 calc(50% - 10px) !important; 
    max-width: calc(50% - 10px) !important;
    box-sizing: border-box !important;
}

/* 3. 確保圖片不會撐破欄位 */
.page-zone .wp-block-column img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* 4. RWD：在小螢幕（手機）才允許換行並佔滿 100% */
@media (max-width: 782px) {
    .page-zone .wp-block-columns.is-layout-flex {
        flex-wrap: wrap !important;
        flex-direction: column !important;
    }

    .page-zone .wp-block-columns.is-layout-flex > .wp-block-column {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}