body{
    background-color: antiquewhite;
    max-width: 1080px;
    margin: 0 auto 0 auto;
    font-family: "Source Sans Pro", "Hiragino Kaku Gothic ProN", Meiryo, Arial, sans-serif;
}

/* ヘッダー */
header{
    display: flex;
    align-items:center;
    justify-content: space-between;
    background-color: green;
}
header img{
    width:75px;
    margin-left: 10px;
    display:block;
}
#nav-pc{
    font-size: 20px;
    font-weight: bolder;
    color:white;
}
#nav-pc ul{
    display: flex;
    padding-left: 0;
    margin-right:10px;
}
#nav-pc li{
    list-style: none;
}
#nav-pc a{
    text-decoration: none;
    /* リンクの下線をnoneにすることで相殺 */
    margin-left: 20px;
    color: white;
}
#nav-pc a:hover{
    text-decoration: underline;
    /* リンクにマウスが乗っている時だけ下線を表示 */
}
#nav-sp,#menu-sp{
    display: none;
}

/* body article */
.homepage{
    background-color: #ffffff;
    margin-bottom:0;
}
.homepage p {
    margin:0;
    padding-left: 20px;
    font-weight: bolder;
    font-size: 1.2rem;
}
.homepage img{
    width:50%;
    margin-left: 20px;
}
.business_hours {
    display: flex;
    font-size: 1.2rem;
}
.h2 {
    font-size: 40px;
    background-color: green;
    color: white;
    margin-top:0;
    margin-bottom:0;
    padding-left: 10px;
}
.kaki{
    color:orange;
    padding-right: 20px;
}
.touki{
    color:blue;
}
/* 左画像あり　article */
/* レイアウト全体 */
.info-banner {
    justify-content: center;
    background-color: #fff;
    box-sizing: border-box; /* ←追加 */
    overflow-x: hidden;     /* ←追加（念のため） */
}
.info-banner h2{
    background-color: green;
    color:white;
    font-size: 40px;
    padding-left:10px;
    margin-top: 0;
    margin-bottom: 5px;
}
.info-box {
    display: flex;
    align-items: center;
    max-width: 100%;
    width: 1080px;
    background-color: white;
    box-sizing: border-box;
}
  /* 画像エリア */
.info-image img {
    width: auto;
    height: 250px;
    margin-left:5px;
    margin-right:5px;
}
.info-image2 img {
    width: 150px;
    height: auto;
    margin-right:10px;
    margin-top:5px;
}
  /* テキストエリア */
.info-text p {
    margin: 0.5rem 0;
    font-size: 1.2rem;
    font-weight: bold;
}
.bigred{
    color:red;
    font-size:1.5rem;
}
  /* ボタンアニメーション */
.button-shadow {
    display: inline-block;
    background-color: #4CAF50;
    color: #fff;
    padding: 0.6rem 1.2rem;
    margin-top: 0;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    box-shadow: none;
    transition: all 0.3s ease;
}
.button-shadow:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}
.link{
    font-size: 30px;
    margin-left: 30px;
    color:white;
    background-color: green;
    padding: 15px;
    text-decoration: none;
}
a.link {
    transition: filter 0.3s ease;
}
a.link:hover {
    filter: brightness(70%);
    cursor: pointer;
}

table {
    margin-left: 30px;
    margin-bottom: 0;
    padding:10px;
    border-collapse: collapse;
    width: auto;
    background-color: rgb(66, 214, 66);
    font-size: 20px;
}
th,td {
    border: 3px solid black;
    padding: 8px;
    text-align: right;
    font-weight: bold;
}
.ide-h2 {
    font-size: 40px;
    background-color: blue;
    color: white;
    margin: 0;
    padding-left: 10px;
}
.ide{
    background-color: aqua;
    margin:0;
}
.gga-h2 {
    font-size: 40px;
    background-color: rgb(38, 208, 38);
    color: white;
    margin:0;
    padding-left: 10px;
}
.gallery-h2{
    margin-bottom: 0;
}

