:root {

    --main-blue: #0f3675;

    --accent-blue: #1a4a99;

    --btn-bg: #d1e9ff;

    --text-color: #333;

    --bg-gray: #f4f4f4;

    /* タイポ（clamp で最小・最大を固定し、リサイズ時のはみ出しを抑える） */
    --fs-base: clamp(0.9375rem, 0.875rem + 0.25vw, 1.0625rem);
    --fs-xs: clamp(0.75rem, 0.7rem + 0.18vw, 0.8125rem);
    --fs-sm: clamp(0.8125rem, 0.75rem + 0.22vw, 0.875rem);
    --fs-md: clamp(0.9375rem, 0.88rem + 0.2vw, 1rem);
    --fs-lg: clamp(1rem, 0.92rem + 0.35vw, 1.125rem);
    --fs-xl: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
    --fs-2xl: clamp(1.375rem, 1.15rem + 1.1vw, 2rem);
    --fs-hero: clamp(1.75rem, 1.35rem + 3.5vw, 3.5rem);
    --fs-hero-sub: clamp(0.75rem, 0.68rem + 0.35vw, 0.9375rem);
    --fs-icon-header: clamp(1.35rem, 1.2rem + 0.5vw, 1.65rem);
    --fs-icon-footer: clamp(2rem, 1.75rem + 1.2vw, 3.2rem);

}



/* --- 基本設定 --- */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}



html {

    font-size: 100%;

    -webkit-text-size-adjust: 100%;

    text-size-adjust: 100%;

}



body {

    font-family: 'Montserrat', 'Noto Serif JP', serif; /* 元の順番に戻す */

    font-size: var(--fs-base);

    color: var(--text-color);

    line-height: 1.8;

    overflow-x: hidden;

    overflow-wrap: break-word;

}



main {

    font-size: 1em;

}

.container {

    max-width: 1200px;

    margin: 0 auto;

    padding: 0 5%;

}



.section {

    padding: 100px 0;

}



.bg-gray {

    background: var(--bg-gray);

}



/* --- ヘッダー --- */

.header-top {

    background: var(--bg-gray);

    display: flex;

    justify-content: space-between;
    align-items: center;

    flex-wrap: wrap;

    gap: 4px;

    padding: 6px 5%;

    font-size: var(--fs-xs);

}



.header-top p {

    min-width: 0;

}



.header-sns {

    display: flex;

    gap: 20px;

    align-items: center;

    flex-shrink: 0;

}



.header-sns i {

    font-size: var(--fs-icon-header);

    color: #444;

    transition: 0.3s;

}



.header-sns a:hover i {

    color: var(--main-blue);

    transform: scale(1.1);

}



.header-main {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 0 0 0 5%;

    position: sticky;

    top: 0;

    background: #fff;

    z-index: 1000;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

    height: 90px;

}



.logo img {

    height: 50px;

}



.header-nav-group {

    display: flex;

    height: 100%;

    align-items: center;

}



.nav ul {

    display: flex;

    list-style: none;

    margin-right: 30px;

}



.nav li {

    margin-left: 20px;

    font-weight: bold;

    font-size: clamp(0.8125rem, 0.78rem + 0.12vw, 0.9rem);

}



.nav a {

    text-decoration: none;

    color: var(--text-color);

    transition: 0.3s;

}



.nav a:hover {

    color: var(--main-blue);

}



.nav-btn {

    height: 100%;

}



.nav-btn a {

    display: flex;

    align-items: center;

    justify-content: center;

    height: 100%;

    padding: 0 45px;

    background: var(--btn-bg);

    color: var(--main-blue) !important;

    text-decoration: none;

    font-weight: bold;

    font-size: clamp(0.8125rem, 0.78rem + 0.12vw, 0.9rem);

    position: relative;

    overflow: hidden;

    z-index: 1;

}



.nav-btn a::before {

    content: '';

    position: absolute;

    top: 0;

    left: -100%;

    width: 100%;

    height: 100%;

    background: var(--main-blue);

    transition: 0.4s cubic-bezier(0.7, 0, 0.3, 1);

    z-index: -1;

}



.nav-btn a span {

    position: relative;

    z-index: 2;

}



.nav-btn a:hover {

    color: #fff !important;

}



