/* ================================================================
   代表あいさつページ専用スタイル (greeting.css)
   読み込み条件: is_page('greeting') || is_page_template('page-greeting.php')
   クラスプレフィックス: gr-
   共通コンポーネント: pg-breadcrumb / pg-fv-badge / pg-fv-label / pg-fv-lead
                      pg-cta / pg-sp-bar
================================================================ */

/* グローバルSP固定バーを非表示 */
body.greeting-page #sp-bar {
    display: none;
}

/* SP固定バー スライドアニメーション */
body.greeting-page .pg-sp-bar {
    transition: transform 0.35s ease;
}

/* ================================================================
   外枠ラッパー
================================================================ */
.gr-wrap {
    overflow-x: hidden;
}

/* プレースホルダー共通スタイル */
.gr-placeholder-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.gr-placeholder-text {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

/* フェードイン（main.js の .visible クラスを使用） */
.gr-wrap .fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.gr-wrap .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================================
   1. メインビジュアル（2カラム：テキスト左・代表写真右）
================================================================ */
.gr-fv {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.gr-fv-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.gr-fv-bg--default {
    background: linear-gradient(135deg,
        var(--green-dark) 0%,
        var(--green) 55%,
        #4a8060 100%);
}

/* 左→右グラデーション：2カラムレイアウトで左テキスト側を暗くする */
.gr-fv-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
        rgba(0,0,0,0.62) 0%,
        rgba(0,0,0,0.25) 55%,
        rgba(0,0,0,0.08) 100%);
    z-index: 1;
}

/* コンテンツラッパー（container クラスと併用） */
.gr-fv-inner {
    position: relative;
    z-index: 2;
    padding-top: 120px;
    padding-bottom: 64px;
}

/* 2カラムグリッド：テキスト | 写真 */
.gr-fv-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 3rem;
    align-items: center;
    margin-top: 1.5rem;
}

.gr-fv-content {
    color: #fff;
}

/* FV メインタイトル（h1） */
.gr-fv-title {
    font-family: var(--font-serif);
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.5;
    letter-spacing: 0.02em;
    margin: 0.5rem 0 1.25rem;
    text-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* 代表写真 */
.gr-fv-photo-wrap {
    position: relative;
}

.gr-fv-photo {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top center;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: block;
}

.gr-fv-photo-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: rgba(255,255,255,0.08);
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
}

/* ================================================================
   2. ごあいさつ（写真左・文章右の2カラム）
================================================================ */
.gr-greet-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem 4rem;
    align-items: start;
}

.gr-greet-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top center;
    border-radius: 8px 8px 0 0;
    box-shadow: var(--shadow);
    display: block;
}

.gr-greet-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(160deg, #e8f0ea 0%, #c8daca 100%);
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

/* 名刺エリア（写真直下） */
.gr-greet-namecard {
    background: var(--green);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 0 0 8px 8px;
    text-align: center;
}

.gr-greet-company {
    font-size: 0.78rem;
    opacity: 0.8;
    margin: 0 0 0.2rem;
    letter-spacing: 0.05em;
}

.gr-greet-rep {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.04em;
}

.gr-greet-content .section-label {
    text-align: left;
}

.gr-greet-heading {
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 2vw, 1.6rem);
    font-weight: 700;
    color: var(--green-dark);
    line-height: 1.5;
    margin: 0.5rem 0 1.5rem;
}

.gr-greet-body p {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-mid);
    margin: 0 0 1em;
}

.gr-greet-body p:last-child {
    margin-bottom: 0;
}

/* ================================================================
   3. 庭づくりへの想い（ダーク背景＋ホワイトカード）
================================================================ */
.gr-thought {
    position: relative;
    padding: 88px 0;
    overflow: hidden;
}

.gr-thought-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.gr-thought-bg--default {
    background: linear-gradient(135deg,
        var(--green-dark) 0%,
        #2d5e34 45%,
        #3d7244 100%);
}

.gr-thought-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,26,12,0.68);
    z-index: 1;
}

.gr-thought-inner {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.gr-thought-card {
    max-width: 760px;
    width: 100%;
    background: rgba(255,252,245,0.96);
    border-radius: 12px;
    padding: 3rem 3.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

/* ラベル（英字 ＋ 水平ライン） */
.gr-thought-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--green);
    text-transform: uppercase;
    margin: 0 0 0.75rem;
}

.gr-thought-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--green);
    flex-shrink: 0;
}

.gr-thought-title {
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 2.2vw, 1.65rem);
    font-weight: 700;
    color: var(--green-dark);
    line-height: 1.5;
    margin: 0 0 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(45,106,53,0.15);
}

.gr-thought-body p {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-mid);
    margin: 0 0 1em;
}

.gr-thought-body p:last-child {
    margin-bottom: 0;
}

/* ================================================================
   4. 仕事で大切にしていること（3カード）
================================================================ */
.gr-value-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.gr-value-card {
    background: #fff;
    border: 1px solid rgba(45,106,53,0.12);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gr-value-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.gr-value-card-top {
    background: linear-gradient(135deg, #eaf2ea 0%, #d2e4d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    overflow: hidden;
}

.gr-value-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.gr-value-card-icon {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-mid);
    font-size: 1.75rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.gr-value-card-icon svg {
    width: 28px;
    height: 28px;
}

.gr-value-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--green-dark);
    margin: 0;
    padding: 1.25rem 1.5rem 0.75rem;
    line-height: 1.4;
}

.gr-value-card-text {
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--text-mid);
    margin: 0;
    padding: 0 1.5rem 1.5rem;
    flex: 1;
}

