/* ==================================== */
/* 1. 基本リセットと共通スタイル */
/* ==================================== */

/* すべての要素にborder-boxを適用 */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    font-size: 112.5%; /* 18px相当 */
    margin: 0;
    padding: 0;
    line-height: 1.7; /* 可読性向上のため行間を広げる */
    color: #333;
}

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

h1, h2, h3 {
    color: #1a1a1a;
    margin: 0;
    padding: 0;
}

ul, dl {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

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

/* <h2>の共通スタイル */
section h2 {
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
}

/* 枠線が必要な <h2> にのみ適用するスタイル */
.section-title-box {
    padding: 12px 25px;
    border: 3px solid #00665e;
    background-color: #fff;
    border-radius: 8px;
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 25px;
    position: static;
    z-index: auto;
    grid-column: 1 / -1;
}

/* フェードインアニメーション */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================================== */
/* 2. パンくずリスト (サイト共通) */
/* ==================================== */

.breadcrumbs {
    list-style: none;
    /* 修正: mainにpaddingを設定したため、margin-top/bottomを調整 */
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 0; /* mainに左右paddingがあるため削除 */
    text-align: left;
    display: flex;
    font-size: 0.9em;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.breadcrumbs a,
.breadcrumbs span {
    text-decoration: none;
    color: #555555;
    padding: 0 5px;
    white-space: nowrap;
}

/* 矢印 (セパレーター) */
.breadcrumbs li:not(:last-child)::after {
    content: '>';
    color: #999;
    font-size: 0.9em;
    padding: 0 5px;
    margin-right: 5px;
}

/* リンク付きの項目にホバーエフェクト */
.breadcrumbs li a:hover {
    color: #00665e;
    text-decoration: underline;
}

/* 現在地（最後の項目）の強調と、強制省略設定 (PC) */
.breadcrumbs li:last-child span {
    font-weight: bold;
    color: #333333;
    padding-right: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* ==================================== */
/* 3. ヘッダーとナビゲーション */
/* ==================================== */

.main-header-layout {
    background-color: transparent;
    padding: 40px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-logo img {
    padding-right: 20px;
    max-height: 55px;
    width: auto;
}

.header-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 30px;
}
.header-nav a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05em;
}

/* 会社概要リンクボタン */
.company-link-wrapper {
    margin-top: 40px;
    text-align: center;
}

.company-link-wrapper a {
    display: inline-block;
    background-color: #00665e;
    color: #fff;
    text-decoration: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.company-link-wrapper a:hover {
    background-color: #004d47;
}

/* ==================================== */
/* 4. フッターとバナー */
/* ==================================== */

footer {
    background-color: #00665e;
    color: #fff;
    padding: 0 100px 10px;
}

.footer-nav-container {
    max-width: 1200px;
    margin: 40px auto 10px; /* 上部に40pxのマージンを設定してコンテンツとフッター上端の間に隙間を作る */
    display: flex;
    justify-content: space-between;
    gap: 50px;
}

.footer-col {
    flex: 1;
}

.footer-col h3 {
    color: #ffffff;
    padding-bottom: 12px;
    font-size: 1.1em;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col a {
    color: #ffffff;
    text-decoration: none;
    line-height: 2.2;
    font-size: 0.95em;
}

.footer-col img {
    max-width: 160px;
}

footer p {
    text-align: center;
    font-size: 0.9em;
    margin-top: 15px;
    padding-top: 15px;
}

/* フッターのお問い合わせバナー */
.footer-contact-banner {
    margin: 0 auto 35px;
    text-align: center;
    max-width: 1200px;
    padding-top: 40px;
}

.footer-contact-banner a {
    display: inline-block;
    background-color: #ff9100;
    color: #ffffff;
    text-decoration: none;
    padding: 18px 35px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

.footer-contact-banner a:hover {
    background-color: #ffb936;
}


/* --- 戻るリンク (ボタン) --- */

.back-link {
    text-align: center;
    margin: 80px 0 40px;
}
.back-link a {
    display: inline-block;
    margin: 0 10px;
    padding: 12px 25px;
    font-weight: 500;
    border: 2px solid #00665e;
    border-radius: 50px;
    transition: background-color 0.3s;
    color: #00665e;
    text-decoration: none;
}
.back-link a:hover {
    background-color: #00665e;
    color: #fff;
}

/* ==================================== */
/* 5. モバイルフレンドリー対応 (Media Queries) */
/* ==================================== */

@media (max-width: 768px) {
    /* 1. 全体設定 */
    main {
        padding: 0 15px; /* 左右のパディングのみ調整 */
    }

    /* 2. ヘッダーとナビゲーション */
    .main-header-layout {
        max-width: 100%;
        margin: 0;
        padding: 20px 15px;
        flex-direction: column;
        align-items: center;
    }
    .header-logo {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
        padding: 0px;
    }
    .header-nav ul {
        gap: 15px;
        text-align: center;
        justify-content: center;
    }
    .header-nav a {
        font-size: 1em;
    }

    /* 3. パンくずリスト */
    .breadcrumbs {
        padding-left: 20px;
        padding-right: 20px;
        flex-wrap: wrap;
    }
    .breadcrumbs li {
        margin-bottom: 2px;
    }
    .breadcrumbs li:last-child {
        flex-basis: auto;
        min-width: 0;
    }
    .breadcrumbs li:last-child span {
        max-width: 100%;
    }

    /* 4. 2カラムセクションを縦積みにする共通設定 */
    .two-columns,
    .two-columns-alt,
    .two-columns-alt-2 {
        flex-direction: column;
        gap: 40px;
    }

    /* 5. フッターをモバイル用に調整 */
    footer {
        padding: 0 50px 10px; /* 修正: 上部のパディングを削除 */
    }
    .footer-nav-container {
        flex-direction: initial;
        flex-wrap: wrap;
        gap: 30px;
        margin-top: 30px; /* モバイルでのフッター内コンテンツ上余白 */
    }
    .footer-col:nth-child(1),
    .footer-col:nth-child(2) {
        width: calc(48% - 15px);
        flex: none;
        text-align: left;
    }
    .footer-col:nth-child(1) {
        padding-left: 0;
    }
    .footer-col:nth-child(3) {
        width: 100%;
        text-align: center;
        margin-top: 10px;
        flex: none;
    }
    .footer-col ul, .footer-col h3 {
        text-align: left;
    }
    .company-link-wrapper {
        text-align: center;
        margin-top: 30px;
    }
    .company-link-wrapper a {
        font-size: 1.1em;
        padding: 12px 25px;
    }

    /* 6. モバイル時のバナー調整 */
    .footer-contact-banner {
        margin: 0 auto 25px;
        padding: 20px 10px 0;
    }
    .footer-contact-banner a {
        width: 100%;
        box-sizing: border-box;
        font-size: 1.2em;
        padding: 15px 20px;
    }

    /* 戻るリンクを縦積みにする */
    .back-link a {
        display: block;
        margin-bottom: 15px;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100%;
        box-sizing: border-box;
    }
    .back-link a:last-child {
        margin-bottom: 0;
    }
}