/* Hot Events Module */
.mod-hot-events {
    clear: both;
    margin-top: 20px;
    background: #fff;
    box-shadow: 0 0 14px 0 rgba(0,0,0,.08);
    border: 1px solid #fff;
    border-radius: 8px;
    margin-bottom: 25px;
}

/* Header styles inherited from .module .hd but explicitly ensured here just in case */
.mod-hot-events .hd {
    position: relative;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
    overflow: hidden;
}

.mod-hot-events .hd .title {
    position: relative;
    display: inline-block;
    padding-left: 5px;
    font-weight: bold;
    font-size: 16px;
    float: none; /* Ensure no float issues */
}

/* Blue vertical bar */
.mod-hot-events .hd .title:before {
    position: absolute;
    left: -10px;
    top: 50%;
    display: inline-block;
    width: 4px;
    height: 20px;
    content: "";
    margin: -10px 2px;
    vertical-align: middle;
    background: #2095f2;
    border-radius: 2px;
}

.mod-hot-events .bd {
    padding: 20px;
    overflow: hidden; /* Clear floats */
}

.mod-hot-events .bd ul {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.mod-hot-events .bd li {
    float: left;
    width: 50%;
    padding: 8px 10px;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border-bottom: 1px dashed #eee; /* Optional: adds separation like news list */
}

/* Remove border from last row if we wanted, but simple is fine */

.mod-hot-events .bd li a {
    color: #333;
    text-decoration: none;
    font-size: 14px; /* Match standard link size, maybe 16px was too big? keeping 14px for density */
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

.mod-hot-events .bd li a:hover {
    color: #2095f2;
    text-decoration: underline;
}

.mod-hot-events .bd li .date {
    display: none; /* Force hide date as per homepage look */
}

/* News Link Button in Header - Overriding .search styles */
.mod-head .bd .search {
    background: transparent !important; /* Override white background */
    width: auto !important; /* Allow width to fit content */
    border-radius: 0 !important;
    box-shadow: none !important;
}

.mod-head .bd .search .news-link {
    display: inline-block;
    height: 40px;
    line-height: 40px;
    padding: 0 30px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.mod-head .bd .search .news-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    color: #fff;
}

/* Friendship Links Module Fix */
.mod-link {
    height: auto !important;
    overflow: visible !important;
}

.mod-link .bd {
    height: auto !important;
    min-height: 42px;
    padding: 12px 20px 14px;
    overflow: visible !important;
    line-height: 2;
}

.mod-link .bd a {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
}

.mod-link .bd a:hover {
    color: #2095f2;
    text-decoration: underline;
}

/* ----------------------------------------------------------------
   News List Page Styles (news_list.php)
   ---------------------------------------------------------------- */
.news-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 14px 0 rgba(0,0,0,.08);
    margin-top: 5px; /* Reduced from 10px */
    margin-bottom: 5px; /* Reduced from 20px */
    padding-bottom: 20px;
    min-height: 600px; /* Ensure it doesn't look too short */
    clear: both; /* Ensure it clears floating elements above */
}

/* Fix for Homepage Layout Breakage */
/* Ensure the container inside wrapper clears floats properly */
.container:after, .inner:after, .bd:after, .hd:after {
    content: "";
    display: table;
    clear: both;
}

/* Fix extra spacing in list pages caused by container height */
.container {
    padding-bottom: 20px !important;
    height: auto !important; /* Ensure height is adaptive */
}

.news-container .hd {
    position: relative;
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
}

.news-container .hd h1 {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    padding-left: 10px;
    margin: 0;
    line-height: 1;
}

/* Blue vertical bar for title */
.news-container .hd h1:before {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    content: "";
    width: 4px;
    height: 18px;
    background: #2095f2;
    border-radius: 2px;
}

.news-list {
    padding: 20px;
}

.news-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list li {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    overflow: hidden;
    line-height: 24px;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list li a {
    float: left;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    max-width: 80%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.news-list li a:hover {
    color: #2095f2;
    text-decoration: underline;
}

.news-list li .date {
    float: right;
    font-size: 14px;
    color: #999;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.pagination a:hover {
    border-color: #2095f2;
    color: #2095f2;
}

.pagination .current {
    background: #2095f2;
    color: #fff;
    border-color: #2095f2;
}

.pagination .disabled {
    color: #ccc;
    background: #f9f9f9;
    cursor: not-allowed;
    border-color: #eee;
}

.pagination .info {
    border: none;
    background: none;
    color: #999;
    margin-left: 10px;
}

/* ----------------------------------------------------------------
   Article Detail Page Styles (article_generator.php)
   ---------------------------------------------------------------- */
.article-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 14px 0 rgba(0,0,0,.08);
    margin-top: 20px;
    margin-bottom: 20px;
    padding-bottom: 40px;
    min-height: 600px;
}

.article-container .hd {
    padding: 30px 40px 20px 40px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.article-container .hd h1 {
    font-size: 24px;
    color: #333;
    font-weight: bold;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.article-container .article-meta {
    font-size: 14px;
    color: #999;
}

.article-container .article-meta .meta-item {
    margin: 0 10px;
    display: inline-block;
}

.article-content {
    padding: 30px 40px;
    line-height: 1.8;
    font-size: 16px;
    color: #444;
}

.article-content p {
    margin-bottom: 20px;
    text-align: justify;
    text-indent: 2em; /* Standard Chinese paragraph indentation */
}

.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-container .ft {
    margin-top: 40px;
    text-align: center;
    padding-bottom: 20px;
}

.back-btn {
    display: inline-block;
    padding: 10px 30px;
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: #2095f2;
    color: #fff;
    border-color: #2095f2;
}

div.inner[style*="transform: translateX"] {
    transform: none !important;
    width: auto !important;
    margin: 0 !important;
}

div.inner[style*="width: 850px"],
div.inner[style*="width: 980px"],
div.inner[style*="width: 1000px"],
div.inner[style*="padding-left: 10px"],
div.container[style*="padding-bottom: 0"] {
    display: contents !important;
}

.container .inner .inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

div.inner > .module.mod-city,
div.inner > .module.mod-other,
div.inner > .module.mod-hot-events,
div.inner > .module.mod-link {
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.wrapper > .module.mod-hot-events {
    width: 960px;
    max-width: calc(100% - 24px);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
}

.article-container + .module.mod-hot-events,
.container + .module.mod-hot-events {
    margin-top: 24px;
}

.wrapper .module.mod-hot-events:last-of-type,
.wrapper .module.mod-link:last-of-type {
    margin-bottom: 0;
}

.wrapper .footer {
    position: relative !important;
    left: auto !important;
    bottom: auto !important;
    width: 100%;
    margin-top: 18px;
    padding-top: 0;
}

body.is-province-index .mod-link {
    display: none !important;
}

body.is-province-index .mod-hot-events {
    margin-top: 12px !important;
}

body.is-province-index .mod-hot-events .bd {
    overflow: visible;
}

body:has(.module.mod-list) .module.mod-link {
    display: none !important;
}

body:has(.module.mod-list) .module.mod-hot-events {
    margin-top: 10px !important;
}

body:has(.module.mod-list) .module.mod-hot-events .bd {
    overflow: visible;
}

body:has(.module.mod-list) .module.mod-list {
    margin-bottom: 10px;
}

.module.mod-list ~ .module.mod-link {
    display: none !important;
}

.module.mod-list ~ .module.mod-hot-events {
    margin-top: 10px !important;
}

.module.mod-list ~ .module.mod-hot-events .bd {
    overflow: visible;
}
