/* =================================================== */
/* top_dsq.css - トップページ専用CSS (最終調整版) */
/* =================================================== */

/* 0. 基本設定 & カラースキーム（top-pageスコープ内に定義） */
body.top-page {
    /* CSS変数（カスタムプロパティ）をtop-pageスコープ内に定義 */
    --color-primary-top: #00A86B;      /* エメラルドグリーン */
    --color-accent-top: #59E89D;       /* ブライトライムグリーン */
    --color-dark-top: #2C3E50;         /* 濃いネイビー/チャコール (引き締め色) */
    --color-light-top: #FFFFFF;        /* クリーンな白 */
    --color-text-inv-top: #FFFFFF;     /* 反転テキスト色 */
    --spacing-unit-top: 1.5rem;
    --font-heading-top: 'Montserrat', sans-serif;
    
    line-height: 1.7;
    background-color: var(--color-light-top);
    overflow-x: hidden;
}

/* 汎用セクションタイトルをトップページスコープに限定 */
.top-page .top-section-title {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 0.5rem;
    font-family: var(--font-heading-top);
    color: var(--color-dark-top);
}

.top-page .top-section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.top-page .top-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 5px;
    background-color: var(--color-primary-top);
}

/* 汎用ボタンのトップページ上書き */
.top-page .btn.btn-contact, 
.top-page .btn.top-btn-cta { 
    background-color: var(--color-accent-top);
    color: var(--color-dark-top); 
    border: 2px solid var(--color-accent-top);
    text-transform: capitalize;
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 25px; 
    font-weight: 700;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 1rem;
}

.top-page .btn.btn-contact:hover, 
.top-page .btn.top-btn-cta:hover {
    background-color: #4ADF8A; 
    border-color: #4ADF8A;
    box-shadow: 0 4px 15px rgba(89, 232, 157, 0.4); 
}

/* 画面再上位のロゴサイズ調整（画像とテキストの両方を調整） */
.top-page .logo {
    display: flex;
    align-items: center;
}

.top-page .logo .header-logo-image {
    /* デスクトップサイズ */
    height: 4.8rem; 
    width: auto;
    margin-right: 0.5rem;
}

.top-page .logo .company-name {
    /* デスクトップサイズ */
    font-size: 2.4rem; 
    font-weight: 700;
    color: var(--color-dark-top); 
    white-space: nowrap; 
}


/* ============================= */
/* 3. ヒーローセクション の調整 */
/* ============================= */
.top-page .top-section-hero {
    min-height: 50vh; 
    background: var(--color-dark-top);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 50px;
    overflow: hidden;
    color: var(--color-text-inv-top);
}

.top-page .top-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('abstract_tech_bg.jpg');  
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    filter: brightness(0.7) contrast(1.1);
    z-index: 1;
}

.top-page .top-hero-content {
    position: relative;
    z-index: 2;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.top-page .top-hero-catchphrase {
    font-size: 3rem; 
    font-weight: 900;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.03em;
    text-transform: none;
    line-height: 1.4; 
    margin-bottom: 1rem;
    font-family: var(--font-heading-top);  
}

/* 「未来を創る。」の行 */
.top-page .top-hero-catchphrase .top-text-line-1 {
    color: var(--color-accent-top);
    text-shadow: 0 0 15px var(--color-accent-top);
    display: block; 
    width: fit-content; 
    margin: 0 auto; 
}

/* 「お客様のビジネスを加速させる。」の行 (★white-space: nowrap; を削除) */
.top-page .top-hero-catchphrase .top-text-line-2 {
    color: var(--color-accent-top);
    text-shadow: 0 0 15px var(--color-accent-top);
    display: inline-block;
    /* white-space: nowrap; を削除しました。これで自動改行します。 */
}

.top-page .top-hero-catchphrase .top-text-line-2 strong {
    color: var(--color-text-inv-top);
    text-shadow: none;
}

.top-page .top-hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: #DDD;
}


/* ============================= */
/* 4. ビジョン/理念セクション (中央寄せ) */
/* ============================= */
.top-page .top-section-philosophy {
    padding: 6rem 0;
    text-align: center; 
}

.top-page .top-philosophy-grid {
    display: flex;
    justify-content: center; 
}

.top-page .top-philosophy-single-column {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.top-page .top-philosophy-text {
    flex: none;
    width: 100%;
}

.top-page .top-vision-headline {
    font-size: 2.0rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--color-dark-top);
    padding-left: 0;
    line-height: 1.4;
    text-align: center; 
    font-family: var(--font-heading-top);
}

.top-page .top-core-message {
    font-size: 1.5rem; 
    max-width: 800px;
    margin: 0 auto 2.5rem; 
}

