/*
Theme Name: HKTV News
Theme URI: https://www.hktvnews.com
Author: HKTV News Team
Author URI: https://www.hktvnews.com
Description: 专业中文新闻网站WordPress主题，适合香港及华语新闻媒体使用。响应式设计，支持多分类展示、头条轮播、侧边栏小工具等功能。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hktvnews
Tags: news, chinese, responsive, two-columns, custom-menu, featured-images, post-formats, sticky-post, threaded-comments, translation-ready
*/

/* ===========================
   CSS Variables
=========================== */
:root {
    --primary-color: #c0392b;
    --primary-dark: #922b21;
    --primary-light: #e74c3c;
    --secondary-color: #2c3e50;
    --accent-color: #f39c12;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --bg-white: #ffffff;
    --bg-light: #f5f5f5;
    --bg-gray: #eeeeee;
    --border-color: #dddddd;
    --border-light: #eeeeee;
    --font-cn: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', '微软雅黑', 'Hiragino Sans GB', sans-serif;
    --font-size-base: 15px;
    --line-height-base: 1.8;
    --container-width: 1200px;
    --sidebar-width: 300px;
    --transition: all 0.25s ease;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --radius: 4px;
}

/* ===========================
   Reset & Base
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--font-size-base); scroll-behavior: smooth; }
body {
    font-family: var(--font-cn);
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-color); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-cn); }
input, textarea, select { font-family: var(--font-cn); }

/* ===========================
   Layout
=========================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}
.site-inner {
    display: flex;
    gap: 28px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 24px 20px;
}
.content-area { flex: 1; min-width: 0; }
.widget-area {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

/* ===========================
   Top Bar
=========================== */
.top-bar {
    background: var(--secondary-color);
    color: #fff;
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 2px solid var(--primary-color);
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-date { opacity: 0.75; letter-spacing: 0.5px; }
.top-bar-links a {
    color: rgba(255,255,255,0.75);
    margin-left: 16px;
    font-size: 11px;
}
.top-bar-links a:hover { color: #fff; }
.breaking-news {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    flex: 1;
    margin: 0 20px;
}
.breaking-label {
    background: var(--primary-color);
    color: #fff;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 2px;
    letter-spacing: 1px;
}
.breaking-ticker {
    overflow: hidden;
    white-space: nowrap;
}
.breaking-ticker a {
    color: rgba(255,255,255,0.85);
    animation: ticker 20s linear infinite;
    display: inline-block;
}
.breaking-ticker a:hover { color: #fff; }
@keyframes ticker {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ===========================
   Header
=========================== */
.site-header {
    background: var(--bg-white);
    border-bottom: 3px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-logo img { height: 50px; width: auto; }
.site-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    line-height: 1;
}
.site-title a { color: inherit; }
.site-title a:hover { color: var(--primary-dark); }
.site-description {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
    letter-spacing: 0.5px;
}
.header-search { display: flex; align-items: center; }
.header-search form {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}
.header-search input[type="search"] {
    padding: 7px 16px;
    border: none;
    outline: none;
    font-size: 13px;
    width: 200px;
    background: var(--bg-light);
}
.header-search button {
    background: var(--primary-color);
    color: #fff;
    padding: 7px 14px;
    font-size: 14px;
    transition: var(--transition);
}
.header-search button:hover { background: var(--primary-dark); }

/* ===========================
   Navigation
=========================== */
.main-navigation {
    background: var(--primary-color);
}
.main-navigation .container { position: relative; }
.nav-menu {
    display: flex;
    align-items: stretch;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    color: rgba(255,255,255,0.92);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: var(--transition);
    white-space: nowrap;
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-parent > a {
    background: rgba(0,0,0,0.2);
    color: #fff;
}
.nav-menu > li > a::after {
    content: '';
    display: block;
    height: 2px;
    background: #fff;
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    transform: scaleX(0);
    transition: var(--transition);
}
.nav-menu > li > a:hover::after { transform: scaleX(1); }
/* Dropdown */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    min-width: 180px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
    z-index: 999;
    border-top: 2px solid var(--primary-color);
}
.nav-menu > li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.sub-menu li a {
    display: block;
    padding: 9px 16px;
    color: var(--text-primary);
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
}
.sub-menu li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: 22px;
}
/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: transparent;
    color: #fff;
    font-size: 22px;
    padding: 10px;
}

/* ===========================
   Hero / Featured Slider
=========================== */
.featured-slider {
    background: #111;
    position: relative;
    overflow: hidden;
}
.slider-wrapper { position: relative; }
.slide {
    display: none;
    position: relative;
}
.slide.active { display: block; }
.slide-image {
    width: 100%;
    height: 460px;
    object-fit: cover;
    opacity: 0.7;
}
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 60px 40px 32px;
    color: #fff;
}
.slide-category {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 2px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.slide-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.slide-title a { color: #fff; }
.slide-title a:hover { color: rgba(255,255,255,0.85); }
.slide-meta { font-size: 12px; opacity: 0.75; }
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 16px;
    pointer-events: none;
}
.slider-btn {
    pointer-events: all;
    background: rgba(0,0,0,0.4);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}
.slider-btn:hover { background: var(--primary-color); }
.slider-dots {
    position: absolute;
    bottom: 14px;
    right: 20px;
    display: flex;
    gap: 6px;
}
.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}
.slider-dot.active { background: #fff; transform: scale(1.3); }

/* ===========================
   Section Headers
=========================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}
.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-color);
}
.section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}
.section-title span { color: var(--primary-color); }
.section-more {
    font-size: 12px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: 2px;
    transition: var(--transition);
}
.section-more:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ===========================
   Post Cards
=========================== */
.post-grid {
    display: grid;
    gap: 20px;
}
.post-grid-4 { grid-template-columns: repeat(4, 1fr); }
.post-grid-3 { grid-template-columns: repeat(3, 1fr); }
.post-grid-2 { grid-template-columns: repeat(2, 1fr); }

.post-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.post-card-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg-gray);
}
.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.post-card:hover .post-card-thumbnail img { transform: scale(1.04); }
.post-card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 1;
}
.post-card-body { padding: 14px 16px 16px; }
.post-card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-title a { color: var(--text-primary); }
.post-card-title a:hover { color: var(--primary-color); }
.post-card-excerpt {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}
.post-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
}
.post-card-meta .meta-item { display: flex; align-items: center; gap: 4px; }

