/* =========================
   リセット
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    display: block;
}

body {
    font-family: "Noto Sans JP", sans-serif;
    color: #222;
    background: #e2ecf1;
    line-height: 1.8;
    letter-spacing: 0.03em;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}


/* =========================
   共通設定
========================= */

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 70px 0;
}

h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
}

/* =========================
   共通設定（会社概要・事業内容ページ用）
========================= */

.page-container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
}

/* =========================
   ヘッダー
========================= */

header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    position: relative;
}

/* ロゴ */
.logo img {
    height: 60px;
    width: auto;
}

/* 右側（ナビ＋TEL） */
.nav-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    transform: translateY(10px);
    margin-left: auto;
}

/* ナビ */
nav ul {
    display: flex;
    gap: 30px;
}

nav a {
    font-weight: 600;
    transition: 0.3s;
}

nav a:hover {
    color: #2f73c9;
}

/* 電話 */
.header-tel{
   text-align:right; 
}

.header-tel a {
    font-weight: 700;
    color: #187fc4;
    font-size: 1rem;
    text-decoration: none;
    letter-spacing: 0.1em;
}

/* =========================
   ハンバーガーメニュー
========================= */

.menu-toggle{
    display:none;
    background:none;
    border:none;
    cursor:pointer;
    padding:8px;
    z-index:1001;
}

.menu-toggle span{
    display:block;
    width:30px;
    height:3px;
    margin:6px 0;
    background:#187fc4;
    transition:.3s;
}

/* =========================
   ファーストビュー
========================= */

.hero {
    position: relative;
}

.hero img {
    width: 100%;
    height: 650px;
    object-fit: cover;
}

.hero-text {
    position: absolute;
    left: 8%;
    bottom: 18%;
    color: #fff;
}

.hero h1 {
    font-size: 1.5rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 0.9rem;
    letter-spacing: 4px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.hero a {
    display: inline-block;
    background: #2f73c9;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 5px;
    transition: 0.3s;
}

.hero a:hover {
    opacity: 0.9;
}


/* =========================
   施工事例
========================= */

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.works article {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.works img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.works h2 {
    font-size: 1.5rem;
    margin-bottom: 40px;
    text-align: center;
}

.works h3 {
    margin-top: 15px;
    margin-bottom: 5px;
    padding: 0 20px;
    font-size: 1.17em;
    font-weight: bold;
    text-align: left;
}

.works p {
    color: #666;
    padding: 0 20px 20px;
}

.works a:hover img {
    opacity: 0.9;
}

.works .container > p {
    text-align: center;
    margin-top: 40px;
}


/* =========================
   会社紹介
========================= */

.about {
    background: #187fc4;
    color: #ffffff;
}

.about p {
    max-width: 800px;
    margin: auto;
    text-align: center;
}


/* =========================
   事業内容（一覧）
========================= */

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 220px);
    justify-content: center;
    gap: 30px;
}

.service img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.service h3 {
    text-align: center;
    margin-top: 15px;
}

/* =========================
   事業内容ページ
========================= */

.service-page article {
    background: #ffffff;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.service-page h3 {
    margin-bottom: 15px;
}

/* =========================
   会社概要ページ
========================= */

.company-page table {
    width: 100%;
    border-collapse: collapse;
}

.company-page th,
.company-page td {
    padding: 20px;
    border-bottom: 1px solid #dcdcdc;
}

.company-page th {
    width: 30%;
    text-align: left;
    font-weight: 700;
}

.company-page td {
    text-align: left;
}

/* =========================
   強み
========================= */

.strength {
    background: #187fc4;
    color: #ffffff;
}

.strength ul {
    max-width: 700px;
    margin: auto;
}

.strength li {
    margin-bottom: 20px;
    padding-left: 20px;
}

.strength p {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
}

/* =========================
   対応エリア
========================= */

.area ul {
    display: grid;
    grid-template-columns: repeat(6, auto);
    justify-content: center;
    gap: 15px;
}

.area li {
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    text-align: center;
}

/* =========================
   お問い合わせ
========================= */

.contact {
    text-align: center;
    background: #187fc4;
    color: #ffffff;
}

.contact p {
    margin-bottom: 30px;
}

.contact a {
    display: inline-block;
    background: #ffffff;
    color: #187fc4;
    padding: 15px 30px;
    border-radius: 5px;
    transition: 0.3s;
}

.contact a:hover {
    opacity: 0.9;
}

/* =========================
   お問い合わせページ
========================= */

.contact-page form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 700px;
    margin: 0 auto;
}

.contact-page label {
    font-weight: 700;
    margin-top: 20px;
}

.contact-page input,
.contact-page textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.contact-page textarea {
    resize: vertical;
}

.contact-page button {
    margin-top: 30px;
    padding: 15px;
    border: none;
    background: #187fc4;
    color: #ffffff;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.contact-page button:hover {
    opacity: 0.9;
}

/* =========================
   送信完了ページ
========================= */

.thanks-page {
    text-align: center;
}

.thanks-page p {
    margin-bottom: 30px;
}

.thanks-page a {
    display: inline-block;
    background: #187fc4;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 5px;
    transition: 0.3s;
}

