﻿@charset "utf-8";

/* ====================================
   基本レイアウト（PC・共通）
   ==================================== */
@import url(./common.css);

body {
    background-color: #f3f2e9;
    color: #5f5039;
    margin: 0;
}

/* 共通幅設定 */
header, nav, #breadcrumb, #contents, footer {
    width: 840px;
    margin-left: auto;
    margin-right: auto;
}

/* --- ヘッダー周り --- */
header h1 {
    margin: 0 0 26px 0;
    padding-top: 28px;
    text-align: center;
}

/* テキストロゴ（PC） */
.logo-text {
    font-family: "游明朝", "Yu Mincho", serif;
    font-size: 220%;
    color: #5f5039;
    text-align: center;
    margin: 30px 0;
    letter-spacing: 0.12em;
    background-color: #fdfaf3;
    border: 1px solid #d6cdb8;
    border-radius: 10px;
    padding: 18px 30px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.logo-text a {
    text-decoration: none;
    color: #5f5039;
}

/* --- ナビゲーション（PC） --- */
nav ul {
    list-style-type: none;
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

nav ul li {
    width: 140px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    background-color: #4b3c24; /* ダークブラウン */
    border-radius: 8px;
    border: 1px solid #d6cdb8;
    margin-bottom: 10px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

nav ul li a {
    display: block;
    width: 100%;
    height: 100%;
    font-family: "游明朝", "Yu Mincho", serif;
    font-size: 105%;
    color: #ffffff; /* 白文字 */
    text-decoration: none;
    transition: color 0.3s ease; 
}

/* ホバー時のスタイル（少しベージュがかった白） */
nav ul li:hover {
    background-color: #eae6d9; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

nav ul li:hover a {
    color: #4b3c24; 
}

/* 現在いるページのカレントスタイル（真っ白） */
nav ul li.current {
    background-color: #ffffff; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border: 1px solid #d6cdb8;
}

nav ul li.current a {
    font-weight: bold;
    color: #4b3c24; 
}

/* ====================================
   トップページ スライドショー（PC）
   ==================================== */
#slideshow {
    width: 840px; 
    height: 450px; /* 画像の高さに合わせて調整してください */
    margin: 0 auto 30px auto;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* リンク要素をスライド全体に広げる */
.slide {
    display: block; 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* スライド内の画像設定 */
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 比率を保って枠いっぱいに表示 */
}

/* ★新規追加：スライド上の文字（キャプション）設定 */
.slide-caption {
    position: absolute;
    bottom: 25px;       /* 下からの位置 */
    left: 50%;          /* 左から50%の位置に配置して... */
    transform: translateX(-50%); /* さらに自分の幅の半分だけ戻すことで完全な中央揃えにする */
    background-color: rgba(75, 60, 36, 0.85); /* ナビゲーションと同じ焦げ茶色を少し透けさせる */
    color: #ffffff;
    padding: 10px 25px;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    white-space: nowrap; /* 文字を改行させない */
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* --- メインコンテンツ --- */
#main {
    width: 840px;
    float: none;
    margin: 0 auto;
}

#main h1 {
    margin: 0 0 30px 0;
    padding: 20px 30px;
    font-size: 165%;
    color: #5f5039;
    background-color: #fdfaf3;
    border: 1px solid #d6cdb8;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.intro {
    line-height: 1.8;
    margin-bottom: 30px;
}

/* --- フッター --- */
footer {
    padding-top: 70px;
    text-align: center;
}

footer address {
    font-style: normal;
    color: #5f5039;
    margin-bottom: 10px;
}

footer small {
    color: #5f5039;
}

/* ====================================
   作品一覧テーブル（PC版ベース）
   ==================================== */
.work-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto 40px auto;
    font-size: 15px;
    background-color: #fff;
}

.work-table th {
    background-color: #eee8cc;
    padding: 12px;
    border: 1px solid #ccc;
    text-align: center;
    font-weight: bold;
    color: #5f5039;
}

.work-table td {
    padding: 12px;
    border: 1px solid #ccc;
    vertical-align: middle;
    text-align: center;
    color: #5f5039;
}

.work-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.work-table tbody tr:hover {
    background-color: #f0ede4;
    transition: 0.2s;
}

.work-table td.work {
    width: 420px;
    text-align: left;
}

.work-table td.work a {
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: inherit;
    justify-content: flex-start;
}

.work-table td.work img {
    width: 110px;
    height: auto;
    border-radius: 4px;
    display: block;
}

.work-table td.work span {
    font-size: 17px;
    font-weight: bold;
    color: #4a3d2a;
}


/* ====================================
   ハンバーガーメニュー（共通設定）
   ==================================== */
.hamburger {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px; 
    cursor: pointer;
    background-color: rgba(253, 250, 243, 0.9);
    border: 1px solid #d6cdb8;
    border-radius: 4px;
    padding: 0;
    z-index: 1000;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #5f5039;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ====================================
   ポートフォリオ個別案件（.work-item）の修正
   ==================================== */

.work-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e6e0d0;
}

.work-item:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.work-img {
    width: 48%;
}

.work-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
    vertical-align: bottom;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.work-txt {
    width: 48%;
}

.work-txt h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #5f5039;
    border-bottom: 1px dotted #5f5039;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.work-meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
}

.work-desc {
    line-height: 1.8;
    margin-bottom: 20px;
}

.btn-visit {
    display: inline-block;
    padding: 10px 25px;
    background-color: #5f5039;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.btn-visit:hover {
    opacity: 0.8;
}
    

/* ====================================
   ▼ スマホ表示（画面幅767px以下）▼
   ==================================== */
@media screen and (max-width: 767px) {

    header, nav, #breadcrumb, #contents, footer, #main {
        width: 100% !important;
        padding-left: 15px; 
        padding-right: 15px;
        box-sizing: border-box;
    }

    .logo-text {
        font-size: 150%;
        margin: 15px 0;
        padding: 15px;
    }

    #main h1 {
        font-size: 130%;
        padding: 15px;
    }

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

    /* --- スマホ用スライドショー調整 --- */
    #slideshow {
        width: 100% !important;
        height: 250px; /* スマホでは高さを抑える */
        margin-bottom: 20px;
        border-radius: 0;
    }

    /* スマホ用に文字サイズを少し小さくする */
    .slide-caption {
        font-size: 0.9rem;
        padding: 6px 15px;
        bottom: 15px;
    }

    /* --- ハンバーガーメニュー表示 --- */
    .hamburger {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 60px 0 20px;
        background-color: #f3f2e9;
        border-bottom: 2px solid #d6d0c4;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 999;
    }

    nav ul.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    nav ul li {
        width: 100%;
        margin: 0;
        border: none;
        border-bottom: 1px dotted #d6cdb8;
        border-radius: 0;
        background-color: transparent; 
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul li a {
        padding: 0;
        font-size: 110%;
        color: #5f5039; 
    }

    /* スマホ用のカレントスタイル（真っ白） */
    nav ul li.current {
        background-color: #ffffff; 
    }

    nav ul li.current a {
        color: #4b3c24; 
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to   { opacity: 1; transform: translateY(0); }
    }


    /* --- 作品一覧テーブル（スマホ最適化） --- */
    .work-table {
        width: 100%;
        table-layout: fixed;
        margin-bottom: 30px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .work-table th:nth-child(1),
    .work-table td:nth-child(1) {
        display: none;
    }

    .work-table th:nth-child(2), 
    .work-table td:nth-child(2) {
        width: 90px;
        white-space: nowrap;
        padding: 8px 4px;
        font-size: 11px;
        text-align: center;
        vertical-align: middle;
    }

    .work-table th:nth-child(2) {
        background-color: #eee8cc;
    }

    .work-table td:nth-child(2) {
        background-color: transparent;
    }

    .work-table td.work {
        width: auto;
        padding: 16px 8px;
        vertical-align: middle;
        background-color: transparent;
    }

    .work-table td.work a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        width: 100%;
    }

    .work-table td.work img {
        width: 100%;
        max-width: 180px;
        height: auto;
        margin-bottom: 10px;
        display: block;
        border: 1px solid #eee;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    .work-table td.work span {
        text-align: center;
        display: block;
        font-size: 14px;
        line-height: 1.4;
    }

    .work-item {
        display: block;
        margin-bottom: 40px;
        padding-bottom: 30px;
    }

    .work-img {
        width: 100%;
        margin-bottom: 20px;
    }

    .work-txt {
        width: 100%;
    }

    .work-txt h2 {
        font-size: 1.3rem;
    }

}