/* Large featured card */
.post-card-large .post-card-thumbnail { aspect-ratio: 16/9; }
.post-card-large .post-card-title { font-size: 17px; -webkit-line-clamp: 3; }
.post-card-large .post-card-excerpt { -webkit-line-clamp: 3; }

/* Horizontal list card */
.post-list-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}
.post-list-item:last-child { border-bottom: none; }
.post-list-thumb {
    width: 100px;
    height: 68px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
    background: var(--bg-gray);
}
.post-list-body { flex: 1; min-width: 0; }
.post-list-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-list-title a { color: var(--text-primary); }
.post-list-title a:hover { color: var(--primary-color); }
.post-list-meta { font-size: 11px; color: var(--text-muted); }

/* Numbered list */
.post-ranked-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}
.post-ranked-item:last-child { border-bottom: none; }
.rank-number {
    font-size: 20px;
    font-weight: 900;
    color: var(--border-color);
    line-height: 1;
    min-width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.rank-number.top3 { color: var(--primary-color); }
.rank-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rank-title a { color: var(--text-primary); }
.rank-title a:hover { color: var(--primary-color); }

/* ===========================
   Home Sections
=========================== */
.home-section { margin-bottom: 32px; }

/* Top stories: 1 large + 4 smaller */
.top-stories-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    align-items: stretch;
}
.top-stories-grid .post-card-large {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.top-stories-grid .post-card-large:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.top-stories-grid .post-card-large .post-card-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg-gray);
}
.top-stories-grid .post-card-large .post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.top-stories-grid .post-card-large:hover .post-card-thumbnail img {
    transform: scale(1.05);
}
.top-stories-grid .post-card-large .post-card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 2px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 1;
}
.top-stories-grid .post-card-large .post-card-body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.top-stories-grid .post-card-large .post-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.top-stories-grid .post-card-large .post-card-title a {
    color: var(--text-primary);
}
.top-stories-grid .post-card-large .post-card-title a:hover {
    color: var(--primary-color);
}
.top-stories-grid .post-card-large .post-card-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    flex: 1;
}
.top-stories-grid .post-card-large .post-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: auto;
}
.top-stories-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.top-stories-secondary .post-list-item {
    padding: 10px;
    border-bottom: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-white);
    transition: var(--transition);
}
.top-stories-secondary .post-list-item:hover {
    background: var(--bg-light);
}
.top-stories-secondary .post-list-item:nth-child(2n) {
    border-right: none;
}
.top-stories-secondary .post-list-item:nth-child(3),
.top-stories-secondary .post-list-item:nth-child(4) {
    border-bottom: none;
}
.top-stories-secondary .post-list-thumb-link {
    display: block;
    width: 100%;
}
.top-stories-secondary .post-list-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--bg-gray);
}
.top-stories-secondary .post-list-body {
    display: flex;
    flex-direction: column;
}
.top-stories-secondary .post-list-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.top-stories-secondary .post-list-title a {
    color: var(--text-primary);
}
.top-stories-secondary .post-list-title a:hover {
    color: var(--primary-color);
}
.top-stories-secondary .post-list-excerpt {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}
.top-stories-secondary .post-list-meta {
    font-size: 9px;
    color: var(--text-muted);
}

