/* すべてのページに適用される設定 */
html {
    font-size: 16px;
    font-family: sans-serif;
color: #FFF; /* 文字色 */
text-shadow:
1px 1px 0 #000,
-1px -1px 0 #000,
-1px 1px 0 #000,
1px -1px 0 #000; /* 影の位置と色 */
}

* {
    box-sizing: border-box;
}
body {
    margin: 0 0 0 0;
}
p, li {
    line-height: 1.7;
}

img {
    max-width: 100%;
}
.kakomi {
    background: #fceff2;
    background-image: radial-gradient(#ffc0cb 10%, transparent 20%);
    background-size: 20px 20px;  
    background-position: 0 0, 10px 10px;   
    font-size: 100%; padding: 20px;
}
  

/* すべてのページに適用 - ヘッダー */
h1 {
    text-align: center;
}
nav {
    border-bottom: 2px solid #0a3ee9;
    border-top: 2px solid #092ae9;
}
nav ul {
    margin: 30px 0 0 0;
    padding: 0;
    list-style-type: none;
    display: flex;
    justify-content: center;
    gap: 40px;
}
nav a:link {
    color: #FFFFFF;
}
nav a:visited {
    color: #F067A6;
}
nav a:hover {
    text-decoration: none;
}
nav a:active {
    text-decoration: none;
}

/* すべてのページに適用 - メイン */
main {
    margin: 90px auto 90px auto;
    max-width: 1000px;
}
main h2 {
    margin: 60px 0 20px 0;
    border-bottom: 2px solid #dde00b;
    padding: 0 0 5px 0;
    color: #e4e70c;
    font-size: 1.3rem;
}

/* 九匹のハムの画像サイス調整 */
.slider {
    width: 100%;
    height: 233;
    margin: 0 auto;
}

.slider img {
    width:200px;
    object-fit: cover;
}

/* 背景設定　*/

body {
    height: 100vh;
    background-image: url("image/33348806_l1.jpg");
    background-repeat: no-repeat;
    min-height: 100vh;
    background-size: auto;
    background-attachment: fixed;
    background-position: bottom;
}

/* メイン画像設定 */
.mainimage {
    padding-top: 80px;
    size: cover;
    text-align: center;
    height: auto;
    width: 100vw;
}

/* すべてのページに適用 - フッター */
.gotop {
  text-align: right;
}
.copyright {
    text-align: center;
}



/* 画像集及び動画集 */
/* --- 1. グリッドコンテナの設定 (変更なし) --- */
.items {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* --- 2. 各アイテムのコンテナ設定 --- */
.item-card {
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden; /* 角丸からはみ出るコンテンツを隠す */
    background-color: #fff;
}

/* --- 3. 画像エリアの設定 --- */
.image-area {
    height: 400px; /* ★ここで画像の高さを固定★ */
    overflow: hidden; /* エリアからはみ出る画像を隠す */
}

.image-area img,
.image-area video
{
    width: 100%;
    height: 100%; 
    /* 縦横比を維持しつつ、コンテナ全体を覆う */
    object-fit: cover; 
}

/* --- 4. コメントエリアのデザイン設定 --- */
.comment-area {
    /* コンテナの下に配置される */
    padding: 10px 15px;
    background-color: #fafafa;
    font-size: 0.9em;
    color: rgb(223, 226, 21);
}

.comment-area p {
    margin: 0; /* pタグのデフォルトマージンをリセット */
}


/* トップへ戻るボタン　*/
.pagetop {
        cursor: pointer;
        position: fixed;
        right: 30px;
        bottom: 40px;
        width: 50px;
        height: 50px;
        border-radius: 12px;
        transition: .2s;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        box-shadow: 0 0 6px #d24b4b;
        /*   デフォルト非表示 */
        opacity: 0;
    }

    .pagetop i {
        color: #544bd2;
    }

    .pagetop:hover {
        background-color: #119cd3;
    }

    .pagetop:hover i {
        color: #9e3737;
    }

    /* contact.html */
form {
    margin: 0 auto;
    max-width: 640px;
    padding: 0 20px;
}
input[type="text"], textarea {
    padding: 6px;
    width: 100%;
    font-size: 1rem;
}
textarea {
    height: 140px;
}
.submit {
    text-align: center;
}
input[type="submit"] {
    border: none;
    padding: 20px;
    width: 200px;
    background-color: #d38139;
    color: #FFFFFF;
    font-size: 1rem;
    margin:30px auto 0;
    display: block;
}

/* --- モーダルウィンドウのスタイル --- */

/* モーダル表示領域全体（最初は非表示） */
.modal {
    display: none; 
    position: fixed; 
    z-index: 100; /* 他のコンテンツより前面に表示 */
    padding-top: 100px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; /* スクロール可能にする */
    background-color: rgb(0,0,0); /* 背景色を黒く */
    background-color: rgba(0,0,0,0.9); /* 半透明の黒 */
  }
  
  /* 拡大表示される画像（モーダルの中身） */
  .modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    /* アニメーション */
    -webkit-animation-name: zoom;
    -webkit-animation-duration: 0.6s;
    animation-name: zoom;
    animation-duration: 0.6s;
  }
  
  /* キャプションテキスト */
  #caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
  }
  
  /* 閉じるボタン */
  .close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
  }
  
  .close:hover,
  .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
  }

 .image-area2 img{
    width: auto;
    height: auto;
    object-fit: contain;
}
  
  /* 画像ズームインのアニメーション */
  @-webkit-keyframes zoom {
    from {-webkit-transform:scale(0)} 
    to {-webkit-transform:scale(1)}
  }
  
  @keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
  }

 /* ================================================== */
