@charset "utf-8";

/*
 * 全体設定
 * フォント、基本カラー、リセットなど
 */

/* メインコンテンツエリア */
main {
    max-width: 1200px; /* 最大幅 */
    margin: 0 auto; /* 中央寄せ */
    padding: 0 20px; /* 左右の余白 */
}

/* キャンペーンセクション */
.campaign-section {
    padding-bottom: 60px; /* 下部の余白 */
    text-align: center;
}

.section-title {
    font-size: 2.8em;
    color: #73361a; /* ヘッダーより濃い青 */
    margin-bottom: 15px;
    font-weight: 700;
}

.section-description {
    font-size: 1.2em;
    color: #6c757d; /* やや薄いグレー */
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* キャンペーングリッド（タイル全体） */
.campaign-grid {
    display: grid;
    /* デスクトップでは3列表示 */
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; /* タイル間の余白 */
    margin-bottom: 50px;
    padding: 0; /* mainで左右のpaddingを取っているのでここは0 */
}

/* 各キャンペーンタイル */
.campaign-item {
    background-color: #ffffff;
    border-radius: 10px; /* 角を少し丸く */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08); /* 影を強調 */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left; /* タイル内のテキストは左寄せ */
}

.campaign-item:hover {
    transform: translateY(-8px); /* ホバーで少し浮き上がる */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* ホバーで影を強調 */
}

.campaign-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%; /* aタグで全体を覆う */
}

.campaign-item img {
    width: 100%;
    height: 220px; /* 画像の高さ固定 */
    object-fit: cover; /* 画像がはみ出さないように調整 */
    display: block;
}

.campaign-info {
    padding: 25px;
}

.campaign-info h2 {
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 12px;
    color: #73361a;
    line-height: 1.3;
}

.campaign-description {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 18px;
    height: 60px; /* 説明文の高さ固定（2〜3行程度） */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 表示する行数 */
    -webkit-box-orient: vertical;
}

/* キャンペーンステータスラベル */
.campaign-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px; /* 丸いバッジ型 */
    font-size: 0.8em;
    font-weight: bold;
    margin-right: 8px;
    margin-bottom: 10px;
    color: white;
    text-transform: uppercase; /* 大文字に */
}

.status-new {
    background-color: #28a745; /* 緑 */
}

.status-hot {
    background-color: #dc3545; /* 赤 */
}

.status-ending {
    background-color: #ffc107; /* 黄 */
    color: #333; /* 黄色背景なので文字は黒 */
}

/* 開催期間 */
.campaign-period {
    font-size: 0.85em;
    color: #777;
    display: block;
    margin-bottom: 20px;
}

/* 詳細ボタン */
.detail-button {
    display: block;
    width: 100%;
    padding: 14px 15px;
    background-color: #73361a;
    color: white;
    text-align: center;
    border: none;
    border-radius: 5px;
    font-size: 1.05em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 700;
}

.detail-button:hover {
    background-color: #380e00;
}

/* すべてのキャンペーンを見るリンク */
.all-campaigns-link {
    text-align: center;
    margin-top: 60px;
}