#toTopBtn {
    display: none; /* 初期は非表示 */
    position: fixed;
    bottom: 30px;
    right: 10px;
    z-index: 100;
    font-size: 20px;
    background-color: green;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: opacity 0.3s ease;
}
#toTopBtn:hover {
    background-color: greenyellow;
}

footer{
    background-color: black;
    color:white;
    margin-bottom: 0;
    text-align: right;
}
.carousel{
    width: 100%;             /* 固定幅 */
    height: 600px;            /* 固定高さ */
    overflow: hidden;         /* はみ出しを隠す */
    position: relative;       /* スライドの基準に */
    margin-bottom: 0;
}
.about-carousel{
    max-width: 1080px;             /* 最大幅 */
    height: 300px;            /* 固定高さ */
    overflow: hidden;         /* はみ出しを隠す */
    position: relative;       /* スライドの基準に */
    margin-bottom: 0;
}
.slide {
    position: absolute;
    width: 1080px;
    height: 600px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 2s ease;
}
.slide.active {
    opacity: 1;
}
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
  }

  .gallery-item img,
  .gallery-item video {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
  }

  /* モーダル */
  .modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }

  .modal-content {
    max-width: 90%;
    max-height: 90%;
  }

  .modal img {
    width: 100%;
    height: auto;
    border-radius: 8px;
  }
  .modal video {
    max-height: 90vh;   /* 画面の90%以内におさめる（縦方向） */
    max-width: 100%;    /* 横幅は画面幅を超えないように */
    height: auto;
    width: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
  }

  .close-btn,
  .arrow {
    position: absolute;
    color: white;
    font-size: 40px;
    cursor: pointer;
    user-select: none;
  }

  .close-btn {
    top: 20px;
    right: 30px;
  }

  .arrow.left {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
  }

  .arrow.right {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
  }
  .video-label {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background 0.3s;
  }
  
  .video-label:hover {
    background-color: #555;
  }

#image-gallery {
    margin-bottom:0;
    margin-left: 20px;
    margin-right:20px;
}
#video-gallery {
    margin-left: 20px;
    margin-right:20px;
}
.image-gallery {
    display: flex;
    justify-content: center;
    padding: 0 5%;
    gap: 10px;
}
.image-gallery img {
    max-width:265px;
    margin-bottom: 20px;
}
.thumbnail {
    display: block;
    flex: 1;
    cursor: pointer;
    max-width: 90%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.2s;
}

.thumbnail:hover {
    transform: scale(1.05);
}
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.modal img {
    width: 1080px;
    max-width: 100%;
    margin:0 auto;
    height: auto;
    border-radius: 8px;
}
.modal .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    color: white;
    cursor: pointer;
    z-index:10000;
}
.modal .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    color: white;
    cursor: pointer;
    user-select: none;
}

.modal .arrow.left {
    left: 40px;
}

.modal .arrow.right {
    right: 40px;
}
#copyright{
    margin: 0;
}

  /* ボタン中央配置 */
#questionForm button {
    display: block;
    margin: auto;   /* 上下に余白＋左右中央寄せ */
    font-size: 1.2rem;   /* 文字サイズ拡大 */
    padding: 10px 20px;  /* ボタンの大きさ調整 */
    cursor: pointer;
}
#questionForm p{
    margin-top:15px;
}

