/* Fonts */

@import url("https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap");

*,
*::after,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-decoration: none;
}

body {
    text-decoration: none;
    font-family: "PT Sans", serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-weight: 400;
    font-size: 20;
}

a {
    text-decoration: none;
}

/* Header */
header {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    display: flex;
    border-bottom: 1.5px solid rgb(174, 174, 174);
    margin-bottom: 0.8rem;
    /* background-color: red; */
}

header nav {
    max-width: 93%;
}

header nav.navbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: auto;
    background-color: white;
}

header nav .left-navbar .navbar-logo a img {
    width: 7rem;
    align-self: center;
}

.left-navbar {
    display: flex;
    align-items: center;
}

.left-navbar .main-navbar {
    background-color: white;
}

.left-navbar .main-navbar ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 1rem;
    margin-top: 1rem;
}

.left-navbar .main-navbar ul li a {
    color: black;
}

.right-navbar {
    display: flex;
    align-items: center;
    .menu-toggle {
        opacity: 0;
    }
}

.main-navbar ul li a.active {
    font-weight: bold;
    /* color: #d09d43; Ganti warna sesuai branding */
    border-bottom: 2px solid #2a2a2a; /* Tambahan opsional */
}

/* Lang Nav Select Option */

.right-navbar select {
    border: none;
    cursor: pointer;
}

/* Main (Images-gallery) */

.projects-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.projects-gallery .images {
    columns: 5 340px;
    max-width: 93% !important;
    gap: 0.6rem;
}

/* Halaman Detail */

.project {
    max-width: 93%;
    display: flex;
    gap: 0rem;
    margin: auto;
}

/* Punya Detail */

section.projects-gallery .images {
    columns: 5 14%;
    max-width: 70%;
}

.projects-gallery .images .card-img {
    list-style: none;
    margin-bottom: 0.3rem;
}

.projects-gallery .images .card-img .card-info {
    opacity: 0;
    bottom: 0;
    left: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    position: absolute;
    height: 100%;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    /* border-radius: 10px 10px 10px 10px; */
}

.projects-gallery .images .card-img:hover .card-info {
    opacity: 1;
    visibility: visible;
}

.projects-gallery .images .card-img .card-info h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    padding-bottom: 0;
}

.projects-gallery .images .card-img .card-info h6 {
    font-size: 18px;
    line-height: 1px;
    font-weight: 300;
    margin-bottom: 14px;
    padding-bottom: 0;
}

/* Pastikan posisi .card-img sebagai relative */
.projects-gallery .images .card-img {
    position: relative;
    overflow: hidden;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Menyesuaikan ukuran gambar */
.projects-gallery .images .card-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* Title and Desc */

section.project-detail {
    width: 35%;
    /* height: 100px; */
}

.title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.description {
    margin-top: 1rem;
    font-size: 0.8rem;
}

.description p {
    margin-top: 0.3rem;
    line-height: 1.3rem;
    text-align: justify;
}

table tr td:nth-child(1) {
    width: 10rem;
    vertical-align: baseline;
    font-size: 0.9rem;
}

table tr td:nth-child(2) {
    width: 10rem;
    /* display: flex;
    justify-content: end;
    align-items: center; */
    vertical-align: bottom;

    font-size: 0.9rem;
    /* color: red; */
}

section.project-detail table td {
    text-align: left;
}

/* Project Gallery */

.project-gallery {
    width: 100%;
    /* background-color: royalblue; */
}

.project-images {
    margin-top: 0.8rem;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    column-gap: 0.3rem;
    row-gap: 0.3rem;
    overflow: hidden;
}

li.project-img {
    list-style: none;
}

li.project-img img {
    width: 100%;
    height: auto; /* atau tetap 13rem jika mau fix ratio */
    aspect-ratio: 21 / 13; /* untuk menjaga proporsi tanpa harus height tetap */
    object-fit: cover;
    cursor: pointer;
}

li.project-img .image-info {
    opacity: 0;
    bottom: 0;
    left: 0;
    top: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    position: absolute;
    width: 100%;
    height: auto; /* atau tetap 13rem jika mau fix ratio */
    aspect-ratio: 21 / 13; /* untuk menjaga proporsi tanpa harus height tetap */
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
}

li.project-img:hover .image-info {
    opacity: 1;
    visibility: visible;
}

li.project-img .image-info h4 {
    font-size: 1.25rem;
    padding-bottom: 0;
}

@media (max-width: 1024px) {
    section.project-detail {
        width: 70%;
    }

    section.projects-gallery .images {
        columns: 10 14%;
        max-width: 30%;
    }

    .project-images {
        grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    }
}

@media (max-width: 768px) {
    .main-navbar {
        display: none;
        position: absolute;
        top: 100%; /* Menempel tepat di bawah navbar */
        left: 0;
        right: 0;
        background-color: white;
        z-index: 99;
        padding: 1rem 2rem;
        /* border-top: 1px solid #ccc; */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .main-navbar.active {
        display: block;
    }

    .main-navbar ul {
        flex-direction: column;
        gap: 1rem;
    }
    .right-navbar {
        display: flex;
        align-items: center;
        .menu-toggle {
            opacity: 1;
        }
    }

    .menu-toggle {
        display: block;
        font-size: 20px;
        background: none;
        border: none;
        cursor: pointer;
        margin-left: 1rem;
        margin-right: 0.5rem;
    }

    .left-navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 468px) {
    main.project {
        display: flex;
        flex-direction: column;
    }
    section.project-detail {
        width: 100%;
    }

    section.projects-gallery .images {
        columns: 10 14%;
        max-width: 100%;
    }

    li.project-img img {
        width: 100%;
        height: auto; /* atau tetap 13rem jika mau fix ratio */
        aspect-ratio: 21 / 13; /* untuk menjaga proporsi tanpa harus height tetap */
        object-fit: cover;
        cursor: pointer;
    }

    li.project-img .image-info {
        width: 100%;
        height: auto; /* atau tetap 13rem jika mau fix ratio */
        aspect-ratio: 21 / 13; /* untuk menjaga proporsi tanpa harus height tetap */
    }
}
