/*
Theme Name: AZメンテナンス
Description: 株式会社AZメンテナンス公式サイト
Version: 1.0
Author: AZメンテナンス
*/

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@700&display=swap');

/* 基本設定 */
:root {
    --primary-color: #003399;
    --secondary-color: #FFD700;
    --text-color: #000;
    --light-gray: #f5f5f5;
    --dark-gray: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* PCでは通常のbrタグを表示 */
br {
    display: inline;
}

/* PCでは pc-break を表示し、mobile-break を非表示 */
.pc-break {
    display: inline;
}

/* モバイル用の改行を通常は非表示に */
.mobile-break {
    display: none;
}

/* ヘッダー */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0.5rem 0;
    transition: transform 0.3s ease;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1700px; /* 1600pxから1800pxに拡大 */
    margin: 0 auto;
    padding: 0 2rem; /* パディングも少し増やす */
}

.header-contact {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.contact-message {
    font-size: 1.5rem;
    color: #333;
    margin-top: 0.5rem; /* 上部に余白を追加して下に移動 */
    margin-bottom: 0.2rem; /* 0.5remから0.2remに減らして間隔を詰める */
    font-weight: bold;
}

.contact-phone {
    font-size: 3rem;
    font-weight: bold;
    color: #06C755;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: color 0.3s ease;
    margin: 0.1rem 0; /* 0.2remから0.1remに減らして間隔を詰める */
}

.contact-hours {
    font-size: 1.3rem;
    color: #333;
    margin-top: 0.2rem; /* 0.5remから0.2remに減らして間隔を詰める */
    font-weight: bold;
}

.contact-phone::before {
    content: '\f095';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 2.4rem;
}

.contact-phone:hover {
    color: #003399;
}

.logo img {
    height: 9.5rem;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 7rem; /* 4remから7remに増やしてさらに間隔を広げる */
    white-space: nowrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 1000;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* メインビジュアル */
.video-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 5rem;
    margin-bottom: 4rem;
    line-height: 1.4;
    font-family: "游明朝", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
    letter-spacing: 0.1em;
    font-weight: 400; /* boldから100（最も細い）に変更 */
    text-align: center;
    width: 100%;
    color: #333;
    -webkit-text-stroke: 1.5px #333;
    text-shadow: 
        0 0 1px #333,
        0 0 2px #333;
    position: relative; /* 追加：実績バッジの位置決めのため */
    /* フェードインアニメーション追加 */
    opacity: 0;
    animation: fadeInTitle 1s ease forwards;
    animation-delay: 1s; /* price-badgeの後に表示 */
}

.hero-title img {
    max-width: 90%; /* サイズを少し小さく */
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 「AZメンテナンスは適正価格宣言」のスタイル*/
.price-badge {
    position: absolute;
    top: -100px;
    left: 12%; /* 右に移動（9%から12%に） */
    width: 150px; /* サイズを小さく */
    height: 150px; /* サイズを小さく */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    /* アニメーション設定を追加 */
    animation: badgePopup 0.8s ease-out forwards;
    opacity: 0; /* 初期状態は非表示 */
}

.price-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.badge-text {
    text-align: center;
    line-height: 1.2;
    font-weight: bold;
    font-size: 1.6rem;
    color: #000;
    display: flex;
    flex-direction: column;
}

.curved-text {
    width: 170px;
    height: 170px;
    position: absolute;
    top: 10px;
    left: 0;
}

.curved-text text {
    font-size: 15px;
    font-weight: bold;
    fill: #000;
}

.curved-text path {
    fill: none;
}

.curved-text textPath {
    letter-spacing: 3px; /* 「AZメンテナンスは」のテキスト 1文字1文字の間の間隔 */
}

.text-line1 {
    display: none;
}

.text-line2 {
    font-size: 2.4rem;
    margin-top: 65px;
}

.text-line3 {
    font-size: 2.4rem;
}

/* 左側の黄色いバッジ・右側の実績バッジ 　共通のスタイル*/
.title-wrapper {
    position: relative;
    display: inline-block;
    background: rgba(255, 255, 255, 0.9); /* 0.9から0.8に透明度を増加 */
    padding: 0.8rem 2rem;
    border-radius: 0.5rem;
    opacity: 0;
    animation: fadeInTitle 1s ease forwards;
    animation-delay: 0.9s; /* アニメーション開始タイミングを早める（1.6s→0.9s） */
}

/* 右側の累計施工実績のスタイル */
.achievement-badge {
    position: absolute;
    top: -100px;
    right: 10px; /* 右上に配置 */
    width: 250px;
    height: 250px;
    opacity: 0;
    animation: fadeInAchievement 0.8s ease forwards;
    animation-delay: 1.5s; /* main2.pngの後に表示 */
    z-index: 3;
}

.achievement-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes fadeInMascot {
    0% {
        opacity: 0;
        transform: translateX(-20px); /* 左から開始 */
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.badge-label {
    display: block;
    font-size: 3.3rem; /* 施工実績の「累計施工実績」のテキストのサイズ */
    color: #333;
    font-family: "游明朝", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
}

.badge-number {
    display: block;
    font-size: 4.1rem; /* 施工実績の数字のサイズ */
    color: #003399;
    font-weight: bold;
    font-family: "游明朝", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
}

.badge-unit {
    font-size: 2.1rem; /* 施工実績の「棟突破！！」のテキストのサイズ */
    color: #333;
    font-family: "游明朝", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
}

/* 黄色いバッジのアニメーション */
@keyframes badgePopup {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* 実績バッジのアニメーション */
@keyframes fadeInAchievement {
    0% {
        opacity: 0;
        transform: translate(20px, -20px) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) rotate(5deg);
    }
}

/* メインタイトルのアニメーション */
@keyframes fadeInTitle {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text {
    display: none;
}

/* 施工実績バナー */
.achievement-banner {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem 6rem;
    border-radius: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 2rem;
    z-index: 2;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1s;
}

.achievement-text {
    font-size: 2.9rem;
    -webkit-text-stroke: 1px #333; /* テキストの輪郭を太くして強調 */
    text-shadow: 0 0 1px #333; /* テキストに影を追加してさらに太く見せる */
}

.achievement-number {
    font-size: 5rem;
    font-weight: 900; /* 最大の太さ（900）を設定 */
    color: #003399;
    font-family: "游明朝", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
    -webkit-text-stroke: 1px #003399; /* テキストの輪郭を太くして強調 */
    text-shadow: 0 0 1px #003399; /* テキストに影を追加してさらに太く見せる */
}

.achievement-unit {
    font-size: 2.9rem;
    font-weight: 900; /* 最大の太さ（900）を設定 */
    font-family: "游明朝", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
    -webkit-text-stroke: 1px #333; /* テキストの輪郭を太くして強調 */
    text-shadow: 0 0 1px #333; /* テキストに影を追加してさらに太く見せる */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 20px));
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('image/main1.jpg');
    background-size: 100% 100%; /* 画像を完全に表示 */
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}


/* クイック見積もりセクション */
.quick-estimate {
    position: absolute;
    bottom: 10%;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: auto;
    max-width: 1000px;
    display: flex;
    justify-content: center;
    gap: 2rem;
    z-index: 2;
    opacity: 0; /* 初期状態は非表示 */
    animation: fadeInUp 1s ease forwards; /* フェードインアニメーション追加 */
    animation-delay: 2.0s; /* 1.5秒から2.0秒に変更（0.5秒遅延） */
}

.estimate-btn {
    display: flex;
    align-items: center;
    padding: 2rem 4rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
    position: relative;
    min-width: 300px;
}

.estimate-btn i:not(.arrow) {
    font-size: 2.4rem;
    margin-right: 1.5rem;
}

.estimate-btn .arrow {
    position: absolute;
    right: 2rem;
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.estimate-btn:hover {
    transform: translateY(-0.5rem);
}

.estimate-btn:hover .arrow {
    transform: translateX(0.5rem);
}

.line-btn {
    background: #06C755;
}

.electric-btn {
    background: #FFD700;
    color: #333;
}

.cleaning-btn {
    background: #003399;
    padding: 0.8rem 2rem;
}

.mail-btn {
    background: #8CD21E;
    padding: 1rem 2rem;
    flex-direction: column;
    align-items: center;
}

.mail-top {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    width: 100%;
}

.mail-top i {
    font-size: 2.4rem;
    margin-right: 1rem;
}

.mail-top span {
    font-size: 2rem;
    font-weight: bold;
}

.mail-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.mail-bottom span {
    font-size: 1.8rem;
    margin-right: 1rem;
}

.mail-bottom i {
    font-size: 2.2rem;
}

.contact-info-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.contact-time {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
    color: white;
    font-weight: bold;
}

.contact-tel {
    font-size: 2.4rem;
    font-weight: bold;
    color: white;
}

.contact-tel i {
    margin-right: 5px;
}

/* 取り扱いメーカーセクション */
.makers-section {
    padding: 8rem 0;
    background: #e6f5e6; /* 薄緑 - オール電化・ハウスクリーニングと同じ色 */
    overflow: hidden; /* スクロール時にはみ出た要素を隠す */
}

/* メーカー行コンテナ */
.makers-rows {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6rem; /* 上下の行の間隔 */
}

/* 各行のスタイル */
.makers-row {
    position: relative;
    width: 100%;
    overflow: hidden; /* はみ出た部分を隠す */
}

/* トラックコンテナ（無限スクロールのためのコンテナ） */
.makers-track {
    display: flex;
    gap: 4rem; /* メーカー間の間隔 */
    animation-duration: 30s; /* アニメーションの時間 */
    animation-timing-function: linear; /* 一定速度でスクロール */
    animation-iteration-count: infinite; /* 無限に繰り返し */
    padding: 1rem;
    width: max-content; /* コンテンツに合わせて幅を設定 */
}

/* 右から左への標準スクロールアニメーション（両方の行に適用） */
.makers-track {
    animation-name: scroll-right-to-left;
}

/* 各メーカーアイテム */
.maker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
    flex: 0 0 auto; /* サイズを固定 */
    width: 200px; /* 幅を固定 */
}

.maker-item:hover {
    transform: translateY(-0.5rem);
}

.maker-logo {
    width: 180px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    padding: 1rem;
}

.maker-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.maker-name {
    font-size: 1.6rem;
    font-weight: bold;
    color: #333;
}

/* スクロールアニメーションのキーフレーム定義 */
@keyframes scroll-right-to-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% / 2)); /* 半分の距離だけスクロール */
    }
}

/* ホバー時にアニメーションを一時停止（PCのみ） */
@media (hover: hover) {
    /* ホバー機能があるデバイス（PC/マウス）でのみ適用 */
    .makers-row:hover .makers-track {
        animation-play-state: paused;
    }
}

/* 7周年セクション */
.anniversary-section {
    padding: 0;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f2ff 100%);
    position: relative;
    overflow: hidden;
}

