html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans', sans-serif;

    --main-color: rgb(25, 45, 82);
    --accent-color: rgb(47, 92, 175);
    --light-accent-color: rgb(82, 131, 221);

    color: var(--main-color);
    line-height: 1.4em;
    overflow-x: hidden;
}

main {
    position: relative;
    display: grid;

    grid-template-rows: 60px 400px repeat(3, 1fr) 170px;
    grid-template-columns: repeat(3, 1fr);

    margin-left: auto;
    margin-right: auto;
    /* padding: 10px; */

    /* background-color: rgb(230, 230, 230); */
    outline: 1px solid rgb(230, 230, 230);

    box-sizing: border-box;
    max-width: 1280px;
    min-height: 100vh;

    /* overflow: hidden; */
}

a {
    color: inherit;
}

ul {
    list-style-type: disc;
    margin-left: 20px;
    line-height: 1.5em;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    /* font-family: 'Kanit', sans-serif; */
    margin-top: 10px;
    margin-bottom: 10px;
}

h1 { font-size: 1.8em; }
h2 { font-size: 1.5em; }

nav {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    width: 100%;
    /* border-bottom: 1px solid lightgray; */
    grid-column: 1 / 4;
    padding-left: 5px;
    padding-right: 5px;
    
    box-sizing: border-box;

    justify-content: space-around;
    align-items: center;
}

header {
    display: flex;

    align-items: center;

    color: var(--main-color);

    grid-column: 1 / 4;

    /* font-size: 1.8em; */

    font-family: 'Kanit', sans-serif;
    /* font-family: 'Playpen Sans', cursive; */
}

header > * {
    display: inline;
}

header > a {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

header > a > img {
    width: 40px;
    height: 40px;
}

.heroimage {
    display: block;
    position: relative;

    text-align: center;

    margin-left: auto;
    margin-right: auto;

    padding: 0;
    margin: 0;
    grid-column: 1 / 4;

    overflow: hidden;
}

.heroimage > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* object-position: 50% 50%; */
    /* transform: translateY(-50%); */
}

.overImageTitle {
    position: absolute;
    
    z-index: 10;

    color: white;
    
    font-size: 1.2em;
    line-height: 1.5em;
}

.overImageTitle:not(.notfullscreen) {
    display: flex;

    width: 100%;
    height: 100%;

    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: rgb(0, 0, 0, 0.3);
}

