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

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
}

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

/* ヘッダー */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 50px;
}

.pc-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.pc-nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s;
}

.pc-nav a:hover {
    color: #007bff;
}

/* スマホメニュー */
.sp-menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    height: 30px;
    justify-content: space-between;
}

.sp-menu-icon span {
    display: block;
    height: 3px;
    background: #333;
    transition: all 0.3s;
}

.sp-nav {
    display: none;
    position: fixed;
    top: 80px;
    right: -300px;
    width: 300px;
    height: calc(100vh - 80px);
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s;
    z-index: 999;
}

.sp-nav.active {
    right: 0;
}

.sp-nav ul {
    list-style: none;
    padding: 20px;
}

.sp-nav li {
    margin-bottom: 20px;
}

.sp-nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    display: block;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

/* メインコンテンツ */
main {
    margin-top: 80px;
}

section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

p {
    margin-bottom: 20px;
    line-height: 1.8;
}

/* ファーストビュー */
#firstview {
    padding: 0;
    text-align: center;
}

#firstview img {
    width: 100%;
    height: auto;
}

/* ZEHセクション */
#ZEH {
    text-align: center;
    background: #f8f9fa;
}

.zeh-images {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.zeh-images img {
    max-width: 45%;
}
/* レスポンシブデザイン */
@media (max-width: 768px) {
    #ZEH h3 {
        font-size: 15px;
    }
    #ZEH .zeh-discription {
        font-size: 11px;
        text-align: left;
    }
}

/* カルーセル */
.carousel {
    position: relative;
    overflow: hidden;
    margin: 40px 0;
}

.carousel-inner {
    display: flex;
    transition: transform 0.3s ease;
}

.carousel-item {
    min-width: 100%;
    text-align: center;
}

.carousel-item img {
    max-width: 80%;
    height: auto;
}

/* ボタン */
.btn {
    display: inline-block;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

/* MERITセクション */
#MERIT {
    text-align: center;
}

/* REASONセクション */
#REASON {
    background: #f8f9fa;
}

.reason-item {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    gap: 30px;
}

/* .reason-item:nth-child(even) {
    flex-direction: row-reverse;
} */

.reason-item img {
    max-width: 300px;
    flex-shrink: 0;
}

.reason-item div {
    flex: 1;
}

/* WORKSセクション */
#WORKS {
    text-align: center;
}

/* FLOWセクション */
#FLOW {
    text-align: center;
    background: #f8f9fa;
}

/* CONTACTセクション */
#CONTACT {
    background: #fff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group label span {
    background: #dc3545;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-left: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.checkbox-group label {
    margin-bottom: 0;
}

.checkbox-group a {
    color: #007bff;
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    font-size: 1.2rem;
    padding: 20px;
}

/* フッター */
footer {
    background: #333;
    color: #fff;
    padding: 40px 20px 20px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-inner .logo img {
    height: 40px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

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

.footer-info p {
    margin-bottom: 5px;
}
@media (max-width: 768px) {
    .footer-info {
        font-size: 10px;
    }
}

.copyright {
    border-top: 1px solid #555;
    padding-top: 20px;
    margin-top: 20px;
    font-size: 0.9rem;
}

/* LINE固定ボタン */
.line-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s;
}

.line-fixed:hover {
    transform: scale(1.1);
}

.line-fixed img {
    width: 80px;
    height: auto;
}

/* プライバシーポリシーポップアップ */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.popup-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    margin: 20px;
}

.popup-content h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.popup-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    margin-top: 25px;
}

.popup-content h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    margin-top: 20px;
}

.popup-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.popup-content table th,
.popup-content table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.popup-content table th {
    background: #f8f9fa;
    font-weight: bold;
}

.popup-content ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.popup-content ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

#close-popup {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 1rem;
}

#close-popup:hover {
    background: #0056b3;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .pc-nav {
        display: none;
    }
    
    .sp-menu-icon {
        display: flex;
    }
    
    .sp-nav {
        display: block;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .zeh-images {
        flex-direction: column;
        align-items: center;
    }
    
    .zeh-images img {
        max-width: 80%;
    }
    
    .reason-item {
        flex-direction: column;
        text-align: center;
    }
    
    .reason-item:nth-child(even) {
        flex-direction: column;
    }
    
    .reason-item img {
        max-width: 80%;
    }
    
    .carousel-item img {
        max-width: 95%;
    }
    
    .line-fixed img {
        width: 60px;
    }
    
    .popup-content {
        margin: 10px;
        padding: 20px;
        max-height: 90vh;
    }
    
    .popup-content h2 {
        font-size: 1.5rem;
    }
    
    .popup-content h3 {
        font-size: 1.3rem;
    }
    
    .popup-content h4 {
        font-size: 1.1rem;
    }
    
    .popup-content table {
        font-size: 0.9rem;
    }
    
    .popup-content table th,
    .popup-content table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 0 15px;
        height: 70px;
    }
    
    main {
        margin-top: 70px;
    }
    
    .sp-nav {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    section {
        padding: 40px 15px;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .line-fixed {
        bottom: 15px;
        right: 15px;
    }
    
    .line-fixed img {
        width: 50px;
    }
}


/* カルーセルボタンとインジケーター */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-indicator.active {
    background: #007bff;
}

.carousel-indicator:hover {
    background: #007bff;
}

/* --- MERITセクション カルーセル複数表示対応 (スクロールコンテナ版) --- */

/* カルーセル外側のコンテナ */
.merit-carousel {
    position: relative; /* ボタンを配置するため */
}

/* カルーセル内側: Gridとスクロールの設定 */
.merit-carousel .carousel-inner {
    display: grid;
    grid-auto-flow: column; /* アイテムを横方向に強制的に並べる */
    grid-auto-columns: calc(25% - 15px); /* PCでの各アイテムの幅 */
    gap: 20px;
    overflow-x: auto; /* 横スクロールを有効にする */
    scroll-snap-type: x mandatory; /* スクロールが止まる位置を強制する */
    scroll-behavior: smooth; /* スムーズスクロールを有効にする */
    -ms-overflow-style: none;  /* IE、Edgeでスクロールバーを非表示 */
    scrollbar-width: none;  /* Firefoxでスクロールバーを非表示 */
}

/* Chrome、Safariでスクロールバーを非表示 */
.merit-carousel .carousel-inner::-webkit-scrollbar {
    display: none;
}

/* カルーセルアイテム */
.merit-carousel .carousel-item {
    scroll-snap-align: start; /* アイテムの先頭でスクロールが止まるようにする */
    width: 100%; /* grid-auto-columnsで指定した幅に追従 */
}

/* カルーセル画像のサイズ */
.merit-carousel .carousel-item img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 8px;
}