.anniversary-container {
    max-width: 1200px;
    height: 300px;
    margin: 0 auto;
    padding: 0;
    background-image: url('image/anniversary-pc.jpg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.anniversary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 100%;
    padding: 0 2rem;
}

.anniversary-mascot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    margin-left: 5rem; /* 右に移動 */
}

.anniversary-mascot .mascot-image {
    max-width: 80px; /* 画像サイズを小さく */
    height: auto;
    margin-top: 3rem; /* 画像を下に移動 */
}

.anniversary-image-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-left: auto;
    margin-right: 3rem; /* 左に移動 */
}

.anniversary-image-pc {
    max-width: 140px !important; /* 画像サイズを拡大 */
    width: 100% !important;
    height: auto !important;
}

/* PC版ではモバイル用画像を非表示 */
.anniversary-image-mobile {
    display: none;
}

/* PC版ではモバイル用あずごり画像を非表示 */
.achievement-mascot-mobile {
    display: none;
}

/* 会員数・施工実績セクション */
.achievement-section {
    padding: 2rem 0 4rem; /* 縦幅を小さくするためにパディングを減らす */
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f2ff 100%);
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

/* フェードインアニメーション用のクラス */
.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* アニメーション適用時のクラス（JavaScriptで追加） */
.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.2s ease, transform 1.2s ease; /* トランジション時間を0.8sから1.2sに延長 */
}

/* 下から上へのフェードインアニメーション */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 右からフェードインするアニメーション用のクラス */
.fade-in-right {
    opacity: 0;
    transform: translateX(-30px); /* 左から開始して右へ移動 */
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* アニメーション適用時のクラス（JavaScriptで追加） */
.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 1.2s ease, transform 1.2s ease; /* トランジション時間を0.8sから1.2sに延長 */
}

/* 左からフェードインするアニメーション */
@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(-30px); /* 左から開始して右へ移動 */
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.achievement-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="%23003399" opacity="0.1"/></svg>');
    background-size: 30px 30px;
    opacity: 0.5;
    z-index: 0;
}

.achievement-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem; /* パディングを減らす */
    position: relative;
    z-index: 1;
}

.achievement-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.achievement-header {
    text-align: center;
    margin-bottom: 2rem; /* マージンを減らす */
}

.header-content {
    display: flex;
    flex-direction: row; /* 通常の順番に戻す */
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.header-text {
    flex: 1;
    max-width: 800px;
    text-align: center; /* leftからcenterに変更 */
}

.achievement-subtext {
    font-size: 2rem;
    color: #000;
    text-align: center; /* leftからcenterに変更 */
    margin: 1.5rem 0 1.5rem; /* 下部マージンを2.5remから1.5remに減らして間隔を狭く */
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
    font-family: 'Noto Serif JP', serif; /* 源ノ明朝Bold */
    letter-spacing: 0.04em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    color: #000000;
}

/* 「顧客会員数5,000件突破」と「累計施工実績20,000件達成」のハイライト用スタイル */
.highlight-text {
    font-size: 2.4rem; /* フォントサイズを大きく */
    font-weight: 900; /* より太く */
    color: #06af82;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.15); /* 影を少し強く */
    display: inline-block; /* インラインブロック要素に */
    position: relative; /* 相対位置指定 */
}

.achievement-anniversary {
    font-size: 3.6rem;
    font-weight: 700;
    font-family: 'Noto Serif JP', serif; /* 源ノ明朝Bold */
    color: #06af82;
    margin-bottom: 2.5rem;
    position: relative;
    text-align: center;
    letter-spacing: 0.05em;
    line-height: 1.4;
    display: block; /* inline-blockからblockに変更 */
    padding-bottom: 1rem;
    padding-left: 10rem; /* 右に移動するため左パディングを追加 */
    margin-left: auto; /* 中央配置 */
    margin-right: auto; /* 中央配置 */
    white-space: nowrap; /* テキストの折り返しを防止 */
}

/* 「７周年」テキストの修正 */
.anniversary-highlight {
    font-size: 4.2rem;
    font-weight: 900;
    color: #FF6B6B;
    position: relative;
    display: inline-block;
    padding: 0 0.5rem;
    margin: 0 0.3rem;
    background: #06af82;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.achievement-flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px; /* コンテナの最大幅を広げる */
    margin: 0 auto;
    background: transparent; /* 背景を透明に */
}

.achievement-cards {
    display: flex;
    flex-wrap: nowrap; /* 折り返しを防止 */
    gap: 2rem; /* カード間の間隔を少し広げる */
    flex: 1;
    justify-content: center;
}

.achievement-card {
    position: relative;
    width: 320px; /* 幅を大きくする */
    height: 240px; /* 高さを大きくする */
    background: white;
    border-radius: 10px; /* 四角形に変更 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow: hidden;
    opacity: 0; /* 初期状態は非表示 */
}

/* カードが表示されたときのスタイル（JavaScriptで.visibleクラスが追加される） */
.achievement-card.visible {
    opacity: 1;
}

.card-icon {
    width: 6rem; /* アイコンサイズを大きく */
    height: 6rem; /* アイコンサイズを大きく */
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem; /* マージンを増やす */
    position: relative;
    z-index: 2;
}

.card-icon i {
    font-size: 3rem; /* アイコンのフォントサイズを大きく */
    color: white;
}

.card-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.card-title {
    font-size: 2.2rem; /* タイトルのフォントサイズを大きく */
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem; /* マージンを増やす */
}

.card-number {
    font-size: 5rem; /* 数字のフォントサイズを大きく */
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.card-unit {
    font-size: 2.8rem; /* 単位のフォントサイズを大きく */
    font-weight: 700;
    margin-left: 0.5rem;
}

.card-label {
    font-size: 2.4rem; /* ラベルのフォントサイズを大きく */
    font-weight: bold;
    color: #333;
    margin-top: 0.8rem; /* マージンを増やす */
}

.achievement-mascot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    margin-right: 3rem; /* 右マージンを調整 */
    margin-left: 0; /* 左マージンをリセット */
}

.mascot-bubble {
    position: absolute;
    right: -60px; /* leftからrightに変更 */
    background: white;
    border: 2px solid #003399;
    border-radius: 15px;
    padding: 1px 10px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    z-index: 2;
    animation: fadeIn 1s ease forwards;
    animation-delay: 2s;
    opacity: 0;
    transform: translateY(-5px);
    z-index: 2;
}

.mascot-bubble:after {
    content: '';
    position: absolute;
    bottom: -7px;
    right: 60px; /* leftからrightに変更 */
    width: 8px;
    height: 8px;
    background: white;
    border-left: 2px solid #003399; /* border-rightからborder-leftに変更 */
    border-bottom: 2px solid #003399;
    transform: rotate(-45deg); /* 45degから-45degに変更 */
    z-index: 1;
}

.mascot-bubble p {
    margin: 0;
    padding: 0;
    font-size: 1.2rem; /* 1.5remから1.2remに縮小 */
    font-weight: bold;
    color: #003399;
    white-space: nowrap;
}

.mascot-name {
    margin-top: 0.7rem; /* 0.9remから0.7remに変更（少し上に移動） */
    font-size: 1.3rem;
    font-weight: bold;
    color: #000000; /* 青色(#003399)から黒色(#000000)に変更 */
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.5s;
}

.achievement-footer {
    text-align: center;
    margin-top: 3rem;
}

.achievement-message {
    font-size: 2rem;
    line-height: 2.5; /* 1.6から2.5に増加して行間を広げる */
    font-weight: 900; /* 700から900へ太さを増加 */
    max-width: 1000px;
    margin: 1.5rem auto 3rem; /* autoを追加して中央配置 */
    white-space: nowrap;
    font-family: 'Noto Serif JP', serif; /* 源ノ明朝Bold */
    letter-spacing: 0.03em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    color: #000000;
    text-align: center; /* leftからcenterに変更 */
}

.mascot-image {
    max-width: 150px;
    height: auto;
    /* fade-in-rightクラスで制御されるため、個別のアニメーションは不要 */
}

/* anniversary.png用のスタイル */
.anniversary-image-container {
    display: none; /* PC版では非表示 */
}

.anniversary-image-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-left: 18rem; /* 3remから18remに増やして右に移動 */
}