.thanks-page a:hover {
    opacity: 0.9;
}

/* =========================
   フッター
========================= */

footer {
    background: #111111;
    color: #ffffff;
    text-align: center;
    padding: 50px 20px;
}

footer p {
    margin-bottom: 10px;
}

.footer-tel {
    margin: 15px 0;
}

.footer-tel a {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.footer-tel a:hover {
    opacity: 0.8;
}

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

.breadcrumb {
    padding: 15px 0;
    font-size: 0.9rem;
    background: #ffffff;
}

.breadcrumb a {
    color: #187fc4;
}

.breadcrumb span {
    margin: 0 5px;
}


/* =========================
   ページタイトル
========================= */

.page-title {
    background: #187fc4;
    color: #ffffff;
    text-align: center;
    padding: 80px 0;
}

.page-title h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.page-title p {
    opacity: 0.9;
}

/* =========================
   施工事例詳細
========================= */

.works-detail {
    padding: 40px 0 30px
}

.works-main-image {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 30px;
}

.works-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.works-table th,
.works-table td {
    padding: 12px 0;
    text-align: left;
    border-bottom: 1px solid #dddddd;
}

.works-table th {
    width: 180px;
    font-weight: 700;
    color: #187fc4;
}

.works-detail h2 {
    margin-top: 30px;
    margin-bottom: 20px;
}

.works-detail p {
    line-height: 1.9;
    margin-bottom: 15px;
    text-align: center;
}

/* =========================
   施工内容
========================= */

.works-content {
    background: #187fc4;
    color: #ffffff;
    padding: 40px 0;
}

.works-content h2 {
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 20px;
}

.works-content p {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 15px;
    text-align: center;
}

/* =========================
   施工写真
========================= */

.works-gallery {
    padding-top: 40px;
}

/* =========================
   施工写真ギャラリー
========================= */

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
}

/* =========================
   施工写真ギャラリー 戻るボタン
========================= */

.works-back {
    text-align: center;
    margin-top: 50px;
}

.works-back a {
    display: inline-block;
    background: #187fc4;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 5px;
    transition: 0.3s;
}

.works-back a:hover {
    opacity: 0.9;
}

.gallery img:hover {
    opacity: 0.9;
}

/* =========================
   Lightbox
========================= */

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

#lightbox img {
    max-width: 90%;
    max-height: 90%;
}

#lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    cursor: pointer;
}

/* =========================
   スマホ表示
========================= */

@media (max-width: 768px) {

    section {
        padding: 40px 0;
    }

    header .container {
        height: 80px;
        padding: 0;
        flex-direction: row;
    }

    .logo img {
        height: 45px;
        width: auto;
    }

    .hero img {
        height: auto;
    }

    .hero h1 {
        font-size: 1rem;
        line-height: 1.5;
    }

    .hero-text {
        left: 5%;
        right: 5%;
        bottom: 20%;
    }

    .hero-subtitle {
    font-size: 0.75rem;
    letter-spacing: 3px;
    }

    .hero a {
    padding: 8px 18px;
    font-size: 0.9rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .area ul {
    grid-template-columns: repeat(3, auto);
    }

    .works-table th,
    .works-table td {
    display: block;
    width: 100%;
    padding: 8px 0;
    }
    
    .works-table th {
    border-bottom: none;
    padding-bottom: 0;
    }
    
    .works-table td {
    padding-top: 0;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
/* =========================
   ハンバーガーメニュー
========================= */

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        margin-left: auto;
        z-index: 1300;
    }
    
    .menu-toggle span {
        display: block;
        width: 28px;
        height: 3px;
        background: #187fc4;
        margin: 6px 0;
        transition: .3s;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px,6px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px,-7px);
    }


/* =========================
   ハンバーガードロワーメニュー
========================= */
/* ナビ＋電話 */
    .nav-area {
        display: flex;
        align-items: center;
        transform: none;
        gap: 6px;
        margin-top: 10px;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -320px;
        width: 320px;
        height: auto;
        min-height: 0; /* ←ここでメニューの枠を設定 */
        background: rgba(255,255,255,0.9);
        transition: right .35s ease;
        z-index: 1200;
        display: flex;
        flex-direction: column;
    }
    
    nav.open {
        right: 0;
    }
    
    nav ul {
        display: flex;
        flex-direction: column;
        margin: 50px 0 0; /* ←ここでメニューの上余白を設定 */
        padding: 0;
        gap: 0;
    }
    
    nav li {
        width: 100%;
    }
    
    nav li a {
        display: block;
        padding: 20px 28px;
        border-bottom: 1px solid #ececec;
        font-size: 1rem;
        font-weight: 700;
    }
    
    .header-tel {
        display: none;
        margin-top: auto;
    }
    
    nav.open .header-tel {
        display: block;
        padding: 18px 28px;
        text-align: center;
        border-top: 1px solid #ececec;
    }
    /* オーバーレイ */
    
    .menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.18);
        opacity: 0;
        visibility: hidden;
        transition: .3s;
        z-index: 1100;
        pointer-events: none; /* ←絶対これ */
    }
    
    .menu-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
}