.nav-btn a:hover::before {

    left: 0;

}



/* --- メインビジュアル --- */

.main-visual {

    height: 75vh;

    position: relative;

    background: #000;

    overflow: hidden;

}



.mv-slideshow {

    position: absolute;

    inset: 0;

}



.slide {

    position: absolute;

    inset: 0;

    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;

    opacity: 0;

    /* 1枚表示5秒 + 黒画面0.5秒を3セット */

    animation: fadeEffect 16.5s infinite ease-in-out;

}



.slide1 {

    background-image: url('../img/mv-slide-01.webp');

    animation-delay: 0s;

}



.slide2 {

    background-image: url('../img/mv-slide-02.webp');

    animation-delay: 5.5s;

}



.slide3 {

    background-image: url('../img/mv-slide-03.webp');

    animation-delay: 11s;

}



@keyframes fadeEffect {

    0% { opacity: 0; }        /* 黒画面 */

    3.03% { opacity: 0.7; }   /* フェードイン */

    30.30% { opacity: 0.7; }  /* 画像表示（約5秒） */

    33.33% { opacity: 0; }    /* フェードアウトして黒へ */

    100% { opacity: 0; }

}



.mv-content {

    position: absolute;

    inset: 0;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    color: #fff;

}


.mv-content h1  {
    display: block;
    text-align: center;
    letter-spacing: 0.2em;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    text-wrap: balance;
}
.mv-content h1 span {
    display: block;
    font-size: var(--fs-hero);
}



.mv-content p {

    font-size: var(--fs-hero-sub);

    letter-spacing: 0.35em;

    margin-top: 1rem;

    opacity: 0.95;

    max-width: min(100%, 42rem);

    padding-inline: 1rem;

    text-align: center;

}



/* --- 代表挨拶 --- */

.message-flex {

    display: flex;

    gap: 50px;

    align-items: center;

}



.message-img-wrapper {

    flex: 0 0 320px;

}



.message-text {

    min-width: 0;

    flex: 1 1 auto;

}



.message-img {

    width: 75%;

    aspect-ratio: 1/1;

    background-size: cover;

    background-position: center;

    border-radius: 8px;

    box-shadow: 15px 15px 0 #eef1f6;

	margin: 0 auto;

}



.signature {

    text-align: right;

    margin-top: 25px;

    font-weight: bold;

    font-size: var(--fs-lg);

}



/* --- セクション共通 --- */

.section-title {

    margin-bottom: 40px;

}



.section-title.center {

    text-align: center;

}



.section-title .en {

    display: block;

    color: var(--main-blue);

    font-size: var(--fs-sm);

    font-weight: bold;

    letter-spacing: 0.2em;

    margin-bottom: 10px;

}



.section-title h2 {

    font-size: var(--fs-2xl);

    font-family: 'Noto Serif JP', serif;

    text-wrap: balance;

}



.section-desc {

    text-align: center;

    max-width: 950px;

    margin: -20px auto 50px;

    color: #666;

    font-size: var(--fs-md);

    padding-inline: clamp(0.5rem, 2vw, 1rem);

}

.section-desc span {
    display: block;
    font-weight: bold;
    letter-spacing: 1em;
}
.section-desc span:not(:first-of-type) {
    margin-top: 1em;
}

/* --- お知らせ --- */

.news-list {

    max-width: 900px;

    margin: 0 auto;

    background: #fff;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);

}



.news-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 12px;

    padding: 20px;

    cursor: pointer;

    border-bottom: 1px solid #eee;

    min-width: 0;

}



.news-meta {

    display: flex;

    align-items: center;

    gap: 20px;

    min-width: 0;

    flex: 1 1 auto;

}



.news-date {

    font-weight: bold;

    color: var(--main-blue);

    font-size: var(--fs-sm);

    min-width: min(100px, 28%);

    flex-shrink: 0;

}



.news-thumb {

    width: 60px;

    height: 45px;

    object-fit: cover;

    border-radius: 3px;

}



.news-title {

    font-size: var(--fs-md);

    color: #222;

    min-width: 0;

    flex: 1 1 auto;

}



.news-icon-wrap {

    flex-shrink: 0;

    color: var(--main-blue);

}



