/* =================================================================
   home.css - TOPページ専用スタイル
   ================================================================= */

/* ===== メインビジュアル ===== */
.sec_hero {
    background-color: #f8f8f8;
    padding: 160px 0 100px;
    height: auto;
    display: flex;
    align-items: flex-start;
}

.sec_hero_content {
    display: flex;
    align-items: center;
}

.sec_hero_text {
    flex: 1;
    padding-right: 80px;
    max-width: 100%;
    box-sizing: border-box;
}

.sec_hero_caption {
    font-family: 'Noto Serif JP', serif;
    font-size: 22px;
    color: #666;
    margin-bottom: 25px;
    font-weight: 500;
}

.sec_hero_title {
    font-family: 'Noto Serif JP', serif;
    font-size: 42px;
    font-weight: 500;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.3;
}

.sec_hero_description {
    font-size: 18px;
    color: #555;
    margin-bottom: 35px;
    line-height: 1.7;
}

.sec_hero_image {
    flex: 1;
    height: 400px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-weight: 500;
}

.sec_hero_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== 施工写真カルーセル（MV内） ===== */
.sec_hero_photos {
    margin-top: 60px;
}

/* カルーセル本体（JSが参照するためクラス名維持） */
.carousel {
    position: relative;
    overflow-x: clip;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s ease;
}

.carousel-slide {
    min-width: 100%;
    box-sizing: border-box;
    display: flex;
    gap: 20px;
}

.carousel-slide .photo-item {
    flex: 1;
    min-width: 0;
}

.photo-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.photo-caption {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.5;
    font-weight: 400;
    min-height: 2.6em;
}

/* 矢印ボタン */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 32, 96, 0.7);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 2;
}

.carousel-btn:hover {
    background: rgba(0, 32, 96, 0.95);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* ドットインジケーター */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: #002060;
}

/* ===== 研究会について（TOP） ===== */
.sec_about {
    background-color: #fff;
}

.sec_about_content {
    display: flex;
    align-items: center;
    gap: 70px;
}

.sec_about_text {
    flex: 1;
}

.sec_about_text p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 18px;
}

.sec_about_image {
    flex: 1;
    height: 350px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-weight: 500;
}

.sec_about_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== お知らせ（TOP） ===== */
.sec_news {
    background-color: #f8f8f8;
}

/* ===== 開発工法（TOP） ===== */
.sec_products {
    background-color: #f8f8f8;
}

.sec_products_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
}

.sec_product_item {
    background-color: #fff;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    display: block;
}

.sec_product_item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.sec_product_image {
    width: 100%;
    height: 200px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-weight: 500;
    overflow-x: clip;
}

.sec_product_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sec_product_content {
    padding: 30px;
}

.sec_product_item h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 500;
    font-family: 'Noto Serif JP', serif;
}

.sec_product_item p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.sec_product_link {
    display: inline-block;
    padding: 10px 20px;
    background: #002060;
    color: white;
    font-size: 14px;
    border-radius: 4px;
}

.sec_product_status {
    display: inline-block;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
}

.sec_status_ready {
    background-color: #002060;
    color: #ffffff;
}

.sec_status_dev {
    background-color: #e6ebf5;
    color: #002060;
    border: 1px solid #002060;
}

/* ===== 資料ダウンロード（TOP） ===== */
.sec_download {
    background-color: #e6ebf5;
    text-align: center;
}

.sec_download_content {
    max-width: 800px;
    margin: 0 auto;
}

.sec_download_content > p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 35px;
}

.sec_download_category {
    background: white;
    border-radius: 8px;
    padding: 30px 35px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.sec_download_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sec_download_list li {
    margin-bottom: 12px;
}

.sec_download_list li:last-child {
    margin-bottom: 0;
}

.sec_download_link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 15px;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.sec_download_link:hover {
    color: #002060;
    opacity: 1;
}

.sec_download_link svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.sec_download_more {
    margin-top: 35px;
}

/* ===== お問い合わせ（TOP） ===== */
.sec_contact {
    background-color: #fff;
    text-align: center;
}

.sec_contact p {
    font-size: 17px;
    max-width: 700px;
    margin: 0 auto 35px;
    line-height: 1.7;
}


/* ===== 写真ティッカー（JSドリブン無限スクロール） ===== */
.photo-ticker {
    position: relative;
    margin-top: 40px;
}

.photo-ticker-viewport {
    overflow-x: clip;
    width: 100%;
}

.photo-ticker-track {
    display: flex;
    gap: 20px;
    will-change: transform;
}

.photo-ticker-item {
    flex-shrink: 0;
    width: 320px;
}

.photo-ticker-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.photo-ticker-caption {
    font-size: 13px;
    color: #555;
    margin-top: 8px;
    line-height: 1.5;
}

/* 矢印ボタン */
.photo-ticker-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-70%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 32, 96, 0.7);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.photo-ticker-btn:hover {
    background: rgba(0, 32, 96, 0.95);
}

