@charset "utf-8";

/* ========================
   ヒーローセクション
======================== */
.hero {
    background-image: url(../images/img_mv-sp.jpg);
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero__container {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    padding: 0 var(--space-sm);
}

.hero__title {
    font-family: "Noto Serif JP", serif;
    font-size: var(--font-xl);
    font-weight: 700;
    text-align: left;
}

.hero__title-line {
    display: block;
    margin-bottom: 8px;
    padding: var(--space-sm);
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    width: fit-content;
}

/* タブレット: 768px〜1439px */
@media screen and (min-width: 768px) {
    .hero {
        background-image: url(../images/img_mv-pc.jpg);
        min-height: 40vh;
    }

    .hero .container {
        max-width: 1024px;
        padding: 0 40px;
    }

    .hero__title {
        font-size: var(--font-2xl);
    }

    .hero__title-line:nth-child(2) {
        display: inline-block;
        margin-right: 0;
        padding-right: 0;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .hero__title-line:nth-child(3) {
        display: inline-block;
        padding-left: 0;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }
}

/* PC: 1440px以上 */
@media screen and (min-width: 1440px) {
    .hero {
        height: 512px;
    }

    .hero .container {
        max-width: 1200px;
        padding: 0 60px;
    }
}

/* ========================
   レイアウト
======================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section .btn--outline {
    width: 275px;
    max-width: 100%;
    margin: calc(var(--space-xl) * 2) auto 0;
    justify-content: center;
    font-size: var(--font-lg);
}

.section .btn--outline::after {
    right: var(--space-lg);
}

.section.services {
    padding-top: calc(var(--space-xl) * 2);
}


/* PC: 1440px以上 */
@media screen and (min-width: 1440px) {
    .section .btn--outline::after {
        right: 20px;
    }
}

/* ========================
   セクションタイトル共通デザイン
======================== */
.section__title {
    font-size: var(--font-xl);
    font-weight: 700;
    text-align: center;
}

.section__subtitle {
    font-family: "ABeeZee", sans-serif;
    font-size: var(--font-xs);
    font-weight: 400;
    color: var(--text-light);
    text-align: center;
    /* margin-bottom: var(--space-md); */
    position: relative;
}

/* 緑色のアンダーライン */
.section__subtitle::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background-color: var(--primary-green);
    border-radius: 2px;
}

.section__content {
    padding: 0 var(--space-lg);
}

@media screen and (min-width: 1440px) {
    .section__content {
        padding-right: 0;
        padding-left: 0;
    }
}

/* ========================
   サービス
======================== */
.services__cards {
    display: grid;
    gap: calc(var(--space-xl) * 1.5);
    margin-top: 48px;
}

.services__item {
    display: block;
    text-decoration: none;
    color: inherit;
    background-color: #FFFBF6;
    border-radius: 8px;
    padding: var(--space-lg);
    box-shadow: 2px 4px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.services__item:hover {
    text-decoration: none;
}

/* アイコンをCSSで表示 */
.services__item::before {
    content: '';
    display: block;
    width: 80px;
    height: 45px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0 auto var(--space-lg);
}

/* 各サービスカードのアイコン */
.services__item--consultation::before {
    background-image: url(../images/icon_souzoku.png);
}

.services__item--planning::before {
    background-image: url(../images/icon_seizen-zooyo.png);
}

.services__item--tax-return::before {
    background-image: url(../images/icon_fudosan.png);
}

.services__content {
    text-align: center;
}

.services__title {
    font-size: var(--font-md);
    font-weight: 600;
    color: var(--text-color);
}

.services__description {
    position: relative;
    /* padding: var(--space-xs); */
    text-align: left;
    color: var(--text-light);
    font-size: var(--font-md);
    margin-top: var(--space-sm);
}

/* リンクテキスト */
.services__link-text {
    display: inline-block;
    color: var(--primary-green);
    font-size: var(--font-sm);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    padding-right: 20px;
    margin-top: var(--space-md);
}

/* リンクテキストの矢印 */
.services__link-text::after {
    content: '';
    width: 8px;
    height: 8px;
    border: 0;
    border-top: solid 2px var(--primary-green);
    border-right: solid 2px var(--primary-green);
    position: absolute;
    top: 50%;
    right: 0;
    transform: rotate(45deg) translateY(-50%);
}

/* タブレット: 768px〜1439px */
@media screen and (min-width: 768px) {
    .services__cards {
        display: flex;
        flex-direction: column;
    }

    .services__item {
        display: flex;
        align-items: center;
    }

    .services__item:hover {
        transform: translateY(-8px);
    }

    .services__item::before {
        width: 100px;
        height: 65px;
        flex-shrink: 0;
    }

    .services__content {
        display: flex;
        flex-direction: column;
        width: 95%;
        text-align: left;
    }

    .services__title {
        font-size: var(--font-lg);
    }

    .services__description {
        word-break: auto-phrase;
    }

    .services__link-text {
        text-align: right;
        margin-left: auto;
    }
}

/* PC: 1440px以上 */
@media screen and (min-width: 1440px) {
    .services__cards {
        margin-top: 64px;
    }
}

/* ========================
   特徴
======================== */
.features {
    background-image: url(../images/img_features-bk.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.features__list {
    display: flex;
    gap: 20px;
    margin-top: 48px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.features__card {
    background: #fff;
    border-radius: 8px;
    padding: calc(var(--space-xl) * 1.8) var(--space-xl) var(--space-xl);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    position: relative;
    /* バッジの位置調整のため */
    flex: 0 0 100%;
    scroll-snap-align: start;
    margin: 24px 0 1em;
    height: auto;
}

/* 数字バッジ（CSS三角形を使った吹き出し） */
.features__badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    color: #FFF;
    font-size: var(--font-lg);
    font-weight: bold;
    background-color: var(--primary-green);
    border-radius: 50%;
    box-sizing: border-box;
}

/* 吹き出しの尻尾（三角形） */
.features__badge::before {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    margin-left: -10px;
    border: 10px solid transparent;
    border-top: 10px solid var(--primary-green);
    z-index: 0;
}

.features__number {
    font-family: "Arial Black", "Helvetica Bold", sans-serif;
    font-size: var(--font-lg);
    font-weight: 900;
    color: #fff;
    transform: scale(1.2);
    line-height: 1;
    margin-top: -2px;
}

.features__title {
    font-size: var(--font-md);
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
}

.features__text {
    margin-top: var(--space-md);
    color: var(--text-light);
    font-size: var(--font-md);
    text-align: left;
}

.features__note {
    margin-top: var(--space-md);
    font-size: var(--font-sm);
    color: var(--text-light);
    text-align: center;
}

/* タブレット: 768px〜1439px */
@media screen and (min-width: 768px) {
    .features__list {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        gap: var(--space-xl);
        overflow-x: visible;
        scroll-snap-type: none;
        scroll-behavior: unset;
        justify-content: center;
        margin-top: 60px;
    }

    .features__card {
        width: calc((100% - var(--space-xl) * 2) / 3);
        /* 3列均等配置 */
        margin: 0;
        padding: calc(var(--space-xl) * 1.2) var(--space-md) var(--space-md);
        height: auto;
        flex-shrink: 0;
        flex: 0 1 auto;
    }

    .features__text {
        margin-top: var(--space-sm);
    }


    .features__note {
        display: none;
    }
}

/* PC: 1440px以上 */
@media screen and (min-width: 1440px) {
    .features__list {
        margin-top: 64px;
    }

    .features__card {
        padding: var(--space-xl) var(--space-md) var(--space-md);
    }
}

/* ========================
   お手続きの流れ
======================== */
.flow__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 200px));
    justify-content: center;
    /* grid-template-columns: repeat(2, 1fr); */
    gap: var(--space-md);
    margin-top: 48px;
}

.flow__item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 200 / 173;
    background-color: #FFFBF6;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.flow__step {
    font-size: var(--font-sm);
    font-weight: 700;
    color: var(--primary-green);
}

