/* the reset selector */
* {
    margin: 0;
    padding: 0;
}

html {
    background-color: white;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 100%;
    background-color: #F3E9DC;
    max-width: 1280px;
	min-width: 330px;
    margin: 0 auto;
}

a {
	text-decoration: none;
}

header {
    position: fixed;
    top: 0;
    margin: 0 auto;
    padding: 1em 0 0.2em;
    max-width: 1280px;
    border-radius: 0 0 30px 30px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, transparent 10%, #f1b24a 30%, #f1b24a 70%, transparent 90%) 1;
    z-index: 90;
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 17% 83%;
    grid-template-columns: 17% 83%;
    -ms-grid-rows: 50% 50%;
    grid-template-rows: 50% 50%;
    grid-template-areas:
        "logo up_menu"
        "logo down_menu"
}


#logo {
    -ms-grid-row: 1;
    -ms-grid-row-span: 2;
    -ms-grid-column: 1;
    grid-area: logo;
    text-align: right;
    -ms-grid-row-align: center;
    align-self: center;
}

#logo a img {
    width: 70%;
    -webkit-filter: drop-shadow(4px 4px 4px #a2c0a6);
    filter: drop-shadow(4px 4px 4px #a2c0a6);
    -webkit-transition: -webkit-transform 1s;
    transition: -webkit-transform 1s;
    -o-transition: transform 1s;
    transition: transform 1s;
    transition: transform 1s, -webkit-transform 1s;
}

#logo a img:hover {
    -webkit-transform: scale(1.2);
    -ms-transform: scale(1.2);
    transform: scale(1.2);
}

ul {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    list-style-type: none;

}

li {
    text-align: center;

}

.title_en {
    font-size: 0.6em;
	letter-spacing: 0.1em;
}

#font_search {
    color: azure;
    font-size: 0.8em;
}

#up_menu .title_en {
    font-size: 0.5em;
}

header a:link,
a:visited {
    text-decoration: none;
    color: #fff;
}

#up_menu {
    -ms-grid-row: 1;
    -ms-grid-column: 2;
    grid-area: up_menu;

}

#up_menu ul {
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding-right: 8%;


}

#up_menu ul li {
    padding: 1em 1.5em;
    font-size: 0.7em;
    border: 1px solid #f1b24a;

}

#up_menu ul li:first-child {}

#up_menu ul li a:hover {
    color: #f1b24a;
}

ul li a.current {
    color: #f1b24a;
}

#down_menu {
    -ms-grid-row: 2;
    -ms-grid-column: 2;
    grid-area: down_menu;  

}

#down_menu ul {
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding: 0.6em 20% 0.6em 13%;

}

#down_menu ul li {
    padding: 0.1em 1em;
    font-size: 1.1em;
}

#down_menu ul li:hover {
    background-color: #f1b24a;
    border-radius: 10px;
}

#down_menu ul li a:hover {
    color: black;
}

section {
    margin: 1em auto;
}

#banner {
    width: 100%;
    border-bottom: 3px solid #f1b24a;
}

/* the styles for the commom part of article */
article {
    padding: 1em 0;
}

article a:link {
    color: #4186D3;
}

article a:visited {
    color: #d41c1c;
}

article a:hover,
a:focus {
    color: brown;
}

article h2 {
    color: #164a41;
    background-color: #f1b24a;
    width: 30%;
    font-size: 150%;
    font-style: italic;
    font-variant: small-caps;
    margin: 0 auto 1em;
    padding: 0.6em 0;
    text-align: center;
    border-radius: 30px 0 30px 0;
}

article h2 .en {
    font-size: 70%;
}

article h3 {
    margin: 1em 1em 0.5em 0;
}

h4 {
    margin: 1em;
	line-height: 1.5em;
}

article p {
    line-height: 1.6em;
    width: 80%;
    margin: 0.5em auto;
}


article img {
    -webkit-filter: drop-shadow(2px 2px 5px #333);
    filter: drop-shadow(2px 2px 5px #333);
}


/* the styles for script */
#script {
    text-align: center;
}

#dialogue h2 {
    width: 80%;
    margin: 1em auto;
    font-size: 130%;
}

