@charset "UTF-8";

/* 共通設定 */
* {
    box-sizing: border-box;
}
html {
    font-size: 100%;
}
body {
    margin: 0;
    padding-top: 80px;
    font-family: Arial, sans-serif;
}
a {
    text-decoration: none;
    color: midnightblue;
}

img {
    max-width: 100%;
}

/*頁首設定*/
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

/*LOGO設定*/
.logo-link {
    display: block;
    width: 110px;
    margin: 10px auto 0 auto;
    z-index: 2;
}

.logo {
    width: 100%;
    height: auto;
    display: block;
}

/*全螢幕選單設定*/
.main-nav{
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.nav-left, .nav-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    column-gap: 16px;
}
.nav-left {
    right: 58%;
}
.nav-right {
    left: 58%;
}

/* 漢堡按鈕 (縮小版) */
.menu-btn {
    display: none; /* 預設隱藏，行動版才顯示 */
    font-size: 20px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    background-color: #333;
    border-radius: 5px;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1100;
}

/* 側邊選單 (縮小版) */
.sidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    right: -250px; /* 預設隱藏 */
    background-color: #333;
    padding-top: 60px;
    transition: right 0.3s ease;
    z-index: 1000;
}

.sidebar a {
    display: block;
    padding: 15px;
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.sidebar a:hover {
    background-color: #575757;
}

.sidebar.active {
    right: 0;
}

/* 作品集區域 */
.section-title {
    text-align: center;
    margin-top: 100px;
    margin-bottom: 30px;
    font-size: 28px;
    color: #333;
}

.all {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f4f4f4;
}

.photo-grid {
    display: flex;
    flex-wrap: wrap;
    column-gap: 20px;
    row-gap: 20px;
    max-width: 80%;
    justify-content: center;
}

.photo {
    position: relative;
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
    text-align: center;
    padding: 10px;
}

.photo:hover .overlay {
    opacity: 1;
}

.link {
    color: white;
}

/* 點擊照片連結區塊 */
.button-block {
    width: 100%;
    margin-top: 40px;
    padding: 20px;
    background-color: #e0e0e0;
    display: flex;
    justify-content: center;
}

.button-container {
    display: flex;
    column-gap: 20px;
}

.nav-button {
    padding: 15px 30px;
    font-size: 16px;
    color: white;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.nav-button:hover {
    background-color: #0056b3;
}

/* FOOTER設定 */
footer {
    background-color: #432;
    text-align: center;
    padding: 26px 0;
    color: #fff;
    font-size: 0.875rem;
}

.link {
    display: flex;
    justify-content: center;
}

.ig, .line {
    width: 70px;
    height: 70px;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .photo {
        max-width: 45%;
    }

    .photo-grid {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        flex-direction: column;
    }

    .menu-btn {
        display: block;
    }

    .sidebar {
        right: -250px;
    }

    .sidebar.active {
        right: 0;
    }

    .photo-grid {
        flex-direction: column;
    }

    .photo {
        width: 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .page-header {
        flex-direction: column;
    }

    .logo {
        margin: 20px auto 10px;
    }
}
