/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    line-height: 1.6;
    color: #fff;
    min-height: 100%;
    background-color: #000; /* フォールバック背景色 */
    background-image: url('../images/back.webp'); /* ../を使用して親ディレクトリのimagesフォルダを参照 */
    background-size: 100% 100%; /* 元のサイズで表示 */
    background-position: center top; /* 上部中央から配置 */
    background-repeat: repeat; /* 画像を繰り返し表示 */
    background-attachment: scroll; /* スクロールと共に移動 */
    overflow-x: hidden;
}

/* メニュー開放時にスクロールを防止 */
body.menu-open {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

img {
    max-width: 100%;
    height: auto;
}

li {
    list-style: none;
}

/* ヘッダー */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
    background-color: rgba(0, 0, 0, 0.95);
}

.logo {
    display: flex;
    align-items: center;
    z-index: 1010;
}

.logo-img {
    height: 50px;
    width: auto;
    transition: opacity 0.3s;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    color: #fff; /* メニュー項目を白色に */
}

/* ハンバーガーメニュー */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1010;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff; /* ハンバーガーメニューの線を白に */
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: #fff;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: #fff;
}

/* セクション共通 */
.section {
    padding: 100px 10%;
    position: relative;
    z-index: 1; /* 背景画像よりも前面に */
}

/* 最初のセクションの余白を調整（メインビジュアル削除のため） */
.works {
    padding-top: 150px; /* ヘッダーの高さ分余白を確保 */
}

.section-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 60px;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #fff; /* 下線を白色に */
}

/* 作品一覧 */
.works-filter {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 8px 16px;
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    color: #fff; /* フィルターボタンの文字色を白に */
}

.filter-btn::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #fff; /* 下線を白に */
    transition: width 0.3s, left 0.3s;
}

.filter-btn.active::after,
.filter-btn:hover::after {
    width: 100%;
    left: 0;
}

.filter-btn.active {
    font-weight: bold;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.work-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #000; /* 作品アイテムの背景を黒にする */
}

.work-img-container {
    position: relative;
    padding-top: 75%; /* 4:3 アスペクト比 */
    overflow: hidden;
    background-color: #000; /* 画像コンテナの背景を黒に変更 */
}

.work-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s, filter 0.4s;
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* オーバーレイの背景色を黒に設定し、やや透明に */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s;
    color: #fff;
    text-align: center;
    padding: 20px;
}

/* サムネイル下部に黒い背景を追加するための要素 */
.work-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%; /* 高さを100%に設定して完全にカバー */
    background-color: #000; /* 完全な黒 */
    z-index: -1; /* オーバーレイコンテンツの下に配置 */
}

.overlay-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    transform: translateY(20px);
    transition: transform 0.4s;
    position: relative; /* 位置指定を追加 */
    z-index: 2; /* テキストが背景の上に表示されるようにする */
}

.overlay-category {
    font-size: 12px;
    transform: translateY(20px);
    transition: transform 0.4s;
    position: relative; /* 位置指定を追加 */
    z-index: 2; /* テキストが背景の上に表示されるようにする */
}

.work-info {
    padding: 15px 0;
    display: none; /* 情報をオーバーレイに移動するため非表示 */
}

.work-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.work-category {
    font-size: 12px;
    color: #777;
}

.work-item:hover .work-img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

.work-item:hover .work-overlay {
    opacity: 0.7; /* 完全に表示(1)ではなく、70%の不透明度(0.7)にして30%の透明度にする */
}

.work-item:hover .overlay-title,
.work-item:hover .overlay-category {
    transform: translateY(0);
}

/* 会社紹介簡易セクション */
.about-brief {
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7); /* 背景を半透明に変更して背景画像が見えるように */
}

.about-brief p {
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 2;
    color: #fff; /* テキストを白色に */
}

.about-link {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid #fff; /* 枠線を白に */
    font-size: 14px;
    letter-spacing: 1px;
    transition: background-color 0.3s, color 0.3s;
}

.about-link:hover {
    background-color: #fff;
    color: #000;
}

/* フッター */
footer {
    padding: 60px 10% 30px;
    background-color: rgba(0, 0, 0, 0.9); /* フッターも半透明に変更 */
    color: #fff;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-company-name {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 1px;
}

.footer-address {
    margin-bottom: 30px;
    font-style: normal;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links a {
    font-size: 14px;
}

.footer-copyright {
    padding-top: 30px;
    border-top: 1px solid #333;
    text-align: center;
    font-size: 12px;
}

/* レスポンシブ */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-end;
        transition: right 0.4s ease;
        z-index: 1000;
        padding: 80px 40px 0 0; /* 上 右 下 左 パディング */
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        margin: 2px 0; /* 5pxから2pxにさらに縮小 */
    }
    
    .nav-menu a {
        color: #fff;
        font-size: 24px; /* フォントサイズを大きく */
        letter-spacing: 2px;
        font-weight: 500; /* 少し太めに */
    }
    
    .section {
        padding: 60px 5%;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* ボタン風リンクのスタイル */
.button-link {
    text-decoration: none;
    color: #fff;
    padding: 2px 6px;
    border: 1px solid #fff;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0; /* 角を直角に変更 */
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
    margin: 5px 0;
    line-height: 1.2;
}

/* 見出し要素のボタンリンクのスタイル調整 */
h1 .button-link, 
h1.button-link {
    font-size: 1em;
    padding: 2px 6px;
}

h3 .button-link,
h3.button-link {
    font-size: 1em;
    padding: 2px 6px;
}

p .button-link,
p.button-link {
    font-size: 1em;
    padding: 2px 6px;
}

.button-link:hover {
    background-color: #fff;
    color: #000;
    opacity: 1;
}