.button-primary {
    display: inline-block;
    padding: 18px 40px;
    background-color: #28a745; /* 強調したい緑 */
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.button-primary:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* フッター */
footer {
    text-align: center;
    padding: 35px 20px;
    margin-top: 60px;
    background-color: #343a40;
    color: #f8f9fa;
    font-size: 0.9em;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/*
 * レスポンシブデザイン
 * 画面幅に応じてレイアウトを調整
 */

/* 992px以下（タブレット横向き、一部の小型PCなど）では2列表示 */
@media (max-width: 992px) { 
    header h1 {
        font-size: 2.5em;
    }
    header p {
        font-size: 1.1em;
    }
    .section-title {
        font-size: 2.2em;
    }
    .section-description {
        font-size: 1em;
        margin-bottom: 40px;
    }
    .campaign-grid {
        grid-template-columns: repeat(2, 1fr); /* 2列表示 */
        gap: 25px; /* 余白を調整 */
    }
    .campaign-item img {
        height: 180px; /* 画像の高さを調整 */
    }
    .campaign-info {
        padding: 20px;
    }
    .campaign-info h2 {
        font-size: 1.4em;
    }
    .campaign-description {
        font-size: 0.9em;
        height: 50px; /* 説明文の高さ調整 */
        -webkit-line-clamp: 2; /* 表示行数を2行に */
    }
    .detail-button {
        padding: 12px 15px;
        font-size: 1em;
    }
    .button-primary {
        padding: 15px 30px;
        font-size: 1.1em;
    }
}

/* 576px以下（スマートフォン全般）でも2列表示を維持 */
@media (max-width: 576px) { 
    header {
        padding: 40px 15px;
    }
    header h1 {
        font-size: 2em;
    }
    header p {
        font-size: 0.95em;
    }
    .section-title {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    .section-description {
        font-size: 0.9em;
        margin-bottom: 30px;
    }
    main {
        padding: 0 15px; /* 左右の余白をさらに狭める */
    }
    .campaign-grid {
        grid-template-columns: repeat(2, 1fr); /* 2列表示を維持 */
        gap: 15px; /* 余白をさらに狭める */
    }
    .campaign-item img {
        height: 140px; /* 画像の高さを調整 */
    }
    .campaign-info {
        padding: 15px;
    }
    .campaign-info h2 {
        font-size: 1.1em;
        margin-bottom: 8px;
    }
    .campaign-description {
        font-size: 0.8em;
        height: 40px; /* 説明文の高さ調整 */
        -webkit-line-clamp: 2; /* 表示行数を2行に */
        margin-bottom: 12px;
    }
    .campaign-status {
        padding: 4px 8px;
        font-size: 0.7em;
        margin-bottom: 8px;
    }
    .campaign-period {
        font-size: 0.75em;
        margin-bottom: 15px;
    }
    .detail-button {
        padding: 10px 10px;
        font-size: 0.9em;
    }
    .button-primary {
        padding: 12px 25px;
        font-size: 1em;
    }

	.campaign-banner {
  max-width: 960px; /* 最大幅は960pxに保ちつつ、それ以下なら可変 */
  width: 100%;      /* 親要素の幅いっぱいに広げる */
  margin: 0 auto;
  position: relative;
}

.campaign-banner__img {
  max-width: 100%; /* 親要素の幅に合わせて最大幅を100%にする */
  height: auto;    /* アスペクト比を保つために高さを自動調整 */
  display: block;
}

.campaign-banner__text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;      /* 親要素の幅いっぱいに広げる */
  height: 100%;     /* 親要素の高さに合わせる */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 40px;
  box-sizing: border-box;
  color: #fff;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  /* font-sizeはメディアクエリで調整 */
}

.campaign-banner__title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.campaign-banner__text-inner {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 10px;
}
	
	/* スマートフォン向けスタイル */
@media (max-width: 767px) {
  .campaign-banner__text {
    padding: 0 20px; /* スマートフォンでは左右のpaddingを小さくする */
  }
  .campaign-banner__title {
    font-size: 24px; /* スマートフォンではフォントサイズを小さくする */
  }
  .campaign-banner__text-inner {
    font-size: 18px; /* スマートフォンではフォントサイズを小さくする */
  }
}

/* 375px以下（iPhone SEなどの特に狭いスマホ）で1列表示にする場合の例 */
/* 必要であればこのメディアクエリを有効にしてください */
/*
@media (max-width: 375px) {
    .campaign-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .campaign-item img {
        height: 180px;
    }
    .campaign-info h2 {
        font-size: 1.5em;
    }
    .campaign-description {
        font-size: 0.9em;
        height: 60px;
        -webkit-line-clamp: 3;
    }
    .detail-button {
        padding: 14px 15px;
        font-size: 1.05em;
    }
}
*/