/* ===========================
   Category Badge
=========================== */
.cat-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 2px;
    background: var(--primary-color);
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}
.cat-badge.finance   { background: #27ae60; }
.cat-badge.tech      { background: #2980b9; }
.cat-badge.sports    { background: #8e44ad; }
.cat-badge.culture   { background: #e67e22; }
.cat-badge.intl      { background: #16a085; }
.cat-badge.local     { background: var(--primary-color); }

/* ===========================
   Single Post
=========================== */
.single-post-header { margin-bottom: 24px; }
.single-post-cats { margin-bottom: 10px; }
.single-post-title {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 14px;
}
.single-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    padding: 12px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 22px;
}
.single-post-meta .meta-item { display: flex; align-items: center; gap: 5px; }
.single-post-meta .meta-item a { color: var(--text-muted); }
.single-post-meta .meta-item a:hover { color: var(--primary-color); }
.post-featured-image {
    margin-bottom: 24px;
    border-radius: var(--radius);
    overflow: hidden;
}
.post-featured-image img { width: 100%; border-radius: var(--radius); }
.post-featured-image figcaption {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
    background: var(--bg-light);
}
.entry-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-primary);
}
.entry-content p { margin-bottom: 1.4em; }
.entry-content h2, .entry-content h3 {
    font-weight: 800;
    margin: 1.8em 0 0.8em;
    color: var(--text-primary);
}
.entry-content h2 {
    font-size: 20px;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
}
.entry-content h3 { font-size: 17px; }
.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    background: #fff8f8;
    padding: 16px 20px;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--text-secondary);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.entry-content ul, .entry-content ol {
    margin: 1em 0 1.4em 1.5em;
}
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content img { border-radius: var(--radius); margin: 1em 0; }
.entry-content a { color: var(--primary-color); text-decoration: underline; text-underline-offset: 2px; }
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 14px;
}
.entry-content table th {
    background: var(--secondary-color);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
}
.entry-content table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border-light);
}
.entry-content table tr:nth-child(even) td { background: var(--bg-light); }