.top-page .top-link-more {
    font-size: 1.5rem; 
    font-weight: 800;
    color: var(--color-primary-top);
}


/* ============================= */
/* 5. ニュースセクション (中央寄せ) */
/* ============================= */
.top-page .top-section-news {
    padding: 6rem 0;
    background-color: #F8F8F8; 
    text-align: center; 
}

.top-page .top-news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 1000px; 
    margin: 0 auto; 
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    justify-content: center;
}

.top-page .top-news-item {
    display: block;
    padding: 1.5rem;
    border: 1px solid #DDD; 
    border-radius: 8px;
    transition: transform 0.3s, border-color 0.3s;
    background-color: #FBFBFB; 
    text-align: left; 
}

.top-page .top-news-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary-top);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

.top-page .top-news-info {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.top-page .top-news-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 1.5rem;
    min-width: 60px;
    text-align: center;
}

.top-page .top-tag-important {
    background-color: var(--color-accent-top);
    color: var(--color-dark-top);
}

.top-page .top-tag-update {
    background-color: var(--color-primary-top);
    color: var(--color-text-inv-top);
}

.top-page .top-news-date {
    font-size: 0.9rem;
    color: #888;
}

.top-page .top-news-item a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-dark-top);
    display: block;
    line-height: 1.5;
}

.top-page .top-news-item a:hover {
    color: var(--color-primary-top);
}


/* ============================= */
/* 6. サービスセクション (中央寄せ) */
/* ============================= */
.top-page .top-section-services {
    padding: 6rem 0;
    text-align: center; 
}

.top-page .top-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto; 
    justify-content: center;
}

.top-page .top-service-card {
    text-align: center; 
    border: 1px solid #EEE;
    border-left: 5px solid var(--color-primary-top); 
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    padding: 2.5rem 2rem;
    border-radius: 4px;
}

.top-page .top-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-left: 5px solid var(--color-accent-top);
}

.top-page .top-service-icon {
    margin: 0 auto 1rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.8rem;
    color: var(--color-primary-top);
    background-color: rgba(89, 232, 157, 0.15);
}

.top-page .top-service-title {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font-heading-top);
}

.top-page .top-link-detail {
    font-weight: 700;
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--color-primary-top);
}


/* ============================= */
/* 7. CTAセクション の調整 */
/* ============================= */
.top-page .top-section-cta {
    background-color: var(--color-primary-top);
    color: var(--color-text-inv-top);
    padding: 4.5rem 0; 
}

.top-page .top-cta-title {
    font-weight: 900;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading-top);
}

.top-page .top-cta-subtitle {
    margin-bottom: 1.5rem; 
    font-weight: 300;
    color: #E0FFE0; 
}

.top-page .top-cta-title-large {
    font-size: clamp(2rem, 3.5vw, 3rem); 
}

.top-page .top-cta-subtitle-large {
    font-size: clamp(1.1rem, 1.8vw, 1.5rem); 
}

.top-page .top-cta-title-large .top-cta-strong {
    font-weight: 900;
    color: var(--color-text-inv-top);
}

.top-page .top-cta-button-container {
    padding-top: 1rem; 
}


/* ============================= */
/* 8. フッター (レイアウト調整) */
/* ============================= */
.top-page .footer {
    background-color: var(--color-dark-top);
    color: var(--color-text-inv-top);
    padding: 3rem 0 1rem;
}

.top-page .footer-grid {
    grid-template-columns: 1.5fr 2fr; 
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

/* 1. 左側 (DSQ情報) の調整: 左寄せを維持 */
.top-page .footer-info {
    text-align: left;
}

.top-page .footer-logo {
    font-family: var(--font-heading-top);
    /* フッターロゴのサイズ調整 */
    font-size: 2.2rem; 
    font-weight: 700;
    color: var(--color-accent-top);
    margin-bottom: 1rem;
}

.top-page .footer-info p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #AAAAAA;
}

/* 右側コンテナの調整: 2つのリストを左右に広げて配置 */
.top-page .nav-footer-links {
    display: flex;
    justify-content: space-between; 
    gap: 1.5rem;
}

/* 2. 会社概要以下 (ナビ) の調整: 少し左に配置 (左寄せ) */
.top-page .footer-nav-list {
    width: auto; 
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left; /* 左寄せ */
}

/* リンクはブロック要素として扱い、縦に並べる */
.top-page .footer-nav-list .footer-link {
    display: block; 
    margin: 0; 
}

/* 3. 個人情報保護方針以下 (法務リンク) の調整: 左寄せを維持 */
.top-page .footer-legal-list {
    width: auto;
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left; /* 左寄せ */
}

