/*=======================================
　汎用レイアウト
=======================================*/
:root {
    --font-primary: serif,'Bebas Neue', sans-serif;
}
    .content-section{ margin-bottom: 100px;}
    .container{ position: relative;}
    .section-detail { margin-left: auto;min-height: 179px;padding: 12px;z-index: 1;}
    .section-detail > p { padding: 21px;background: #f3f3f3;}
    .background-img { line-height: 0;background: #efefef;}
    .background-img img { line-height: 0;}
    .worksdetail .container{ margin-bottom: 42px;}
    .slider-list { display: flex;overflow-x: auto; gap:21px;padding: 16px 0;}
    .slider-item:not(.worksdetail .slider-item){
        border-radius: 12px;
        min-width: calc(270px + 24px);
        max-width: calc(320px + 24px);
        padding: 12px;
        transition: all .3s;
    }
    .slider-item:first-child:not(.worksdetail .slider-item:first-child){ margin-left: auto;}
    .slider-item:hover{
        opacity: 0.5;
        background: #9a9a9a;
        transform: translateY(10px);
    }
    .card-image img{ border-radius: 12px;}
    
/*=======================================
　汎用フォント
=======================================*/
    .section-title:not(.News) {
        font-weight: bold;
        font-family: serif;
        border-bottom: 2px solid;
        border-bottom-color: #00d800;
        padding: 0 16px;
        background: #ffffffe0;
    }
    .card-title {
        font-size: 20px;
        text-align: center;
        text-shadow: 0px 5px 10px #8c8c8c;
    }
/*=======================================
　トップビュー
=======================================*/
.hero-wrap{
  width: min(1800px, 100vw);
  max-height: 930px;         /* 必要なら残す。不要なら外す */
  margin: 0 auto;
  position: relative;
  overflow: hidden;          /* cover時のはみ出し防止 */
}
.hero-wrap ul{
    /* フルスクリーンの見た目を維持（アドレスバーで揺れない "svh" を使用） */
    height: calc(100svh);              /* 2025年の主要ブラウザで安定 */
    /* 古い環境のフォールバック（僅かに揺れるがCLSは最小） */
    min-height: calc(100vh);
}
.Opening img.Opening__img {
  transition: transform var(--zoom-duration, 5000ms) linear, opacity 200ms ease;
  transform: scale(1);
}
.Opening img.Opening__img.zoom-in { transform: scale(1.03); }
.Opening img.Opening__img.zoom-reset { transform: scale(1); }

/* PC/SPの出し分け（従来構成を踏襲） */
.Opening img.Opening__img.pc { display: none; }
@media (min-width: 771px){
  .Opening img.Opening__img.sp { display: none; }
  .Opening img.Opening__img.pc { display: block; }
}
@media (max-width: 770px){
  /* 枠組み：UL/LI/FIGUREは“高さを先に確定”してCLSを出さない */
  .Opening,
  .Opening ul,
  .Opening ul li,
  .Opening ul li figure{
    margin:0; padding:0; border:0;
  }
  .Opening{ position:relative; }
  .Opening ul{ list-style:none; position:relative; height:100%; }
  .Opening ul li{ position:absolute; inset:0; }

  /* ← ここが肝：SPは常に高さ=100svh（安定表示） */
  .Opening ul li figure{
    height: 100vh;   /* 古い環境のフォールバック */
    height: 100dvh;  /* 使えるブラウザでは優先 */
    height: 100svh;  /* 最終的に“安定”な高さを採用（推奨） */
    position:relative;
    overflow:hidden;
  }

  /* 画像は“枠にフィット”。中央配置＆トリミング（object-fit） */
  .Opening img.Opening__img{
    position:absolute; inset:0;
    width:100%; height:100%;
    display:block;
    object-fit:cover;                 /* はみ出しはトリム */
    object-position:center center;    /* 画面中央に配置 */
    transform:none;                   /* SPはズーム無効でボケ抑制（必要なら下で調整） */
    image-rendering:auto;             /* 変な補間を避ける */
  }

  /* PC画像は非表示、SP画像だけ表示 */
  .Opening img.Opening__img.pc{ display:none; }
  .Opening img.Opening__img.sp{ display:block; }
}
/*=======================================
　Textbnr 
=======================================*/
    .text-bnr-backimg { height: 113px;}
    .text-bnr-box{
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        display: flex;
        justify-content: center;
        background: #edf7ffcf;

    }
    .text-bnr .bnr-title {
        font-size: clamp(12px, calc(12px + 7 * ((100vw - 771px) / 253)), 19px);
        padding: 12px 24px;
        border: 1px solid;
        text-shadow: 3px 3px 5px #f9ff00;
        color: #161616;
        font-weight: bold;
        box-shadow: 8px 8px 0 0px rgb(0, 0, 0);
        background: white;
        transition: all .5s;
    }
    .text-bnr:hover .bnr-title{
        transform: translateY(10px);
        opacity:0.7;
    }
/*=======================================
　NEWS
=======================================*/
    .mainNewsBox {
        background-color: #888888;
        margin-bottom: 24px;
    }
    .section-title.News{
        font-size: 20px;
        line-height: 1.4;
        font-weight: bold;
        color: #393939;
        text-align: center;
        margin: 0 auto;
    }
    .topic_list{width: 800px;margin: auto;}
    .topic_list_name{padding: 12px 20px}
    .topic_list_name.active {background: #cacaca;font-weight: bold;}
    .topic_list_content {background: #cacaca;padding: 12px 0;display: none;}
    .topic_list_content.active{display:block}
    .Newstopic{ 
        border-top: 1px solid #fff;
        border-bottom: 1px solid #fff;
        width: 100%;
        margin: 0px auto 20px auto;
        padding: 20px 0;
        -webkit-transition: all 0.3s;
        -moz-transition: all 0.3s;
        -o-transition: all 0.3s;
        transition: all 0.3s;
    }
    .Newstopic:hover{ background: rgba(255, 255, 255, 0.915);}
    .Newstopic span{ margin-right: 20px;}
    .Newstopic a{
        color: #000000;
        padding: 20px 0;
    }
    .Newstopic .category {border-bottom: 1px solid;}
    .newsLink p {
        border: 2px outset #717171;
        padding: 4px 12px;
        background: #898989;
        width: fit-content;
        color: white;
        margin: auto;
        font-weight: 600;
    }
/*=======================================
　施工実績
=======================================*/
.section-detail.works { text-align: center;}
.works-content { margin-bottom:54px;}
.worksdetail .slider-item{ min-width: 33%;margin: auto;position: relative;transition: all .3s;padding: 16px;}
.worksdetail .slider-item::after {
    content: "";
    display: block;
    width: 1px;
    height: 100%;
    position: absolute;
    right: -10px;
    top: 0;
    background: #d9d9d9;
}
.card-image-group { transition: .3s;}
.worksdetail .card-title {
    font-family: serif;
}
.worksdetail .card-image { position: relative;}
.worksdetail .card-image figcaption {
    position: absolute;
    top: 0;
    display: inline;
    padding: 8px 12px;
    left: 0;
    background: aliceblue;
    color: black;
    font-style: italic;
}
.worksdetail .card-image.before figcaption { background: #00bfff;}
.worksdetail .card-image.after figcaption { background: orange;}
/*=======================================
　SNS
=======================================*/
.section-detail.sns { text-align: center;}
.snsdetail .section-subtitle{ 
    font-family: var(--font-primary); 
    font-size: 21px; padding: 12px 0;
    text-align: center;
    color: #e90000;
    font-style: italic;
    display: inline-block;
}
.snsdetail .section-subtitle::after {
    content: "";
    width: 100%;
    height: 2px;
    background: #9e9e9e;
    display: block;
}
.social-media-grid { margin-bottom: 52px;text-align: center;}
.tp-youtube-grid { display:flex; gap:16px; overflow: auto; justify-content: space-around;padding: 12px 0;}
.tp-youtube-card {
    min-width: 322px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.tp-youtube-card:hover { transform: translateY(-4px) scale(1.02);box-shadow: 0 6px 14px rgba(0,0,0,0.15);}
  /* サムネイル部分（縦長ショート風） */
.tp-youtube-card .thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
    overflow: hidden;
}
.tp-youtube-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* タイトル部分 */
.tp-youtube-card .ttl {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 8px;
    color: #111;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* iframe 埋め込み（オプション用） */
.tp-youtube-card .embed {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
}
.tp-youtube-card .embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.tiktok-item{background:#fff;border:1px solid #eee;border-radius:12px;overflow:hidden;min-width: 322px}
.tiktok-embed{margin:0}
.tt-iframe{position:relative;width:100%;padding-top:177.78%;}
.tt-iframe iframe{position:absolute;inset:0;width:100%;height:100%;border:0;}
/*=======================================
　レスポンシブ
=======================================*/
@media screen and (min-width:771px){
/*============汎用============*/
    .section-detail:not(.works,.sns){ position: absolute;top:0;right: 0;width: 62%;}
    .background-img { min-height: 371px;}
    .background-img img {width: 38%;}
/*========フォントサイズ========*/
    .section-title .overlap{ transform: translateX(-8%);}
    .section-title.works, .section-title.sns { transform: none;}
/*===========News===========*/
    .Newstopic{ width: 800px;}
}
@media screen and (max-width:770px){
/*============汎用============*/
    .section-detail{ width: 100%;}
    .background-img img {width: 100%;}
/*========フォントサイズ========*/
    .section-title{ font-size: 2.7rem;}
/*===========News===========*/
    .Newstopic span.ttl{ display: block;}
/*===========施工実績===========*/
    .worksdetail .slider-item{ min-width: 70%;}
/*===========SNS===========*/
    .tp-youtube-card{ min-width: 73%;}
}