@charset "utf-8";

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.content {
    min-height: 100vh;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* ビューポートの高さを基準にする */
}

main {
    flex-grow: 1;
    /* コンテンツが少ない場合でもmainが伸びる */
}

.nav-wrap {
    height: 60px;
    width: 100%;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.main-nav {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    margin-left: 10px;
    height: 100%;
}

#menu-toggle {
    position: relative;
    width: 44px;
    height: 60px;
    border: none;
    cursor: pointer;
    background: none;
    margin-left: 20px;
}

#menu-toggle .line {
    position: absolute;
    display: block;
    left: 0;
    height: 3px;
    width: 30px;
    background: #000;
    margin: 0 auto;
}

#menu-toggle .line::before,
#menu-toggle .line::after {
    content: "";
    position: absolute;
    left: 0;
    width: 30px;
    height: 3px;
    background-color: #333;
}

#menu-toggle .line::before {
    top: -8px;
}

#menu-toggle .line::after {
    top: 8px;
}

.nav-auth-btn-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/*Safariで、ログアウトの文字が見えなくなるバグがあるのでデフォルトの挙動を無効化して設定している(ヘッダーの一番上の部分）*/
.logout-btn-nav {
    appearance: none;
    -webkit-appearance: none;
    background-color: white;
    font-size: 1.1rem;
    border: none;
    color: black;
    font-size: 1.1rem;
    padding: 0;
    cursor: pointer;
}

/*Safariで、ログアウトの文字が見えなくなるバグがあるのでデフォルトの挙動を無効化して設定している（ナビゲーションバー部分）*/
.logout-btn {
    appearance: none;
    -webkit-appearance: none;
    background-color: white;
    font-size: 1.1rem;
    border: none;
    color: black;
    font-size: 1.1rem;
    cursor: pointer;
}

#navbar-brand {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

#navbar-brand a {
    font-size: 1.4rem;
    text-decoration: none;
    color: #E63946;
}

.search-btn {
    all: unset;
    margin-right: 10px;
    margin-left: auto;
}

.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    /* ← 最初は左に隠す */
    transition: transform 0.5s ease;
    z-index: 1000;
}

/* メニューが表示される状態 */
.nav-menu.open {
    transform: translateX(0);
    /* ← 左から右にスライドイン */
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 999;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.delete-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    font-weight: 600;
    border: none;
    background-color: white;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.7rem;
    margin-top: 65px;
    list-style: none;
    margin-left: 25px;
}

li>a {
    font-size: 1.3rem;
    color: black;
}

.nav-item {
    text-decoration: none;
}

.nav-user {
    margin: 0 10px;
}

.nav-user>a {
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-wrap {
    display: none;
    opacity: 0;
    position: relative;
    flex-direction: column;
    align-items: center;
    /* border: 1px solid black;
    border-radius: 10px; */
    padding: 10px;
    width: 80%;
    margin: 10px auto;
    overflow: hidden;
    transform: translateY(-60px);
    transition: opacity 0.3s ease, transform 1.2s ease;
}

.search-wrap.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.search-wrap.close {
    opacity: 0;
    transform: translateX(0) translateY(-60px);
    pointer-events: none;
}

.search-icon {
    font-size: 1.4rem;
    margin-left: auto;
    cursor: pointer;
}

.main-search-wrap {
    width: 100%;
    height: 40px;
    margin: 30px auto;
    display: flex;
    align-items: center;
}

.main-search {
    flex: 9;
    height: 100%;
    position: relative;
    padding: 5px;
    outline: none;
    font-size: 16px;
    box-sizing: border-box;
    border: 1px solid black;
    border-right: none;
}

.search-delete {
    border: none;
    background: none;
    font-size: 1.4rem;
    position: absolute;
    top: 1%;
    right: 15px;
}

.search-main-btn {
    flex: 1;
    height: 100%;
    background-color: #E63946;
    border: none;
}

.icon-in-search {
    font-size: 1.4rem;
    color: white;
}

/* 4. フッターのデザイン */
footer {
    width: 100vw;
    background-color: rgba(114, 112, 112, 0.9);
    color: white;
    text-align: center;
    padding: 40px 10px 20px;
}

.footer-section-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 10px;
}

.footer-auth-wrap {
    margin-bottom: 20px;
}

.footer-auth-logout-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50px;
}

.footer-logout {
    background-color: white;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    border: none;
}

.footer-login-wrap {
    width: 100%;
    height: 50px;
}

.footer-login {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: black;
}

footer ul {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    list-style-type: none;
    color: white;
    padding-left: 0;
}

.footer-section h4 {
    font-size: 1.2rem;
    padding-bottom: 10px;
    max-height: 48px;
}

.footer-section a {
    font-size: 1rem;
}

.policy-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.pc-footer {
    display: none;
}

footer a {
    color: white;
    text-decoration: none;
}

.copyright {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .nav-user {
        margin: 0 30px;
    }

    .search-main-btn {
        left: 8%;
    }

    .footer-section-wrap {
        flex-direction: row;
        gap: 80px;
        justify-content: center;
    }

    .footer-auth-wrap {
        display: none;
    }

    .pc-footer {
        display: block;
    }

    footer ul {
        flex-direction: column;
    }

    footer h4 {
        border-bottom: 1px solid white;
    }

    .policy-links {
        flex-direction: column;
    }

    .policy-links span {
        display: none;
    }


}

@media (min-width:1200px) {
    .nav-user {
        margin-left: 0 50px;
    }
}