/* PC/デフォルトスタイル (780pxよりも広い画面) */
/* ================================================== */

/* navのPC用ボーダー設定 */
nav {
    border-bottom: 2px solid #0a3ee9;
    border-top: 2px solid #092ae9;
}

/* PCでは横並びのメニューリスト */
#main-navigation ul {
    display: flex; 
    list-style: none;
    padding: 0;
    justify-content: space-around;
}

/* ハンバーガーメニューボタンの基本スタイル（PCでは非表示） */
#menu-toggle-button {
    display: none; 
    width: 40px; /* ボタンサイズ */
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    /* header内で位置を調整するための指定（必要ならheaderにposition: relative;を設定） */
}

/* ハンバーガーメニューの線のスタイル */
#menu-toggle-button span {
    display: block; 
    height: 4px;    /* 線の太さ */
    background-color: #ff69b4; /* 線の色 */
    margin: 6px 0;  /* 線同士の隙間 */
    width: 100%;    
    transition: all 0.3s ease; 
}


/* ================================================== */
/* レスポンシブ対応 (画面幅が780px以下の場合) */
/* ================================================== */
@media (max-width: 780px) {
    
    /* 780px以下では、navのボーダーを常に消す */
    #main-navigation,
    nav {
        border-bottom: none;
        border-top: none;
    }

    /* ハンバーガーメニューボタンを表示し、画面右上に固定 */
    #menu-toggle-button {
        display: block; 
        position: fixed; /* 画面に固定 */
        top: 10px;       /* 上からの位置 */
        right: 10px;     /* 右からの位置 */
        z-index: 1000;   /* 最前面に配置 */
    }

    /* ナビゲーションメニュー本体の設定 */
    #main-navigation ul {
        display: flex;
        flex-direction: column; /* 縦並び */
        list-style: none;
        
        /* Padding調整: 上60pxはボタンの下に来るように調整 */
        padding: 60px 20px 20px 20px; 
        
        width: auto; /* 幅をコンテンツ（メニュー文字）に合わせる */
        min-width: 150px; /* 最小幅 */
        
        height: 100vh; /* 画面いっぱいの高さ */
        background-color: #ffffdd; /* 背景色を薄い黄色に変更 */
        
        position: fixed; /* 画面に固定 */
        top: 0;
        right: 0; 
        z-index: 999; /* ボタンよりは背面 */
        
        /* 初期状態（非表示）: 右に完全に隠す */
        right: -100%; /* 画面外の右に隠す */
        transition: right 0.3s ease-out; /* rightプロパティをアニメーションさせる */
    }
    
    /* JavaScriptで 'is-open' クラスがnav要素についたら表示する */
    #main-navigation.is-open ul {
        right: 0; /* 右端までスライドして表示 */
    }
}

/* モバイル対応 */
/* ------------------------------------------- */
/* PC・デフォルト設定 (幅が広い場合: 769px以上) */
/* ------------------------------------------- */
.items {
    display: grid;
    /* デフォルトの3列表示 */
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* ------------------------------------------- */
/* タブレット向け設定 (画面幅が768px以下の場合) */
/* ------------------------------------------- */
@media (max-width: 768px) {
    .items {
        /* 画面が狭くなったら2列に変更 */
        grid-template-columns: 1fr 1fr;
        gap: 15px; /* 隙間も少し狭くする */
    }

    .image-area {
        object-fit: contain; /* タブレットでは画像の高さを少し低くする */
    }
}

/* ------------------------------------------- */
/* スマートフォン向け設定 (画面幅が480px以下の場合) */
/* ------------------------------------------- */
@media (max-width: 480px) {
    .items {
        /* スマートフォンでは縦に並ぶ1列に変更 */
        grid-template-columns: 1fr;
        gap: 10px; /* 隙間をさらに狭くする */
    }

    .image-area {
        object-fit: contain; /* スマホでは画像の高さをさらに低くする */
    }

    #news h2 {
        text-align: center;
    }

    #news ul {
        padding-right: 20px;
    }
}