@charset "utf-8";

/* ヒーロー/////////////////////////// */

.topics-hero {
 background-image: url("../images/ショーケース3.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  height: 60vh; 
  display: flex;
  align-items: center;
  text-align: center;

  position: relative;
  color: #fff;
}

/* 黒のオーバーレイ */
.topics-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

/* 文字を前面に */
.topics-hero .container {
  position: relative;
  z-index: 2;
}

/* タイトル */
.topics-hero .section-title {
font-size: 32px;
font-weight: bold;
letter-spacing: 2px;
}

/* サブタイトル */
.topics-hero .section-subtitle {
font-size: 16px;
margin-top: 10px;
opacity: 0.9;
}

/* 一覧 */
.topics-list {
display: flex;
flex-direction: column;
gap: 30px;
margin-top: 40px;
}

/* カード */
.topics-card {
border: 1px solid #eee;
border-radius: 10px;
overflow: hidden;
background: #fff;
cursor: pointer;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.topics-card:hover {
transform: translateY(-3px);
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.topics-card:focus {
  outline: 2px solid #333;
}

/* 画像サイズ統一 */
.topics-image img {
width: 100%;
height: 220px;
object-fit: contain;
background: #fff;
display: block;
padding: 10px;
}

/* 日付 */
.topics-date {
display: block;
font-size: 13px;
color: #888;
margin: 12px 15px 0;
text-align: center;
}

/* タイトル */
.topics-title {
font-size: 16px;
font-weight: bold;
margin: 6px 15px;
text-align: center;
}

/* 本文 */
.topics-text {
font-size: 14px;
color: #555;
line-height: 1.7;
padding: 0 15px 20px;
text-align: center;
}

/* =========================
モーダル
========================= */

body.modal-open {
overflow: hidden;
}

.modal {
position: fixed;
inset: 0;

background: rgba(0,0,0,.6);

display: flex;
justify-content: center;
align-items: center;

z-index: 9999;
padding: 20px;

opacity: 0;
visibility: hidden;
pointer-events: none;

transition: opacity .3s ease,
            visibility .3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
position: relative;

width: min(90%, 800px);
max-height: 90vh;

overflow-y: auto;
-webkit-overflow-scrolling: touch;

background: #fff;
border-radius: 12px;
padding: 40px 30px;

transform: translateY(20px);
transition: .3s;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-content img {
width: 100%;
height: auto;
margin: 20px 0;
}

.modal-date {
display: block;
color: #888;
font-size: 14px;
margin-bottom: 10px;
}

.modal-content h2 {
font-size: 24px;
margin-bottom: 20px;
}

.modal-content p {
line-height: 2;
color: #555;
margin-bottom: 15px;
}

.modal-close {
position: absolute;
top: 15px;
right: 20px;

border: none;
background: none;

font-size: 32px;
cursor: pointer;
color: #666;
}

/* スマホ */
@media (max-width: 768px) {

.topics-hero .section-title {
font-size: 26px;
}

.topics-image img {
height: 200px;
}

.modal-content {
padding: 30px 20px;
}

.modal-content h2 {
font-size: 20px;
}
}
