/* ==========================================================================
   1. 全般・リセットスタイル
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

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

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: #2E274F; /* サイト全体のベース背景色 */
    color: #ffffff;
    line-height: 1.8;
    letter-spacing: 0.05em;
}

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

/* ==========================================================================
   2. 共通ヘッダー (site-header)
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: rgba(46, 39, 79, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-inline-logo {
    height: 1.2em;
    width: auto;
}

/* ナビゲーション */
.header-nav {
    display: flex;
    align-items: center;
}

.header-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    position: relative;
    padding: 8px 0;
    font-weight: normal;
    transition: color 0.3s ease;
}

.header-nav a:hover,
.header-nav a.active {
    color: #ffffff;
}

/* アクティブ時の下線 */
.header-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
}

/* ==========================================================================
   3. 下層ページ用メイン領域共通
   ========================================================================== */
.company-page-main {
    padding-top: 80px;
    background-color: #2E274F;
    min-height: calc(100vh - 80px - 140px); /* フッター高さを考慮して底上げ */
}

/* ==========================================================================
   4. 共通コンテナ・セクション見出し
   ========================================================================== */
.about-container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    margin-bottom: 60px;
    text-align: left;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #ffffff;
}

.section-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.2em;
    margin-top: 15px;
}

/* ==========================================================================
   5. TOPページ：ヒーローエリア
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 120px 10% 80px 10%;
    background-color: #2E274F;
}

.hero-content {
    width: 100%;
    max-width: 1200px;
}

.hero-flex-container {
    display: flex;
    align-items: center;
    gap: 35px;
    margin-bottom: 35px;
    width: 100%;
}

.inline-logo {
    height: 130px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-copy {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    color: #ffffff;
    white-space: nowrap;
}

.sub-copy {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.15em;
    margin: 0;
}

.lead-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.9;
    max-width: 750px;
}

/* ==========================================================================
   6. TOPページ：コンセプトセクション
   ========================================================================== */
.concept-section {
    padding: 100px 20px;
    text-align: center;
    background-color: #ffffff;
}

.concept-container {
    max-width: 800px;
    margin: 0 auto;
}

.concept-title {
    font-size: 2rem;
    color: #2E274F;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 40px;
    display: inline-block;
    position: relative;
}

.concept-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #2E274F;
}

.concept-text {
    color: #444444;
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 0;
}

/* ==========================================================================
   7. 【修復】TOPページ：What's New セクション
   ========================================================================== */
.news-section {
    padding: 100px 20px;
    background-color: #2E274F;
}

.news-container {
    max-width: 1000px;
    margin: 0 auto;
}

.news-list {
    list-style: none;
    margin-top: 40px;
    padding: 0;
}

.news-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    display: flex;
    align-items: baseline;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    width: 150px;
    flex-shrink: 0;
}

.news-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   8. TOPページ：プロダクトセクション (カード一覧)
   ========================================================================== */
.products-section {
    padding: 100px 20px;
    background-color: #2E274F;
}

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

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* 【重要】aタグとしてのプロダクトカードの正しいスタイリング */
a.product-card,
.product-card {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 40px 30px 60px 30px; /* 下部に「詳細はこちら」を収めるための余白 */
    text-decoration: none;
    color: #ffffff;
    
    /* 【最重要】これが外れると文字が上に飛び出します。位置の基準点をカード自身に固定 */
    position: relative; 
    
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* マウスホバー時のエフェクト */
a.product-card:hover,
.product-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-icon {
    color: #ffffff;
    margin-bottom: 25px;
    opacity: 0.9;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

.card-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 0;
}

/* 【重要】カードの左下にピタッと配置するリンクの設定 */
.more-link {
    position: absolute;
    bottom: 30px;
    left: 30px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

a.product-card:hover .more-link,
.product-card:hover .more-link {
    color: #ffffff;
    transform: translateX(4px); /* ホバー時に矢印が少し右に動く演出 */
}

/* ==========================================================================
   9. 会社概要セクション・ページ (ABOUT)
   ========================================================================== */
.about-section {
    padding: 100px 20px;
    background-color: #2E274F;
}

.company-profile-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed;
}

.company-profile-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.company-profile-table th {
    width: 25%;
    text-align: left;
    padding: 25px 10px 25px 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    vertical-align: top;
    letter-spacing: 0.1em;
}

.company-profile-table td {
    width: 75%;
    text-align: left;
    padding: 25px 0 25px 10px;
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.8);
    vertical-align: top;
    word-break: break-all;
}

/* ==========================================================================
   10. 【修復】共通フッター (site-footer)
   ========================================================================== */