.news-body {

    height: 0;

    overflow: hidden;

    transition: 0.4s;

    background: #fafafa;

}



.news-body-inner {

    padding: 25px 30px;

    font-size: 1em;

    color: #555;

}



/* --- MORE VIEW --- */

.view-more-container {

    display: flex;

    justify-content: center;

    width: 100%;

    margin-top: 50px;

}



.btn-more {

    display: inline-block;

    padding: 14px 60px;

    border: 1px solid var(--main-blue);

    color: var(--main-blue);

    text-decoration: none;

    font-weight: bold;

    font-size: var(--fs-sm);

    transition: 0.4s;

}



.btn-more:hover {

    background: var(--main-blue);

    color: #fff;

}



/* --- 施工事例グリッド --- */

.ba-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 40px;

}



.ba-images {

    display: flex;

    gap: 5px;

}



.img-box {

    position: relative;

    flex: 1;

    aspect-ratio: 1/1;

    overflow: hidden;

    border-radius: 4px;

}



.img-box img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition: 0.5s;

}



.img-box span {

    position: absolute;

    top: 8px;

    left: 8px;

    background: rgba(0, 0, 0, 0.7);

    color: #fff;

    padding: 2px 8px;

    font-size: clamp(0.55rem, 0.5rem + 0.15vw, 0.65rem);

    z-index: 5;

}



.ba-card:hover img {

    transform: scale(1.05);
    cursor: pointer;

}



.ba-title {

    font-weight: bold;

    text-align: center;

    margin-top: 15px;

    font-size: var(--fs-md);

    padding-inline: 0.25rem;

    text-wrap: balance;

}



/* --- CTA --- */

.cta-section {

    padding: 100px 0;

}



.modern-cta {

    display: block;

    max-width: 850px;

    margin: 0 auto;

    text-decoration: none;

    background: linear-gradient(135deg, var(--main-blue), var(--accent-blue));

    padding: 60px 20px;

    border-radius: 12px;

    text-align: center;

    color: #fff;

    transition: 0.3s;

    box-shadow: 0 10px 30px rgba(15, 54, 117, 0.2);

}



.cta-tag {

    display: inline-block;

    background: #fff;

    color: var(--main-blue);

    padding: 8px 30px;

    border-radius: 50px;

    margin-bottom: 25px;

    font-weight: bold;

    font-size: clamp(0.95rem, 0.85rem + 0.6vw, 1.6rem);

    max-width: 100%;

    box-sizing: border-box;

    text-wrap: balance;

}



.cta-main {

    display: block;

    font-size: clamp(1.1rem, 0.95rem + 0.9vw, 2rem);

    font-weight: bold;

    max-width: 100%;

    padding-inline: 0.25rem;

    text-wrap: balance;

}



.modern-cta:hover {

    transform: translateY(-5px);

}



/* --- フッター --- */

.footer {

    background: var(--main-blue);

    color: #fff;

    padding: 80px 0 30px;

}



/* --- パンくずリスト --- */

.breadcrumb {

    background: #f0f0f0;

    border-bottom: 1px solid #e0e0e0;

}

.breadcrumb ol {

    list-style: none;

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    padding: 2px 0;

    margin: 0;

    font-size: 0.8125rem;

}

.breadcrumb ol li {

    display: flex;

    align-items: center;

    color: #888;

}

.breadcrumb ol li + li::before {

    content: "›";

    margin: 0 0.5em;

    color: #bbb;

    font-size: 1.1em;

    line-height: 1;

}

.breadcrumb ol li a {

    color: #555;

    text-decoration: none;

    transition: color 0.2s;

}

.breadcrumb ol li a:hover {

    color: var(--main-blue);

    text-decoration: underline;

}

.breadcrumb ol li[aria-current="page"] {

    color: #333;

}



.footer-map {
    margin-bottom: 50px;
    border-radius: 10px;
    overflow: hidden;
}
.footer-map iframe {
    border-radius: 10px;
    display: block;
}



.footer-flex {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 40px;

}



.f-logo img {

    height: 45px;

    margin-bottom: 20px;

    filter: brightness(0) invert(1);

}



address {

    font-style: normal;

    font-size: var(--fs-sm);

    opacity: 0.8;

    line-height: 2;

}



