/*
======================================
    News Details Page Styles
======================================
*/

.news-details-page {
    padding: 60px 0;
    background: #ffffff;
}

.news-details-inner {
    width: 1320px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0; /* 移除左右內邊距，確保 1320px 容器內能放下 3 個 420px 卡片 (3*420 + 2*30 = 1320) */
    box-sizing: border-box;
}

/* Header, Banner, Content, Footer 內部添加 padding 以保持文字不貼邊 */
.news-post-header,
.news-post-banner,
.news-post-content,
.news-post-footer,
.news-comments-section {
    padding-left: 10px;
    padding-right: 10px;
}

/* Header */
.news-post-header {
    margin-bottom: 32px;
}

.news-post-title {
    font-size: 36px;
    font-weight: 900;
    color: #101828;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.news-post-meta-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.news-post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #667085;
    font-size: 14px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-post-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: opacity 0.3s;
    text-decoration: none;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.link {
    background: #eaecf0;
    color: #667085;
}

.share-btn:hover {
    opacity: 0.8;
}

/* Banner Image */
.news-post-banner {
    width: 1320px;
    max-width: 100%;
    height: 433px;
    margin-bottom: 40px;
    border-radius: 35px;
    overflow: hidden;
    background: #f5f5f5;
}

.news-post-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Content */
.news-post-content {
    color: #344054;
    line-height: 1.8;
    font-size: 16px;
}

.content-block {
    margin-bottom: 40px;
}

.block-title {
    font-size: 24px;
    font-weight: 800;
    color: #101828;
    margin: 0 0 16px 0;
}

.news-post-content p {
    margin: 0 0 16px 0;
}

/* Info Grid Box (最佳賞櫻時期) */
.info-grid-box {
    background: #f9fafb;
    border-radius: 12px;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.info-grid-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-grid-item strong {
    color: #101828;
    font-size: 16px;
}

.info-grid-item span {
    color: #667085;
    font-size: 14px;
}

/* Region Block (推薦賞櫻景點) */
.region-block {
    margin-bottom: 24px;
}

.region-block h3 {
    font-size: 18px;
    font-weight: 700;
    color: #101828;
    margin: 0 0 12px 0;
}

.news-post-content ul {
    margin: 0;
    padding-left: 20px;
    list-style: none; /* 使用自定義小圓點 */
}

.news-post-content li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.news-post-content li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background-color: #155dfc;
    border-radius: 50%;
}

/* Tips Box (賞櫻旅遊小貼士) */
.tips-box {
    background: #eff6ff;
    border-radius: 0 8px 8px 0; /* 左側設為 0，使邊框變直 */
    padding: 24px;
    border-left: 2px solid #155dfc;
}

.tips-box ul {
    list-style: none;
    padding: 0;
}

.tips-box li {
    position: relative;
    padding-left: 0;
    margin-bottom: 12px;
}

.tips-box li::before {
    display: none; /* 移除小圓點 */
}

.tips-box li:last-child {
    margin-bottom: 0;
}

/* Footer Tags */
.news-post-footer {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #eaecf0;
}

.post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-label {
    font-size: 14px;
    color: #667085;
}

.tag-item {
    background: #f2f4f7;
    color: #0052b4; /* 標籤字體顏色改為 #0052b4 */
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s;
}

.tag-item:hover {
    background: #eaecf0;
    color: #101828;
}

/* 留言討論區塊樣式 */
.news-comments-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eaecf0;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comments-title svg {
    color: #667085;
}

.comments-title h2 {
    font-size: 24px;
    font-weight: 700;
    color: #101828;
    margin: 0;
}

.sort-dropdown {
    position: relative;
}

.sort-btn {
    background: #ffffff;
    border: 1px solid #eaecf0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: #344054;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.sort-btn:hover {
    background: #f9fafb;
}

.sort-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    list-style: none;
    padding: 8px 0;
    margin: 8px 0 0 0;
    min-width: 120px;
    display: none;
    z-index: 10;
}

.sort-dropdown:hover .sort-menu {
    display: none; /* 移除懸停顯示 */
}

.sort-dropdown.active .sort-menu {
    display: block; /* 點擊激活後顯示 */
}

.sort-menu li a {
    display: block;
    padding: 8px 16px;
    color: #344054;
    text-decoration: none;
    font-size: 14px;
}

.sort-menu li a:hover {
    background: #f2f4f7;
}