.site-footer {
    background-color: #2E274F;
    padding: 50px 20px 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo .logo-main {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
}

/* 【重要】フッターナビを確実に綺麗な横並びにする設定 */
.footer-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.footer-nav a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #ffffff;
}

.copyright {
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 20px;
}

/* 会社概要ページ（単体）用のシンプルなコピーライト用 */
.footer-copy {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}

/* ==========================================================================
   11. スマートフォン・タブレット用レイアウト調整 (横幅768px以下)
   ========================================================================== */
@media (max-width: 768px) {
    body, html {
        overflow-x: hidden;
        width: 100%;
    }

    /* --- ヘッダー領域の完全スリム化 --- */
    .site-header {
        height: 60px; /* ヘッダー自体の高さを低くしてスタイリッシュに */
    }
    
    .company-page-main {
        padding-top: 70px; /* ヘッダーが低くなった分、下層の余白も調整 */
    }

    /* 【重要】大きすぎたスマホの社名ロゴをスマートに縮小 */
    .header-logo {
        font-size: 0.55rem; /* 1.2remから大幅に縮小して文字の衝突を回避 */
        gap: 5px;
    }

    .header-inline-logo {
        height: 1.1rem; /* ロゴマークのアイコンも合わせて小ぶりに */
    }

    /* 右側のナビメニューの文字サイズもさらにコンパクトに */
    .header-nav a {
        margin-left: 10px;
        margin-right: 0;
        font-size: 0.75rem; /* 1段小さくして綺麗に1行に収めます */
        padding: 4px 0;
    }

    /* --- ヒーローエリア（ファーストビュー） --- */
    .hero-section {
        padding: 80px 6% 40px 6%;
    }

    .hero-flex-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .inline-logo {
        height: 60px; /* メインのロゴ画像も少し控えめに */
    }

    .main-copy {
        font-size: 1.5rem; /* キャッチコピーを2.2rem ➔ 1.5remへスッキリ縮小 */
        white-space: normal;
        line-height: 1.4;
    }

    .sub-copy {
        font-size: 0.85rem;
    }

    .lead-text {
        font-size: 0.82rem; /* リード文をさらにミニマルな文字サイズに */
        line-height: 1.6;
    }

    /* --- 各セクションの余白・見出し --- */
    .about-section,
    .concept-section,
    .news-section,
    .products-section {
        padding: 40px 15px; /* 上下の余白を詰めてスクロール量を最適化 */
    }

    .section-title,
    .concept-title {
        font-size: 1.25rem; /* 各見出しをシャープに縮小 */
    }

    /* コンセプト */
    .concept-text {
        font-size: 0.82rem; /* 読みやすい極小サイズ */
        line-height: 1.6;
    }

    /* What's New */
    .news-item {
        flex-direction: column;
        gap: 2px;
        padding: 12px 0;
    }
    .news-date {
        width: 100%;
        font-size: 0.75rem;
    }
    .news-text {
        font-size: 0.82rem;
    }

    /* --- プロダクトカード --- */
    #products {
        /* スマホ用ヘッダー高さ(60px) ＋ 上部に持たせたいゆとり(30px) ＝ 90px 下げます */
        scroll-margin-top: 90px !important; 
    }

    /* 各セクション共通の上下余白（見出しの上のスペースを少しゆったりに調整） */
    .about-section,
    .concept-section,
    .news-section,
    .products-section {
        padding: 50px 15px 40px 15px; 
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    a.product-card,
    .product-card {
        padding: 25px 18px 50px 18px; /* カードの中も引き締まったサイズ感に */
    }

    .card-title {
        font-size: 1.05rem; /* カードタイトルを小ぶりに */
        margin-bottom: 8px;
    }

    .card-description {
        font-size: 0.82rem; /* 説明文を小さくして、はみ出しを完全防御 */
        line-height: 1.5;
    }

    .more-link {
        bottom: 18px;
        left: 18px;
        font-size: 0.75rem;
    }

    /* --- 会社概要テーブル --- */
    .company-profile-table,
    .company-profile-table tbody,
    .company-profile-table tr,
    .company-profile-table th,
    .company-profile-table td {
        display: block;
        width: 100%;
    }

    .company-profile-table tr {
        padding: 12px 0;
    }

    .company-profile-table th {
        padding: 0 0 4px 0;
        font-size: 0.78rem;
        color: rgba(255, 255, 255, 0.5);
    }

    .company-profile-table td {
        padding: 0;
        font-size: 0.85rem;
        line-height: 1.5;
        color: rgba(255, 255, 255, 0.9);
    }

    /* --- フッター --- */
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .footer-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-nav a {
        font-size: 0.78rem;
    }

    .footer-logo .logo-main {
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        color: #ffffff;
    }

}