.photo-ticker-prev { left: 5px; }
.photo-ticker-next { right: 5px; }


    .photo-ticker-item img {
        height: 170px;
    }
    .photo-ticker-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}


/* =================================================================
   レスポンシブ（Gutenbergネイティブ対応）
   ================================================================= */

/* --- 1200px以下 --- */
@media screen and (max-width: 1200px) {
    .sec_hero_title,
    h1.wp-block-heading.sec_hero_title {
        font-size: 38px !important;
    }
}

/* --- 992px以下（タブレット） --- */
@media screen and (max-width: 992px) {
    /* ヒーロー: 縦並び */
    .wp-block-columns.sec_hero_content {
        flex-direction: column !important;
    }

    .sec_hero_text,
    .wp-block-group.sec_hero_text {
        padding-right: 0 !important;
        margin-bottom: 30px;
        max-width: 100%;
    }

    /* 研究会について: 縦並び */
    .wp-block-columns.sec_about_content {
        flex-direction: column !important;
        gap: 30px !important;
    }

    /* 製品カード: 1列 */
    .wp-block-columns.tmpl_products_grid {
        flex-direction: column !important;
        gap: 25px !important;
    }

    /* ダウンロード */
    .sec_download .wp-block-group.sec_download_category {
        padding: 20px 22px;
    }
}