/* 登入提示框 */
.login-prompt-box {
    background: #f9fafb;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 40px;
}

.login-prompt-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.lock-icon {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667085;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.login-prompt-content span {
    font-size: 16px;
    color: #344054;
    font-weight: 500;
}

.login-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 10px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #1d4ed8;
}

/* 留言輸入框 (已登錄狀態) */
.comment-input-box {
    margin-bottom: 40px;
}

.comment-input-container {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.comment-input-wrapper {
    flex: 1;
    position: relative;
}

.comment-input-field {
    width: 100%;
    height: 48px;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 14px;
    color: #101828;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.comment-input-field:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.comment-input-field::placeholder {
    color: #667085;
}

.comment-char-count {
    font-size: 12px;
    color: #98a2b3;
    margin-top: 4px;
}

.comment-submit-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 0 24px;
    height: 48px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-submit-btn:hover {
    background: #1d4ed8;
}

/* 評論列表 */
.comments-list-wrap {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #eaecf0;
}

.comments-count-title {
    font-size: 20px;
    font-weight: 700;
    color: #101828;
    margin: 0 0 30px 0;
}

.comment-item {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: #f2f4f7;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.author-name {
    font-size: 16px;
    font-weight: 700;
    color: #101828;
}

.post-time {
    font-size: 14px;
    color: #667085;
}

.comment-text {
    font-size: 16px;
    line-height: 1.6;
    color: #344054;
    margin-bottom: 12px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    color: #667085;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: color 0.3s;
}

.action-btn:hover {
    color: #101828;
}

.action-btn svg {
    color: #98a2b3;
}

.action-btn:hover svg {
    color: #667085;
}

/* 查看更多按鈕 */
.load-more-comments {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eaecf0;
}

.view-more-btn {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s;
}

.view-more-btn:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* 熱門文章區塊樣式 (複用 news.php 樣式) */
.popular-posts-section {
    margin-top: 60px;
    padding-top: 60px;
}

.popular-posts-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    margin-bottom: 40px;
}

.news-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: flex-start;
}

.news-item-card {
    width: 420px;
    flex-shrink: 0;
    height: 500px;
    background: #ffffff;
    border-radius: 31px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.news-item-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.news-item-img {
    width: 420px;
    height: 241px;
    overflow: hidden;
    flex-shrink: 0;
}

.news-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-item-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-item-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-tags {
    display: flex;
    gap: 8px;
    margin-bottom: auto;
}

.news-item-tag {
    background: #f2f8ff;
    color: #01488c;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
}

.news-item-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #aaa;
    font-size: 12px;
}

.news-item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-item-readmore {
    color: #01488c;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.3s;
}

.news-item-readmore:hover {
    gap: 8px;
}

/* 熱門文章響應式 */
@media (max-width: 1400px) {
    .news-grid {
        gap: 20px;
    }
    .news-item-card {
        width: calc(33.333% - 14px);
        height: auto;
        min-height: 480px;
    }
    .news-item-img {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .news-item-card {
        width: calc(50% - 15px);
    }
}

@media (max-width: 640px) {
    .news-item-card {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 1320px) {
    .news-details-inner {
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    .comments-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }
    .comments-title h2 {
        font-size: 18px;
    }
    .comments-title svg {
        width: 20px;
        height: 20px;
    }
    .sort-dropdown {
        width: auto;
    }
    .sort-btn {
        width: auto;
        padding: 6px 12px;
        font-size: 13px;
    }
    .login-prompt-box {
        padding: 20px;
    }
    .comment-avatar {
        width: 40px;
        height: 40px;
    }
    .comment-input-container {
        flex-direction: column;
        gap: 12px;
    }
    .comment-submit-btn {
        width: 100%;
        height: 44px;
    }
    .comment-input-field {
        height: 44px;
    }
}
@media (max-width: 1200px) {
    .news-post-title {
        font-size: 30px;
    }
}

@media (max-width: 992px) {
    .news-details-page {
        padding: 40px 0;
    }
    .news-post-banner {
        height: 300px;
        border-radius: 20px;
    }
}

@media (max-width: 768px) {
    .news-post-title {
        font-size: 24px;
    }
    .info-grid-box {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .news-post-banner {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .news-details-inner {
        padding: 0 20px;
    }
    .news-post-title {
        font-size: 20px;
    }
    .news-post-meta {
        gap: 12px;
        font-size: 12px;
    }
}
