body {
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}
*, *::before, *::after {
    box-sizing: border-box;
}



/* kepala halaman */
header {
    background: url(images/town-square.jpg) no-repeat;
    height: 100vh;
    min-height: 100svh;
    background-size: cover;
    background-position: center;
    padding-top: 2rem;
}
header p {
    margin-bottom: 0;
}
header h1 {
    padding-top: 8rem;
    font: bold 50px Arial, sans-serif;
    cursor: default;
}



/* navigasi */




/* bagian halaman */
.section-divider {
    width: 90%;
    margin: auto;
}
.home, .history, .attractions, .food, .gallery, .contact {
    padding-bottom: 96px;
    scroll-margin-top: 72px;
}
.contact {
    padding-bottom: 48px;
}
/* home section */
.home {
    margin-top: 170px;
}
.home-history, .home-attractions, .home-food, .home-gallery, .home-contact{
    padding-top: 30px;
    width: 150px;
    height: 200px;
    border: 5px solid black;
    border-radius: 30px;
}
.home-menu {
    width: 90%;
    height: auto;
    margin: 50px auto;
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-around;
}
.home-menu a{
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    color: black;
}
.home-menu a:hover{
    color: black;
}
.home-menu img{
    width: 100px;
    height: 100px;
}

/* history section */
.history-content{
    width: min(90%, 1000px);
    margin: 0 auto;
    text-indent: 50px;
}
.history-photo{
    width: 100%;
    display: flex;
    justify-content: space-around;
}
.history-image{
    width: min(400px, 100%);
    border: 5px solid white;
    border-radius: 30px;
    align-self: center;
}

/* attractions section */
.attractions-grid {
    margin: 0 auto;
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-around;
}
.attractions-grid .card{
    width: min(100%, 300px);
}
.attractions p{
    text-indent: 30px;
}
.attractions a img{
    width: 30px;
}



/* food section */
.food-grid {
    margin: 0 auto;
    padding-top: 50px;
    width: min(1100px, 90%);
    height: auto;
    display: grid;
    gap: 48px;
}
.food-item{
    display: grid;
    grid-template-columns: minmax(0, 400px) minmax(0, 600px);
    align-items: center;
    justify-content: center;
    gap: 32px;
}
.food-media img{
    display: block;
    width: 100%;
    height: auto;
    border: 5px solid white;
    border-radius: 30px;
}
.food-description{
    min-width: 0;
}



/* gallery section */
.puzzle-board {
    width: min(600px, 90%);
    aspect-ratio: 1;
    margin: auto;
    position: relative;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    border: 3px solid grey;
    background-color: #111;
}
.puzzle-instruction{
    margin: 0 auto 16px;
    color: #555;
}
.puzzle-piece{
    display: block;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 2px solid #222;
    border-radius: 0;
    background-image: url("gallery/gallery-7.jpg");
    background-repeat: no-repeat;
    background-size: 300% 533.333%;
    background-color: #222;
    cursor: pointer;
    transition: filter .2s ease, border-color .2s ease, transform .2s ease;
}
.puzzle-board.loading .puzzle-piece{
    visibility: hidden;
}
.puzzle-piece:hover,
.puzzle-piece:focus-visible{
    border-color: #0d6efd;
    outline: none;
}
.puzzle-piece.selected{
    border-color: #ffc107;
    transform: scale(.94);
}
.puzzle-board.completed .puzzle-piece{
    filter: brightness(.3);
    cursor: default;
}
.finish-button{
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    padding: 8px 24px;
    border: 0;
    border-radius: 999px;
    color: white;
    background-color: #198754;
    font-weight: bold;
}
.finish-button:hover,
.finish-button:focus-visible{
    background-color: #157347;
    transform: translate(-50%, -50%) scale(1.04);
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.finish-button[hidden]{
    display: none;
}
/* contact section */
.contact-grid{
    width: min(900px, 90%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 170px 180px minmax(280px, 420px);
    align-items: center;
    gap: 30px;
    justify-content: space-around;
}
.profile-photo img{
    display: block;
    width: 170px;
    max-width: 100%;
    margin: auto;
    border: 5px solid white;
}
.social-links{
    width: 180px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
}
.social-links a{
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
}
.social-links a:hover{
    color: grey;
}
.social-links img:hover{
    opacity: .5;
}
.social-links img{
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 10px;
}
.about-me{
    max-width: 420px;
    padding: 24px;
    box-sizing: border-box;
    border-radius: 30px;
}
.about-me h5{
    margin-bottom: 14px;
}
.about-me p{
    margin-bottom: 0;
    line-height: 1.7;
}
/* kaki halaman */
footer{
    margin-top: 5px;
}
.footer{
    margin-bottom: 0;
    padding: 8px 12px;
    font-size: .75rem;
}

@media (max-width: 767px){
    header{
        height: 100svh;
        background-position: center center;
    }

    header h1{
        padding-top: 5rem;
        font-size: 38px;
    }

    .home{
        margin-top: 80px;
    }

    .home-menu{
        margin-top: 30px;
    }

    .home-history, .home-attractions, .home-food,
    .home-gallery, .home-contact{
        width: 130px;
        height: 180px;
    }

    .contact-grid{
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .social-links{
        width: auto;
        flex-direction: row;
        gap: 30px;
    }

    .social-links a{
        gap: 0;
    }

    .social-links a span{
        display: none;
    }

    .food-item{
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .food-description{
        text-align: center;
    }

    .puzzle-board{
        gap: 4px;
        padding: 5px;
    }

    .about-me{
        width: 100%;
        max-width: 420px;
    }

}

@media (min-width: 768px) and (max-width: 991px){
    .food-item{
        grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
        gap: 24px;
    }

    .contact-grid{
        grid-template-columns: 150px 150px minmax(0, 1fr);
        gap: 20px;
    }

    .social-links{
        width: 150px;
    }
}
