/* ========================================
   施工実績ページ専用スタイル
   ======================================== */

/* ========================================
   パンくずリスト
   ======================================== */
.breadcrumb-section {
    margin-top: 90px;
    padding: 10px 0;
    background-color: var(--bg-light);
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background-color: transparent;
}

.breadcrumb ol {
    display: flex;
    gap: 10px;
    list-style: none;
    align-items: center;
    font-size: 14px;
}

.breadcrumb ol li {
    display: flex;
    align-items: center;
}

.breadcrumb ol li:not(:last-child)::after {
    content: '›';
    margin-left: 10px;
    color: var(--text-gray);
    font-size: 16px;
}

.breadcrumb ol li a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb ol li a:hover {
    opacity: 0.7;
}

.breadcrumb ol li:last-child {
    color: var(--text-gray);
}

/* ========================================
   ヒーローセクション（パターン1: 施工写真 + オーバーレイ）
   ======================================== */
.works-hero {
    position: relative;
    padding: 120px 0 80px;
    background:
        linear-gradient(135deg, rgba(3, 107, 252, 0.9) 0%, rgba(5, 137, 255, 0.85) 100%),
        url('img/works-hero-bg.jpg');
    background-size: 100% auto;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    color: white;
    text-align: center;
    overflow: hidden;
    border-bottom: 4px solid;
    border-image: linear-gradient(90deg, #D0A900 0%, #F5D76E 50%, #D0A900 100%);
    border-image-slice: 1;
}

.page-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.page-title-en {
    font-family: var(--font-en);
    font-size: 18px;
    letter-spacing: 0.3em;
    opacity: 0.9;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

/* ========================================
   メインコンテンツセクション
   ======================================== */
.main-content-section {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 50px;
    align-items: start;
}

/* ========================================
   左カラム：メインコンテンツ
   ======================================== */
.content-column {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* 導入文 */
.intro-block {
    background-color: white;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
}

.intro-text {
    font-size: 15px;
    line-height: 2;
    color: var(--text-gray);
    margin: 0;
}

/* 施工実績リスト（グリッド表示） */
.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 横に2つ並べる */
    gap: 30px;
}

@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: 1fr;
        /* スマホでは1列 */
    }
}

.work-card {
    position: relative;
    height: 300px;
    /* 以前より少し小さく調整 */
    border-radius: 12px;
    overflow: hidden;
    background-color: #f9f9f9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.work-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    /* カード自体のtranslateYは画像の飛び出しと競合しないよう控えめに */
}

/* 画像ラッパー */
.work-card-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding-bottom: 0;
    /* 余白削除 */
}

/* 画像のアニメーション */
.work-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 枠いっぱいに */
    transform: scale(1);
    transition: transform 0.5s ease;
    cursor: pointer;
    /* クリック可能であることを示す */
}

.work-card:hover .work-card-image {
    transform: scale(1.05);
    /* 少しだけ拡大 */
}

/* 半透明の枠（オーバーレイ） */
.work-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.4);
    padding: 8px 15px;
    /* パディングを最小限に */
    border-radius: 0;
    backdrop-filter: blur(4px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    text-align: right;
    /* 右揃え */
    z-index: 2;
    /* 画像より上に */
    pointer-events: none;
    /* オーバーレイがクリックを邪魔しないようにする */
}

.work-card-year {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: white;
    background-color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-family: var(--font-en);
}

.work-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

/* --- 画像拡大モーダル --- */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.show {
    opacity: 1;
    display: flex;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* 定修・定検工事リスト */
.repair-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.repair-item {
    background-color: var(--bg-light);
    padding: 25px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.repair-item:hover {
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.repair-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 10px 0;
}

.repair-category {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0 0 8px 0;
}

.repair-client {
    font-size: 13px;
    color: var(--text-gray);
    margin: 0;
    font-style: italic;
}

/* コンテンツブロック */
.content-block {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.content-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.content-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

/* 施工分野カード */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.category-card {
    background-color: var(--bg-light);
    padding: 30px 25px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    background-color: white;
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    color: white;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.category-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* ========================================
   右カラム：サイドバー
   ======================================== */
.sidebar-column {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

/* サイドバーナビゲーション */
.sidebar-nav {
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 15px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 15px;
    position: relative;
    padding-left: 35px;
}

.sidebar-menu li a::before {
    content: '▸';
    position: absolute;
    left: 15px;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-menu li a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 35px;
}

.sidebar-menu li a:hover::before {
    opacity: 1;
}

.sidebar-menu li.current a {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-menu li.current a::before {
    color: white;
    opacity: 1;
}

/* サブメニュー */
.sidebar-menu .has-submenu>a {
    position: relative;
}

.sidebar-menu .has-submenu>a::after {
    content: '▼';
    position: absolute;
    right: 15px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.sidebar-menu .has-submenu.open>a::after {
    transform: rotate(180deg);
}

.sidebar-menu .submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-menu .submenu li {
    margin-bottom: 3px;
}

.sidebar-menu .submenu li a {
    font-size: 13px;
    padding: 8px 15px 8px 45px;
    color: var(--text-gray);
}

.sidebar-menu .submenu li a::before {
    content: '−';
    left: 30px;
}

.sidebar-menu .submenu li a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* お問い合わせウィジェット */
.contact-widget {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.contact-widget .sidebar-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.widget-contact-info {
    text-align: center;
}

.widget-text {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.widget-phone {
    display: block;
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-en);
    color: white;
    text-decoration: none;
    margin-bottom: 10px;
    transition: opacity 0.3s ease;
}

.widget-phone:hover {
    opacity: 0.8;
}

.widget-hours {
    font-size: 12px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.widget-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.widget-button:hover {
    background-color: #ff8555;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* ========================================
   レスポンシブ対応
   ======================================== */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sidebar-column {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .work-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }

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

    .repair-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 36px;
    }

    .page-title-en {
        font-size: 14px;
    }

    .main-content-section {
        padding: 50px 0;
    }

    .intro-block,
    .work-item,
    .content-block {
        padding: 25px 20px;
    }

    .sidebar-column {
        grid-template-columns: 1fr;
    }

    .content-title {
        font-size: 20px;
    }

    .work-title {
        font-size: 18px;
    }
}

/* ========================================
   アニメーション
   ======================================== */
.intro-block {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.1s;
}

.work-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.work-item:nth-child(1) {
    animation-delay: 0.1s;
}

.work-item:nth-child(2) {
    animation-delay: 0.2s;
}

.work-item:nth-child(3) {
    animation-delay: 0.3s;
}

.work-item:nth-child(4) {
    animation-delay: 0.4s;
}

.work-item:nth-child(5) {
    animation-delay: 0.5s;
}

.work-item:nth-child(6) {
    animation-delay: 0.6s;
}

.category-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.category-card:nth-child(1) {
    animation-delay: 0.1s;
}

.category-card:nth-child(2) {
    animation-delay: 0.2s;
}

.category-card:nth-child(3) {
    animation-delay: 0.3s;
}

.category-card:nth-child(4) {
    animation-delay: 0.4s;
}

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

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