.anniversary-image-pc {
    max-width: 170px; /* 200pxから150pxに縮小 */
    height: auto;
    /* fade-in-elementクラスで制御されるため、個別のアニメーションは削除 */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes fadeInMascot {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* hero-title-imgのデフォルトスタイル（PC用） */
.hero-title-img {
    max-width: 60% !important;  /* 強制的に50%に設定 */
    height: auto;
    padding-top: 35px;
}

/* ノートパソコン対応 */
@media (max-width: 1366px) and (min-width: 769px) {
    .hero-title-img {
        max-width: 45% !important; /* さらに小さく */
    }
}

/* モバイル対応 */
@media (max-width: 768px) {

    .achievement-section {
        padding: 2rem 0 3rem; /* 縦幅を小さくするためにパディングを減らす */
    }
    
    /* 7周年セクションのモバイル対応 */
    .anniversary-section {
        padding: 0;
        background-image: none; /* 背景画像を非表示 */
        background-position: center top;
        position: relative;
        margin-bottom: -5rem; /* 次のセクションとの間隔を確保 */
    }
    
    /* モバイルではanniversary-sp.jpgを背景に表示 */
    .anniversary-container {
        background-image: url('image/anniversary-sp.jpg');
        background-size: 100% auto; /* 幅100%で高さは自動調整 */
        background-position: top center;
        background-repeat: no-repeat;
        height: auto; /* 高さを自動調整 */
        min-height: 70vh; /* 最小高さを増やす */
        max-width: 100%; /* 幅を画面いっぱいに */
        width: 100vw; /* ビューポートの幅いっぱいに */
        margin-left: calc(-50vw + 50%); /* 画面幅いっぱいに広げる */
        margin-right: calc(-50vw + 50%); /* 画面幅いっぱいに広げる */
        margin-top: 20px; /* 上部の余白を大幅に減らす */
        padding: 0;
        padding-top: 20px; /* パディングも減らす */
    }
    
    .anniversary-content {
        flex-direction: column;
        gap: 0;
        align-items: center; /* 中央揃え */
    }
    
    /* モバイル用のanniversary.png */
    .anniversary-image-mobile {
        display: block;
        text-align: center;
        position: absolute; /* absoluteに変更して自由に配置 */
        top: -3rem; /* 上部に大きく移動 */
        left: 50%;
        transform: translateX(-50%); /* 中央揃え */
        z-index: 2;
    }
    
    .anniversary-image-mobile-img {
        max-width: 120px; /* 250pxから120pxに縮小 */
        width: 55%; /* 80%から55%に縮小 */
        height: auto;
    }
    
    /* PC用は非表示 */
    .anniversary-image-right {
        display: none;
    }
    
    .anniversary-mascot {
        display: none; /* anniversary-section内では非表示 */
    }
    
    /* モバイルでanniversary.pngの位置調整 */
    .anniversary-image-mobile {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
    
    /* achievement-sectionの上にあずごり画像を配置 */
    .achievement-section::before {
        display: none; /* 既存の背景パターンを非表示 */
    }
    
    /* あずごり画像をachievement-sectionの上部に移動 */
    .achievement-container {
        position: relative;
    }
    
    /* モバイル用あずごり画像 */
    .achievement-mascot-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 2rem;
        position: relative;
        width: 100%;
        text-align: center;
    }
    
    .achievement-mascot-mobile .mascot-bubble {
        position: relative; /* absoluteからrelativeに変更 */
        top: auto;
        right: auto;
        margin-bottom: 1rem; /* 吹き出しと画像の間に余白 */
    }
    
    .achievement-mascot-mobile .mascot-image {
        margin: 0 auto; /* 中央配置 */
    }
    
    .achievement-mascot-mobile .mascot-name {
        text-align: center;
        margin-top: 0.5rem;
    }
    
    /* PC版では非表示 */
    .achievement-mascot {
        display: none;
    }
    
    .header-content {
        flex-direction: column; /* 縦並びに変更 */
        align-items: center; /* 中央揃え */
    }

    /* モバイルではあずごりを最後に表示 */
    .achievement-mascot {
        order: 3; /* 順序を最後に */
    }

    .header-text {
        order: 1; /* テキストを最初に */
    }

    .anniversary-image-right {
        order: 2; /* anniversary.pngを2番目に（ただし非表示） */
    }

    .header-text {
        width: 100%; /* 幅を100%に */
        display: flex;
        flex-direction: column;
        align-items: center; /* 中央揃え */
    }
    
    .achievement-flex-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .achievement-cards {
        flex-direction: row; /* 横並びに変更 */
        gap: 1rem; /* 間隔を狭く */
        width: 100%;
        justify-content: center; /* 中央揃え */
        overflow-x: hidden; /* 横スクロールを無効化 */
        padding: 0 1rem; /* 左右にパディング */
    }
    
    .achievement-card {
        width: 32%; /* 3つ並べるため、少し小さく */
        min-width: 0; /* 最小幅をリセット */
        max-width: none; /* 最大幅をリセット */
        height: auto;
        padding: 0.8rem 0.3rem; /* パディングを小さく */
        margin: 0;
        flex-shrink: 1; /* 縮小を許可 */
    }
    
    .card-icon {
        width: 5rem; /* さらに小さく */
        height: 5rem; /* さらに小さく */
    }
    
    .card-icon i {
        font-size: 2rem; /* さらに小さく */
    }
    
    .card-title {
        font-size: 1.4rem; /* さらに小さく */
        font-weight: bold;
        white-space: nowrap;
    }
    
    .card-number {
        font-size: 2.3rem; /* さらに小さく */
    }
    
    .card-unit {
        font-size: 1.5rem; /* さらに小さく */
    }
    
    .card-label {
        font-size: 1.5rem; /* さらに小さく */
    }
    
    .achievement-mascot {
        margin-right: 0;
        margin-top: 2rem;
        order: 3; /* 順序を最後に（重複しているが念のため） */
        align-self: center; /* 中央揃え */
    }

    /* モバイル版でanniversary.pngを表示 */
    .anniversary-image-container {
        display: block; /* モバイルでは表示 */
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .anniversary-image {
        max-width: 80px; /* 150pxから120pxに縮小 */
        height: auto;
        margin: 0 auto;
    }

    /* PC版のanniversary.pngは非表示 */
    .anniversary-image-right {
        display: none;
    }
    
    .mascot-image {
        max-width: 100px;
    }
    
    .mascot-bubble {
        top: -40px;
        transform: translateX(-50%); /* 中央揃えの調整 */
        padding: 0.6rem 1.5rem; /* パディングを増やして幅を確保 */
        white-space: nowrap; /* テキストの折り返しを防ぐ */
        min-width: 180px; /* 最小幅を設定 */
    }
    
    .mascot-bubble:after {
        width: 12px;
        height: 12px;
        bottom: -6px;
    }
    
    .mascot-bubble p {
        font-size: 1.3rem;
    }
    
    .mascot-name {
        font-size: 1.5rem;
        margin-top: 0.5rem;
    }
}

/* NEWSセクション */
.news-section {
    padding: 8rem 0;
    background: white;
}

.news-container {
    max-width: 1400px; /* 1200pxから1400pxに増加 */
    margin: 0 auto;
    padding: 0 2rem;
}

#wordpress-news {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem; /* 各ニュース記事の間隔 */
    margin-top: 4rem;
}

.news-item {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.news-item:hover {
    transform: translateY(-0.5rem);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f5f5f5;
}

.news-content {
    padding: 2rem;
}

.news-date {
    font-size: 1.4rem;
    color: #666;
    margin-bottom: 1rem;
}

.news-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.4;
    height: 5rem;
}

.news-excerpt {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    height: 6.3rem;
}

.news-link {
    display: inline-block;
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: var(--secondary-color);
}

.news-archive-link {
    text-align: center;
    margin-top: 3rem;
}

.news-archive-link a {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.news-archive-link a:hover {
    background-color: #002266;
    transform: translateY(-3px);
}

/* レスポンシブ対応 - NEWSセクション */
@media (max-width: 1024px) {
    #wordpress-news {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* NEWSセクションを横スライド仕様に変更 */
    .news-container {
        position: relative;
        overflow: hidden;
        padding: 0 1rem;
    }
    
    #wordpress-news {
        display: flex;
        gap: 1.5rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 2rem 0;
        /* グリッドレイアウトを無効化 */
        grid-template-columns: unset;
    }
    
    .news-item {
        flex: 0 0 85%; /* カード幅を画面の85%に設定 */
        max-width: 350px;
        scroll-snap-align: start;
        margin: 0;
    }
    
    /* スクロールバーを非表示 */
    #wordpress-news::-webkit-scrollbar {
        display: none;
    }
    
    #wordpress-news {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    /* モバイルでニュース一覧リンクを上に移動 */
    .news-archive-link {
        margin-top: 1rem; /* 3remから1remに減らす */
    }
}

/* 口コミセクション */
.reviews-section {
    padding: 12rem 0;
    background: white;
}


/* 施工事例セクション */
.works-section {
    padding: 12rem 0;
    background: #f8f9fa;
}

/* 「クリックで拡大されます」のスタイル */
.works-description {
    text-align: center;
    font-size: 1.8rem;
    color: var(--text-color);
    margin: 0 auto 1.5rem; /* 4remから1.5remに変更して間隔を狭く */
    max-width: 1200px;
    padding: 0 2rem;
}

.works-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    overflow: visible;
}