/* --- 768px以下（スマホ） --- */
@media screen and (max-width: 768px) {
    /* ヒーロー全体 */
    .sec_hero,
    .wp-block-group.sec_hero,
    div.wp-block-group.sec_hero {
        padding: 180px 0 50px !important;
        overflow-x: clip !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* ヒーローテキスト - padding-right除去を最優先 */
    .sec_hero_text,
    .wp-block-group.sec_hero_text,
    div.wp-block-group.sec_hero_text,
    .sec_hero .sec_hero_text,
    .sec_hero_content .sec_hero_text {
        padding-right: 0 !important;
        padding-left: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: clip !important;
        box-sizing: border-box !important;
    }

    /* ヒーロータイトル */
    .sec_hero_title,
    h1.sec_hero_title,
    h1.wp-block-heading.sec_hero_title {
        font-size: 22px !important;
        line-height: 1.4 !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        max-width: 100% !important;
    }

    .sec_hero_caption,
    p.sec_hero_caption {
        font-size: 12px !important;
    }

    /* ヒーロー説明文 */
    .sec_hero_description,
    p.sec_hero_description {
        font-size: 14px !important;
        line-height: 1.7 !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        max-width: 100% !important;
    }

    /* タイトル・説明文のbrは両方維持（スマホでも改行する） */

    /* ヒーロー画像 */
    .wp-block-columns.sec_hero_content > .wp-block-column:last-child .wp-block-image img {
        max-height: 220px;
        object-fit: cover;
        border-radius: 4px;
    }

    /* 全カラムの幅制限 */
    .sec_hero .wp-block-column,
    .sec_hero_content .wp-block-column,
    .wp-block-columns.sec_hero_content > .wp-block-column {
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: clip !important;
        flex-basis: 100% !important;
    }

    /* tmpl_inner のはみ出し防止 */
    .sec_hero .tmpl_inner,
    .sec_hero .wp-block-group.tmpl_inner {
        padding: 0 20px !important;
        max-width: 100% !important;
        overflow-x: clip !important;
        box-sizing: border-box !important;
    }

    /* Gutenbergレイアウトの上書き */
    .sec_hero .is-layout-constrained > *,
    .sec_hero .is-layout-flow > * {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* セクション余白 */
    .wp-block-group.sec_tmpl_block {
        padding: 40px 0 !important;
    }

    .wp-block-group.tmpl_inner {
        padding: 0 20px !important;
    }

    /* セクションタイトル */
    .wp-block-heading.tmpl_section_title {
        font-size: 22px !important;
        margin-bottom: 30px !important;
    }

    /* 研究会について: テキスト */
    .sec_about_content .wp-block-group.sec_about_text p {
        font-size: 14px;
    }

    /* 製品カード画像 */
    .tmpl_product_card .wp-block-image img,
    .tmpl_product_card .tmpl_product_image img {
        height: 180px !important;
    }

    .tmpl_product_card .tmpl_product_title,
    .tmpl_product_card h3.wp-block-heading.tmpl_product_title {
        font-size: 18px !important;
    }

    .tmpl_product_card .tmpl_product_description {
        font-size: 13px;
    }

    /* ボタン */
    .wp-block-buttons .wp-block-button .wp-block-button__link {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }

    /* お知らせ */
    .tmpl_news_item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px;
    }

    .tmpl_news_title {
        margin-left: 0 !important;
        font-size: 14px !important;
    }

    /* ダウンロードセクション */
    .sec_download .wp-block-group.tmpl_inner {
        max-width: 100% !important;
    }

    .sec_download .wp-block-group.tmpl_inner > .wp-block-paragraph {
        font-size: 14px !important;
    }

    .sec_download .wp-block-group.sec_download_category {
        padding: 18px 15px;
    }

    .sec_download .sec_download_list li a {
        font-size: 13px !important;
    }

    /* ティッカー */
    .photo-ticker-item {
        width: 250px;
    }

    .photo-ticker-item img {
        height: 160px;
    }

    .photo-ticker-caption {
        font-size: 11px;
    }

    .photo-ticker-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* Gutenbergカラムの強制縦並び */
    .wp-block-columns.sec_hero_content,
    .wp-block-columns.sec_about_content,
    .wp-block-columns.tmpl_products_grid {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }

    /* Gutenbergカラムの幅リセット */
    .wp-block-columns.sec_hero_content > .wp-block-column,
    .wp-block-columns.sec_about_content > .wp-block-column,
    .wp-block-columns.tmpl_products_grid > .wp-block-column {
        flex-basis: 100% !important;
        width: 100% !important;
    }
}

/* --- 480px以下（小型スマホ） --- */
@media screen and (max-width: 480px) {
    .sec_hero_title,
    h1.wp-block-heading.sec_hero_title {
        font-size: 20px !important;
    }

    .wp-block-group.sec_hero {
        padding: 170px 0 40px !important;
    }

    .wp-block-group.tmpl_inner {
        padding: 0 15px !important;
    }

    .photo-ticker-item {
        width: 220px;
    }

    .photo-ticker-item img {
        height: 140px;
    }
}

/* ===== TOP: ダウンロードセクション（800px幅制限） ===== */
.sec_download .tmpl_inner,
.sec_download .wp-block-group.tmpl_inner,
.sec_download div.wp-block-group.tmpl_inner,
.wp-block-group.sec_tmpl_block.sec_download .wp-block-group.tmpl_inner,
.wp-block-group.sec_download .wp-block-group.tmpl_inner {
    max-width: 800px !important;
    padding: 0 30px !important;
    text-align: center;
}

/* is-layout上書き: sec_download内のtmpl_innerの子要素も幅制限 */
.sec_download .tmpl_inner > *,
.sec_download .wp-block-group.tmpl_inner > *,
.sec_download .wp-block-group.tmpl_inner.is-layout-constrained > *,
.sec_download .wp-block-group.tmpl_inner.is-layout-flow > * {
    max-width: 100% !important;
}

.sec_download .sec_download_category,
.sec_download .wp-block-group.sec_download_category {
    background: white;
    border-radius: 8px;
    padding: 30px 35px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.sec_download .sec_download_list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sec_download .sec_download_list li {
    margin-bottom: 12px;
}

.sec_download .sec_download_list li:last-child {
    margin-bottom: 0;
}

.sec_download .sec_download_list li a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 15px;
    padding: 8px 0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sec_download .sec_download_list li a:hover {
    color: #002060;
}

.sec_download .sec_download_list li a:before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23002060' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.sec_download .wp-block-group.tmpl_inner > .wp-block-paragraph {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 35px !important;
}

@media screen and (max-width: 768px) {
    .sec_download .tmpl_inner,
    .sec_download .wp-block-group.tmpl_inner {
        max-width: 100% !important;
        padding: 0 20px !important;
    }

    .sec_download .sec_download_category,
    .sec_download .wp-block-group.sec_download_category {
        padding: 20px 22px;
    }

    .sec_download .sec_download_list li a {
        font-size: 13px !important;
    }

    .sec_download .wp-block-group.tmpl_inner > .wp-block-paragraph {
        font-size: 14px !important;
    }
}