.overImageTitle.notfullscreen {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.overImageTitle > h2 {
    font-size: 1em;
}

.overImageTitle > * {
    font-family: 'Playpen Sans', cursive;
}

/* https://isotropic.co/tool/hex-color-to-css-filter/ */
.filterColorImage {
    filter: invert(13%) sepia(15%) saturate(7111%) hue-rotate(202deg) brightness(87%) contrast(89%);
}

/* Styling for nav bar */
.navList {
    /* margin: auto; */
    display: flex;

    column-gap: 20px;
    font-size: 1.3em;

    /* align-items: center; */

    /* width: 100%;
    height: 100%; */

    list-style-type: none;
    font-family: 'Kanit', sans-serif;
    /* justify-content: space-around; */
}

.navList > li {
    height: 100%;
    /* width: 100px; */
}

.navList > li > a {
    position: relative;
    /* padding: 10px; */
    
    width: 100%;
    height: 100%;
    
    box-sizing: border-box;
    text-align: center;
}

.navList > li > a::after {
    position: absolute;

    content: "";
    width: 0;
    height: 4px;

    background-color: var(--main-color);
    border-radius: 5px 5px 0 0;
    
    left: 50%; /* In order to make it come from the center */
    bottom: 0;
    
    transform: translateX(-50%); /* In order to make it come from the center */
    transition: width 400ms;

    transform-origin: bottom center;
}

.navList > li > a.currentPage::after {
    width: 100%;
}

/* .navList > li > a.currentPage {
    pointer-events: none;
    background-color: rgb(247, 247, 247);
} */

.navList > li > a {
    display: block;

    color: inherit;
    text-decoration: none;

    padding: 5px;
    padding-top: 15px;
    padding-bottom: 15px;
}

.navList > li:hover {
    background-color: lightgray;
}
/* End nav bar styling */

/* Styling for slideshows */
.slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slideshow::after {
    content: "";
    position: absolute;
    display: block;
    
    width: 100%;
    height: 100%;

    z-index: 4;

    top: 0;
    left: 0;
}

.slideshowelements {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-shrink: 0;

    transform: translateX(calc(-100% * var(--current-index)));

    transition: transform 1s;
}

.slideshowelements > span {
    flex-shrink: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.slideshowelements > span > img {
    display: block;
    width: 100%;
    height: 100%;

    object-fit: cover;
    transform: translateY(-20%);
}

.slideshowSettings {
    position: absolute;

    width: 100%;
    height: 100%;
    z-index: 5;
}

.slideshowProgressBar {
    position: absolute;
    display: block;
    
    z-index: 2;
    bottom: 0;

    background-color: white;

    height: 5px;
    width: 100%;
}

.slideshowArrow {
    position: absolute;

    font-size: 5em;
    top: 50%;
    transform: translateY(-50%);
    
    color: white;
    /* text-shadow: -1px 1px 0 #000, 1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;  */

    cursor: pointer;
}

.slideshowArrow.left {
    left: 20px;
}

.slideshowArrow.right {
    right: 20px;
}

.slideshow::after {
    background: radial-gradient( circle, transparent 70%, black 150%), rgba(0,0,0,0.3);
}

/* End Slideshow styling */

footer {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: repeat(3, 1fr);

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

    border-top: 1px solid lightgray;

    padding: 10px;

    grid-row: -2 / -1;
    grid-column: 1 / 4;
}

.socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    grid-column: 3 / 4;
    grid-row: 1 / 4;
}

.socials > a {
    width: 40px;
    height: 40px;
}

.footerLogo {
    grid-column: 1 / 2;
    grid-row: 1 / 4;
}

.footerLogo > img {
    width: 80px;
    height: 80px;
    border-radius: 100%;
}

section {
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-column: 1 / 4;

    padding: 50px;
    min-height: 250px;

    font-size: 1.05em;
}

section:nth-child(odd) {
    background-color: rgba(0, 0, 0, .04);
}

.sectionImage {
    display: flex;
    grid-column: 1 / 2;

    /* border: 1px solid red; */

    align-items: center;
    justify-content: center;
    
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.sectionImage > img {
    display: block;
    height: 200px;
    width: 200px;
    border-radius: 100%;

    
    object-fit: cover;
    /* transform: translateX(-25%); */
}

section > .content {
    align-self: center;
    grid-column: 2 / 3;
}

section > .content > h2 {
    /* font-family: 'Playpen Sans', cursive; */
    font-family: 'Kanit', sans-serif;
}

.linkbutton {
    display: inline-block;

    background-color: var(--main-color);
    color: white;
    
    margin-top: 15px;
    padding: 8px;
    
    border-radius: 2px;
    text-decoration: none;
}

/* FORM */

.contactFormBackground {
    background-image: url(assets/images/slideshows/home/2.webp);
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;

    grid-column: 1 / 4;
    grid-row: 2 / 6;
}

.contactFormWrapper {
    position: relative;
    display: flex;

    height: 100%;

    background-color: rgba(0, 0, 0, 0.4);

    color: white;

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

form {
    display: block;
    width: 90vw;
    max-width: 500px;
    padding: 20px;

    

    /* margin-top: 20px; */
    
    margin-left: auto;
    margin-right: auto;
}   

form > label {
    display: block;
    font-size: 1.2em;
}

form > input:not(input[type="submit"]), textarea {
    font-family: 'Noto Sans', sans-serif;
    /* display: block; */
    box-sizing: border-box;
    width: 100%;
    padding: 10px;

    font-size: 1.2em;
    margin-bottom: 10px;
    border: 0;
    outline: 0;
}

form > input[type="submit"] {
    box-sizing: border-box;

    width: 100%;
    padding: 10px;
    
    font-size: 1.2em;
    margin-bottom: 10px;
    border: 0;

    background-color: rgb(240, 240, 240);

    cursor: pointer;
}

form > input[type="submit"]:hover {
    background-color: rgb(200, 200, 200);
}

label.required::after {
    content: "*";
    color: red;
}

form > textarea {
    resize: vertical;
    max-height: 240px;
    min-height: 50px;
}

#contactformsent {
    position: relative;

    width: 100%;
    height: 100%;
    max-height: 0;
    opacity: 0;

    padding: 10px;
    box-sizing: border-box;
    
    font-size: 1.5em;

    margin-top: 20px;
    text-align: center;

    overflow: hidden;
    transition: max-height 3s, opacity 3s;
}

#contactformsent.show {
    opacity: 1;
    max-height: 200px;
}

#contactformsent::after {
    content: "";

    width: 0;
    height: 5px;
    background-color: var(--accent-color);

    left: 0;
    bottom: 0;
    position: absolute;
}

#contactformsent.show::after {
    /* animation-fill-mode: forwards; */
    animation: shrink 10s linear;
}

/* Honey Pot */
.addressInput {
    display: none;
}