.works-slider {
    display: flex;
    scroll-behavior: smooth;
    gap: 2rem;
    padding: 2rem 0;
    width: 100%;
    position: relative;
    flex-wrap: nowrap;
}

/* 常に右から左へスクロールするアニメーション（JavaScriptで動的に生成されるため削除） */

/* 施工事例セクションのカードのスタイル */
.work-item {
    flex: 0 0 calc(33.333% - 1.5rem);
    background: #2e8b57; /* 濃い緑（SeaGreen） - 事業内容セクションと同じ色 */
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 1rem;
    transition: transform 0.3s ease !important; /* カードにカーソルを合わせた際の拡大スピードを0.3秒に設定 */
    min-width: 280px;
    max-width: 400px;
    box-sizing: border-box;
    cursor: pointer; /* カーソルをポインターに変更してクリック可能であることを示す */
}

.work-item:hover, .work-item-clone:hover {
    transform: translateY(-0.5rem) scale(1.05) !important; /* カードにカーソルを合わせた際の、上への移動距離とスケールを調整 */
}

/* 施工事例セクションの左右のボタン */
.works-prev-btn, .works-next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 6rem;
    height: 6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10;
}

/* 矢印アイコンのサイズを大きく */
.works-prev-btn i, .works-next-btn i {
    font-size: 3rem; /* 矢印のサイズを3remに設定 */
}

.works-prev-btn {
    left: -10rem;
}

.works-next-btn {
    right: -10rem;
}

.works-prev-btn:hover, .works-next-btn:hover {
    background: #002266;
}

/* モーダルウィンドウのスタイル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2.8rem;
    color: #333;
    cursor: pointer;
    z-index: 1002;
}

.modal-images {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.modal-before, .modal-after {
    position: relative;
}

.modal-img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.modal-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #333333;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.3rem;
    font-size: 1.6rem;
    font-weight: bold;
}

.modal-after .modal-label {
    background: #0099ff;
}

/* モーダルが表示されているときのスタイル */
.modal.show {
    display: flex;
}

/* スクロールを無効にするためのクラス */
.no-scroll {
    overflow: hidden !important;
    touch-action: none !important;
}

.work-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.work-before {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
}

.work-after {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
}

.work-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    display: block;
}

/* beforeのラベルのスタイル */
.work-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #000000; /* グレー寄りの黒（透明度なし） */
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.3rem;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 2;
}

/* Afterのラベルの背景色を水色に変更 */
.work-after .work-label {
    background: #0099ff; /* シンプルな水色（透明度なし） */
}

.works-controls {
    margin-top: 3rem;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .work-item {
        flex: 0 0 calc(90% - 2rem);
        max-width: 280px;
        margin: 0 auto;
        padding: 0.8rem;
    }
    
    .work-images {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .work-img {
        height: 120px;
    }
    
    .work-label {
        font-size: 1.3rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* 施工事例セクションのナビゲーションボタンを非表示 */
    .works-prev-btn, .works-next-btn {
        display: none;
    }
    
    /* スワイプ用のスタイル調整 */
    .works-container {
        overflow-x: auto; /* 横スクロールを有効化 */
        -webkit-overflow-scrolling: touch; /* iOSでのスムーズスクロール */
        scroll-snap-type: x mandatory; /* スナップスクロール */
        scrollbar-width: none; /* Firefoxでスクロールバーを非表示 */
        -ms-overflow-style: none; /* IEでスクロールバーを非表示 */
        padding: 0 1rem; /* 左右のパディングを追加 */
    }
    
    /* Chromeなどでスクロールバーを非表示 */
    .works-container::-webkit-scrollbar {
        display: none;
    }
    
    .works-slider {
        width: auto !important; /* JavaScriptで設定される幅を上書き */
        transform: none !important; /* JavaScriptで設定される変形を上書き */
        animation: none !important; /* アニメーションを無効化 */
        display: flex;
        gap: 1.5rem;
        padding: 1rem 0.5rem;
    }
    
    .work-item, .work-item-clone {
        scroll-snap-align: center; /* スナップポイントを中央に */
        flex: 0 0 85%; /* カードの幅を画面の85%に */
        margin-right: 0;
        transform: none !important; /* JavaScriptで設定される変形を上書き */
    }
    
    /* ホバーエフェクトを無効化（タッチデバイス用） */
    .work-item:hover, .work-item-clone:hover {
        transform: none !important;
    }
}

.reviews-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    overflow: hidden; /* はみ出た部分を隠す */
}

.reviews-slider {
    display: flex;
    scroll-behavior: smooth;
    gap: 1.5rem; /* 2remから1.5remに減らしてカード間の間隔を縮小 */
    padding: 2rem 0;
    width: 100%;
    position: relative;
    flex-wrap: nowrap;
    transition: transform 1.5s ease; /* 0.5秒から1.5秒に変更 */
}

.review-card {
    flex: 0 0 calc(33.333% - 1.5rem); /* カードの幅を指定 */
    background: white;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    transition: transform 0.3s ease;
    min-width: 280px; /* カードの最小幅 */
    max-width: 340px; /* カードの最大幅 */
    box-sizing: border-box; /* パディングを含めた幅の計算 */
}

.review-card:hover {
    transform: translateY(-0.5rem);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.reviewer-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.reviewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reviewer-info {
    flex: 1;
}

.reviewer-name {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.review-rating {
    color: #FFD700;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.review-date {
    font-size: 1.4rem;
    color: #666;
}

.review-content p {
    font-size: 1.6rem;
    line-height: 1.6;
    color: #333;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
}

.prev-btn, .next-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 4rem;
    height: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.prev-btn:hover, .next-btn:hover {
    background: #002266;
}

.slider-dots {
    display: flex;
    gap: 1rem;
    margin: 0 2rem;
}

.dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dot.active {
    background: var(--primary-color);
}

/* モバイル対応 */
@media (max-width: 768px) {
    .review-card {
        flex: 0 0 calc(100% - 2rem);
    }
    
    /* お客様の声セクションのナビゲーションボタンを非表示 */
    .slider-controls {
        display: none;
    }
    
    /* スワイプ用のスタイル調整 */
    .reviews-container {
        overflow-x: auto; /* 横スクロールを有効化 */
        -webkit-overflow-scrolling: touch; /* iOSでのスムーズスクロール */
        scroll-snap-type: x mandatory; /* スナップスクロール */
        scrollbar-width: none; /* Firefoxでスクロールバーを非表示 */
        -ms-overflow-style: none; /* IEでスクロールバーを非表示 */
    }
    
    /* Chromeなどでスクロールバーを非表示 */
    .reviews-container::-webkit-scrollbar {
        display: none;
    }
    
    .reviews-slider {
        width: auto !important; /* JavaScriptで設定される幅を上書き */
        transform: none !important; /* JavaScriptで設定される変形を上書き */
        display: flex;
        gap: 1.5rem;
        padding: 1rem 0.5rem;
    }
    
    .review-card {
        scroll-snap-align: center; /* スナップポイントを中央に */
        flex: 0 0 85%; /* カードの幅を画面の85%に */
        margin-right: 0;
    }
}

/* 企業理念セクション */
.about {
    padding: 12rem 0;
    background: #f8f9fa;
}

.about-content {
    max-width: 1400px; /* 1200pxから1400pxに増加して幅を広げる */
    margin: 0 auto;
    padding: 0 2rem;
}

/* 企業理念セクションのフレックスレイアウト */
.about-flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem; /* 5remから3remに減少して間隔を縮める */
}

/* テキスト部分（左側） */
.about-text {
    flex: 0.5; /* 0.6から0.5に変更してテキスト部分のスペースをさらに縮小 */
    text-align: left;
    padding-right: 1rem;
}

.about-text h3 {
    font-size: 3.2rem;
    margin-bottom: 3.1rem;
    line-height: 1.8;
    color: var(--text-color);
    white-space: nowrap;
    font-weight: bold;
    font-family: "游明朝", "Yu Mincho", "Hiragino Mincho ProN", serif;
    letter-spacing: 0.03em; /* 文字間隔を調整 */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1); /* テキストに軽い影を追加 */
}

.about-text p {
    font-size: 2.3rem;
    color: #000; /* #333から#000（黒）に変更 */
    line-height: 1.8;
    white-space: nowrap;
    font-weight: 900; /* boldから900に変更してより太く */
    font-family: "游明朝", "Yu Mincho", "Hiragino Mincho ProN", serif;
    letter-spacing: 0.03em; /* 文字間隔を調整 */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2); /* 影を強めに変更 */
}

/* 画像部分（右側） */
.about-image {
    flex: 1.5; /* 1.4から1.5に変更して画像部分のスペースをさらに拡大 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.family-image {
    width: 490px; /* 幅を100%に設定 */
    height: 300px;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

/* 事業内容セクション */
.services-section {
    padding: 12rem 0;
    margin-bottom: -120px;
    background: #f8f9fa;
}

/* Sunny Plusスタイルのサービスグリッド */
.service-grid-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.service-item {
    position: relative;
    display: flex;
    padding: 5rem 3rem;
    min-height: 30rem;
    overflow: hidden;
    transition: all 0.5s ease;
}

/* サービスアイテムの背景色 */
.service-item.maintenance {
    background-color: #2e8b57; /* 濃い緑（SeaGreen） */
    color: white;
}

.service-item.electrification {
    background-color: #e6f5e6; /* 薄緑 */
    color: #333;
}

.service-item.reform {
    background-color: #e6f5e6; /* 薄緑 */
    color: #333;
}

.service-item.security {
    background-color: #2e8b57; /* 濃い緑（SeaGreen） */
    color: white;
}

/* サービスアイテムのホバー時の背景画像 */
.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.5s ease;
    z-index: 0;
}