#dialogue h3 {
    text-align: left;
    display: table;
    margin-left: 10%;
    color: #4d774e;
    background-color: #9dc88d;
    padding: 0.1em 0.5em;
    border-radius: 0 6px 6px 0;
}

#dialogue h3 .en {
    color: #eee;
    font-size: 0.7em;
}

#dialogue p {
	margin: 0.7em auto;
    text-align: left;
	line-height: 1.5em;
}

.pic_words {
    font-size: 90%;
    text-align: center !important;
}

.en {
    color: #999900;
}


.big_phone {
    width: 1.5em;
    -webkit-filter: drop-shadow(1px 1px 0 white);
    filter: drop-shadow(1px 1px 0 white);
}

#big_phone {
	width: 1.5em;
	-webkit-filter: drop-shadow(1px 1px 0 white);
    filter: drop-shadow(1px 1px 0 white);
}

#read_more_1, #read_more_2 {
	width: 36%;
}



#div1 {
    width: 12em;
    text-align: center;
    line-height: 1.5em;
    border: 1px solid black;
    margin: 1em auto;
    padding: 1em 0.6em;
    font-size: 90%;
}

.div2 {
    width: 30em;
    text-align: justify;
    margin: 1em auto;
}

#guide {
	width: 80%;
	margin: 1em auto;
	color: black;
	font-size: 95%;	
	
}

#guide p {
	margin: 0.2em;	
}

#guide a:link {
    color: #4186D3;
	font-style: italic;	
	padding: 0.1em 0em;
}

#guide a:visited {
    color: #d41c1c;
}

#cover {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-transition: opacity 500ms;
    -o-transition: opacity 500ms;
    transition: opacity 500ms;
    visibility: hidden;
    opacity: 0;
    z-index: 998;
}

iframe {
    width: 80%;
    position: fixed;
    top: 10%;
    left: 10%;
    height: 50%;
    background-color: white;
}

#popup2 {
    position: fixed;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 30%;
    background: #fff;
    border-radius: 5px;
    -webkit-transition: all 500ms ease-in-out;
    -o-transition: all 500ms ease-in-out;
    transition: all 500ms ease-in-out;
    visibility: hidden;
}

.close {
    position: fixed;
    top: 5%;
    right: 6%;
    -webkit-transition: all 20ms;
    -o-transition: all 20ms;
    transition: all 20ms;
    font-size: 40px;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

.close:hover {
    color: #06D85F;
}

/* the styles for the footer */
footer p {
    text-align: center;
    color: white;
    padding: 1em 0 1.5em;
    font-size: 90%;
    line-height: 1.5em;
    background-color: #c08552;
    border-top: 5px solid #9dc88d;
}

.foot_email {
	font-size: 85%;
	line-height: 1.2em;
}

section {
    background-color: #eeeeee;
    padding: 0.6em;
    width: 50%;
    margin: 0 auto;
    border-radius: 5px;
}

table {
    margin: 0 auto;

}
/* for menu */
#mobile_menu {
    display: none;
}
#menu {
	width: 80%;
	display: grid;
	grid-template-columns:1fr 15% 1fr;
	border: 5px solid #5f8495;
	border-radius: 15px;
	background-color: #f7fcfe;
	margin: 0 auto;
}

#left_pic {
	float: left;
	margin: 0 1.5em 1.5em 0;
	width: 100%;
}

#middle {
	margin:2.3em 1.5em;
	background-color: #9ad9ea;
	border: 3px solid black;
	border-radius: 12px;
	text-align: center;
	min-width: 70px;
}

#middle img {
	padding-top: 2em;
	padding-bottom: 2em;
	width: 80%;
}

#right,#left {
	margin: 1.5em;
}

#n357_table, #n357_table th, #n357_table td{
  border: 1px solid black;
  border-collapse: collapse;
  padding: 3px;
}

/* tablet portrait */
@media only screen and (max-width: 959px) {
    body {
        font-size: 80%;
    }
	#up_menu ul li {
        font-size: 0.7em;
    }
}

/* mobile landscape */
@media only screen and (max-width: 767px) {
    body {
        font-size: 70%;
    }

    #up_menu ul li {
        font-size: 0.8em;
    }

    #down_menu ul li {
        font-size: 1em;
    }

}

