@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700&display=swap');

/* General Styles */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    margin: 0;
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-weight: bold;
}

a {
    text-decoration: none;
    color: inherit;
}

section {
    padding: 60px 20px;
    text-align: center;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Hero Section */
.hero {
    background-image: url('hero-background-mobile.jpg'); /* スマホ用背景画像 */
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 20px;
    display: flex;
    justify-content: center; /* スマホでは.hero-contentブロックを中央揃え */
    align-items: center;
    min-height: 70vh; /* モバイルでの高さを調整 */
    overflow: hidden; /* アニメーションのため */
}

@media (min-width: 768px) {
    .hero {
        background-image: url('hero-background-desktop.jpg'); /* PC用背景画像 */
        justify-content: flex-start; /* PCでは左揃えに変更 */
    }
    .hero-content {
        text-align: left; /* テキストも左揃えに */
        margin-left: 8%; /* 左側に余白を追加 */
        max-width: 45%; /* 横幅が広がりすぎないように制限 */
        padding: 40px; /* デスクトップではpaddingをリセット */
    }
    .hero h1 {
        font-size: 2.7em !important; /* PC表示でh1のフォントサイズを90%に調整 */
    }
    .hero h1 br { /* PC表示でh1内のbrタグを非表示にする */
        display: none;
    }
    .reasons h2 br, .reason-item h3 br { /* PC表示でbrタグを非表示にする */
        display: none;
    }
    .designs h2 br { /* PC表示でbrタグを非表示にする */
        display: none;
    }
}

@media (min-width: 768px) {
    .panel-content h3 {
        font-size: 1.7em; /* 2em * 0.85 */
    }
}

.hero-content {
    background-color: transparent;
    padding: 40px 20px; /* モバイルで左右に余白を追加 */
    border-radius: 10px;
    text-align: left; /* モバイルでテキストを左揃えに */
    max-width: 90%; /* モバイルで横幅が広がりすぎないように制限 */
    box-sizing: border-box; /* paddingをwidthに含める */
}

.hero h1, .hero h2, .hero .authority, .hero .cta-button {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0; /* アニメーションの初期状態 */
    animation: fadeIn 0.8s ease-out forwards;
}

.hero h1 {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.0em; /* モバイルでのサイズをさらに調整 */
    font-weight: 400; /* フォントの太さを調整 */
    margin-bottom: 0.5em;
    animation-delay: 0.2s;
    overflow-wrap: break-word; /* 長い単語を強制的に改行 */
}

.hero h2 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.2em; /* モバイルでのサイズをさらに調整 */
    margin-bottom: 1.5em; /* 間隔を調整 */
    font-weight: normal;
    animation-delay: 0.5s;
    overflow-wrap: break-word; /* 長い単語を強制的に改行 */
}

.authority {
    margin-bottom: 2.5em; /* 間隔を調整 */
    animation-delay: 0.8s;
    /* color: #c5a05a; */ /* アイコンとテキストの色をブランドカラーにしていた部分を削除 */
}

.authority span {
    /* margin: 0 15px; */ /* グローバルなマージンを削除 */
}

@media (max-width: 767px) { /* モバイル専用のスタイル */
    .authority span {
        display: flex; /* Flexboxを使ってアイコンとテキストを揃える */
        align-items: center; /* 垂直方向中央揃え */
        margin: 0.5em 0; /* 上下に余白を追加 */
        /* text-align: left; */ /* flexboxを使うので不要 */
        font-size: 0.9em; /* モバイルでフォントサイズを調整 */
    }
    .cta-button {
        font-size: 0.9em; /* モバイルでフォントサイズをさらに小さく */
        padding: 10px 20px; /* モバイルでパディングをさらに小さく */
        white-space: nowrap; /* テキストを強制的に1行に */
    }
}

@media (min-width: 768px) {
    .authority span {
        font-size: 1.1em; /* PCでフォントサイズを調整 */
        margin-right: 15px; /* PCでアイコンとテキストの間に余白を追加 */
    }
}

.authority span svg {
    vertical-align: middle;
    margin-right: 8px;
    width: 20px;
    height: 20px;
    color: #c5a05a; /* SVGアイコンの色をブランドカラーに */
}

