/* 1. 基本設定 */
h1 {
    text-align: center; /* PCはセンター */
}

.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #9995ef;
  color: #000;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.show { opacity: 1; visibility: visible; }

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.update-info {
    text-align: center; /* PCはセンター */
    font-size: 13px;
    color: #888;
    margin-bottom: 40px;
}

/* 2. グリッドレイアウト */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    align-items: start;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
        gap: 30px;
    }
}

/* 3. ニュースカード */
.news-card {
    background: #1a1a1a;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, height 0.2s ease;
}

.news-card.show {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 160, 233, 0.15);
}

/* 4. 画像エリア */
.img-container {
    width: 100%;
    height: auto;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.news-card:hover img {
    transform: scale(1.04);
}

/* 5. テキストコンテンツ */
.content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    border-top: 1.5px solid #333;
}

.date {
    font-size: 12px;
    color: #00a0e9;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-badge {
    background-color: #ff3b30;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 6. ボタン・状態テキスト */
.more-container {
    text-align: center;
    padding: 60px 0;
}

#load-more-btn {
    background-color: transparent;
    color: #00a0e9;
    border: 2px solid #00a0e9;
    padding: 14px 50px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: none;
}

#load-more-btn:hover {
    background-color: #00a0e9;
    color: #fff;
}

.loading-text {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 0;
    color: #666;
    font-size: 18px;
}

/* モバイル最適化 */
@media (max-width: 480px) {
    h1 { 
        text-align: left;
    }
    .update-info { 
        text-align: left; 
        padding-left: 15px;
    }
    .container { padding: 0px 10px; }
    .content { padding: 12px; }
    .title { font-size: 14px; line-height: 1.5; -webkit-line-clamp: 3; line-clamp: 3; }
    .news-grid { gap: 10px; }
}