/* Post Tags */
.post-tags {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.post-tags-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.tag-link {
    font-size: 12px;
    padding: 3px 10px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-secondary);
    transition: var(--transition);
}
.tag-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Share Buttons */
.post-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius);
}
.share-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}
.share-btn:hover { opacity: 0.85; color: #fff; }
.share-btn.fb  { background: #1877f2; }
.share-btn.tw  { background: #1da1f2; }
.share-btn.wa  { background: #25d366; }
.share-btn.copy { background: var(--secondary-color); }

/* Related Posts */
.related-posts { margin-top: 36px; }
.related-posts .section-header { margin-bottom: 16px; }

/* Author Box */
.author-box {
    display: flex;
    gap: 18px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 32px;
    align-items: flex-start;
}
.author-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}
.author-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 5px;
}
.author-bio {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===========================
   Comments
=========================== */
.comments-area {
    margin-top: 40px;
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.comments-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}
.comments-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}
.comment-list .comment { padding: 16px 0; border-bottom: 1px solid var(--border-light); }
.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-author-avatar img { width: 36px; height: 36px; border-radius: 50%; }
.comment-author-name { font-size: 13px; font-weight: 700; }
.comment-date { font-size: 11px; color: var(--text-muted); }
.comment-content { font-size: 14px; line-height: 1.7; padding-left: 46px; }
.comment-form { margin-top: 28px; }
.comment-form-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    margin-bottom: 12px;
    transition: var(--transition);
    background: var(--bg-light);
}
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
    background: #fff;
}
.comment-form textarea { height: 120px; resize: vertical; }
.comment-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-submit {
    background: var(--primary-color);
    color: #fff;
    padding: 11px 28px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn-submit:hover { background: var(--primary-dark); }

/* ===========================
   Archive / Category Page
=========================== */
.archive-header {
    background: var(--bg-white);
    padding: 20px 24px;
    border-radius: var(--radius);
    border-left: 5px solid var(--primary-color);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.archive-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-primary);
}
.archive-description {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 5px;
}
.archive-list { display: flex; flex-direction: column; gap: 0; }
.archive-post-item {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
}
.archive-post-item:last-child { border-bottom: none; }

/* ===========================
   Pagination
=========================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-white);
    transition: var(--transition);
}
.page-numbers:hover,
.page-numbers.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* ===========================
   Sidebar / Widgets
=========================== */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.widget {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 18px 18px 16px;
    box-shadow: var(--shadow-sm);
}
.widget-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 14px;
    position: relative;
}
.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}
.widget ul li {
    padding: 7px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text-primary); }
.widget ul li a:hover { color: var(--primary-color); }
.widget-categories li {
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}
.widget-categories li:last-child {
    border-bottom: none;
}
/* Ad Widget */
.widget-ad {
    padding: 0;
    overflow: hidden;
}
.widget-ad img { width: 100%; }
/* Tags Widget */
.widget-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.widget-tag-link {
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-secondary);
    transition: var(--transition);
}
.widget-tag-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* ===========================
   Search Page