/* モバイル用にメニューを隠す */
@media (max-width: 768px) {
    header{
        height:40px;
    }
    header img{
        width:40px;
    }
    #nav-pc{
        display: none;
    }
    #menu-sp{
        display: block;
        color:white;
        background-color: transparent;
        font-size: 30px;
        float: right;
        padding: 0;
        padding-right: 20px;
        border: none;
    }
    #nav-sp{
        background-color: green;
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;

        display: none;
        z-index: 100; 
    }
    #close{
        position: absolute;
        color:white;
        font-size: 30px;
        top: 20px;
        right: 20px;
        background-color: transparent;
        border: none;
        z-index: 101; 
    }
    #nav-sp nav ul{
        padding-left: 0;
    }
    #nav-sp nav li{
        list-style: none;
    }
    #logo-sp{
        margin: 80px 0 30px 20px;
    }
    #nav-sp nav a{
        display: block;
        color: #ffffff;
    }
    #nav-sp nav a{
        text-decoration: underline;
    }
    #nav-sp .menu{
        text-decoration: none;
        margin: 0 20px 0 20px;
        height: 44px;
        font-size: 16px;
        background-image: url("images/arrow.png");
        /* 要素の背景として画像を表示 */
        background-repeat: no-repeat;
        /* 背景のリピート方法(repeat no-repeat)を指定 */
        background-position: right top;
        /* 背景の位置を指定 */
    }
    .business_hours {
        margin-left: 0;
    }
    .homepage p {
        padding-bottom: 5px;
        padding-left: 20px;
        font-size: 15px;
    }
    .homepage img{
        width: 90%;
        display: block;
        margin: 0 auto;
        padding-bottom: 10px;
    }
    .info-banner h2{
        background-color: green;
        color:white;
        font-size: 24px;
        padding-left:10px;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    .info-box {
        display: flex;
        align-items: center;
        max-width: 100%;           /* ←修正: 親に合わせる */
        width: 1080px;              /* ←ここで制限する */
        background-color: white;
        box-sizing: border-box;    /* ←追加 */
    }
    
      /* 画像エリア */
    .info-image img {
        width: auto;
        height: 140px;
        margin-right:10px;
        margin-top:5px;
    }
    .info-image2 img {
        width:80px;
        height:auto;
        margin-right:10px;
        margin-top:5px;
    }
    
      /* テキストエリア */
    .info-text p {
        font-weight: bold;
        font-size: 12px;
        margin-top:0;
        margin-bottom: 5px;
    }
    .h2 {
        background-color: green;
        color: white;
        margin-bottom: 0;
        padding-left: 10px;
        font-size: 24px;
    }
    .ide-h2 {
        font-size: 24px;
        background-color: blue;
        color: white;
        margin-bottom: 0;
        padding-left: 10px;
    }
    .gga-h2 {
        font-size: 24px;
        background-color: rgb(38, 208, 38);
        color: white;
        margin-bottom: 0;
        padding-left: 10px;
    }
    .button-shadow {
        font-size: 14px;
        margin-top:0;
        margin-bottom: 10px;
    }
    .carousel{
        width: 100%;
        max-width: 768px;
        height: 200px;            /* 固定高さ */
        overflow: hidden;         /* はみ出しを隠す */
        position: relative;       /* スライドの基準に */
        margin-bottom: 0;
    }
    /* 画像：常にカルーセルの幅に合わせて縮小 */
    .carousel img {
        width: 100%;
        height: auto;
        display: block;
    }
    .about-carousel{
        width: 100%;
        max-width: 768px;             /* 最大幅 */
        height: 200px;            /* 固定高さ */
        overflow: hidden;         /* はみ出しを隠す */
        position: relative;       /* スライドの基準に */
        margin-bottom: 0;
    }
    .slide {
        position: absolute;
        width: 768px;
        height: 200px;
        object-fit: cover;
        opacity: 0;
        transition: opacity 2s ease;
    }
    .slide.active {
        opacity: 1;
    }
    .image-gallery{
        display:flex;
        justify-content: center;
        padding: 0 5%;
        width:90%;
    }
    .image-gallery img{
        width:25%;
        height:auto;
        padding-bottom: 10px;
    }
    table {
        padding:10px;
        border-collapse: collapse;
        width: auto;
        background-color: rgb(66, 214, 66);
        font-size: 15px;
    }
    th,td {
        border: 3px solid black;
        padding: 8px;
        text-align: right;
        font-weight: bold;
    }
    footer{
        font-size:10px;
    }
    #toTopBtn{
        #toTopBtn {
            display: none; /* 初期は非表示 */
            position: fixed;
            bottom: 15px;
            right: 10px;
            z-index: 100;
            font-size: 12px;
            background-color: green;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: opacity 0.3s ease;
        }
    }
}
