/* 基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: none;
}

:root {
    --web-view-ids: HOME;
}

.mediaViewInfo {
    --web-view-name: HOME;
    --web-view-id: HOME;
    --web-scale-on-resize: true;
    --web-enable-deep-linking: true;
}

/* アニメーション定義 */
@keyframes slide-right {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes slide-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes slide-in-menu {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes slide-out-menu {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes fadein {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeout {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* ヘッダーコンテナ */
#header_container {
    display: flex;
    position: relative;
    width: 100%;
    height: auto;
    min-height: 85px;
    padding: 10px 4%;
    overflow: visible;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

#header_rectangle {
    fill: rgba(255,255,255,1);
}

.header_rectangle {
    position: absolute;
    overflow: visible;
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
}

/* ロゴ */
#iconPikupikutai {
    width: 140px;
    height: auto;
    max-height: 70px;
    object-fit: contain;
}

/* ヘッダーリンクコンテナ */
.header-links-container {
    display: flex;
    padding: 0;
}

.header-link {
    border: 0;
    overflow: visible;
    white-space: nowrap;
    text-align: center;
    font-family: "A P-OTF Manpukumaru Min2", serif;
    font-style: normal;
    font-weight: normal;
    font-size: 20px;
    color: rgba(0, 0, 0, 1);
    padding: 8px 12px;
    margin: 5px;
}

/* クリック可能な要素用 */
.header-link.clickable {
    --web-animation: fadein 1s ease-in;
    --web-action-type: page;
    cursor: pointer;
}

/* アクティブリンクのスタイル */
.header-link.active {
    font-weight: bold;
}

/* ソーシャルアイコンコンテナ */
#social-icons-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 20px;
}

#social-icon-container {
    display: flex;
    height: 20px;
    overflow: visible;
}

#social-icon {
    height: 20px;
    object-fit: contain;
}

#social-icon-twitter-path {
    fill: rgba(0,0,0,1);
}

.social-icon-twitter {
    overflow: visible;
    height: 20px;
    transform: matrix(1,0,0,1,0,0);
}

/* 区切り線 */
.header_sectionline_container {
    position: relative;
    width: 100%;
    height: 4px;
    overflow: visible;
}

.header_sectionline_svg {
    display: block;
    width: 100%;
    height: 4px;
}

#header_sectionline_rect {
    fill: rgba(0,0,0,1);
}

/* ハンバーガーメニュー */
#hamburger-menu {
    width: 36px;
    height: 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    overflow: visible;
    cursor: pointer;
    z-index: 1000;
}

#hamburger-rect-top, #hamburger-rect-middle, #hamburger-rect-bottom {
    fill: rgba(0,0,0,1);
}

.hamburger-line-top, .hamburger-line-middle, .hamburger-line-bottom {
    overflow: visible;
    width: 36px;
    height: 4px;
}

/* アクティブリンクの下線 */
.active-underline {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #000;
    z-index: 100;
}

/* ヘッダーコンテナに相対位置を設定 */
#header_container {
    position: relative;
    background-color: #fff;
}

/* スライドメニュー関連のスタイル */
.slide-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.2);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.slide-menu.active {
    transform: translateX(0);
    animation: slide-in-menu 0.3s forwards;
}

.slide-menu.closing {
    animation: slide-out-menu 0.3s forwards;
}

.slide-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.slide-menu-logo {
    width: 120px;
    height: auto;
    object-fit: contain;
}

.close-menu {
    font-size: 24px;
    cursor: pointer;
}

.slide-menu-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.mobile-link {
    font-family: "A P-OTF Manpukumaru Min2", serif;
    font-size: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.slide-menu-social {
    display: flex;
    gap: 20px;
    margin-top: auto;
    padding: 20px 0;
}

.slide-menu-social-icon {
    height: 24px;
    width: auto;
}

.slide-menu-social-icon-twitter {
    height: 24px;
    width: auto;
}

#slide-menu-twitter-path {
    fill: rgba(0,0,0,1);
}

/* オーバーレイ */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.menu-overlay.active {
    display: block;
    animation: fadein 0.3s forwards;
}

.menu-overlay.closing {
    animation: fadeout 0.3s forwards;
}

/********************************************/
/* レスポンシブデザイン */ 
/********************************************/

@media screen and (max-width: 1200px) {
    .header-link {
        font-size: 18px;
        padding: 6px 8px;
    }
}

@media screen and (max-width: 992px) {
    #header_container {
        padding: 10px 2%;
    }
    
    .header-link {
        font-size: 16px;
        padding: 5px 6px;
        margin: 3px;
    }
    
    #social-icons-container {
        gap: 10px;
        display: none;
    }
}

/* スマホ表示でのロゴ位置修正 */
@media screen and (max-width: 768px) {
    #header_container {
        justify-content: space-between;
        padding: 10px 4%;
        position: relative; /* 位置決めの基準に */
    }
    
    #iconPikupikutai {
        position: absolute;
        left: 50%;
        top: 50%; /* 縦方向の中央揃え */
        transform: translate(-50%, -50%); /* 横方向と縦方向の中央揃え */
        margin: 0; /* マージンをリセット */
    }
    
    .header-links-container {
        display: none;
    }
    
    #social-icons-container {
        gap: 12px;
        display: none;
    }
    
    /* ハンバーガーメニューは常に表示 */
    #hamburger-menu {
        position: absolute;
        right: 20px;
        top: 50%; /* 縦方向の中央揃え */
        transform: translateY(-50%); /* 縦方向の中央揃え */
        margin: 0; /* マージンをリセット */
    }

    /* モバイル表示ではアクティブリンクのスタイルを調整（必要に応じて） */
    .active-underline {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    #social-icon, .social-icon-twitter {
        height: 18px;
    }
    
    .header_sectionline {
        height: 3px;
    }
    
    .slide-menu {
        width: 80%;
    }
}

/* ヘッダーリンクスタイルの追加 */
.header-links-container a {
    text-decoration: none;
    color: inherit;
}

.header-link {
    cursor: pointer;
}

.header-link a {
    display: block;
    width: 100%;
    height: 100%;
}

/* モバイルメニューリンクスタイルの追加 */
.slide-menu-links a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* フッターリンクスタイルの追加 */
.footer-links-container a {
    text-decoration: none;
    color: inherit;
}

.footer-link {
    cursor: pointer;
}

/* ホバーエフェクト */
.header-link:hover, 
.mobile-link:hover,
.footer-link:hover {
    opacity: 0.8;
}