/* ナビゲーションボタンの位置 */
.merit-carousel .carousel-btn {
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* スマートフォン表示（768px以下） */
@media (max-width: 768px) {
    .merit-carousel .carousel-inner {
        grid-auto-columns: calc(50% - 10px); /* スマホでの各アイテムの幅 */
    }

    .merit-carousel .carousel-item img {
        height: 380px;
    }
}

/* --- MERITセクション テキストボックス追加 --- */

/* アイテムの位置指定の基準にする */
.merit-carousel .carousel-item {
    position: relative;
    overflow: hidden; /* はみ出した要素を隠す */
}

/* テキストボックスのスタイル */
.merit-carousel .merit-text-box {
    position: absolute; /* 親要素を基準に絶対配置 */
    bottom: 15px;
    left: 35px;
    right: 0;
    height: 45%; /* アイテムの下45%を覆う */
    width: 75%;
    /* background-color: rgba(255, 255, 255, 0.9);  */
    background-color: #ffffff;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

/* 見出しのスタイル */
.merit-carousel .merit-text-box .subtitle {
    color: #b86f58; /* ご指定の色 */
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

/* 段落のスタイル */
.merit-carousel .merit-text-box p {
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.merit-description{
    text-align: left;
}

/* スマホ用の文字サイズ調整 */
@media (max-width: 768px) {
    .merit-carousel .merit-text-box {
        padding: 5px;
        height: 50%;
        width: 88%;
        left: 10px;
    }
    .merit-carousel .merit-text-box h3 {
        font-size: 1rem;
    }
    .merit-carousel .merit-text-box .subtitle {
        font-size: 10px;
    }
    .merit-carousel .merit-text-box p {
        font-size: 10px;
    }
}

.title-description {
    font-size: 15px;
    margin-top: -50px;
}

/* --- WORKSセクション テキストボックス --- */
.works-carousel .carousel-item {
    position: relative;
    cursor: pointer;
    overflow: hidden; /* はみ出した要素を隠す */
}

.works-text-box {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 15px 20px;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.4s ease-out;
}

.works-carousel .carousel-item:hover .works-text-box {
    transform: translateY(0);
}

.works-text-box h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 5px;
}

.works-text-box p {
    font-size: 0.9rem;
    margin-bottom: 0;
    opacity: 0.9;
}


/* --- WORKS ポップアップ --- */
.works-popup-overlay {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.works-popup-overlay.active {
    display: flex; /* activeクラスで表示 */
}

.works-popup-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.works-popup-body {
    padding: 30px;
    overflow-y: auto;
    flex-grow: 1;
}

.works-popup-body h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
}

.popup-main-content {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
}

.popup-main-content .main-image {
    width: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 5px;
}

.popup-main-content p {
    font-size: 1rem;
    line-height: 1.8;
}

.popup-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.popup-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #eee;
}

.works-popup-close {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #4a5a94;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    transition: background-color 0.3s;
}

.works-popup-close:hover {
    background-color: #3b4776;
}

/* ポップアップ レスポンシブ対応 */
@media (max-width: 768px) {
    .works-popup-body {
        padding: 20px;
    }
    .popup-main-content {
        flex-direction: column;
    }
    .popup-main-content .main-image {
        width: 100%;
    }
}

.corp-bn {
    width: 400px;
}
@media (max-width: 768px) {
    .corp-bn {
        width: 200px;
    }
}

/* --- Thanks Page Styles --- */
#thanks {
    text-align: center;
    padding-top: 60px;
    padding-bottom: 60px;
}

.thanks-content {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    max-width: 700px;
    margin: 0 auto;
}

.thanks-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: bold;
    margin: 0 auto 30px;
    color: #fff;
}

.thanks-icon.success {
    background: linear-gradient(45deg, #28a745, #218838);
}

.thanks-icon.warning {
    background: linear-gradient(45deg, #ffc107, #e0a800);
}

.thanks-icon.error {
    background: linear-gradient(45deg, #dc3545, #c82333);
}

#thanks h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

#thanks p {
    color: #555;
    line-height: 1.8;
}

#thanks .note {
    font-size: 0.9rem;
    color: #777;
    margin-top: 15px;
}

.contact-info-thanks {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 35px 0;
    text-align: center;
    border: 1px solid #e9ecef;
}

.contact-info-thanks h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
}

.contact-info-thanks .phone-number {
    font-size: 1.6rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
}

.contact-info-thanks .phone-hours {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .thanks-content {
        padding: 30px 20px;
    }
    #thanks h1 {
        font-size: 1.6rem;
    }
    .contact-info-thanks .phone-number {
        font-size: 1.4rem;
    }
}