.footer-sns {

    display: flex;

    gap: 10px;

    margin-top: 25px;

}



.footer-sns a {

    color: #fff;

    font-size: var(--fs-icon-footer);

    transition: 0.3s;

    display: inline-block;

}



.footer-sns a:hover {

    transform: scale(1.1);

}



.f-nav ul {

    list-style: none;

    text-align: right;

}



.f-nav li {

    margin-bottom: 12px;

}



.f-nav a {

    color: #fff;

    text-decoration: none;

    opacity: 0.7;

    font-size: var(--fs-sm);

    transition: 0.3s;

}



.f-nav a:hover {

    opacity: 1;

}



.copyright {

    text-align: center;

    margin-top: 60px;

    padding-top: 20px;

    border-top: 1px solid rgba(255, 255, 255, 0.1);

    font-size: var(--fs-xs);

    opacity: 0.5;

    padding-inline: 0.5rem;

}



/* --- アニメーション --- */

.reveal {

    opacity: 0;

    transform: translateY(40px);

    transition: 1s ease-out;

}



.reveal.active {

    opacity: 1;

    transform: translateY(0);

}



.fade-up {

    animation: fadeInUp 1.2s forwards;

}



@keyframes fadeInUp {

    from { opacity: 0; transform: translateY(20px); }

    to { opacity: 1; transform: translateY(0); }

}



/* --- スマートフォン最適化（ブレイクポイント 768px） --- */

@media (max-width: 768px) {

    .section {

        padding: 60px 0;

    }



    /* ヘッダー */

    .header-top {

        flex-direction: column;

        gap: 5px;

        text-align: center;

        padding: 6px 10px;

    }

	.header-sns {

        display: none;

    }



    .header-top p {

        font-size: var(--fs-xs);

        white-space: normal;

        text-align: center;

    }



    .header-sns i {

        font-size: 1.2rem;

    }



    .header-main {

        height: 70px;

        padding-right: 0;

    }



    .logo img {

        height: 35px;

    }



    .nav {

        display: none;

    }



    .nav-btn a {

        padding: 0 20px;

    }



    /* メインビジュアル */

    .main-visual {

        height: 60vh;
        text-align: center;

    }



    .mv-content h1 {

        letter-spacing: 0;

        padding-inline: 0.75rem;

    }



    /* 代表挨拶 */

    .message-flex {

        flex-direction: column;

        gap: 30px;

        text-align: center;

    }



    .message-img-wrapper {

        flex: 0 0 auto;

        width: 100%;

        max-width: 320px;

    }



    .signature {

        text-align: center;

    }



    /* お知らせ */

    .news-meta {

        gap: 10px;

    }



    .news-date {

        min-width: min(80px, 26%);

    }



    .news-thumb {

        width: 40px;

        height: 30px;

    }



    /* 施工事例グリッド */

    .ba-grid {

        grid-template-columns: 1fr;

        gap: 30px;

    }



    .section-desc {

        margin-bottom: 30px;

    }



    /* CTA */

    .modern-cta {

        padding: 40px 15px;

    }



    .cta-tag {

        padding: 6px 20px;

    }



    /* フッター */

    .footer-flex {

        flex-direction: column;

        align-items: center;

        text-align: center;

        gap: 40px;

    }



    .f-nav ul {

        text-align: center;

    }



    .footer-sns {

        justify-content: center;

    }



}


/* -----------------------------------------------------------

   440行目付近（ハンバーガーメニュー設定）以降をこれに差し替え

----------------------------------------------------------- */



/* --- ハンバーガーメニュー設定 --- */

.sp-menu-btn, .sp-nav {

    display: none;

}



