:root {
    --primary-color: #FF9F1C;
    /* 温かみのあるオレンジ */
    --primary-dark: #E68A00;
    --accent-brown: #5D4037;
    /* 自然なブラウン */
    --accent-green: #4CAF50;
    /* 自然なグリーン */
    --bg-color: #FFF8E1;
    /* 薄いクリーム色 */
    --card-bg: #FFFFFF;
    --text-color: #333333;
    --text-light: #666666;
    --font-main: 'Noto Sans JP', sans-serif;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 500;
    /* 全体的に視認性を高めるため少し太めに設定 */
}

/* 共通コンテナ */
.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ヘッダー */
.site-header {
    position: relative;
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    margin-bottom: 2rem;
    overflow: hidden;
    /* スライドのはみ出しを制御 */
    min-height: 300px;
    /* スライドショーが表示されるための最小高さ */
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    /* フェード時間 */
}

.slide.active {
    opacity: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    /* スライドより前面に表示 */
}

.site-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.site-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* セクション共通 */
section {
    margin-bottom: 3rem;
    text-align: center;
}

section h2 {
    color: var(--accent-brown);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    display: block;
    width: 50%;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* 挨拶エリア */
.intro-section p {
    max-width: 600px;
    margin: 0 auto;
}

/* カード一覧（グリッド） */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

/* カードデザイン */
.review-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed #ccc;
}

.satisfaction {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.review-body {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.user-impression {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.user-opinion {
    font-size: 0.9rem;
    color: var(--text-light);
    background-color: #f9f9f9;
    padding: 0.8rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-green);
}

/* フッター */
.site-footer {
    background-color: var(--accent-brown);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    margin-bottom: 1.5rem;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ローディングとエラー */
.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.error-message {
    color: #d32f2f;
    font-weight: bold;
}

/* ▼ スマホ用改行の初期設定（PCでは隠す） */
.sp-br {
    display: none;
}

/* 件数表示 */
.review-count {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

/* ▼ 絞り込み・並び替えコントロール（PC向け） */
.controls-wrapper {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-controls,
.sort-controls {
    display: flex;
    align-items: center;
    max-width: 100%;
}

.filter-controls label,
.sort-controls label {
    font-weight: bold;
    color: var(--text-light);
    white-space: nowrap;
    /* ラベルを折り返さない */
}

.filter-controls select,
.sort-controls select {
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: inherit;
    max-width: 250px;
    /* 長すぎるプログラム名を制限してはみ出し防止 */
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* スマホ向け調整 */
@media (max-width: 600px) {
    .site-title {
        font-size: 1.8rem;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
        /* スマホでは1カラム */
    }

    .container {
        width: 95%;
    }

    /* ご挨拶セクションの段落内の改行をスマホでは無効にする */
    .intro-section p br {
        display: none;
    }

    /* 改行を無くした分、文字が詰まって見えないように行間を少し広げる */
    .intro-section p {
        line-height: 1.8;
    }

    /* カッコ部分をスマホの時だけ改行して、少しデザインを整える */
    .skill-desc {
        display: block;
        /* padding-left: 1em;   */
        /* text-indent: 0;      */
        font-size: 0.9em;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }

    /* ▼ スマホの時だけ改行を表示する */
    .sp-br {
        display: block;
    }

    /* ▼ スマホの時はセレクトボックスを縦並びにして、画面幅にピタッと収める */
    .controls-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }

    .filter-controls,
    .sort-controls {
        justify-content: space-between;
        /* ラベルを左、セレクトを右に配置 */
        width: 100%;
        /* 画面幅をはみ出さない */
    }

    .filter-controls select,
    .sort-controls select {
        max-width: 65%;
        /* ラベルの幅を避けて伸縮させる */
        flex-grow: 1;
        margin-left: 0.5rem;
    }
}