/* ================================================================
   5. お客様へのお約束
================================================================ */
.gr-promise-lead {
    max-width: 640px;
    margin: 0 auto 2rem;
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 1.75;
}

.gr-promise-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gr-promise-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
    border: 1px solid rgba(45,106,53,0.12);
    border-left: 4px solid var(--green);
    border-radius: 0 8px 8px 0;
    padding: 1.1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.gr-promise-check {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--green);
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
}

.gr-promise-text {
    font-size: 0.97rem;
    line-height: 1.6;
    color: var(--green-dark);
    font-weight: 500;
    padding-top: 2px;
}

/* ================================================================
   6. こんなご相談もお気軽に
================================================================ */
.gr-consult-lead {
    max-width: 640px;
    margin: 0 auto 2rem;
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 1.75;
}

.gr-consult-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.gr-consult-card {
    background: #fff;
    border: 1px solid rgba(45,106,53,0.1);
    border-radius: 10px;
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.gr-consult-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.gr-consult-icon {
    width: 48px;
    height: 48px;
    background: var(--green-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-mid);
    margin: 0 auto 0.75rem;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.gr-consult-icon svg {
    width: 24px;
    height: 24px;
}

.gr-consult-card:hover .gr-consult-icon {
    background: #d4e9cf;
}

.gr-consult-text {
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--text-mid);
    margin: 0;
    font-weight: 500;
}

.gr-consult-note {
    max-width: 680px;
    margin: 0 auto;
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text-mid);
}

/* ================================================================
   7. ギャラリー（4カラム）
================================================================ */
.gr-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.gr-gallery-item {
    margin: 0;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gr-gallery-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.45s ease;
}

.gr-gallery-item:hover .gr-gallery-img {
    transform: scale(1.04);
}

.gr-gallery-placeholder {
    aspect-ratio: 3/4;
    background: linear-gradient(160deg, #e8f2ea 0%, #c8dcca 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-light);
    gap: 0.5rem;
}

.gr-gallery-placeholder p {
    font-size: 0.72rem;
    line-height: 1.4;
    text-align: center;
    margin: 0;
}

.gr-gallery-caption {
    background: var(--green-dark);
    color: rgba(255,255,255,0.88);
    font-size: 0.78rem;
    line-height: 1.45;
    padding: 0.6rem 0.75rem;
    text-align: center;
    flex: 1;
}

/* ================================================================
   9. 関連ページ導線（カード型・説明文あり）
================================================================ */
.gr-nav {
    background: var(--green-pale);
}

.gr-nav-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gr-nav-card {
    display: block;
    background: #fff;
    border: 1px solid rgba(45,106,53,0.12);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gr-nav-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    text-decoration: none;
}

.gr-nav-card-icon {
    width: 56px;
    height: 56px;
    background: var(--green-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-mid);
    margin-bottom: 1rem;
    transition: background 0.3s ease;
}

.gr-nav-card-icon svg {
    width: 28px;
    height: 28px;
}

.gr-nav-card:hover .gr-nav-card-icon {
    background: #d4e9cf;
}

.gr-nav-card-title {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--green-dark);
    margin: 0 0 0.6rem;
}

.gr-nav-card-desc {
    font-size: 0.87rem;
    line-height: 1.65;
    color: var(--text-mid);
    margin: 0 0 1rem;
}

.gr-nav-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--green);
    color: #fff;
    border-radius: 50%;
    font-size: 0.88rem;
    transition: background 0.2s ease;
}

.gr-nav-card:hover .gr-nav-card-arrow {
    background: var(--green-dark);
}

/* ================================================================
   レスポンシブ：タブレット（960px 以下）
================================================================ */
@media (max-width: 960px) {
    .gr-fv {
        min-height: 480px;
    }

    .gr-fv-inner {
        padding-top: 110px;
        padding-bottom: 48px;
    }

    .gr-fv-grid {
        grid-template-columns: 1fr 260px;
        gap: 2rem;
    }

    .gr-greet-grid {
        grid-template-columns: 240px 1fr;
        gap: 2rem 2.5rem;
    }

    .gr-value-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .gr-consult-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .gr-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gr-thought-card {
        padding: 2.5rem;
    }
}

/* ================================================================
   レスポンシブ：スマートフォン（720px 以下）
================================================================ */
@media (max-width: 720px) {
    .gr-fv {
        min-height: auto;
    }

    .gr-fv-inner {
        padding-top: 88px;
        padding-bottom: 40px;
    }

    .gr-fv-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* SP：写真を先に表示 */
    .gr-fv-photo-wrap {
        order: -1;
    }

    .gr-fv-photo,
    .gr-fv-photo-placeholder {
        aspect-ratio: 4/3;
        max-height: 280px;
    }

    .gr-greet-grid {
        grid-template-columns: 1fr;
    }

    .gr-greet-img,
    .gr-greet-placeholder {
        aspect-ratio: 4/3;
        max-height: 300px;
    }

    .gr-thought {
        padding: 56px 0;
    }

    .gr-thought-card {
        padding: 2rem 1.5rem;
    }

    .gr-value-cards {
        grid-template-columns: 1fr;
    }

    .gr-promise-list {
        gap: 0.75rem;
    }

    .gr-consult-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .gr-consult-card {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-align: left;
        padding: 1rem;
    }

    .gr-consult-icon {
        margin: 0;
    }

    .gr-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .gr-nav-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ================================================================
   ユーティリティ
================================================================ */
.text-center { text-align: center !important; }