.top-page .footer-nav-list li {
    margin-bottom: 0.5rem;
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-page .footer-legal-list li {
    margin-bottom: 0.5rem;
    white-space: normal; 
    text-overflow: clip; 
}

.top-page .legal-separator {
    color: #AAAAAA;
    margin: 0 0.4rem;
    font-weight: 300;
}

.top-page .footer-link {
    color: #AAAAAA;
    font-weight: 300;
}

.top-page .footer-link:hover {
    color: var(--color-accent-top);
}

.top-page .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
}

.top-page .footer-bottom p {
    font-size: 0.8rem;
    color: #888888;
}


/* ============================= */
/* 9. モバイル対応 (画面の向き制御を導入) */
/* ============================= */

/* 1024px以下 */
@media (max-width: 1024px) {
    .top-page .top-hero-catchphrase {
        font-size: 2.5rem;
    }
    
    .top-page .top-section-hero {
        min-height: 60vh; 
    }
}

/* ==================================================== */
/* 768px以下（タブレット・スマホ共通の基本調整） */
/* ==================================================== */
@media (max-width: 768px) {
    /* ロゴサイズ調整 */
    .top-page .logo .header-logo-image {
        height: 2.0rem; 
        margin-right: 0.3rem;
    }

    .top-page .logo .company-name {
        font-size: 1.5rem; 
    }
    
    /* セクションタイトル調整 (★修正済み) */
    .top-page .top-section-title {
        font-size: 2.0rem; /* 2.4remから縮小 */
        margin-bottom: 2rem;
    }

    /* ビジョン見出し調整 (★修正済み) */
    .top-page .top-vision-headline {
        font-size: 1.5rem; /* 1.7remから縮小 */
    }
    
    .top-page .top-core-message {
        font-size: 1.3rem; 
        margin-bottom: 1.5rem;
    }
    
    /* ヒーローキャッチフレーズの全体的な調整 */
    .top-page .top-hero-catchphrase {
        font-size: 2rem; 
    }
    .top-page .top-hero-catchphrase .top-text-line-1 {
        font-size: 2.4rem; 
    }
    .top-page .top-hero-catchphrase .top-text-line-2 {
        font-size: 1.8rem; 
    }
    
    /* フッターレイアウト調整（既存のコード） */
    .top-page .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .top-page .footer-info {
        text-align: center; 
    }
    .top-page .nav-footer-links {
        justify-content: space-around;
        padding-top: 1.5rem;
        flex-direction: column;
        align-items: center;
    }
    .top-page .footer-nav-list, .top-page .footer-legal-list {
        text-align: center; 
        width: 100%; 
        flex: none; 
    }
}

/* ==================================================== */
/* 768px以下 & 横向き (Landscape) の調整 - ゆとりを持たせる */
/* ==================================================== */
@media (max-width: 768px) and (orientation: landscape) {
    /* 横向きは幅が広いので、縦向きより文字を少し大きくするが、元の設定より控えめに */
    .top-page .top-hero-catchphrase {
        font-size: 1.8rem; 
        line-height: 1.3;
    }
    
    .top-page .top-hero-catchphrase .top-text-line-1 {
        font-size: 2.2rem; 
    }
    
    .top-page .top-hero-catchphrase .top-text-line-2 {
        font-size: 1.6rem; 
    }
}

/* ==================================================== */
/* 576px以下 & 縦向き (Portrait) の調整 - 最も狭い画面に対応 (★最終修正) */
/* ==================================================== */
@media (max-width: 576px) and (orientation: portrait) {
    .top-page .top-section-hero {
        min-height: 50vh; 
    }

    /* 「未来を創る。」のはみ出し対策（white-space:nowrapを削除したため、サイズは前回調整のものを維持） */
    .top-page .top-hero-catchphrase {
        font-size: 1.2rem; 
        line-height: 1.5;
    }
    
    .top-page .top-hero-catchphrase .top-text-line-1 {
        font-size: 1.3rem; 
    }
    
    .top-page .top-hero-catchphrase .top-text-line-2 {
        font-size: 1.1rem; 
    }
    
    /* 他のセクションの文字サイズは現状維持 */
    .top-page .top-section-title {
        font-size: 2.0rem; 
    }

    .top-page .top-vision-headline {
        font-size: 1.5rem; 
    }
    
    .top-page .top-core-message {
        font-size: 1.2rem; 
    }
    
    /* ★サービスタイトルを縮小して枠内収める (新規追加) */
    .top-page .top-service-card .top-service-title {
        font-size: **1.2rem**; /* 1.4remから縮小 */
        line-height: 1.3;
    }

    .top-page .top-cta-title-large {
        font-size: 1.6rem;
    }

    .top-page .top-cta-subtitle-large {
        font-size: 0.9rem;
    }
}
