/* 首頁專屬樣式（依建置板 index.html，補電子報與熱門排行區塊） */

/* 本日焦點新聞 */
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.hero-article {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-link {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 380px;
    text-decoration: none;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-text {
    position: relative;
    z-index: 2;
    padding: 30px 25px 25px 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
    color: #ffffff;
}

.hero-text h1 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    line-height: 1.3;
    color: #ffffff;
}

.hero-text p {
    color: #e0e0e0;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-text .category-tag {
    background: var(--primary-red);
    color: white;
    border: none;
}

.sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
}

.side-article {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary-blue);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 15px;
    text-decoration: none;
    color: var(--text-main);
}

.side-article.accent {
    border-left-color: var(--primary-red);
}

.side-image {
    width: 100px;
    height: 80px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.side-text {
    padding: 0;
    flex-grow: 1;
}

.side-text .category-tag {
    margin-bottom: 5px;
    font-size: 0.75rem;
    padding: 2px 6px;
}

.side-text h3 {
    font-size: 1.05rem;
    margin-bottom: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 深度產業報導 */
.depth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.depth-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: var(--text-main);
    display: block;
}

.depth-card:hover {
    transform: translateY(-5px);
}

.depth-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
}

.depth-content {
    padding: 20px;
}

.depth-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.depth-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 新聞動態區與熱門排行 */
.home-two-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.news-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border-top: 3px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: border-color 0.3s ease;
    text-decoration: none;
    color: var(--text-main);
    display: block;
}

.news-item:hover {
    border-top-color: var(--primary-red);
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
    font-weight: bold;
}

.news-item h4 {
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.ranking-list {
    list-style: none;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    padding: 10px 0;
}

.ranking-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-number {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-red);
    min-width: 24px;
    line-height: 1.4;
}

.ranking-item a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.5;
}

.ranking-item a:hover {
    color: var(--primary-blue);
}

/* 電子報訂閱 */
.newsletter-section {
    background: var(--primary-blue);
    color: #ffffff;
    padding: 45px 0;
    margin-top: 50px;
}

.newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.newsletter-text h2 {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.newsletter-text p {
    color: #d5e0f2;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
    border: none;
    border-radius: 20px;
    padding: 10px 18px;
    min-width: 260px;
    font-size: 0.95rem;
    outline: none;
}

.newsletter-done {
    width: 100%;
    font-weight: 700;
    color: #ffe08a;
}

/* 下半部：多媒體區塊 */
.section-lower {
    background-color: var(--dark-section);
    color: #ffffff;
    padding: 60px 0;
    margin-top: 0;
}

.lower-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 35px;
    border-left: 5px solid var(--primary-red);
    padding-left: 10px;
}

.lower-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
}

.lower-title-wrapper .more-link {
    color: #aaaaaa;
}

.lower-title-wrapper .more-link:hover {
    color: #ffffff;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.media-card {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    text-decoration: none;
    display: block;
}

.media-card:hover {
    transform: translateY(-5px);
}

.media-thumb {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 55px;
    background: rgba(225, 27, 35, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.media-info {
    padding: 22px;
}

.media-info h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.media-info p {
    color: #aaaaaa;
    font-size: 0.9rem;
    line-height: 1.5;
}

.badge-video, .badge-podcast {
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    margin-bottom: 10px;
    display: inline-block;
    font-weight: bold;
}
.badge-video { background: var(--primary-red); }
.badge-podcast { background: #28a745; }

@media (max-width: 900px) {
    .main-grid { grid-template-columns: 1fr; }
    .hero-article, .hero-link { min-height: 350px; }
    .home-two-col { grid-template-columns: 1fr; }
    .newsletter-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
    .hero-text h1 { font-size: 1.5rem; }
    .newsletter-form input[type="email"] { min-width: 0; width: 100%; }
}
