/* ==========================================================================
   1. ベース設定
   ========================================================================== */

* { box-sizing: border-box; }

html, body { overflow-x: hidden; width: 100%; margin: 0; padding: 0; }

/* ページ遷移フェードイン */
body { opacity: 0; transition: opacity 0.8s ease; }
body.loaded { opacity: 1; }


    background: #fff;
    padding-top: 60px; /* site-headerのheight: 60px に合わせる */
    color: #000;
    -webkit-font-smoothing: antialiased;
}


/* ==========================================================================
   カスタムカーソル
   ========================================================================== */
* { cursor: none !important; }
@media (max-width: 768px) { * { cursor: auto !important; } #goo-cursor-wrap { display: none; } }

/* リンク色の強制固定 */
a, a:visited { color: #000 !important; text-decoration: none !important; transition: 0.3s; }
.sp-overlay-btn, .sp-overlay-btn:visited { color: #fff !important; }

/* ══ スマホ専用：hover無効化・touch-activeのみ有効 ══ */
@media (max-width: 768px) {
    .card-item:hover,
    .card-item:focus { border-color: #ddd !important; box-shadow: none !important; }
    .works-card:hover .visual-stack,
    .works-card:focus .visual-stack { transform: none !important; box-shadow: none !important; }
    .works-card:hover,
    .works-card:focus { border-color: transparent !important; box-shadow: none !important; }
    .about-value-card:hover,
    .about-value-card:focus { border-color: rgba(255,255,255,0.08) !important; }
    .news-list-item:hover .news-list-img img { transform: none !important; }
    /* 長押し時の画像プレビュー・選択を無効化 */
    .works-card img, .card-item img, .news-list-item img {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        -webkit-user-drag: none;
        pointer-events: none;
    }
    /* touch-activeのみ有効 */
    .about-value-card.touch-active { border-color: rgba(255,120,0,0.4) !important; }
    .works-card.touch-active .visual-stack { transform: translateY(-8px) !important; box-shadow: 8px 8px 0px #ff7800 !important; }
    .card-item.touch-active { border-color: #ff7800 !important; box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important; }
    .works-card.touch-active { border-color: transparent !important; box-shadow: none !important; }
    .news-list-item.touch-active .news-list-img img { transform: scale(1.05) !important; }
}
a:hover, a:active { color: #ff7800 !important; }

/* ナビ・パンくず */
.header-x-link:hover svg, .header-x-link:active svg { fill: #ff7800 !important; }
.nav-menu li a:hover, .nav-menu li a:active { color: #ff7800 !important; }
.nav-menu li a:hover::after, .nav-menu li a:active::after { width: 100%; }
.breadcrumb a:hover, .breadcrumb a:active { color: #ff7800 !important; }
.breadcrumb a:hover::after, .breadcrumb a:active::after { width: 100%; }

/* カード */
.card-item:hover, .card-item:active { border-color: #ff7800; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.works-card:hover .visual-stack, .works-card:active .visual-stack { transform: translateY(-8px); box-shadow: 8px 8px 0px #ff7800; }

/* ボタン */
.more-btn:hover, .more-btn:active { background: #ff7800 !important; color: #fff !important; transform: translateY(-3px); }
.banner-box:hover, .banner-box:active { border-color: #ff7800 !important; background: #fffcf9; }
.detail-back .more-btn:hover, .detail-back .more-btn:active { background: #ff7800; color: #fff; border-color: #ff7800; }

/* フッター */
.site-footer a:hover, .site-footer a:active { color: #ff7800 !important; }

/* テーブル */
.company-table tr:hover th, .company-table tr:active th,
.company-table tr:hover td, .company-table tr:active td { border-bottom-color: #ff7800; }

/* コンテナ */
.container        { max-width: 1400px; margin: 0 auto; padding: 0 40px; position: relative; }
.container-narrow { max-width: 900px;  margin: 0 auto; padding: 0 40px; position: relative; z-index: 1; }

.section-title {
    font-size: 32px; font-weight: bold; margin: 0 0 40px;
    text-align: left; letter-spacing: 0.1em; text-transform: uppercase;
    position: relative; z-index: 10;
}

/* ページタイトル（下層固定ページ共通） */
.page-title {
    font-size: 32px; font-weight: bold; margin-bottom: 40px;
    border-left: 8px solid #ff7800; padding-left: 20px; line-height: 1.3;
}


/* ==========================================================================
   2. ヘッダー / メニュー
   ========================================================================== */

.site-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 80px;
    background: linear-gradient(to bottom, rgba(0,0,0,1.0) 0%, rgba(0,0,0,1.0) 50%, rgba(0,0,0,0) 100%);
    z-index: 20000; display: flex; align-items: center;
}
.header-inner { width: 100%; padding: 0 40px; display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 40px; width: auto; display: block; }
.header-right { display: flex; align-items: center; gap: 30px; }
.header-x-link svg { width: 22px; height: 22px; fill: #000; transition: fill 0.3s; }

.menu-icon {
    cursor: pointer; width: 30px; height: 18px;
    display: flex; flex-direction: column; justify-content: space-between;
    z-index: 20001; position: relative;
}
.menu-icon span { display: block; width: 100%; height: 2px; background: #fff; transition: 0.3s; }
#menu-toggle:checked + .site-header .menu-icon span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#menu-toggle:checked + .site-header .menu-icon span:nth-child(2) { opacity: 0; }
#menu-toggle:checked + .site-header .menu-icon span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-menu {
    position: fixed; top: 0; right: 0; width: 400px; height: 100%;
    background: rgba(10,10,11,0.85); backdrop-filter: blur(8px); transition: transform 0.6s; z-index: 10000;
    display: flex; justify-content: flex-start; align-items: flex-start;
    padding: 120px 50px; box-shadow: -5px 0 30px rgba(0,0,0,0.3);
    transform: translateX(100%);
}
#menu-toggle:checked ~ .nav-menu { transform: translateX(0); }
html, body { overflow-x: hidden; }
@media (max-width: 480px) {
    .nav-menu { width: 100% !important; padding: 80px 25px; background: rgba(10,10,11,0.92); backdrop-filter: none; box-shadow: none; }
}
.nav-menu ul  { list-style: none; padding: 0; text-align: left; }
.nav-menu li  { margin: 20px 0; font-size: 28px; font-weight: bold; text-transform: uppercase; }
.nav-menu li a { position: relative; display: inline-block; color: #fff !important; }
.nav-menu li a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 3px; background: #ff7800;
    transition: width 0.3s ease;
}
.nav-menu li a:hover, .nav-menu li a:active { color: #ff7800 !important; }
.nav-menu li a:hover::after { width: 100%; }


/* ==========================================================================
   3. パンくずリスト（全ページ共通）
   ========================================================================== */

.breadcrumb {
    max-width: 1400px; margin: 20px auto 10px; padding: 80px 40px 0;
    font-size: 11px; font-weight: bold; letter-spacing: 0.15em;
    text-transform: uppercase; color: #999; text-align: left; line-height: 1;
    position: relative; z-index: 10;
}
.breadcrumb a { color: #000 !important; text-decoration: none; position: relative; transition: 0.3s; }
.breadcrumb a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px; background: #ff7800; transition: 0.3s; }
.breadcrumb a:hover { color: #ff7800 !important; }
.breadcrumb a:hover::after { width: 100%; }
.breadcrumb span { margin: 0 15px; color: #ff7800; font-weight: normal; }


/* ==========================================================================
   4. 透かし文字（下層ページ共通: NEWS / COMPANY / RECRUIT）
   ========================================================================== */

/* ==========================================================================
   5. TOPページ：WORKSカルーセル / NEWSセクション
   ========================================================================== */

.works-section-wrapper,
.news-section-wrapper { position: relative; width: 100%; padding: 20px 0; overflow: hidden; }

/* TOPページ用透かし（カルーセルセクション） */
.works-watermark, .news-watermark {
    position: absolute; font-weight: 900; color: rgba(0,0,0,0.03);
    pointer-events: none; z-index: 0; line-height: 1; user-select: none;
}
.works-watermark { top: -30px; left: -5%;  font-size: 260px; }
.news-watermark  { top: -30px; right: -5%; font-size: 260px; }

/* カルーセル（index.phpのTOP用・3D） */
.works-carousel-container {
    position: relative; width: 100%; height: 500px;
    margin-top: 10px; perspective: 2000px; z-index: 2; margin-bottom: 80px;
}
.works-carousel {
    display: flex; justify-content: center; align-items: center;
    position: relative; width: 100%; height: 100%; transform-style: preserve-3d;
}
.carousel-item {
    position: absolute; width: 320px; height: 450px;
    transition: 0.9s; opacity: 0; background: #000; overflow: hidden;
    -webkit-box-reflect: below 10px linear-gradient(transparent, transparent 80%, rgba(0,0,0,0.1));
}
.carousel-item img { width: 100%; height: 100%; object-fit: cover; }
.carousel-item.active { transform: translate3d(0, 0, 250px) scale(1.1); opacity: 1; z-index: 100; box-shadow: 0 40px 80px rgba(0,0,0,0.4); }
.carousel-item.next  { transform: translate3d(400px, 0, -150px) rotateY(-25deg); opacity: 0.5; z-index: 50; }
.carousel-item.prev  { transform: translate3d(-400px, 0, -150px) rotateY(25deg); opacity: 0.5; z-index: 50; }

.carousel-prev, .carousel-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 60px; height: 60px; border: 1px solid #e0e0e0;
    background: #fff !important; border-radius: 50% !important;
    font-size: 20px; cursor: pointer; z-index: 150;
    display: flex; justify-content: center; align-items: center;
}
.carousel-prev { left: -30px; }
.carousel-next { right: -30px; }

/* 無限スクロールカルーセル（index.phpの差替版） */
.works-carousel-container.infinite { height: auto; perspective: none; margin-bottom: 0; overflow: visible; cursor: grab; user-select: none; touch-action: pan-y; }
.works-carousel-container.infinite:active { cursor: grabbing; }
.works-carousel-container.infinite .works-carousel {
    width: max-content; transform-style: flat;
    justify-content: flex-start; animation: infinite-scroll 60s linear infinite;
    will-change: transform; gap: 50px;
}
@keyframes infinite-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.works-carousel-container.infinite .carousel-item {
    position: relative; width: 240px; height: auto;
    opacity: 1; background: transparent;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: transform 0.4s ease-in-out;
    pointer-events: auto; -webkit-box-reflect: none;
}
.works-carousel-container.infinite .carousel-item:hover { transform: translateY(-30px); z-index: 10; }
.works-carousel-container.infinite .carousel-item img { width: 100%; height: auto; display: block; border-radius: 4px; pointer-events: none; -webkit-user-drag: none; }


/* ==========================================================================
   6. 一覧ページ共通：フィルター・検索
   ========================================================================== */

.page-header-flex {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 40px; border-bottom: 2px solid #ff7800; padding-bottom: 20px;
}
.filter-controls { display: flex; align-items: center; gap: 30px; }

.select-wrapper { position: relative; }
.select-wrapper select {
    border: none; border-bottom: 1px solid #000; padding: 8px 35px 8px 10px;
    font-weight: bold; cursor: pointer; background: transparent; outline: none;
    appearance: none; -webkit-appearance: none; font-size: 14px;
}
.select-wrapper::after {
    content: '▼'; font-size: 10px; position: absolute; right: 5px;
    top: 50%; transform: translateY(-50%); pointer-events: none;
}
.search-input {
    border: none; border-bottom: 1px solid #ccc; padding: 8px 5px;
    width: 160px; transition: 0.3s; font-weight: bold; background: transparent;
}
.search-input:focus { border-bottom-color: #ff7800; width: 220px; outline: none; }


/* ==========================================================================
   7. グリッド & カード（全一覧共通ベース）
   ========================================================================== */

.grid-system {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 70px 40px; margin-bottom: 80px; position: relative; z-index: 2; width: 100%;
}
/* NEWSカード共通（index・news.php共通） */
.card-item { display: flex; background: transparent; border: 1px solid #ddd; border-radius: 12px; text-decoration: none !important; color: inherit; overflow: hidden; transition: all 0.3s ease; min-height: 160px; position: relative; }
.card-item:hover { border-color: #ff7800; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.card-visual { flex: 0 0 45%; overflow: hidden; aspect-ratio: 638 / 900; }
.card-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card-body  { flex: 1; padding: 20px; display: flex; flex-direction: column; justify-content: flex-start; position: relative; }
.card-title { font-size: 16px; font-weight: bold; margin-top: 10px; color: #000; }
.card-more  { align-self: flex-end; margin-top: auto; font-size: 11px; font-weight: bold; color: #ff7800; }
.card-meta  { display: flex; gap: 10px; margin-bottom: 10px; font-weight: bold; align-items: center; }

/* タグ・日付バッジ */
.tag-box  { font-size: 11px; background: #fff; color: #000; padding: 2px 10px; border: 1px solid #000; text-transform: uppercase; }
.date-box { font-family: monospace; font-size: 12px; background: #000; color: #fff; padding: 3px 10px; border: 1px solid #000; }



/* スクロール連動フェードイン */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up.delay-1 { transition-delay: 0.15s; }
.fade-up.delay-2 { transition-delay: 0.30s; }


/* TOPページ・WORKS一覧共通のスタック演出 */
.visual-stack {
    position: relative; width: 100%; aspect-ratio: 16 / 11;
    margin-bottom: 25px; display: flex; align-items: center; justify-content: center;
}
.stack-bg {
    position: absolute; width: 85%; height: 85%;
    background: #ff7800; transform: rotate(-7deg); z-index: 1; transition: 0.4s;
}
.stack-img {
    position: relative; width: 50%; height: 100%; z-index: 2;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25); overflow: hidden; background: #fff;
}
.stack-img img { width: 100%; height: 100%; object-fit: cover; }
.card-item:hover .stack-bg { transform: rotate(0deg) scale(1.05); }

/* WORKS一覧ページ（works.php）用の縦長コマ上書き */
.works-card {
    display: block; border: none; border-radius: 0;
    min-height: 0; background: transparent; overflow: visible;
}
.works-card:hover { border-color: transparent; box-shadow: none; }
.works-card .visual-stack {
    aspect-ratio: 1 / 1.414;
    background: #fcfcfc;
    line-height: 0; margin-bottom: 15px; overflow: hidden;
    transition: all 0.3s ease;
}
.works-card .stack-bg { display: none; }
.works-card .stack-img { width: 100%; height: 100%; overflow: hidden; }
.works-card .stack-img img { transition: transform 0.5s ease; width: 100%; height: 100%; object-fit: cover; display: block; }
.works-card:hover .visual-stack {
    transform: translateY(-8px);
    box-shadow: 8px 8px 0px #ff7800;
}
.works-card:hover .stack-img img { transform: none; }

.works-card .tag-box  { display: inline-block; background: #000; color: #fff; padding: 2px 10px; font-size: 11px; font-weight: bold; margin-bottom: 10px; border: none; }
.works-card .card-title {
    font-weight: 900; font-size: 1.1rem; line-height: 1.4; margin: 0;
    color: #000; border-left: 5px solid #000; padding-left: 10px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}


/* ==========================================================================
   9. NEWSカード（横並び・画像＋テキスト）
   ========================================================================== */

/* NEWS一覧・TOP共通のカードレイアウト */
/* NEWS一覧ページ：グリッド gap の調整 */
.news-grid { gap: 25px; margin-bottom: 80px; width: 100%; }
.new-badge { font-family: monospace; font-size: 12px; font-weight: bold; color: #e00; display: block; height: 18px; line-height: 18px; margin-bottom: 4px; }
.new-badge-spacer { display: block; height: 18px; margin-bottom: 4px; }


/* ==========================================================================
   10. 詳細ページ（view.php）
   ========================================================================== */

.detail-container { max-width: 900px; margin: 0 auto 100px; }
.detail-header-block { width: 100%; margin-bottom: 20px; }

.detail-meta { display: flex; gap: 15px; align-items: center; margin-bottom: 10px; }
.detail-date     { font-family: monospace; background: #000; color: #fff; padding: 3px 12px; font-size: 13px; }
.detail-category { border: 1px solid #000; padding: 2px 12px; font-size: 12px; font-weight: bold; text-transform: uppercase; }
.detail-title    { font-size: 32px; font-weight: bold; line-height: 1.3; border-left: 8px solid #ff7800; padding-left: 20px; }

.detail-visual {
    width: 100%; height: calc(100vh - 280px); margin-bottom: 50px;
    display: flex; justify-content: center; align-items: center; background: #fff;
}
.detail-visual img {
    max-width: 100%; max-height: 100%; width: auto; height: auto;
    object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.detail-section { margin-bottom: 50px; text-align: left; }
.section-sub-title {
    font-size: 18px; font-weight: 900; margin-bottom: 20px; color: #ff7800;
    border-bottom: 1px solid #eee; padding-bottom: 10px; text-align: left;
}
/* 詳細ページ（view.php）本文：改行をそのまま表示 */
.detail-text { font-size: 16px; line-height: 1.8; color: #333; text-align: left; }
.detail-text.preformatted { white-space: pre-wrap; line-height: 1.5; }

.official-link-wrapper { text-align: left; margin: 0; padding: 0; display: block; }
.official-link-row { margin-bottom: 8px; }
.official-link-label { font-weight: bold; margin-right: 6px; }
@media (max-width: 768px) {
    .official-link-label { display: block; margin-right: 0; margin-bottom: 2px; }
}
.official-link, .official-link:visited {
    color: #ff7800 !important; text-decoration: none !important; font-weight: bold;
    display: inline-block; margin: 0; padding: 0; text-indent: 0; vertical-align: top;
    word-break: break-all;
}
.official-link:hover { text-decoration: underline !important; }

.detail-back { text-align: center; margin-top: 80px; padding-top: 40px; border-top: 1px solid #eee; }
.detail-back .more-btn {
    display: inline-block; padding: 15px 100px; border: 1px solid #e0e0e0;
    background: #fff; color: #000; font-weight: bold; text-decoration: none; transition: all 0.3s;
}
.detail-back .more-btn:hover { background: #ff7800; color: #fff; border-color: #ff7800; transform: translateY(-3px); }


/* ==========================================================================
   11. プライバシーポリシー（privacy.php）
   ========================================================================== */

.company-content { max-width: 900px; margin: 0 auto 100px; }
.policy-list      { margin-bottom: 1.5em; padding-left: 0; list-style: none; }
.policy-list li   { margin-bottom: 0.5em; }
.policy-list-sub  { padding-left: 1.5em; margin-bottom: 1em; }
.policy-date      { text-align: right; margin-top: 40px; font-weight: bold; }


/* ==========================================================================
   12. 固定ページ（COMPANY / RECRUIT）
   ========================================================================== */

/* RECRUIT：採用停止メッセージ */
.recruit-notice         { margin-bottom: 60px; }
.recruit-notice-heading { font-size: 20px; font-weight: bold; margin-bottom: 20px; }
.recruit-notice-body    { font-size: 16px; line-height: 2; color: #666; }


.company-table { width: 100%; border-collapse: collapse; margin-bottom: 80px; margin-top: 20px; }
.company-table th, .company-table td {
    border-bottom: 1px solid #e8e8e8; padding: 25px 0;
    text-align: left; vertical-align: top; line-height: 1.8;
}
.company-table th { width: 250px; font-weight: bold; }
.company-table tr:hover th,
.company-table tr:hover td { border-bottom-color: #ff7800; }
.sub-section-title { font-size: 20px; font-weight: bold; border-left: 5px solid #ff7800; padding-left: 15px; margin: 50px 0 25px; }


/* ==========================================================================
   13. ABOUTセクション（index.php）
   ========================================================================== */

.about-full-width {
    position: relative; left: 0; z-index: 10;
}
.about-text { font-size: 22px; line-height: 2.3; font-weight: bold; text-shadow: 0 2px 15px rgba(0,0,0,0.8); }


/* ==========================================================================
   14. バナー・MOREボタン
   ========================================================================== */

.more-button-container { text-align: center; margin-bottom: 120px; width: 100%; position: relative; z-index: 10; }
.more-btn {
    display: inline-block; padding: 18px 80px; border: 1px solid #000;
    font-weight: bold; background: #fff; transition: 0.4s;
}
.more-btn:hover { background: #ff7800 !important; color: #fff !important; transform: translateY(-3px); }

.banner-section { display: flex; gap: 20px; margin: 40px 0 80px; width: 100%; }
.banner-box {
    flex: 1; height: 200px; border: 1px solid #e0e0e0;
    display: flex; justify-content: center; align-items: center;
    background: #fff; transition: 0.4s;
}
.banner-box span { font-size: 36px; font-weight: 900; color: #000 !important; }
.banner-box:hover { border-color: #ff7800 !important; background: #fffcf9; }


/* ==========================================================================
   15. フッター
   ========================================================================== */

.site-footer {
    background: #000; color: #fff; padding: 30px 40px;
    margin-top: 0; width: 100%; position: relative; z-index: 20;
    border-top: 1px solid rgba(255,255,255,0.3);
}
.footer-inner {
    max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; gap: 0; flex-wrap: wrap;
}
.footer-logo-block { flex-shrink: 0; margin-right: 60px; }
.footer-logo-block img { height: 35px; display: block; }
.footer-address-block { flex-shrink: 0; margin-right: 60px; }
.footer-address-block address { font-style: normal; font-size: 13px; color: #fff; opacity: 0.7; line-height: 1.8; }
.footer-family-block { flex-shrink: 0; display: flex; align-items: center; gap: 12px; }
.footer-family-block .family-title { font-size: 15px; font-weight: bold; color: #fff; letter-spacing: 0.08em; }
.footer-family-block a { font-size: 13px; color: #fff !important; opacity: 0.7; }
.footer-family-block a:hover { opacity: 1; color: #ff7800 !important; }
.family-divider { color: rgba(255,255,255,0.3); font-size: 13px; }
.footer-x-block { margin-left: auto; }
.footer-x-mobile { display: none; }
.footer-x-link svg { fill: #fff; transition: fill 0.3s; }
.footer-zip { display: inline; }
.footer-addr { display: inline; }


/* フッターXリンク */
.footer-x { margin-bottom: 15px; }
.footer-x-link svg { fill: #fff; transition: fill 0.3s; }
.footer-x-link:hover svg { fill: #ff7800 !important; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: 30px; padding-bottom: 10px; font-size: 11px; opacity: 0.4; text-align: left; max-width: 1400px; margin-left: auto; margin-right: auto; }

/* フッター内のリンク色を統一 */
.site-footer, .site-footer * { color: #ffffff !important; opacity: 1 !important; text-decoration: none !important; }
.site-footer a:hover { color: #ff7800 !important; }
.site-footer 
/* フッターXリンク */
.footer-x { margin-bottom: 15px; }
.footer-x-link svg { fill: #fff; transition: fill 0.3s; }
.footer-x-link:hover svg { fill: #ff7800 !important; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.2) !important; }
.site-footer .family-link a { color: #ffffff !important; opacity: 1 !important; }


/* ==========================================================================
   16. レスポンシブ
   ========================================================================== */

@media (max-width: 1024px) {
    .grid-system  { grid-template-columns: repeat(2, 1fr); }
    .news-grid    { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-system  { grid-template-columns: 1fr; }
    .news-grid    { grid-template-columns: 1fr; }
    .card-item    { flex-direction: column; }
    .card-visual  { flex: 0 0 auto; height: 200px; }
    .banner-section { flex-direction: column; }
    .banner-box   { height: 80px; }
    .site-footer { padding: 24px 20px; }
    .footer-inner { flex-direction: column; gap: 16px; }
    .footer-logo-block { margin-right: 0; display: flex; align-items: center; justify-content: space-between; width: 100%; }
    .footer-address-block { margin-right: 0; width: 100%; }
    .footer-family-block { flex-wrap: nowrap; width: 100%; align-items: center; }
    .footer-family-block .family-title { flex: 0 0 auto; }
    .footer-family-block a { flex: 1; text-align: center; }
    .footer-x-desktop { display: none; }
    .footer-x-mobile { display: block; margin-left: 0; }
    .company-table th, .company-table td { display: block; width: 100%; padding: 15px 0; border: none; }
    .company-table tr { border-bottom: 1px solid #eee; }
    .page-header-flex { flex-direction: column; align-items: flex-start; gap: 20px; }
    .filter-controls { width: 100%; justify-content: space-between; }
    .search-input { width: 120px; }
    .search-input:focus { width: 160px; }
    .detail-visual { height: auto !important; padding: 8px 0; }
}

/* ── TOPへ戻るボタン ── */
.back-to-top {
    position: fixed; bottom: 32px; right: 32px; z-index: 9000;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    opacity: 0; pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }
.back-to-top svg { width: 28px; height: 28px; stroke: #ff7800; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.2s; }

/* ── スマホ タッチ効果修正 ── */
.about-value-card.touch-active { border-color: rgba(255,120,0,0.4) !important; }
.works-card.touch-active .visual-stack { transform: translateY(-8px) !important; box-shadow: 8px 8px 0px #ff7800 !important; }
.card-item.touch-active .card-visual img { transform: scale(1.05) !important; }
.news-list-item.touch-active .news-list-img img { transform: scale(1.05) !important; }