@media (max-width: 768px) {

    /* メニューボタン（右下に固定） */

    .sp-menu-btn {

        display: block;

        position: fixed;

        right: 5px;

        bottom: 5px;

        width: 70px;

        height: 70px;

        background: var(--main-blue);

        border-radius: 50%;

        z-index: 9999;

        box-shadow: 0 4px 15px rgba(0,0,0,0.3);

        cursor: pointer;

    }



    .sp-menu-btn span {

        position: absolute;

        left: 20px;

        height: 2px;

        background: #fff;

        width: 30px;

        transition: all .4s;

    }

    .sp-menu-btn span:nth-of-type(1) { top: 22px; }

    .sp-menu-btn span:nth-of-type(2) { top: 30px; }

    .sp-menu-btn span:nth-of-type(3) { top: 38px; }

    

    .sp-menu-btn p {

        position: absolute;

        bottom: 12px;

        width: 100%;

        text-align: center;

        color: #fff;

        font-size: clamp(0.5625rem, 0.5rem + 0.2vw, 0.625rem);

        font-weight: bold;

    }



    .sp-menu-btn.active span:nth-of-type(1) { transform: translateY(8px) rotate(-45deg); }

    .sp-menu-btn.active span:nth-of-type(2) { opacity: 0; }

    .sp-menu-btn.active span:nth-of-type(3) { transform: translateY(-8px) rotate(45deg); }



    /* メニュー本体 */

    .sp-nav {

        display: block;

        position: fixed;

        top: 0;

        left: 0;

        width: 100%;

        height: 100vh;

        background: rgba(15, 54, 117, 0.98);

        z-index: 9998;

        transform: translateY(100%);

        opacity: 0;

        visibility: hidden;

        transition: all 0.5s ease;

    }



    .sp-nav.active {

        transform: translateY(0);

        opacity: 1;

        visibility: visible;

    }



    .sp-nav nav {

        height: 100%;

        display: flex;

        flex-direction: column;

        justify-content: center;

        align-items: center;

    }



    .sp-nav ul { list-style: none; text-align: center; padding: 0; }

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

    .sp-nav a { color: #fff; text-decoration: none; font-size: clamp(1.2rem, 1rem + 1.1vw, 1.5rem); font-weight: bold; }

    

    .sp-nav-btn a {

        display: block;

        margin-top: 20px;

        background: #fff;

        color: var(--main-blue);

        padding: 15px 40px;

        border-radius: 50px;

        font-size: clamp(0.9375rem, 0.85rem + 0.35vw, 1.125rem);

    }

} /* ← ここで @media をしっかり閉じる */

/* --- ナビゲーション内の英数字を明朝体にする設定 --- */



/* PC版のナビゲーション */

.nav a, 

.nav-btn a span {

    font-family: 'Noto Serif JP', serif !important;

}



/* スマホ版（ハンバーガーメニュー）の中身 */

.sp-nav a,

.sp-nav-btn a {

    font-family: 'Noto Serif JP', serif !important;

}




/* --- お問い合わせ --- */
#Contact .note {
    margin: 10px auto;
    max-width: 640px;
}
#Contact form {
    max-width: 640px;
    margin: 0 auto;
}
#Contact label {
    display: block;
    margin-top: 16px;
    font-weight: bold;
}
#Contact input, select, textarea {
    width: 100%;
    padding: 8px;
    margin-top: 6px;
    box-sizing: border-box;
}
#Contact textarea {
    height: 140px;
    resize: vertical;
}
#Contact input,
#Contact select,
#Contact textarea {
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: var(--fs-base);
    transition: border-color 0.2s;
}
#Contact input:focus,
#Contact select:focus,
#Contact textarea:focus {
    outline: none;
    border-color: var(--main-blue);
    box-shadow: 0 0 0 3px rgba(15,54,117,0.1);
}
#Contact button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 32px auto 0;
    padding: 14px 40px;
    width: fit-content;
    min-width: 260px;
    background: var(--main-blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: var(--fs-base);
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
#Contact button:hover {
    background: var(--accent-blue);
    transform: translateY(-2px);
}
.note {
    font-size: var(--fs-sm);
    color: #888;
    margin-bottom: 8px;
}

/* --- 会社概要 --- */
.area{
    margin-bottom: 28px;
}
.area p {
    margin: 6px 0;
    line-height: 1.5;
}
.area p.city {
    border-left: 1px solid;
    padding-left: .5em;
    margin-left: .5em;
}
.area p strong {
    font-weight: bold;
    font-size: 1.4em;
}
.area p.note{
    margin-top: 8px;
    font-size: .9em;
    text-align: right;
}
.company-info{
    width: fit-content;
    margin: 0 auto;
    font-family: sans-serif;
}

.company-info dl{
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px 24px;
}

.company-info dt{
    font-weight: bold;
}

