@charset "utf-8";

/* --- 共通スタイル --- */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: center;
}

.headerp p {
    margin-bottom: 10px; /* 通常は 16px くらいなので、少し狭めにする */
}

/* --- 「プロフィール」の特定の <p> だけ行間を短縮 --- */
.compact-text {
    margin-bottom: 0px; /* 通常より狭く */
}

/* --- コンテンツエリア --- */
section {
    margin: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

/* --- 特定の p だけ左寄せ --- */
.left-text {
    text-align: left;
}

.container {
    max-width: 900px;
    margin: auto;
}

.profile-img {
    width: 120px;
    border-radius: 50%;
}

.service-img {
    width: 100px;
    height: auto;
    margin: 10px;
}

footer {
    background-color: #333;
    color: white;
    padding: 10px;
    text-align: center;
    margin-top: 20px;
}

/* --- プロジェクト一覧 --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    justify-content: center;
}

.project-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
}

.project-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.project-item h3 {
    font-size: 16px;
    margin-top: 10px;
}

.project-item p {
    font-size: 14px;
    color: #555;
}

/* --- 料金ページ専用スタイル（競合を防ぐためにクラス名を変更） --- */
.price-container {
    max-width: 800px;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.price-header {
    background-color: #333;
    color: white;
    padding: 15px;
    font-size: 24px;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.price-table th, .price-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.price-table th {
    background-color: #f4f4f4;
}

.price-note {
    font-size: 14px;
    color: #555;
    margin-top: 10px;
}

.price-back-button {
    margin-top: 20px;
    display: inline-block;
    padding: 10px 20px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.price-back-button:hover {
    background: #555;
}

/* --- 「お問い合わせはこちら」など特定のリンクだけスタイル変更 --- */
.price-back-button {
    color: #f8f8f8 !important;
    padding: 8px 15px;
    display: block;
    text-decoration: none;
    border-radius: 4px;
}

.cprice-back-button:hover {
    background: #666;
    color: #ffffff !important;
}

/* --- ナビゲーションメニュー（PC版） --- */
nav {
    background: #333;
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

nav ul li {
    display: inline-block;
    margin: 0 15px;
}

/* --- グローバルメニューのフォントカラー（影響を受けないように修正） --- */
nav ul li a {
    color: #f8f8f8 !important;  /* `!important` を追加して上書き防止 */
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
}

nav ul li a:hover {
    background: #666;
    color: #ffffff !important;
}

/* --- スマホ用（ハンバーガーメニュー対応） --- */
@media screen and (max-width: 768px) {
    /* メニューを左上に固定 */
    nav {
        position: fixed;
        top: 0;
        right: -100%; /* 初期状態は画面外に隠す */
        width: 80%;
        height: 100%;
        background: rgba(51, 51, 51, 0.9); /* 透明度 90% */
        padding: 20px;
        box-shadow: -3px 0 5px rgba(0, 0, 0, 0.2);
        z-index: 1100;
        transition: right 0.3s ease-in-out;
    }

        /* メニューが開いた時 */
        nav.active {
            right: 0; /* 画面内に表示 */
        }
    
        .menu-overlay.active {
            display: block; /* 背景のオーバーレイを表示 */
        }
    
        /* 閉じるボタン（×） */
        .menu-close {
            position: absolute;
            top: 15px;
            right: 15px;
            font-size: 24px;
            color: white;
            cursor: pointer;
        }

    /* 最初は非表示 */
    nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column; /* 縦に並べる */
        align-items: center;
        width: 100%;
    }

/* --- メニューが開いた時（JSで追加） --- */
nav ul.active {
    display: block;
    opacity: 1;
}

    nav ul li {
        display: block;
        margin: 10px 0;
    }

    nav ul li a {
        color: white;
        font-size: 20px;
        text-decoration: none;
        display: block;
        padding: 15px;
        width: 100%;
        text-align: center;
    }

    nav ul li a:hover {
        background: #666;
    }

    /* ハンバーガーメニューのボタン */
    .menu-toggle {
        position: fixed;
        top: 2px;
        left: 2px;
        background: rgba(51, 51, 51, 1.0); /* 透明度 80% */
        color: white;
        border: none;
        padding: 10px 15px;
        font-size: 18px;
        cursor: pointer;
        border-radius: 5px;
        z-index: 1100;
        display: block;
    }
}

/* --- リンクスタイル（グローバルメニューに影響しないように変更） --- */
a:link {
    color: #515151;
    transition: color 0.3s ease-in-out;
}

a:visited {
    color: #464646;
}

a:hover {
    color: #B9B9B9;
}

.link-p {
    margin-top: -4px;
}

/* --- PC版ではハンバーガーメニューを非表示 --- */
@media screen and (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}

html {
    scroll-behavior: smooth;
}