/* mobile portrait */
@media only screen and (max-width: 600px) {
    #mynav {
        display: none;
    }

    #mobile_menu {
        display: block;
    }

    header {
        position: fixed;
        top: 0;
        margin: 0 auto;
        padding: 1em 0;
        width: 100%;
        border-radius: 0 0 30px 30px;
        border-bottom: none;
        z-index: 90;
        display: -ms-grid;
        display: grid;
        -ms-grid-columns: (auto)[1];
        grid-template-columns: repeat(1, auto);
        -ms-grid-rows: (auto)[3];
        grid-template-rows: repeat(3, auto);
        grid-template-areas:
            "up_menu"
            "down_menu"
            "logo"
    }
    
    #mobile_menu ul li {
       background-image: linear-gradient(to right, rgb(14,54,69,0), rgb(14,54,69,0.8),rgb(14,54,69,0.8),rgb(14,54,69,0));
    }


    #up_menu_m a img {
        -webkit-filter: drop-shadow(3px 3px 5px #a2c0a6);
        filter: drop-shadow(3px 3px 5px #a2c0a6);
        -webkit-transition: -webkit-transform 1s;
        transition: -webkit-transform 1s;
        -o-transition: transform 1s;
        transition: transform 1s;
        transition: transform 1s, -webkit-transform 1s;
        width: 80%;
    }

    #logo a img:hover {
        -webkit-transform: scale(1.2);
        -ms-transform: scale(1.2);
        transform: scale(1.2);
    }

    ul {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        list-style-type: none;
    }

    li {
        text-align: center;        
        width: 25%;
    }

    #mobile_menu_m .title_en {
        font-size: 0.5em;
    }

    #font_search {
        color: azure;
        font-size: 0.8em;

    }

    header a:link,
    a:visited {
        text-decoration: none;
        color: white;
    }

    #up_menu_m {
        -ms-grid-row: 1;
        -ms-grid-column: 2;
        grid-area: up_menu;

    }

    #up_menu_m ul {
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        padding: 0;


    }

    #up_menu_m ul li {
        margin: 2px;
        font-size: 0.7em;

        padding: 0.5em;

    }

    #up_menu_m ul li:first-child {
        background-image: none;
        background-color: transparent;
    }

    #up_menu_m ul li a:hover {
        color: #f1b24a;
    }

    #down_menu_m ul li a.current {
        color: #f1b24a;
    }

    #down_menu_m {
        -ms-grid-row: 2;
        -ms-grid-column: 2;
        grid-area: down_menu;
    }

    @media only screen and (max-width: 600px) {

        #up_menu_m {
            -ms-grid-row: 1;
            -ms-grid-column: 1
        }

        #down_menu_m {
            -ms-grid-row: 2;
            -ms-grid-column: 1
        }
    }

    #down_menu_m ul {
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-evenly;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        padding: 0;
    }

    #down_menu_m ul li {
        margin: 2px;
        font-size: 1.1em;
        padding: 0.5em;
    }
	#li1 {     
        width: 40%;
    }
	#li2,#li3,#li4 {     
        width: 20%;
    }

    #down_menu_m ul li a:hover {
        color: #f1b24a;
    }

    article h2 {
        width: 50%;
    }

    #logo {
        -ms-grid-row: 3;
        -ms-grid-row-span: 1;
        -ms-grid-column: 1
    }

    #up_menu {
        -ms-grid-row: 1;
        -ms-grid-column: 1
    }

    #down_menu {
        -ms-grid-row: 2;
        -ms-grid-column: 1
    }
	
	/* for menu when in phone */
	#menu {
	width: 90%;	
	border: 3px solid #5f8495;
	}

	#left_pic {
		float: left;
		margin: 0 1em 1em 0;
	}

	#middle {
		margin:1.5em 1em;
		background-color: #9ad9ea;
		border: 2px solid black;
		border-radius: 12px;
		text-align: center;
		min-width: 40px;
	}

	#middle img {
		padding-top: 2em;
		padding-bottom: 2em;
		width: 90%;
	}

	#right,#left {
		margin: 0.7em;
	}

}