.company-info dd{
    margin: 0;
}

/* --- スマートフォン最適化（追加） --- */
@media (max-width: 600px){
    .company-info{
        width: 100%;
    }
    .company-info dl{
        grid-template-columns: 1fr;
        gap: 0;
    }
    .company-info dt{
        margin-top: 16px;
        border-bottom: 1px solid #ddd;
    }
}



/* ---　Modal base --- */
.ba-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}
  
.ba-modal.active {
    display: block;
  }
  
.ba-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
}
  
.ba-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
}
  
.ba-slide-wrapper {
    position: relative;
    width: fit-content;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
}
  
.ba-slide-wrapper img {
    max-width: 100%;
    max-height: 70dvh;
    object-fit: contain;
    border-radius: 8px;
}

.ba-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: rgb(255 255 255 / 75%);
    border: none;
    font-size: 28px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
}

.ba-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #FFF;
    border: none;
    font-size: 28px;
    width: 64px;
    height: 64px;
    cursor: pointer;
    border-radius: 50%;
    background: transparent;
    filter: drop-shadow(0 0 3px rgba(0,0,0,.5));
    z-index: 1;
}

.ba-nav.prev { left: -10px; }
.ba-nav.next { right: -10px; }

@media (max-width: 768px) {
.ba-nav.prev { left: 0; }
.ba-nav.next { right: 0; }
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-inner {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-img-wrapper {
    position: relative;
}

#modal-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 6px;
}

#modal-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 4px 12px;
    font-size: 12px;
    letter-spacing: 1px;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

/* BEFORE / AFTER ラベルをCSSだけで表示 */
.img-box.before::after,
.modal-img-wrapper.before::after {
    content: "BEFORE";
}

.img-box.after::after,
.modal-img-wrapper.after::after {
    content: "AFTER";
}

.img-box::after,
.modal-img-wrapper::after {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 3px 10px;
    font-size: 11px;
    letter-spacing: 1px;
    z-index: 10;
    pointer-events: none;
}

.ba-slide-wrapper {
    position: relative;
}

.ba-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 14px;
    padding: 6px 14px;
    letter-spacing: 1px;
    border-radius: 3px;
    z-index: 10;
}


/* ============================================
   下層ページ メインビジュアル
   ============================================ */

.underlayer-main-visual {
    background-color: var(--main-blue);
    background-size: cover;
    background-position: center;
    padding: 120px 5%;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* 画像の上にグラデーションオーバーレイ */
.underlayer-main-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15,54,117,0.72) 0%, rgba(26,74,153,0.68) 100%);
    pointer-events: none;
}