=========================== */
.search-header {
    background: var(--bg-white);
    padding: 20px 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.search-header h1 { font-size: 20px; font-weight: 800; }
.search-header .search-term { color: var(--primary-color); }

/* ===========================
   404 Page
=========================== */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}
.error-404 .error-code {
    font-size: 120px;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
    opacity: 0.15;
}
.error-404 h2 { font-size: 26px; margin-bottom: 14px; }
.error-404 p { color: var(--text-muted); margin-bottom: 24px; }
.btn-back-home {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    transition: var(--transition);
}
.btn-back-home:hover { background: var(--primary-dark); color: #fff; }

/* ===========================
   Footer
=========================== */
.site-footer {
    background: var(--secondary-color);
    color: rgba(255,255,255,0.8);
    margin-top: 40px;
}
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 36px;
    padding: 40px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-about .footer-logo {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 12px;
}
.footer-about p {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255,255,255,0.6);
    margin-bottom: 14px;
}
.footer-social { display: flex; gap: 10px; }
.social-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}
.social-btn:hover { background: var(--primary-color); color: #fff; }
.footer-col-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-links li { padding: 5px 0; }
.footer-links li a {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    transition: var(--transition);
}
.footer-links li a::before { content: '› '; color: var(--primary-color); }
.footer-links li a:hover { color: #fff; padding-left: 4px; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    flex-wrap: wrap;
    gap: 10px;
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: #fff; }
.footer-bottom-links { display: flex; gap: 16px; }

/* ===========================
   Back to Top
=========================== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 42px;
    height: 42px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 9999;
    border: none;
    box-shadow: var(--shadow-md);
}
#back-to-top.visible { opacity: 1; visibility: visible; }
#back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ===========================
   Loading Skeleton
=========================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.4s infinite;
    border-radius: var(--radius);
}
@keyframes skeleton-loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===========================
   Image Watermark (图片水印)
=========================== */
.entry-content img.hktvnews-watermarked,
.post-content img.hktvnews-watermarked {
    position: relative;
    display: inline-block;
}
.entry-content img.hktvnews-watermarked::before,
.post-content img.hktvnews-watermarked::before {
    content: 'HKTVnews';
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    pointer-events: none;
    opacity: 0.85;
}

/* ===========================
   Utilities
=========================== */
.text-red   { color: var(--primary-color); }
.text-muted { color: var(--text-muted); }
.text-sm    { font-size: 12px; }
.fw-bold    { font-weight: 700; }
.mt-0 { margin-top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ===========================
   Responsive
=========================== */
@media (max-width: 1024px) {
    .footer-top { grid-template-columns: 1fr 1fr; }
    .post-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .widget-area { width: 260px; }
}
@media (max-width: 768px) {
    .site-inner { flex-direction: column; padding: 16px; }
    .widget-area { width: 100%; }
    .header-inner { flex-wrap: wrap; gap: 10px; }
    .header-search { width: 100%; }
    .header-search input[type="search"] { width: 100%; flex: 1; }
    .menu-toggle { display: flex; }
    .nav-menu {
        display: none;
        flex-direction: column;
        background: var(--primary-dark);
    }
    .nav-menu.open { display: flex; }
    .nav-menu > li > a { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0,0,0,0.2);
        border-top: none;
    }
    .sub-menu li a { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.1); }
    .slide-image { height: 220px; }
    .slide-title { font-size: 17px; }
    .slide-caption { padding: 30px 16px 18px; }
    .top-stories-grid { grid-template-columns: 1fr; }
    .top-stories-secondary { grid-template-columns: 1fr 1fr; }
    .top-stories-secondary .post-list-item:nth-child(2n) { border-right: none; }
    .top-stories-secondary .post-list-item:nth-child(3) { border-bottom: none; }
    .top-stories-secondary .post-list-item:nth-child(4) { border-bottom: none; }
    .post-grid-3, .post-grid-2 { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; gap: 24px; padding: 28px 0; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .single-post-title { font-size: 22px; }
    .comment-form-row { grid-template-columns: 1fr; }
    .top-bar-links { display: none; }
    .breaking-news { margin: 0; }
    #back-to-top { bottom: 20px; right: 16px; }
}
@media (max-width: 480px) {
    .top-stories-secondary { grid-template-columns: 1fr; }
    .top-stories-secondary .post-list-item { border-right: none; }
    .top-stories-secondary .post-list-item:nth-child(3) { border-bottom: 1px solid var(--border-light); }
    .top-stories-secondary .post-list-item:last-child { border-bottom: none; }
    .post-grid-4 { grid-template-columns: 1fr; }
    .slide-image { height: 180px; }
    .site-title { font-size: 20px; }
    .post-share { flex-wrap: wrap; }
}