.flow__title {
    margin-top: var(--space-sm);
    font-size: var(--font-md);
}

/* タブレット: 768px〜1439px */
@media screen and (min-width: 768px) {
    .flow__list {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-xl);
        /* 点線の間隔を調整 */
        background-image: repeating-linear-gradient(90deg,
                var(--primary-green),
                var(--primary-green) 3px,
                transparent 3px,
                transparent 8px);
        background-position: center;
        background-repeat: repeat-x;
        background-size: 100% 2px;
    }
}

/* PC: 1440px以上 */
@media screen and (min-width: 1440px) {}

/* ========================
   お客様の声セクション
======================== */
.section.reviews {
    /* セクション全体の余白 */
    padding: var(--space-xl) 0;
}

.reviews__list {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin: 48px 0 0;
    padding: 0;
}

.reviews__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #FFFBF6;
    border-radius: 8px;
}

.reviews__quote {
    position: relative;
    padding: var(--space-lg) var(--space-lg) 0;
}

.reviews__text {
    font-size: var(--font-md);
    line-height: 1.8;
    color: var(--text-color);
}

/* 引用符の装飾 */
.reviews__quote::before {
    content: "“";
    position: absolute;
    top: -30px;
    left: 0;
    font-family: serif;
    font-size: clamp(4rem, 8vw, 6rem);
    color: var(--primary-green);
    opacity: 0.2;
    z-index: 0;
}

.reviews__meta {
    display: flex;
    padding: var(--space-md);
    font-size: var(--font-sm);
    color: var(--text-light);
}

.reviews__info {
    display: inline-block;
    margin-right: 8px;
}

