/* article_list.css — 文章列表 專屬樣式 */

/* 覆寫 page-header padding（文章列表較窄） */
.page-header {
    padding: 20px 0 10px 0;
    margin-bottom: 0;
}

/* Hero carousel - 滿版設計 */
.hero-carousel {
    margin-bottom: 0;
}

.carousel-item {
    height: auto;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin: auto 15px;
    height: 60px;
    top: 10%;
    transform: translateY(-50%);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: var(--primary-color);
}

.carousel-indicators {
    margin-bottom: 15px;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 4px;
}

.carousel-indicators .active {
    background-color: var(--primary-color);
}

/* Article cards */
.article-card {
    border-radius: 12px;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.article-image {
    position: relative;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 80px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #999;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 15px;
    margin-top: auto;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--primary-dark);
}

/* Section styling */
.articles-section {
    padding: 20px 0;
}

/* 覆寫 section-title 置中對齊 */
.section-title {
    text-align: center;
}

.section-title::after {
    margin: 15px auto 0;
    width: 60px;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 20px 0;
    }

    .carousel-item {
        height: 300px;
    }

    .article-title {
        font-size: 1.1rem;
        min-height: 50px;
    }

    .article-content {
        padding: 15px;
    }

    .articles-section {
        margin-top: 30px;
    }

    footer {
        margin-bottom: 60px;
    }
}

@media (max-width: 576px) {
    .article-card {
        margin-bottom: 20px;
    }

    .carousel-item {
        height: 250px;
    }
}