.service-item.maintenance::before {
    background-image: url('image/reform.jpg');
}

.service-item.reform::before {
    background-image: url('image/all.png');
}

.service-item.electrification::before {
    background-image: url('image/cleaning.jpg');
}

.service-item.security::before {
    background-image: url('image/gaiheki.jpg');
}

.service-item.maintenance:hover::before,
.service-item.security:hover::before {
    opacity: 0.8;
    transform: translateY(0);
}

.service-item.reform:hover::before,
.service-item.electrification:hover::before {
    opacity: 0.6; /* オール電化とハウスクリーニングの背景画像を暗めに */
    transform: translateY(0);
}

.service-item.reform:hover,
.service-item.electrification:hover {
    color: white;
}

.service-item.reform:hover .service-content p,
.service-item.electrification:hover .service-content p {
    color: white;
}

.service-item.reform:hover .service-subtitle,
.service-item.electrification:hover .service-subtitle {
    color: white;
    opacity: 1;
}

.service-item.maintenance:hover,
.service-item.security:hover {
    color: black;
}

.service-item.maintenance:hover .service-content p,
.service-item.security:hover .service-content p {
    color: black;
}

.service-item.maintenance:hover .service-subtitle,
.service-item.security:hover .service-subtitle {
    color: black;
    opacity: 1;
}

.service-item .service-icon,
.service-item .service-content {
    position: relative;
    z-index: 1;
}

/* サービスアイコン */
.service-icon {
    flex: 0 0 10rem;
    height: 10rem;
    background-color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 2rem;
    transition: all 0.3s ease;
}

.service-icon i {
    font-size: 4rem;
    color: #2e8b57; /* 濃い緑（SeaGreen） */
    transition: color 0.3s ease;
}

.service-item.reform .service-icon i,
.service-item.electrification .service-icon i {
    color: #4caf50; /* 中間の緑 */
}

.service-item.security .service-icon i {
    color: #2e8b57; /* 濃い緑（SeaGreen） */
}

.service-item:hover .service-icon i {
    color: #003399; /* ホバー時のアイコン色を濃い青に変更 */
}

/* サービスコンテンツ */
.service-content {
    flex: 1;
}

.service-content h3 {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    position: relative;
}