/* PC（768px以上）でのスタイル */
@media screen and (min-width: 768px) {
    .reviews__list {
        flex-direction: row;
        justify-content: space-between;
        gap: 40px;
        align-items: stretch;
        margin-top: 60px;
    }

    .reviews__item {
        width: 48%;
        align-items: flex-start;
        text-align: left;
        display: flex;
        flex-direction: column;
        /* height: 100%; を削除 */
    }

    .reviews__quote {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .reviews__text {
        flex: 1;
    }

    .reviews__meta {
        margin-top: auto;
    }

    /* PCでの引用符の位置調整 */
    .reviews__quote::before {
        top: -50px;
    }
}

/* ========================
   お知らせ（フロントページ）
======================== */
.news {
    background-color: #FFFBF6;
}

/* お知らせリスト（フロントページ用） */
.news-list--front {
    margin: 48px 0 var(--space-xl);
}

.news-item--front {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.news-item--front:hover {
    background-color: #f9f7f5;
}

.news-item__link--front {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: var(--space-md);
    text-decoration: none;
    color: inherit;
}

.news-item__content--front {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.news-item__date {
    font-size: var(--font-sm);
    color: var(--text-light);
    font-weight: 500;
    align-self: flex-start;
}

.news-item__title {
    margin: 0;
    font-size: var(--font-md);
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-dark);
    transition: color 0.2s ease;
}

.news-item--front:hover .news-item__title {
    color: var(--primary-green);
}

/* タブレット: 768px以上 */
@media (min-width: 768px) {
    .news-item__content--front {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .news-item__date {
        flex-shrink: 0;
        min-width: 80px;
    }

    .news-item__title {
        flex: 1;
    }
}

/* PC: 1440px以上 */
@media (min-width: 1440px) {
    .news-item__date {
        min-width: 100px;
    }

    .news-item__content--front {
        gap: var(--space-lg);
    }
}

/* ========================
   コラム（フロントページ）
======================== */
.columns {
    background-color: #fff;
}

.column-cards--front {
    display: grid;
    gap: var(--space-lg);
    margin: 48px 0 var(--space-xl);
}

.column-card--front {
    background: #fff;
    border-radius: 8px;
    padding: var(--space-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e5e5e5;
}

.column-card--front:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.column-card__link--front {
    display: block;
    color: inherit;
    text-decoration: none;
}

.column-card__content--front {
    width: 100%;
}

.column-card__title--front {
    font-size: var(--font-lg);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 var(--space-md) 0;
    color: var(--text-dark);
}

.column-card__excerpt--front {
    font-size: var(--font-md);
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.column-card__meta--front {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.column-card__date--front {
    font-size: var(--font-sm);
    color: var(--text-light);
    font-weight: 500;
}

.column-card__category--front {
    display: inline-block;
    padding: 4px 8px;
    font-size: var(--font-xs);
    font-weight: 500;
    color: #fff;
    border-radius: 3px;
    white-space: nowrap;
}

.column-card__category--souzoku {
    background-color: #3B82F6;
}

.column-card__category--zoyo {
    background-color: #F59E0B;
}

.column-card__category--fudosan {
    background-color: #EF4444;
}

/* タブレット: 768px以上 */
@media (min-width: 768px) {
    .column-cards--front {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xl);
        align-items: stretch;
    }

    .column-card__content--front {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .column-card__excerpt--front {
        flex: 1;
        margin-bottom: var(--space-lg);
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 3;
        /* 3行で統一 */
        min-height: 4.5em;
        /* 3行分の最小高さ確保 */
        line-height: 1.5;
        /* line-clampと連動 */
    }

    .column-card__meta--front {
        margin-top: auto;
    }
}

/* PC: 1440px以上 */
@media (min-width: 1440px) {
    .column-cards--front {
        grid-template-columns: repeat(3, 1fr);
    }

    .column-card__title--front {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 1;
        /* 1行に制限 */
        line-height: 1.4;
        min-height: 1.4em;
        /* 1行分の高さ確保 */
    }
}

/* ========================
   共通ボタンスタイル
======================== */
.section__button {
    display: flex;
    justify-content: center;
    margin-top: var(--space-xl);
}

/* ========================
   記事なし表示の共通スタイル
======================== */
.news-list--front .no-posts,
.column-cards--front .no-posts {
    margin: var(--space-xl) 0;
    text-align: center;
    font-size: var(--font-md);
    color: var(--text-light);

    /* 親要素のgridレイアウトを無効化 */
    grid-column: 1 / -1;
    display: block;
}

/* タブレット・PC での grid レイアウト無効化 */
@media (min-width: 768px) {

    .news-list--front .no-posts,
    .column-cards--front .no-posts {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1440px) {

    .news-list--front .no-posts,
    .column-cards--front .no-posts {
        grid-column: 1 / -1;
    }
}