/* Attractions & FAQ page */
article {
    flex-grow: 1;
    grid-row: 3 / 6;
    grid-column: 1 / 4;
}

article > section {
    display: grid;

    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr;
    padding: 10px;
}

article > section > .content {
    /* position: relative; */
    display: block;
    padding: 10px;
    padding-right: 20px;
    grid-column: 1 / 2;
    /* overflow: hidden; */

    width: 100%;
    height: 100%;
    box-sizing: border-box;

    min-height: 0;
    min-width: 0;
}

.attractionimage {
    display: flex;
    grid-column: 2 / 3;

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

    /* padding: 20px; */
    
    width: 100%;
    height: 100%;
    overflow: hidden;
}

iframe {
    /* width: 600px; */
    background-color: rgb(0, 0, 0, 0.2);
    width: 100%;
    height: 450px;
    border: 0;
}

.attractionimage > img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 400px;

    box-sizing: border-box;
    
    object-fit: cover;
    box-shadow: 4px 8px 4px rgba(30, 30, 30, 0.5);
    /* transform: translateX(-25%); */
}

.chat-box {
    display: flex;
    position: absolute;
    background-color: var(--main-color);
    color: white;

    bottom: 25px;
    right: 25px;
    
    width: 450px;
    height: 500px;
    border-radius: 5px;

    overflow: hidden;

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

    transition: 500ms;
}

.chat-box.closed {
    width: 100px;
    height: 100px;
    border-radius: 100%;
    cursor: pointer;
}

.chat-box.closed > * {
    display: none;
    opacity: 0;
    transition: opacity 500ms;
}

.chat-box:not(.closed) > * {
    opacity: 1;
    /* display: block; */
}

.chat-box.closed > .open-icon {
    display: block;
    width: 65%;
    height: 65%;
    filter: invert(90%);

    opacity: 1;
    transition: opacity 1s;
}

.chat-box:not(.closed) > .open-icon {
    opacity: 0;
}

.chat-box > .close {
    position: absolute;
    left: 10px;
    top: 22.5px;

    width: 35px;
    height: 5px;
    border-radius: 5px;
    background-color: white;
    transform: rotate(45deg);
    cursor: pointer;
}

.chat-box > .close::after {
    position: absolute;
    content: "";

    width: 35px;
    height: 5px;
    border-radius: 5px;
    background-color: white;

    transform: rotate(90deg);
}

.chat-box > .close:hover {
    background-color: lightgray;
}

.chat-box > .close:hover::after {
    background-color: lightgray;
}

.delete-conversation {
    position: absolute;
    right: 12.5px;
    top: 10px;
    height: 35px;

    filter: invert(100%);
}

.delete-conversation:hover {
    cursor: pointer;
    filter: invert(80%);
}

.chatarea {
    display: flex;
    /* justify-content: flex-end; */
    
    /* align-items: center; */
    flex-direction: column;
    
    overflow-y: scroll;
    overflow-x: hidden;
}

.chat-box:not(.closed) > .chatarea {
    position: absolute;
    /* display: block; */
    opacity: 1;
    
    bottom: 100px;
    padding: 5px;

    box-sizing: border-box;

    width: 100%;    
    height: calc(90% - 100px);

    background-color: rgb(0, 0, 0, 0.1);
}

.chat-box-form {
    position: absolute;
    bottom: 0;

    width: 100%;
    height: 50px;
    
    padding: 0;
    margin: 0;
}

.chat-box-form > .chat-box-input {
    position: absolute;

    padding: 10px;
    box-sizing: border-box;
    font-size: 1em;
    
    width: 100%;
    height: 50px;
}

.message {
    display: block;

    flex-shrink: 0;
    
    overflow-wrap: break-word;

    background-color: white;
    color: black;

    max-width: 80%;
    max-height: none;
    min-height: 1em;

    font-size: 0.95em;
    
    padding: 5px;
    margin: 5px;
    border-radius: 5px;
}

.message.assistant {
    /* align-self: flex-start; */
    margin-right: auto;
}

.message.user {
    /* align-self: flex-end; */
    margin-left: auto;
}

.message.assistant.error > .errorMessage {
    display: block;
    color: red;
}

.message.typing::after {
    content: " ";
    display: inline-block;

    width: 10px;
    height: 10px;

    background-color: lightgray;

    animation: flash 1s infinite;
}

.notice {
    position: absolute;

    text-align: center;
    width: 100%;
    font-size: 0.7em;
    /* right: 5px; */
    bottom: 50px;
    white-space: nowrap;
}

code {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: rgb(255, 255, 255, 0.2);

    padding: 3px;
    border-radius: 2px;
}

@keyframes flash {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes shrink {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}