.underlayer-main-visual h1 {
    font-size: var(--fs-2xl);
    font-family: 'Noto Serif JP', serif;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    line-height: 1.5;
    text-wrap: balance;
    position: relative;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.underlayer-main-visual h1 span {
    display: block;
    font-size: .5em;
}

.underlayer-main-visual p {
    font-size: var(--fs-sm);
    letter-spacing: 0.4em;
    opacity: 0.7;
    font-weight: bold;
    position: relative;
}

@media (max-width: 768px) {
    .underlayer-main-visual {
        padding: 80px 5%;
    }
}


/* ============================================
   ニュースカード一覧（news.html）
   ============================================ */

.news-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.news-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: inherit;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

.news-card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-img img {
    transform: scale(1.06);
}

.news-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.news-card-date {
    font-size: var(--fs-sm);
    color: var(--main-blue);
    font-weight: bold;
    white-space: nowrap;
}

.news-card-cat {
    font-size: var(--fs-xs);
    background: var(--btn-bg);
    color: var(--main-blue);
    padding: 3px 12px;
    border-radius: 50px;
    font-weight: bold;
    white-space: nowrap;
}

/* カテゴリ別カラー */
.news-card-cat[data-cat="イベント"]  { background: #fff3e0; color: #b85c00; }
.news-card-cat[data-cat="施工事例"]  { background: #e8f5e9; color: #2e7d32; }
.news-card-cat[data-cat="採用情報"]  { background: #fce4ec; color: #b71c1c; }
.news-card-cat[data-cat="サービス"]  { background: #ede7f6; color: #4a148c; }

.news-card-title {
    font-size: var(--fs-md);
    font-weight: bold;
    line-height: 1.65;
    margin-bottom: 10px;
    color: #222;
    text-wrap: balance;
}

.news-card-excerpt {
    font-size: var(--fs-sm);
    color: #666;
    line-height: 1.8;
    margin-bottom: 18px;
}

.news-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--main-blue);
    font-size: var(--fs-sm);
    font-weight: bold;
    text-decoration: none;
    transition: gap 0.25s ease;
    margin-top: auto;
}

.news-card-link:hover {
    gap: 12px;
}

@media (max-width: 768px) {
    .news-card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================================
   reform.html — 施工の流れ
============================================================ */
.reform-flow-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.reform-flow-card {
    background: #fff;
    border-radius: 10px;
    padding: 28px 24px 28px 84px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    position: relative;
}

.reform-flow-num {
    position: absolute;
    top: 24px;
    left: 20px;
    width: 46px;
    height: 46px;
    background: var(--main-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.reform-flow-card h3 {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--main-blue);
    margin-bottom: 10px;
    line-height: 1.45;
}

.reform-flow-card p {
    font-size: var(--fs-sm);
    color: #555;
    line-height: 1.85;
}

/* reform.html — タブ */
.reform-tab-wrap {
    margin-top: 40px;
}

.reform-tab-btns {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #ddd;
    margin-bottom: 36px;
}

.reform-tab-btn {
    padding: 12px 36px;
    border: none;
    border-radius: 6px 6px 0 0;
    background: #f0f0f0;
    cursor: pointer;
    font-size: var(--fs-base);
    font-weight: 700;
    color: #999;
    position: relative;
    bottom: -2px;
    transition: color 0.2s, background 0.2s;
}

.reform-tab-btn.active {
    background: #fff;
    color: var(--main-blue);
    border: 2px solid #ddd;
    border-bottom-color: #fff;
}

.reform-tab-pane {
    display: none;
}

.reform-tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .reform-flow-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .reform-tab-btn {
        padding: 10px 20px;
        font-size: var(--fs-sm);
        flex: 1;
        text-align: center;
    }
}

/* ============================================================
   doma.html — 特徴カード
============================================================ */
.doma-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 48px;
}

.doma-feature-card {
    background: #fff;
    border-radius: 10px;
    padding: 32px 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    border-top: 4px solid var(--main-blue);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* アイコン + h3 を横並びにするヘッダー行 */
.feature-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-card-head .feature-icon {
    font-size: 1.75rem;
    color: var(--main-blue);
    flex-shrink: 0;
    line-height: 1;
}

.feature-card-head h3 {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--main-blue);
    line-height: 1.4;
}

/* 旧: カード単独アイコン（doma.html 等で縦積みの場合は残す） */
.doma-feature-card > .feature-icon {
    font-size: 2rem;
    color: var(--main-blue);
    margin-bottom: 4px;
}

.doma-feature-card > h3 {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--main-blue);
    line-height: 1.45;
}

.doma-feature-card .feature-sub {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 4px;
}

.doma-feature-card p {
    font-size: var(--fs-sm);
    color: #555;
    line-height: 1.85;
}

@media (max-width: 900px) {
    .doma-feature-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================================
   塗床工事 施工事例グリッド（index.html 専用カード）
============================================================ */
.floor-cardFLOOR {
    cursor: pointer;
}

.floor-imgFLOOR {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.floor-imgFLOOR img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.floor-cardFLOOR:hover .floor-imgFLOOR img {
    transform: scale(1.05);
}

.floor-captionFLOOR {
    font-weight: bold;
    font-size: var(--fs-sm);
    text-align: center;
    margin-top: 12px;
    color: #444;
}

/* ============================================================
   土間・左官 施工事例グリッド（index.html / doma.html 共通）
============================================================ */
.doma-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.doma-cardDOMA {
    cursor: pointer;
}

.doma-imgDOMA {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.doma-imgDOMA img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.doma-cardDOMA:hover .doma-imgDOMA img {
    transform: scale(1.05);
}

.doma-captionDOMA {
    font-weight: bold;
    font-size: var(--fs-sm);
    text-align: center;
    margin-top: 12px;
    color: #444;
}

@media (max-width: 768px) {
    .doma-works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}