.authority svg path, .authority svg circle {
    /* fill: currentColor; */ /* SVGの塗りつぶし色を親要素のcolorに合わせる設定を削除 */
    /* stroke: currentColor; */ /* SVGの線の色を親要素のcolorに合わせる設定を削除 */
}

.cta-button {
    background-color: #c5a05a; /* ブランドカラーを想定 */
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
    display: inline-block; /* transformを有効にするため */
    animation-delay: 1.1s;
}

.cta-button:hover {
    background-color: #b38e4c;
    transform: scale(1.05); /* ホバー時に少し拡大 */
}

/* Reasons Section */
.reasons h2 {
    margin-bottom: 40px;
}

.reason-item h3 {
    text-align: center; /* h3を中央揃えに */
}

.reason-item h3 span {
    display: inline-block;
    text-align: left; /* span内のテキストを左揃えに */
    max-width: 100%; /* テキストがはみ出さないように */
}

.reason-item p {
    text-align: left; /* pは左揃えを維持 */
}

@media (max-width: 767px) {
    .reasons h2 {
        text-align: left; /* モバイルのh2を左揃えに */
    }
}

.reason-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.reason-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Designs Section */
.designs {
    background-color: #eeeeee;
}

.designs h2, .designs h3 {
    margin-bottom: 20px;
}

.designs h2 span, .designs h3 span {
    display: inline-block;
    text-align: left;
    max-width: 100%;
}

@media (max-width: 767px) {
    .designs h2 span {
        font-size: 0.9em; /* モバイルでh2のフォントサイズを調整 */
    }
    .designs h3 span {
        font-size: 0.8em; /* モバイルでh3のフォントサイズを調整 */
    }
    .panel-button {
        font-size: 0.8em; /* モバイルでフォントサイズを調整 */
        padding: 10px 20px; /* モバイルでパディングを調整 */
        white-space: nowrap;
    }

    .panel-content h3 {
        font-size: 2.4em; /* モバイルでのタイトルサイズを調整 */
    }
}