.service-subtitle {
    display: block;
    font-size: 1.4rem;
    font-weight: normal;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.service-content p {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.detail-link {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: bold;
    color: inherit;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.detail-link i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.service-item:hover .detail-link {
    transform: translateX(5px);
}

.service-item:hover .detail-link i {
    transform: translateX(3px);
}

.section-title {
    text-align: center;
    font-size: 4rem;
    margin-bottom: 6rem;
    color: black; /* var(--primary-color)から黒色に変更 */
}

/* 文字アニメーション用のスタイル */
.char-animate, .char-animate-short {
    display: inline-block;
    opacity: 1;
    transform: translateY(0);
}

/* 長いテキスト用のアニメーション設定（AZメンテナンスが選ばれる7つの理由） */
.char-animate:nth-child(1) { animation: charJump1 6s ease-in-out infinite; }
.char-animate:nth-child(2) { animation: charJump2 6s ease-in-out infinite; }
.char-animate:nth-child(3) { animation: charJump3 6s ease-in-out infinite; }
.char-animate:nth-child(4) { animation: charJump4 6s ease-in-out infinite; }
.char-animate:nth-child(5) { animation: charJump5 6s ease-in-out infinite; }
.char-animate:nth-child(6) { animation: charJump6 6s ease-in-out infinite; }
.char-animate:nth-child(7) { animation: charJump7 6s ease-in-out infinite; }
.char-animate:nth-child(8) { animation: charJump8 6s ease-in-out infinite; }
.char-animate:nth-child(9) { animation: charJump9 6s ease-in-out infinite; }
.char-animate:nth-child(10) { animation: charJump10 6s ease-in-out infinite; }
.char-animate:nth-child(11) { animation: charJump11 6s ease-in-out infinite; }
.char-animate:nth-child(12) { animation: charJump12 6s ease-in-out infinite; }
.char-animate:nth-child(13) { animation: charJump13 6s ease-in-out infinite; }
.char-animate:nth-child(14) { animation: charJump14 6s ease-in-out infinite; }
.char-animate:nth-child(15) { animation: charJump15 6s ease-in-out infinite; }
.char-animate:nth-child(16) { animation: charJump16 6s ease-in-out infinite; }
.char-animate:nth-child(17) { animation: charJump17 6s ease-in-out infinite; }
.char-animate:nth-child(18) { animation: charJump18 6s ease-in-out infinite; }
.char-animate:nth-child(19) { animation: charJump19 6s ease-in-out infinite; }
.char-animate:nth-child(20) { animation: charJump20 6s ease-in-out infinite; }

/* 短いテキスト用のアニメーション設定（NEWS、お客様の声など） */
.char-animate-short:nth-child(1) { animation: charJumpShort1 3s ease-in-out infinite; }
.char-animate-short:nth-child(2) { animation: charJumpShort2 3s ease-in-out infinite; }
.char-animate-short:nth-child(3) { animation: charJumpShort3 3s ease-in-out infinite; }
.char-animate-short:nth-child(4) { animation: charJumpShort4 3s ease-in-out infinite; }
.char-animate-short:nth-child(5) { animation: charJumpShort5 3s ease-in-out infinite; }
.char-animate-short:nth-child(6) { animation: charJumpShort6 3s ease-in-out infinite; }
.char-animate-short:nth-child(7) { animation: charJumpShort7 3s ease-in-out infinite; }
.char-animate-short:nth-child(8) { animation: charJumpShort8 3s ease-in-out infinite; }
.char-animate-short:nth-child(9) { animation: charJumpShort9 3s ease-in-out infinite; }
.char-animate-short:nth-child(10) { animation: charJumpShort10 3s ease-in-out infinite; }

/* 短いテキスト用のアニメーションキーフレーム */
@keyframes charJumpShort1 {
    0%, 20%, 100% { transform: translateY(0); }
    10% { transform: translateY(-15px); }
}

@keyframes charJumpShort2 {
    0%, 10%, 30%, 100% { transform: translateY(0); }
    20% { transform: translateY(-15px); }
}

@keyframes charJumpShort3 {
    0%, 20%, 40%, 100% { transform: translateY(0); }
    30% { transform: translateY(-15px); }
}

@keyframes charJumpShort4 {
    0%, 30%, 50%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
}

@keyframes charJumpShort5 {
    0%, 40%, 60%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes charJumpShort6 {
    0%, 50%, 70%, 100% { transform: translateY(0); }
    60% { transform: translateY(-15px); }
}

@keyframes charJumpShort7 {
    0%, 60%, 80%, 100% { transform: translateY(0); }
    70% { transform: translateY(-15px); }
}

@keyframes charJumpShort8 {
    0%, 70%, 90%, 100% { transform: translateY(0); }
    80% { transform: translateY(-15px); }
}

@keyframes charJumpShort9 {
    0%, 80%, 100% { transform: translateY(0); }
    90% { transform: translateY(-15px); }
}

@keyframes charJumpShort10 {
    0%, 90%, 100% { transform: translateY(0); }
    95% { transform: translateY(-15px); }
}

/* 各文字ごとに個別のアニメーションを定義 - 間隔を広げて1文字ずつゆっくり表示 */
@keyframes charJump1 {
    0%, 10%, 100% { transform: translateY(0); }
    5% { transform: translateY(-15px); }
}

@keyframes charJump2 {
    0%, 5%, 15%, 100% { transform: translateY(0); }
    10% { transform: translateY(-15px); }
}

@keyframes charJump3 {
    0%, 10%, 20%, 100% { transform: translateY(0); }
    15% { transform: translateY(-15px); }
}

@keyframes charJump4 {
    0%, 15%, 25%, 100% { transform: translateY(0); }
    20% { transform: translateY(-15px); }
}

@keyframes charJump5 {
    0%, 20%, 30%, 100% { transform: translateY(0); }
    25% { transform: translateY(-15px); }
}

@keyframes charJump6 {
    0%, 25%, 35%, 100% { transform: translateY(0); }
    30% { transform: translateY(-15px); }
}

@keyframes charJump7 {
    0%, 30%, 40%, 100% { transform: translateY(0); }
    35% { transform: translateY(-15px); }
}

@keyframes charJump8 {
    0%, 35%, 45%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
}

@keyframes charJump9 {
    0%, 40%, 50%, 100% { transform: translateY(0); }
    45% { transform: translateY(-15px); }
}

@keyframes charJump10 {
    0%, 45%, 55%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes charJump11 {
    0%, 50%, 60%, 100% { transform: translateY(0); }
    55% { transform: translateY(-15px); }
}

@keyframes charJump12 {
    0%, 55%, 65%, 100% { transform: translateY(0); }
    60% { transform: translateY(-15px); }
}

@keyframes charJump13 {
    0%, 60%, 70%, 100% { transform: translateY(0); }
    65% { transform: translateY(-15px); }
}

@keyframes charJump14 {
    0%, 65%, 75%, 100% { transform: translateY(0); }
    70% { transform: translateY(-15px); }
}

@keyframes charJump15 {
    0%, 70%, 80%, 100% { transform: translateY(0); }
    75% { transform: translateY(-15px); }
}

@keyframes charJump16 {
    0%, 75%, 85%, 100% { transform: translateY(0); }
    80% { transform: translateY(-15px); }
}

@keyframes charJump17 {
    0%, 80%, 90%, 100% { transform: translateY(0); }
    85% { transform: translateY(-15px); }
}

@keyframes charJump18 {
    0%, 85%, 95%, 100% { transform: translateY(0); }
    90% { transform: translateY(-15px); }
}

@keyframes charJump19 {
    0%, 90%, 100% { transform: translateY(0); }
    95% { transform: translateY(-15px); }
}

@keyframes charJump20 {
    0%, 95%, 100% { transform: translateY(0); }
    97.5% { transform: translateY(-15px); }
}

/* 浮遊するテキストアニメーション（残りのセクションタイトル用） */
.floating-text {
    position: relative;
    animation: floatingText 3s ease-in-out infinite;
}

@keyframes floatingText {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.services-description {
    text-align: center;
    font-size: 2.4rem;
    color: var(--text-color);
    margin: 2rem auto 4rem;
    max-width: 1200px;
    padding: 0 2rem;
    font-weight: bold;
    white-space: nowrap;
}

/* 選ばれる7つの理由セクション */
.reasons-section {
    padding: 12rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.reasons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.reason-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 3rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.reason-number {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 6rem;
    font-weight: 900;
    color: rgba(0, 51, 153, 0.08);
    line-height: 1;
}

.reason-icon {
    width: 8rem;
    height: 8rem;
    background: #2e8b57; /* 濃い緑（SeaGreen） - 事業内容セクションと同じ色 */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.reason-icon i {
    font-size: 3.5rem;
    color: white;
}

.reason-card h3 {
    font-size: 2.2rem;
    color: #2e8b57; /* 濃い緑（SeaGreen） - 事業内容セクションと同じ色 */
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.reason-card p {
    font-size: 1.6rem;
    color: #333;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* 会社概要セクション */
.company-section {
    padding: 12rem 0;
    background: #3d444e;
}

/* 背景色が暗くなるため、テキストの色を白に変更 */
.company-section .section-title,
.company-info th,
.company-info td {
    color: white;
}

.company-info th {
    color: var(--secondary-color);
}

.company-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    align-items: center; /* centerに変更：垂直方向の中央揃え */
}

.company-info table {
    width: 100%;
    font-size: 1.6rem;
}

.company-info th,
.company-info td {
    padding: 2rem;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

.company-info th {
    width: 30%;
    text-align: left;
    color: white;
    font-weight: 1000;
}

.company-map {
    height: 400px; /* 地図の位置（高さ）を設定 */
}

.company-map iframe {
    width: 100%;
    height: 100%;/* 地図の縦幅はHTMLで設定（400）してあります！！*/
    border-radius: 1rem;
    border: none;
}

/* お問い合わせセクション */
.contact-section {
    padding: 12rem 0;
    background: #f8f9fa;
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.contact-form {
    background: white;
    padding: 4rem;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
}

.contact-info {
    text-align: center;
    margin-top: 2rem;
}

.contact-info p {
    font-size: 2rem;
    margin-bottom:-5rem; /* テキストとアイコンの距離を近づける */
}

.line-icon {
    font-size: 15rem;
    color: #06C755;
    transition: transform 0.3s ease;
    display: inline-block;
    margin-bottom: -5rem; /* アイコン下の余白を減らす */
}

.line-icon:hover {
    transform: scale(1.1);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-size: 1.7rem;
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1.6rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.required {
    color: #ff0000;
    margin-left: 0.5rem;
}

.btn-submit {
    background: var(--primary-color);
    color: white;
    font-size: 1.8rem;
    padding: 1.5rem 4rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
    display: block;
    margin: 4rem auto 0;
}

.btn-submit:hover {
    background: #002266;
}

/* フッター */
.footer {
    background-color: #f5f5f5;
    color: black;
    padding: 5rem 0 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo img {
    height: 7.5rem;
}

.footer-links ul {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.footer-links a {
    color: black;
    text-decoration: none;
    font-size: 1.8rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #003399;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 1.4rem;
    color: black;
}

/* モバイル用要素をデスクトップでは非表示 */
.mobile-phone-icon,
.mobile-menu-toggle,
.mobile-menu {
    display: none;
}


/* 他のページでナビゲーションクリック時のターゲット位置調整(PC画面) */
[id] {
    scroll-margin-top: -480px; /* ヘッダーの高さ + 余白 */
}

/* 他のページでナビゲーションクリック時のターゲット位置調整(モバイル画面) */
@media (max-width: 768px) {
    [id] {
        scroll-margin-top: -340px; /* モバイルではヘッダーの高さのみ */
    }
}


/* レスポンシブ対応 */
@media (max-width: 768px) {
    html {
        font-size: 56.25%;
    }

    .header {
        display: block; /* ヘッダーを表示 */
        padding: 0; /* パディングを完全に削除 */
        min-height: 60px; /* 最小高さを指定 */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: #fff;
        z-index: 1000;
        transform: none !important; /* 常に表示 */
        transition: none !important; /* モバイルではtransitionを無効化 */
    }
    
    .header .logo {
        display: block; /* ロゴを表示 */
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 60%;
    }
    
    .header .logo img {
        height: 50px; /* モバイル用のロゴサイズを拡大 */
        width: auto;
    }

    /* ナビゲーション部分の調整 */
    .nav {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
        min-height: 60px;
        position: relative;
    }

    /* デスクトップ用のナビゲーションリンクを非表示 */
    .nav-links {
        display: none !important;
    }
    
    /* ヘッダーコンタクト部分を非表示 */
    .header-contact {
        display: none !important;
    }
    
    /* モバイル用の電話アイコン */
    .mobile-phone-icon {
        display: block;
        position: absolute;
        right: 70px; /* 60pxから70pxに変更して左に移動 */
        top: 50%;
        transform: translateY(-50%);
        color: #06C755;
        font-size: 2.2rem;
        text-decoration: none;
        transition: color 0.3s ease;
    }
    
    .mobile-phone-icon:hover {
        color: #003399;
    }
    
    /* ハンバーガーメニューボタン */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 25px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }
    
    .hamburger-line {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #333;
        margin: 5px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    /* メニューが開いた時のハンバーガーアニメーション */
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* モバイルメニュー */
    .mobile-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .mobile-nav-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-nav-links li {
        border-bottom: 1px solid #eee;
    }
    
    .mobile-nav-links a {
        display: block;
        padding: 1.5rem 2rem;
        color: #333;
        text-decoration: none;
        font-size: 1.6rem;
        font-weight: 500;
        transition: background-color 0.3s ease;
    }
    
    .mobile-nav-links a:hover {
        background-color: #f5f5f5;
        color: #003399;
    }

        /* video-containerの上部パディングを追加 */
    .video-container {
        padding-top: 60px; /* ヘッダーの高さ分のパディング */
    }

    /* モバイル用の背景画像 */
    .background-image {
        background-image: url('image/main1-sp.jpg');
    }

    /* モバイル用のメイン画像切り替え */
    .hero-title-img {
        content: url('image/main2-sp.png');
        max-width: 100%;
        width: 100%; /* 実際の幅も100%に設定 */
        height: auto; /* アスペクト比を保持 */
        display: block; /* ブロック要素として表示 */
        transform: scale(1.5); /* 1.2倍に拡大 */
        transform-origin: center; /* 中心を基準に拡大 */
        padding-bottom: 20px;
    }

    /* セクションタイトルのサイズ調整 （企業理念、事業内容、AZメンテナンスが選ばれる7つの理由、会社概要、お問い合わせ）*/
    .section-title {
        font-size: 2.7rem; /* タイトルのサイズを小さく */
        margin-bottom: 15px; /* タイトルの下の余白を調整 */
    }
    
    /* NEWSセクションのタイトルだけ上下の余白を狭く */
    .news-section .section-title {
        margin-top: -30px;
        margin-bottom: -40px; /* 下の余白も狭く */
    }

    .news-section {
        margin-bottom: -40px; /* 下の余白を少し減らす */
    }
    
    /* 施工事例セクションのタイトルも上下の余白を狭く */
    .works-section .section-title {
        margin-top: -70px;
        margin-bottom: 0; /* 下の余白も狭く */
    }

    .works-section {
        margin-bottom: -70px; /* 下の余白を少し減らす */
    }
    
    /* お客様の声セクションのタイトルの上の余白を狭く */
    .reviews-section .section-title {
        margin-top: -70px; /* 上の余白を少し減らす */
    }

    .reviews-section {
        margin-bottom: -70px; /* 下の余白を少し減らす */
    }
    
    /* 企業理念セクションのタイトルの上部の余白を狭く */
    .about .section-title {
        margin-top: -70px; /* 上の余白を少し減らす */
    }

    .about {
        margin-bottom: -70px; /* 下の余白を少し減らす */
    }
    
    /* 取り扱いメーカーセクションのタイトルの上の余白を狭く */
    .makers-section .section-title {
        margin-top: -20px; /* 上の余白を少し減らす */
    }
    
    /* 事業内容セクションのタイトルの上の余白を狭く */
    .services-section .section-title {
        margin-top: -70px; /* 上の余白を少し減らす */
    }

    .services-section {
        margin-bottom: -70px; /* 下の余白を少し減らす */
    }
    
    /* AZメンテナンスが選ばれる7つの理由セクションのタイトルの上の余白を狭く */
    .reasons-section .section-title {
        margin-top: -150px; /* 上の余白を少し減らす */
    }

    .reasons-section {
        margin-bottom: -50px; /* 下の余白を少し減らす */
    }
    
    /* 会社概要セクションのタイトルの上の余白を狭く */
    .company-section .section-title {
        margin-top: -70px; /* 上の余白を少し減らす */
    }

    
    /* お問い合わせセクションのタイトルの上の余白を狭く */
    .contact-section .section-title {
        margin-top: -70px; /* 上の余白を少し減らす */
    }

    .contact-section {
        margin-bottom: -70px; /* 下の余白を少し減らす */
    }

    /* モバイルでは mobile-break を表示し、pc-break を非表示 */
    .pc-break {
        display: none;
    }

    /* モバイル版では改行を表示 */
    .mobile-break {
        display: inline;
    }

    /* 黄色いバッジ（適正価格宣言）のサイズ変更と位置調整 */
    .price-badge {
        width: 100px;
        height: 100px;
        width: 80px;  /* 100pxから80pxに縮小 */
        height: 80px; /* 100pxから80pxに縮小 */
        top: -110px;  /* -60pxから-80pxに変更して上に移動 */
        transform: translateX(-50%) rotate(-15deg) scale(0.8);
        left: -4px;
    }

    .badge-text {
        font-size: 1.4rem;
    }

    .text-line2 {
        font-size: 1.8rem;
        margin-top: 45px;
    }

    .text-line3 {
        font-size: 1.8rem;
    }

    /* 黄色いバッジ内のテキスト（AZメンテナンスは）の位置調整 */
    .curved-text {
        width: 100px; /* バッジのサイズに合わせて調整 */
        height: 100px; /* バッジのサイズに合わせて調整 */
    }

    /* 累計施工実績バッジのサイズ変更と位置調整 */
    .achievement-badge {
        width: 130px;  /* サイズを指定 */
        height: 130px; /* サイズを指定 */
        top: -110px;  /* -60pxから-80pxに変更して上に移動 */
        right: -85px;  /* 5pxから-20pxに変更して右に移動 */
        padding: 0;
        transform: none; /* 回転とスケールを削除 */
    }

    .badge-label {
        font-size: 1.8rem;
        font-weight: 800; /* 太さを調整 */
        -webkit-text-stroke: 0; /* テキストの輪郭を削除 */
        text-shadow: none; /* テキストの影を削除 */
    }

    .badge-number {
        font-size: 3.0rem;
        font-weight: 800; /* 太さを調整 */
        -webkit-text-stroke: 0; /* テキストの輪郭を削除 */
        text-shadow: none; /* テキストの影を削除 */
    }

    .badge-unit {
        font-size: 1.6rem;
        font-weight: 800; /* 太さを調整 */
        -webkit-text-stroke: 0; /* テキストの輪郭を削除 */
        text-shadow: none; /* テキストの影を削除 */
    }

    /* ヒーローセクションのタイトル「あなたの理想を形に、、、」の調整 */
    .hero-title {
        top: -10px; /* 「あなたの理想を形に、、、」の高さの調整 */
        margin-bottom: 1rem;
        line-height: 1.3;
        -webkit-text-stroke: 1px #333;
        white-space: nowrap;
        text-shadow: 0 0 1px #333;
        display: block; /* ブロック要素に変更 */
        width: 100%; /* 幅を100%に設定 */
        max-width: 100%; /* 最大幅を設定 */
    }

    /* タイトル「あなたの理想を形に、、、」の後ろの白い調整 */
    .title-wrapper {
        padding: 2rem 0.7rem; /* パディングを増やして縦幅を大きく */
        background: rgba(255, 255, 255, 0.9);
        border-radius: 0.5rem;
    }

    /* ヒーローコンテンツの調整 */
    .hero-content {
        width: auto; /* 幅を自動調整 */
        max-width: fit-content; /* コンテンツに合わせる */
        margin: 0 auto; /* 中央揃え */
        padding: 1rem 2rem; /* パディングを調整 */
    }

    .hero-text {
        font-size: 1.8rem;
    }

    /* 顧客会員数バナーの調整 */
    .achievement-banner {
        padding: 1rem 2rem; /* パディングを小さくして全体のサイズを縮小 */
        flex-direction: row; /* 横並びに設定（デフォルトですが明示的に指定） */
        align-items: center; /* 中央揃え */
        gap: 1rem; /* 要素間の間隔を縮小 */
        top: 50%;
    }
    
    .achievement-text {
        font-size: 2rem; /* フォントサイズを小さく */
        white-space: nowrap; /* 改行を防止 */
        -webkit-text-stroke: 0.5px #333; /* テキストの輪郭を調整 */
    }
    
    .achievement-number {
        font-size: 3.5rem; /* 数字のサイズを小さく */
        -webkit-text-stroke: 0.5px #003399; /* テキストの輪郭を調整 */
    }
    
    .achievement-unit {
        font-size: 2rem; /* 単位のサイズを小さく */
        -webkit-text-stroke: 0.5px #333; /* テキストの輪郭を調整 */
    }

    /* クイック見積もりセクションを縦並びに変更 */
    .quick-estimate {
        flex-direction: column; /* 縦並びに変更 */
        align-items: center; /* 中央揃え */
        gap: 0.7rem; /* 要素間の間隔を少し狭く */
        width: 80%; /* 幅を少し狭く */
        max-width: 260px; /* 最大幅を小さく */
        bottom: 4%; /* 位置を下に移動（20%から1%に変更） */
    }
    
    .estimate-btn {
        width: 100%; /* ボタンの幅を100%に */
        justify-content: center; /* テキストを中央揃え */
        padding: 0.8rem 1.2rem; /* パディングをさらに小さく調整 */
        font-size: 1.6rem; /* フォントサイズをさらに小さく */
    }

    /* モバイル画面でのアイコンサイズ調整 */
    .estimate-btn i:not(.arrow) {
        font-size: 1.8rem; /* 2.4remから1.8remに縮小 */
        margin-right: 1rem; /* 間隔も調整 */
    }

    /* LINEで見積もりボタンの縦幅を調整 */
    .line-btn {
        height: 45px; /* 高さをさらに小さく */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 受付時間ボタンの高さ調整 */
    .cleaning-btn {
        height: 45px;
        padding: 0.5rem 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .contact-info-btn {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }

    .contact-time {
        font-size: 1rem;
        line-height: 1;
    }

    .contact-tel {
        font-size: 1.4rem;
        line-height: 1;
    }
    
    /* メールフォームボタンのモバイル対応 */
    .mail-btn {
        height: 45px;
        padding: 0.5rem 1rem; /* パディングを小さく */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mail-top {
        margin-bottom: 0.3rem;
    }
    
    .mail-top i {
        font-size: 1.8rem;
        margin-right: 0.5rem;
    }
    
    .mail-top span {
        font-size: 1.4rem;
    }
    
    .mail-bottom span {
        font-size: 1.3rem;
    }
    
    .mail-bottom i {
        font-size: 1.8rem;
    }

/* 取り扱いメーカーセクションのモバイル対応 */
    .makers-section {
        padding: 6rem 0 4rem;
    }
    
    .makers-rows {
        gap: 3rem; /* 上下の行の間隔を縮小 */
    }
    
    .makers-row {
        width: 100%;
        overflow: visible; /* はみ出た部分を表示 */
    }
    
    .makers-track {
        width: max-content; /* コンテンツに合わせて幅を設定 */
        animation-duration: 20s; /* アニメーション速度を速く */
        padding: 0.5rem;
        gap: 2rem; /* メーカー間の間隔を縮小 */
    }
    
    .maker-item {
        width: 120px; /* 幅を小さく */
    }
    
    .maker-logo {
        width: 110px; /* 幅を小さく */
        height: 60px; /* 高さを小さく */
        margin-bottom: 0.5rem;
    }
    
    .maker-name {
        font-size: 1.4rem; /* フォントサイズを小さく */
    }

    /* 企業理念セクションの調整 */
    .about-text h3 {
        font-size: 2rem; /* タイトルのサイズを小さく */
        margin-bottom: 1rem;
        padding-left: 20px; /* 左側にパディングを追加して右に移動 */
    }
    
    .about-text p {
        font-size: 1.7rem;
        white-space: normal;
        text-align: center !important;
        padding-left: 10px; /* 左側にパディングを追加して右に移動 */
    }

    .about-flex-container {
        flex-direction: column;
        gap: 3rem;
    }
    
    .about-text {
        text-align: center;
    }
    
    .family-image {
        max-width: 95%; /* 100%から95%に縮小 */
        height: auto; /* 高さを自動調整 */
        margin: 0 auto; /* 中央揃え */
    }
    
    /* モバイル表示時に通常のbrタグを非表示にする */
    .about-text p br:not(.mobile-break) {
        display: none;
    }
    
    .about-images {
        gap: 0.6rem; /* 画像間の間隔を縮小 */
    }
    
    .about-images img {
        width: 115px; /* 画像の幅を小さく */
        height: 90px; /* 画像の高さを小さく */
    }

    /* 事業内容セクションをモバイル表示で縦並びに変更 */
    .service-grid {
        display: flex;
        flex-direction: column;
    }

    /* 事業内容の説明文「AZメンテナンスでは、メンテナンス、、、」のテキストサイズ */
    .services-description {
        font-size: 1.8rem; /* 2.4remから1.8remに縮小 */
    }
    
    /* リフォームを1番目に(実際の順番は違う) */
    .service-item.reform {
        order: 2;
    }
    
    /* オール電化を2番目に (実際の順番は違う)*/
    .service-item.electrification {
        order: 4;
    }

    /* メンテナンスを3番目に(実際の順番は違う) */
    .service-item.maintenance {
        order: 1;
    }
    
    /* ハウスクリーニングを4番目に (実際の順番は違う)*/
    .service-item.security {
        order: 3;
    }
    
    .service-item {
        min-height: auto; /* 高さを自動調整 */
        padding: 2rem 1rem; /* パディングを縮小（上下のパディング） */
        cursor: default !important;
        pointer-events: auto;
    }

    /* DETAILリンクのみクリック可能に */
    .detail-link {
        position: relative;
        z-index: 10;
        cursor: pointer !important;
        display: inline-block;
        padding: 0.8rem 1rem;
        background-color: rgba(29, 29, 29, 0.2);
        border-radius: 0.3rem;
        margin-top: 1rem;
        left: 25%;
    }

    /* サービスアイコンのサイズを小さく */
    .service-icon {
        flex: 0 0 5rem; /* 10remから7remに縮小 */
        height: 5rem; /* 10remから5remに縮小 */
        margin-right: 1.5rem; /* 2remから1.5remに縮小 */
        position: relative;
        top: -1rem; /* アイコンを少し上に移動 */
    }
    
    .service-icon i {
        font-size: 3rem; /* 4remから3remに縮小 */
    }
    
    /* サービスコンテンツのタイトルとサブタイトルを横並びに */
    .service-content h3 {
        font-size: 2rem;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 1rem;
    }
    
    .service-subtitle {
        display: inline;
        font-size: 1.2rem;
        margin-top: 0;
        white-space: nowrap;
    }
    
    .service-content p {
        font-size: 1.4rem; /* 1.6remから1.4remに縮小 */
        padding-right: 50px;
        margin-left: -5rem; /* テキストを左に移動 */
        padding-left: 0; /* 左のパディングを削除 */
    }

    /* モバイルでは.service-content p内の通常のbrタグ（クラスなし）を非表示 */
    .service-content p br:not(.mobile-break) {
        display: none;
    }
    
    /* モバイルではservice-contentのレイアウトはそのまま */
    .service-content {
        position: relative;
    }
    
    /* pタグはそのまま */
    .service-content p {
        margin-bottom: 1rem;
    }
    
    /* DETAILボタンを絶対配置で右側に */
    .service-content .detail-link {
        position: absolute;
        right: 0;
        bottom: 2rem;
        margin-top: 0;
        left: auto;
        padding: 0.6rem 0.8rem; /* 0.8rem 1remから縮小 */
        font-size: 1.2rem; /* フォントサイズも小さく */
        background-color: rgba(29, 29, 29, 0.2);
        border-radius: 0.3rem;
        bottom: 4rem; /* さらに上に移動 */
    }

    /* 7つの理由セクションのモバイル調整 */
    .reasons-section {
        padding: 0 !important; /* パディングを0に */
        margin-top: -9rem !important; /* 負のマージンで上に移動 */
        padding-bottom: 10rem !important;
    }

    /* 「AZメンテナンスが選ばれる7つの理由」のタイトルをさらに小さく */
    .reasons-section .section-title {
        font-size: 2.5rem; /* 2.7remからさらに小さく */
    }

    /* セクションタイトルの下の余白も調整 */
    .reasons-section .section-title {
        margin-bottom: 3rem !important; /* タイトルの下の余白も減らす */
        padding-top: 10rem;
    }
    
    /* 7つの理由セクションのアイコンと数字のサイズを小さく */
    .reasons-section .reason-icon {
        width: 6rem !important; /* 8remから6remに縮小 */
        height: 6rem !important; /* 8remから6remに縮小 */
    }
    
    .reasons-section .reason-icon i {
        font-size: 2.8rem !important; /* 3.5remから2.8remに縮小 */
    }
    
    .reasons-section .reason-number {
        font-size: 4.5rem !important; /* 6remから4.5remに縮小 */
    }

    #reasons .reasons-grid,
    .reasons-section .reasons-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 1~6番目の項目の調整 */
    #reasons .reason-house,
    .reasons-section .reason-house {
        width: 100% !important;
        max-width: 430px !important;
        position: relative !important;
        margin: 0 !important; /* マージンを正の値に変更 */
        padding: 0 !important;
        transform: scale(1.2) !important; /* スケールを1に設定 */
        min-height: auto !important; /* 高さを自動調整 */
    }

    /* 7番目（中央に配置される最後の項目）の調整 */
    #reasons .reason-house-center,
    .reasons-section .reason-house-center {
        grid-column: auto !important;
        justify-self: auto !important;
        max-width: 430px !important; /* 320pxから480pxに変更 */
        transform: scale(1.2) !important; /* 1から1.4に変更して他の家と同じに */
    }

    /* 最後の項目だけは下部のマージンを調整 */
    #reasons .reason-house:last-child,
    .reasons-section .reason-house:last-child,
    #reasons .reason-house-center,
    .reasons-section .reason-house-center {
        margin-bottom: 8rem !important;
    }
    
    /* 家の本体部分の調整 */
    #reasons .house-body,
    .reasons-section .house-body {
        padding: 2rem 1rem !important;
        min-height: 250px !important;
    }
    
    /* 見出しのスタイル調整 */
    #reasons .reason-house h3,
    .reasons-section .reason-house h3 {
        font-size: 1.4rem !important;
        margin-bottom: 1rem !important;
        text-align: center !important;
        margin-top: 9rem !important; /* 上部のマージンを追加して下に下げる */
    }
    
    /* 説明文のスタイル調整 */
    #reasons .reason-house p,
    .reasons-section .reason-house p {
        font-size: 1.1rem !important;
        text-align: center !important;
        line-height: 1.4 !important;
        max-width: 60% !important; /* テキストの最大幅を85%に制限 */
        margin: 0 auto !important; /* 左右のマージンを自動で中央揃え */
    }

    /* <br>タグを無効化させる */
    #reasons .reason-house p br,
    .reasons-section .reason-house p br {
        display: none !important; /* brタグを非表示にする */
    }

    /* mobile-breakクラスを持つbrタグは表示する */
    #reasons .reason-house p br.mobile-break,
    .reasons-section .reason-house p br.mobile-break {
        display: inline !important; /* mobile-breakクラスを持つbrタグを表示 */
    }

    /* 会社概要セクション全体の調整 */
    .company-section {
        padding: 6rem 0 !important; /* 左右のパディングを0に */
        width: 100% !important; /* 幅を100%に */
        max-width: 100vw !important; /* 最大幅をビューポート幅に */
        overflow-x: hidden !important; /* 横スクロールを防止 */
    }

    /* 会社概要セクションのセクションタイトルの上の余白を増やす */
    .company-section .section-title {
        padding-top: 7rem !important; /* 上のパディングを追加 */
    }
    
    /* 会社概要の内容を小さく */
    .company-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        align-items: center !important;
        width: 100% !important; /* 幅を100%に */
        max-width: 100% !important; /* 最大幅を100%に */
        padding: 0 1rem !important; /* 左右に少しだけパディングを追加 */
        box-sizing: border-box !important; /* ボックスサイズを調整 */
    }
    
    /* 会社情報テーブルの調整 */
    .company-info {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .company-info table {
        transform: scale(1) !important; /* 会社概要のスケール */
        transform-origin: left top !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* テーブルのセルが長いテキストでもはみ出さないように */
    .company-info th, 
    .company-info td {
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        font-size: 1.3rem !important;
        padding: 1rem !important; /* 2remから1remに減らして上下の余白を縮小 */
    }
    
    /* 地図のサイズを小さく */
    .company-map {
        height: 180px !important; /* 220pxから180pxに縮小 */
        width: 80% !important; /* 幅を100%に */
        margin: 0 !important; /* マージンをリセット */
    }
    
    .company-map iframe {
        height: 200px !important; /* 250pxから200pxに縮小 */
        width: 100% !important;
    }
    
    /* 会社概要セクションの親コンテナの調整 */
    .company-section > div {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* 会社概要と地図の間隔を調整 */
    .company-details {
        margin-bottom: 2rem !important; /* 下の余白を調整 */
    }
    
    .contact-info-btn {
        width: 100%; /* 電話番号ボタンの幅も100%に */
    }

    /* 電話番号ボタンの中のテキストサイズ調整 */
    .contact-time {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
    }
    
    .contact-tel {
        font-size: 1.8rem;
    }

    .company-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    /* お問い合わせセクションのLINEアイコンを小さく */
    .line-icon {
        font-size: 12rem; /* 15remから12remに縮小 */
        margin-top: -4rem;
    }
    
    /* LINEアイコンの下の余白を狭く */
    .contact-info {
        margin-top: 1rem; /* 2remから1remに縮小 */
        margin-bottom: -2rem; /* 下部にも余白を追加 */
    }

    .contact-info p {
        margin-bottom: 0; /* テキストとアイコンの距離を近づける */
    }
    
    .line-icon {
        font-size: 13rem;
        margin-bottom: -1rem; /* アイコン下の余白を減らす */
    }

    .footer-content {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .footer-links ul {
        flex-direction: column;
        gap: 1.5rem;
    }
}