.design-panels {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.panel {
    width: 300px;
    min-height: 400px; /* heightをmin-heightに変更 */
    border-radius: 10px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* コンテンツを下に表示 */
    padding: 30px;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
}

.panel:hover {
    transform: scale(1.05);
}

.panel.alphabet { background-image: url('alphabet-bg.jpg'); }
.panel.kanji { background-image: url('kanji-bg.jpg'); }
.panel.hand-drawn { background-image: url('hand-drawn-bg.jpg'); }

.panel-content h3 {
    font-size: 2em;
    text-align: center; /* h3を中央揃えに */
    margin-bottom: 10px; /* キャプションとの距離を詰める */
}

.panel-content h3 span {
    display: inline-block;
    text-align: left; /* span内のテキストを左揃えに */
    max-width: 100%;
}

.panel-content p {
    text-align: left; /* pを左揃えに */
    margin-top: 0; /* h3との距離を詰める */
    margin-bottom: 20px; /* ボタンとの間に余白を追加 */
}

.panel-content p span {
    display: inline-block;
    text-align: left; /* span内のテキストを左揃えに */
    max-width: 100%;
    white-space: normal; /* テキストの折り返しを有効に */
}

.panel-button {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 14px 20px; /* ボタンのパディングを調整 */
    border-radius: 5px;
    font-size: 1em; /* ボタンのフォントサイズを調整 */
    font-weight: bold;
    transition: background-color 0.3s;
    display: inline-block; /* transformを有効にするため */
    animation-delay: 1.1s;
    white-space: nowrap; /* ボタン内のテキストを改行させない */
}

@media (min-width: 768px) {
    .panel-content h3 {
        font-size: 1.7em; /* 2em * 0.85 */
    }
}

/* Flow Section */
.flow-steps {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 40px auto 0;
}

.step {
    width: 22%;
    min-width: 250px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step h4, .step p {
    text-align: left;
}

.step-icon {
    width: 50px;
    height: 50px;
    background-color: #c5a05a;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    margin: 0 auto 15px;
}

/* Reviews Section */
.reviews {
    background-color: #eeeeee;
    position: relative; /* 矢印の絶対配置のため */
    padding-left: 20px;
    padding-right: 20px;
}

.reviews h2 {
    margin-bottom: 40px;
}

@media (max-width: 767px) {
    .reviews h2 {
        font-size: 120%; /* モバイルでフォントサイズを調整 */
    }
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 44px;
    height: 44px;
    display: flex; /* モバイルでも表示 */
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.carousel-nav.hidden {
    display: none !important;
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
}

.left-arrow {
    left: 10px;
}

.right-arrow {
    right: 10px;
}

@media (min-width: 768px) {
    .carousel-nav {
        display: flex; /* デスクトップで表示 */
    }
}

.review-carousel-container {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    gap: 20px;
    padding-bottom: 20px; /* 下部のパディングは残す */
    max-width: 1200px; /* カルーセル全体の最大幅 */
    margin: 0 auto; /* 中央揃え */
}

.review-carousel-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.review-card {
    flex-shrink: 0;
    width: calc(100% - 40px); /* モバイルで左右に20pxの余白 */
    scroll-snap-align: start;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center; /* 上下中央揃え */
}

@media (max-width: 767px) {
    .review-card {
        width: calc(100% - 80px); /* 白い背景部分を狭める */
        padding: 30px 30px; /* 内側のパディングを調整 */
    }
}

@media (min-width: 768px) {
    .review-card {
        width: calc(33.333% - 20px); /* デスクトップで3枚表示 (gap 20px考慮) */
    }
}

.review-text {
    text-align: left;
}

@media (max-width: 767px) {
    .review-text {
        max-width: 100%; /* テキストブロックの最大幅を制限 */
        margin: 0; /* 中央揃えを解除 */
    }
    .review-intro-line {
        font-size: 90%; /* モバイルでフォントサイズを調整 */
    }
}

.review-intro-line {
    display: block;
    text-align: center; /* 中央揃え */
    font-weight: bold; /* 太字 */
}

@media (max-width: 767px) {
    .review-intro-line {
        white-space: nowrap; /* モバイルでテキストを1行に */
        text-align: center; /* モバイルでも中央揃え */
        font-size: 90%; /* モバイルでフォントサイズを調整 */
    }
}

/* FAQ Section */
.faq-item {
    max-width: 800px;
    margin: 0 auto 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.faq-icon {
    display: none; /* デスクトップで非表示 */
}

@media (max-width: 767px) {
    .faq-question {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        padding: 10px 0;
        border-bottom: 1px solid #eee; /* Keep the border from faq-item */
    }

    .faq-question h4 {
        margin: 0; /* Remove default margin from h4 */
    }

    .faq-icon {
        display: block; /* モバイルで表示 */
        font-size: 1.5em;
        transition: transform 0.3s ease;
    }

    .faq-question.active .faq-icon {
        transform: rotate(45deg); /* Rotate to 'x' or '-' */
    }

    .faq-answer {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        padding: 0 10px; /* Adjust padding as needed */
    }

    .faq-answer.active {
        max-height: 500px; /* Adjust based on max expected content height */
        padding: 10px 10px; /* Add padding when active */
    }

    /* Remove default faq-item padding-bottom and border-bottom for mobile, as faq-question will handle it */
    .faq-item {
        padding-bottom: 0;
        border-bottom: none;
    }
}

/* Closing Section */
.closing {
    background-color: #333;
    color: white;
}

.closing h3 {
    margin-bottom: 60px;
}

@media (max-width: 767px) {
    .closing h3 {
        font-size: 100%; /* モバイルでフォントサイズを調整 */
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #222;
    color: #aaa;
}

.social-icons {
    margin-bottom: 15px;
}

.social-icons a {
    margin: 0 10px;
    display: inline-block;
    transition: transform 0.3s;
}

.social-icons a:hover {
    transform: scale(1.1);
}

.social-icons img {
    width: 30px;
    height: 30px;
    filter: invert(1); /* アイコンの色を反転させて白くする */
    transition: opacity 0.3s;
}

.social-icons a:hover img {
    opacity: 0.8; /* ホバー時に少し透明度を落とす */
}


@media (max-width: 767px) {
    footer {
        font-size: 80%; /* モバイルでフォントサイズを調整 */
    }
}
